You are on page 1of 370

Nexus® Technical Reference

Guide
© 2009 Halliburton

December 2009
© 2009 Halliburton
All Rights Reserved

This publication has been provided pursuant to an agreement containing restrictions on its use. The publication is also protected by
Federal copyright law. No part of this publication may be copied or distributed, transmitted, transcribed, stored in a retrieval system,
or translated into any human or computer language, in any form or by any means, electronic, magnetic, manual, or otherwise, or
disclosed to third parties without the express written permission of:

Halliburton | Landmark Software & Services


2107 CityWest Blvd, Building 2, Houston, Texas 77042-3051, USA
P.O. Box 42806, Houston, Texas 77242, USA
Phone:713-839-2000, FAX: 713-839-2015
Internet: www.halliburton.com/landmark

Trademarks
3D Drill View, 3D Drill View KM, 3D Surveillance, 3DFS, 3DView, Active Field Surveillance, Active Reservoir Surveillance,
Adaptive Mesh Refining, ADC, Advanced Data Transfer, Analysis Model Layering, ARIES, ARIES DecisionSuite, Asset Data
Mining, Asset Decision Solutions, Asset Development Center, Asset Development Centre, Asset Journal, Asset Performance,
AssetConnect, AssetConnect Enterprise, AssetConnect Enterprise Express, AssetConnect Expert, AssetDirector, AssetJournal,
AssetLink, AssetLink Advisor, AssetLink Director, AssetLink Observer, AssetObserver, AssetObserver Advisor, AssetOptimizer,
AssetPlanner, AssetPredictor, AssetSolver, AssetSolver Online, AssetView, AssetView 2D, AssetView 3D, BLITZPAK,
CasingLife, CasingSeat, CDS Connect, Channel Trim, COMPASS, Contract Generation, Corporate Data Archiver, Corporate Data
Store, Data Analyzer, DataManager, DataStar, DBPlot, Decision Management System, DecisionSpace, DecisionSpace 3D Drill
View KM, DecisionSpace AssetLink, DecisionSpace AssetPlanner, DecisionSpace AssetSolver, DecisionSpace Atomic Meshing,
DecisionSpace Nexus, DecisionSpace Reservoir, DecisionSuite, Deeper Knowledge. Broader Understanding., Depth Team, Depth
Team Explorer, Depth Team Express, Depth Team Extreme, Depth Team Interpreter, DepthTeam, DepthTeam Explorer, DepthTeam
Express, DepthTeam Extreme, DepthTeam Interpreter, Desktop Navigator, DESKTOP-PVT, DESKTOP-VIP, DEX, DIMS,
Discovery, Discovery Asset, Discovery Framebuilder, Discovery PowerStation, DMS, Drillability Suite, Drilling Desktop,
DrillModel, Drill-to-the-Earth-Model, Drillworks, Drillworks ConnectML,DSS, Dynamic Reservoir Management, Dynamic
Surveillance System, EarthCube, EDM, EDM AutoSyn, EDT, eLandmark, Engineer’s Data Model, Engineer’s Desktop, Engineer’s
Link, ESP, Event Similarity Prediction, ezFault, ezModel, ezSurface, ezTracker, ezTracker2D, FastTrack, Field Scenario Planner,
FieldPlan, For Production, FZAP!, GeoAtlas, GeoDataLoad, GeoGraphix, GeoGraphix Exploration System, GeoLink, Geometric
Kernel, GeoProbe, GeoProbe GF DataServer, GeoSmith, GES, GES97, GESXplorer, GMAplus, GMI Imager, Grid3D,
GRIDGENR, H. Clean, Handheld Field Operator, HHFO, High Science Simplified, Horizon Generation, i WellFile, I2 Enterprise,
iDIMS, Infrastructure, Iso Core, IsoMap, iWellFile, KnowledgeSource, Landmark (as a service), Landmark (as software),
Landmark Decision Center, Landmark Logo and Design, Landscape, Large Model, Lattix, LeaseMap, LogEdit, LogM, LogPrep,
Magic Earth, Make Great Decisions, MathPack, MDS Connect, MicroTopology, MIMIC, MIMIC+, Model Builder, Nexus, Nexus,
Nexus View, Object MP, OpenBooks, OpenJournal, OpenSGM, OpenVision, OpenWells, OpenWire, OpenWire Client, OpenWire
Direct, OpenWire Server, OpenWorks, OpenWorks Development Kit, OpenWorks Production, OpenWorks Well File, PAL, Parallel-
VIP, Parametric Modeling, PetroBank, PetroBank Explorer, PetroBank Master Data Store, PetroStor, PetroWorks, PetroWorks
Asset, PetroWorks Pro, PetroWorks ULTRA, PlotView, Point Gridding Plus, Pointing Dispatcher, PostStack, PostStack ESP,
PostStack Family, Power Interpretation, PowerCalculator, PowerExplorer, PowerExplorer Connect, PowerGrid, PowerHub,
PowerModel, PowerView, PrecisionTarget, Presgraf, Pressworks, PRIZM, Production, Production Asset Manager, PROFILE,
Project Administrator, ProMAGIC, ProMAGIC Connect, ProMAGIC Server, ProMAX, ProMAX 2D, ProMax 3D, ProMAX
3DPSDM, ProMAX 4D, ProMAX Family, ProMAX MVA, ProMAX VSP, pSTAx, Query Builder, Quick, Quick+, QUICKDIF,
Quickwell, Quickwell+, QUIKRAY, QUIKSHOT, QUIKVSP, RAVE, RAYMAP, RAYMAP+, Real Freedom, Real Time Asset
Management Center, Real Time Decision Center, Real Time Operations Center, Real Time Production Surveillance, Real Time
Surveillance, Real-time View, Reference Data Manager, Reservoir, Reservoir Framework Builder, RESev, ResMap, RTOC, SCAN,
SeisCube, SeisMap, SeisModel, SeisSpace, SeisVision, SeisWell, SeisWorks, SeisWorks 2D, SeisWorks 3D, SeisWorks
PowerCalculator, SeisWorks PowerJournal, SeisWorks PowerSection, SeisWorks PowerView, SeisXchange, Semblance
Computation and Analysis, Sierra Family, SigmaView, SimConnect, SimConvert, SimDataStudio, SimResults, SimResults+,
SimResults+3D, SIVA+, SLAM, SmartFlow, smartSECTION, Spatializer, SpecDecomp, StrataAmp, StrataMap, StrataModel,
StrataSim, StratWorks, StratWorks 3D, StreamCalc, StressCheck, STRUCT, Structure Cube, Surf & Connect, SynTool, System Start
for Servers, SystemStart, SystemStart for Clients, SystemStart for Servers, SystemStart for Storage, Tanks & Tubes, TDQ, Team
Workspace, TERAS, T-Grid, The Engineer’s DeskTop, Total Drilling Performance, TOW/cs, TOW/cs Revenue Interface,
TracPlanner, TracPlanner Xpress, Trend Form Gridding, Trimmed Grid, Turbo Synthetics, VESPA, VESPA+, VIP, VIP-COMP,
VIP-CORE, VIPDataStudio, VIP-DUAL, VIP-ENCORE, VIP-EXECUTIVE, VIP-Local Grid Refinement, VIP-THERM, WavX,
Web Editor, Well Cost, Well H. Clean, Well Seismic Fusion, Wellbase, Wellbore Planner, Wellbore Planner Connect, WELLCAT,
WELLPLAN, WellSolver, WellXchange, WOW, Xsection, You’re in Control. Experience the difference, ZAP!, and Z-MAP Plus
are trademarks registered trademarks or service marks of Halliburton.

All other trademarks, service marks and product or service names are the trademarks or names of their respective owners.

Note
The information contained in this document is subject to change without notice and should not be construed as a
commitment by Halliburton. Halliburton assumes no responsibility for any error that may appear in this manual. Some
states or jurisdictions do not allow disclaimer of expressed or implied warranties in certain transactions; therefore, this
statement may not apply to you.

Halliburton acknowledges that certain third party code has been bundled with, or embedded in, its software. The
licensors of this third party code, and the terms and conditions of their respective licenses, may be found at the
following location:

..\Nexus-Nexus-VIP5000.0.2\help\com\lgc\dspx\ThirdParty.pdf
Landmark Nexus® Technical Reference Manual

Table of Contents
Chapter 1: Parallel Processing
Parallel Solver Implementation ................................................................................. 1-13
ILUT, Gauss-Seidel, and Half-Fast ..................................................................... 1-13
AMG, AMG-RS ................................................................................................... 1-15
ILU Full System Preconditioner .......................................................................... 1-16

Chapter 2: Solver
Introduction................................................................................................................ 2-21
Overview.................................................................................................................... 2-22
Red-Black Reduction ................................................................................................. 2-23
Network Coupling and Solution ................................................................................ 2-26
CPR ............................................................................................................................ 2-27
Pressure Solution ....................................................................................................... 2-28
Incomplete LU factorization ................................................................................ 2-28
Algebraic Multigrid ............................................................................................. 2-29
Full System Preconditioner........................................................................................ 2-30
Multiple Subgrids and Parallel Processing ................................................................ 2-31
Tolerances .................................................................................................................. 2-32
Miscellaneous ............................................................................................................ 2-33
Direct Solution ..................................................................................................... 2-33
Action on Solver Failure ................................................................................ 2-33
Dual Porosity Feature .................................................................................... 2-33

Chapter 3: PVT Representation


Introduction................................................................................................................ 3-35
Water Properties ........................................................................................................ 3-36
Black Oil Models ....................................................................................................... 3-37
Standard Black Oil Calculations .......................................................................... 3-37
The Physical Model ....................................................................................... 3-37
The Nexus Internal Representation ................................................................ 3-40
The Nexus Black Oil Flash ............................................................................ 3-41
Nexus Volumes and Volume Derivatives ...................................................... 3-42
Enhanced Black Oil Calculations ........................................................................ 3-44
The Physical Model ....................................................................................... 3-44
The Nexus Internal Representation ................................................................ 3-45
The Nexus Enhanced Black Oil Flash ........................................................... 3-46
Nexus Volumes and Volume Derivatives ...................................................... 3-48
Conversion from VIP Black Oil Model ............................................................... 3-50
Calculation of Surface Volumes .......................................................................... 3-57
The API Interpolation Model ............................................................................... 3-58
The Water-Oil Model and the Gas-Water Model ................................................ 3-59

R5000.0.2 Table of Contents v


Nexus® Technical Reference Manual Landmark

Equation of State (EOS) Model ................................................................................. 3-60


A General EOS Model ......................................................................................... 3-60
Calculation of Z-factors and Molar Density ........................................................ 3-62
Calculation of Fugacity Coefficient and Fugacities ............................................ 3-64
Other Thermodynamic Properties ........................................................................ 3-65
Hydrocarbon Phase Viscosities ........................................................................... 3-66
Lohrenz-Bray-Clark Correlation .................................................................... 3-66
Pedersen Correlation ...................................................................................... 3-68
Principal Algorithms ............................................................................................ 3-72
Two Isothermal Phase Flash Calculation ....................................................... 3-72
Saturation Pressure Calculation ..................................................................... 3-78
Gibbs Stability Analysis ................................................................................ 3-78
The Search for a Two-Phase State ....................................................................... 3-81
Transition Test Technique ............................................................................. 3-81
Single Phase Identification .................................................................................. 3-88
Surface Separator Calculations ............................................................................ 3-89
Multi-stage Separator ..................................................................................... 3-90
Standard Conditions ....................................................................................... 3-93
Standing-Katz Correlation ............................................................................. 3-95
Gas Plants .................................................................................................... 3-100
Calculation of Volume Derivatives ................................................................... 3-102
Three Phase Equilibrium ......................................................................................... 3-104
Calculation of Water Properties ......................................................................... 3-104
Conversion of Solubility Data to Fugacity Coefficient Data ............................. 3-105
Flash Procedure .................................................................................................. 3-106
References................................................................................................................ 3-107

Chapter 4: Network Calculations


Introduction.............................................................................................................. 4-109
Network Solution Caused By Procedures................................................................ 4-111
Network Solutions Caused By Targeting ................................................................ 4-112
Simultaneous Reservoir/Network Solution ............................................................. 4-113
Targeting .................................................................................................................. 4-115
Targeting Input .................................................................................................. 4-116
Target Rate Calculations .................................................................................... 4-118
Net Voidage/Fillup Algorithm ........................................................................... 4-120
Pressure Maintenance Algorithm ....................................................................... 4-121
Control of the target rate .................................................................................... 4-123
Tree Structured Guide Rates .............................................................................. 4-126
Multiple Targets and the Order of Target Calculations ..................................... 4-128
Remote Control of Constraints ................................................................................ 4-130
Hydraulic Calculations ............................................................................................ 4-133
General Description ........................................................................................... 4-133
Hydrostatic Gradient .......................................................................................... 4-133
Hydraulic Tables ................................................................................................ 4-135

vi Table of Contents R5000.0.2


Landmark Nexus® Technical Reference Manual

Hydraulic Correlations ....................................................................................... 4-138


Use of Correlations ...................................................................................... 4-138
Model Description ....................................................................................... 4-140
Algorithm of Pressure Drop Calculations .................................................... 4-142
Pump Model ....................................................................................................... 4-144
Calculation Method ...................................................................................... 4-145
Valve Model ...................................................................................................... 4-147
Solution Algorithm ...................................................................................... 4-148
Choke Model ...................................................................................................... 4-149
Wells ........................................................................................................................ 4-151
Gridded Wells .................................................................................................... 4-152
Lumped Wells .................................................................................................... 4-155
Branched Wells .................................................................................................. 4-157
Complex Wells .................................................................................................. 4-159
Connecting Wells to the Network ...................................................................... 4-163
Well Constraints ................................................................................................ 4-164
Treatment of Datum Depth .......................................................................... 4-165
Crossflow ........................................................................................................... 4-166
Perforation Equations ........................................................................................ 4-167
WAG (Water-Alternating-Gas) Injection ................................................................ 4-169
Separation Nodes ..................................................................................................... 4-172
Treatment of ONTIME factors ................................................................................ 4-176
Network Heat Loss Calculations ............................................................................. 4-177
Drilling Queues........................................................................................................ 4-179
The Drill Procedure ..................................................................................... 4-179
The Redrill Procedure .................................................................................. 4-181
Gaslift Optimization ................................................................................................ 4-184
Optimal Gaslift Table Method ........................................................................... 4-185
Optimization Using a Nonlinear Optimizer ....................................................... 4-186
Network PVT Data .................................................................................................. 4-191
PVT and Separator Method Assignments .......................................................... 4-191
Multifield networks with Mixed PVT ..................................................................... 4-192
Producing Perforations ...................................................................................... 4-192
Injecting Perforations ......................................................................................... 4-194
IMPES Elimination and Elimination of Water Mass for Implicit Runs ............ 4-194
Reservoir Equations ........................................................................................... 4-194
Mixing of Fluid in the Network ......................................................................... 4-195
Fuel and Shrinkage .................................................................................................. 4-196
Calculation of Connection Length and Depth Change ............................................ 4-197
Depth Change (DDEPTH) ................................................................................. 4-197
Connection Length (CON_LENGTH) ............................................................... 4-198
Consistency Checks ........................................................................................... 4-198
Network Reports ...................................................................................................... 4-199
References................................................................................................................ 4-200

R5000.0.2 Table of Contents vii


Nexus® Technical Reference Manual Landmark

Chapter 5: Well Data


Calculation of the Wellbore Constant for Each Perforation .................................... 5-201
Effective Grid Block Radius RADB........................................................................ 5-203
One-Dimensional Flow ...................................................................................... 5-203
Linear Case .................................................................................................. 5-203
Two-Dimensional Flow ..................................................................................... 5-205
Well in Center of Square Gridblock ............................................................ 5-205
General Definition of rb ............................................................................... 5-207
An Approximate Derivation of rb for Square Well Block ........................... 5-208
Well in Center of Rectangular Gridblock .................................................... 5-210
Well in Center of Block in Anisotropic Rectangular Grid .......................... 5-212
Single Well Arbitrarily Located in Isolated Well Block ............................. 5-215
Multiple Wells in Same Isolated Well Block .............................................. 5-216
Two Wells With Same Rate in Adjacent Blocks ......................................... 5-218
Single Well in Edge Block ........................................................................... 5-220
Single Well Exactly on Edge of Grid .......................................................... 5-221
Single Well Exactly at Corner of Grid ......................................................... 5-222
Single Well Arbitrarily Located in Corner Block ........................................ 5-224
Horizontal Well ............................................................................................ 5-225
Inclined Well ...................................................................................................... 5-227
Incorporating Skin into Well Model ........................................................................ 5-232
Derivation of Skin Due to Altered Permeability ............................................... 5-232
Including Mechanical Skin In Well Index ......................................................... 5-233
Skin Due to Restricted Entry ............................................................................. 5-235
Effects of Restricted Entry on Well Index ......................................................... 5-238
References................................................................................................................ 5-240

Chapter 6: Equilibrium
Introduction.............................................................................................................. 6-241
Mainstream Path ...................................................................................................... 6-242
Supercritical Initialization........................................................................................ 6-252
Gibbs Sedimentation................................................................................................ 6-254
Search for GOC ....................................................................................................... 6-256

Chapter 7: Compaction
Introduction.............................................................................................................. 7-257
Pore Volume Adjustment......................................................................................... 7-258
Reversible Cases ................................................................................................ 7-258
Irreversible Cases ............................................................................................... 7-259
Water-Induced Compaction Modeling .............................................................. 7-260
Transmissibility and Well KH Adjustment ............................................................. 7-262
Water-Induced Compaction Table Effects ......................................................... 7-263
Implicitness of Calculations..................................................................................... 7-265

viii Table of Contents R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 8: Relative Permeability Methods


Introduction.............................................................................................................. 8-267
Three-Phase Oil Relative Permeability Models....................................................... 8-268
Stone's Model I .................................................................................................. 8-268
Stone's Model II ................................................................................................. 8-269
Saturation Weighted Interpolation Model ......................................................... 8-269
Guidelines for Selecting the Models .................................................................. 8-272
Hysteresis................................................................................................................. 8-273
Introduction ........................................................................................................ 8-273
Background ........................................................................................................ 8-273
Linear Method .................................................................................................... 8-277
Scaling of Primary Drainage Curve .................................................................. 8-278
Carlson Method .................................................................................................. 8-279
User-Supplied Bounding Method (Non-Wetting Hysteresis) ............................ 8-280
User-Supplied Bounding Method (Wetting Hysteresis) .................................... 8-282
End-Point Scaling .................................................................................................... 8-284
Introduction ........................................................................................................ 8-284
Normalized Saturation End Points ..................................................................... 8-284
Rules for Missing or Incomplete End-Point Scaling Arrays and Data Errors ... 8-287
Two-Point Scaling Option ................................................................................. 8-288
Two-Point Scaling of Capillary Pressure Functions .................................... 8-288
Two-Point Scaling of Relative Permeability Functions .............................. 8-289
Three-Point Scaling Option (Default Option) ................................................... 8-290
Four-Point Scaling of Capillary Pressure Functions .................................... 8-290
Three-Point Scaling of Relative Permeability Functions ............................ 8-290
Normalized End-Point Relative Permeability.......................................................... 8-291
End-Point Scaling for Oil (Two-Point Scaling) ................................................. 8-292
End-Point Scaling for Water and Gas (Two-Point Scaling) .............................. 8-293
End-Point for Oil (Three-Point Scaling) ............................................................ 8-294
End-Point Scaling for Water and Gas (Three-Point Scaling) ............................ 8-295
End-Point Scaling for Gas-Water Cases (Two-Point Scaling) .......................... 8-296
Data Defaulting and Errors Applied to End-Point Relative Permeability ......... 8-297
Three-Point Scaling Defaulting Rules ......................................................... 8-297
Three-Point Scaling Defaulting Rules (Gas-Water) .................................... 8-300
Directional Relative Permeability............................................................................ 8-302
IFT Adjustment of Capillary Pressure and Gas/Oil Relative Permeability ............. 8-303
References................................................................................................................ 8-306

Chapter 9: Tracers
Tracer Calculations .................................................................................................. 9-307

Chapter 10: Grid


Introduction............................................................................................................ 10-309
Unstructured Grid Form......................................................................................... 10-310

R5000.0.2 Table of Contents ix


Nexus® Technical Reference Manual Landmark

Map Output ...................................................................................................... 10-310


Structured Grid Form............................................................................................. 10-311
Grid Geometry Data ......................................................................................... 10-311
Fault Specification ........................................................................................... 10-311
Calculations of Cell Bulk Volume and Center Depth ...................................... 10-312
Calculations of Cell Dimensions ..................................................................... 10-312
Calculations of Intercell Transmissibility ........................................................ 10-313
Standard Transmissibility Option .............................................................. 10-313
NEWTRAN Transmissibility Option ........................................................ 10-314
Local Grid Refinement (LGR) ......................................................................... 10-316
LGR Keyword Parameters ............................................................................... 10-317
Propagation of Reservoir Properties to LGR Cells .......................................... 10-318
Grid Coarsening ............................................................................................... 10-318
Coarse Cell Properties ..................................................................................... 10-318

Chapter 11: Procedures


Introduction............................................................................................................ 11-323
Procedure Functions .............................................................................................. 11-325
Debugging Procedures ........................................................................................... 11-328

Chapter 12: Aquifers


Introduction............................................................................................................ 12-329
Analytic Model — The Carter-Tracy Aquifer ....................................................... 12-330
Analytical Model - The Fetkovich Aquifer ........................................................... 12-334
Numerical Aquifer ................................................................................................. 12-336
References.............................................................................................................. 12-337

Appendix A: Corner-Point Geometry


Mapping of Gridblock to Unit Cube....................................................................... A-339
Two-Dimensional Mapping .............................................................................. A-339
Three-Dimensional Mapping ............................................................................ A-341
Volumetric Calculations ................................................................................... A-343
Integration by Gaussian Quadrature ................................................................. A-346
Transmissibility Calculations ........................................................................... A-348
Calculation of Transmissibility in 2D ............................................................... A-348
Simplest Case: Orthogonal Grid ................................................................. A-348
Non-Orthogonal Grid with Parallel Sides ................................................... A-349
Non-Orthogonal Grid with Non-Parallel Sides .......................................... A-350
Alternate Approach for Gridblock with Non-Parallel Sides ....................... A-354
Calculation of Transmissibility in 3D (HARINT) ............................................ A-356
Tubes and Slices in 3D ............................................................................... A-356
Differential Area of the Slice ...................................................................... A-357
Location of Centroid, in Real Space, and in the Unit Cube ........................ A-357

x Table of Contents R5000.0.2


Landmark Nexus® Technical Reference Manual

Evaluation of Arc Length Derivative .......................................................... A-358


Evaluation of cos  (u,v,w) ........................................................................ A-358
Half-Block Transmissibility to Other Faces ............................................... A-361
Calculation of Transmissibility in 3D by the NEWTRAN Option ................... A-361
Half-Block Transmissibility to All Six Faces ............................................. A-363
Calculation of Full Transmissibility Between Gridblocks ............................... A-363
Unfaulted Case ............................................................................................ A-363
Faulted Case ................................................................................................ A-364
Choice Between HARINT and NEWTRAN Options ....................................... A-365
References............................................................................................................... A-370

R5000.0.2 Table of Contents xi


Nexus® Technical Reference Manual Landmark

xii Table of Contents R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 1
Parallel Processing

Parallel Solver Implementation

In Nexus, we provide parallel ILUT, AMG and AMG-RS solvers as the


pressure preconditioner and Gauss-Seidel, Half-Fast, and ILU solvers
as the full system preconditioner. All of these parallel solvers are based
on domain decomposition.

ILUT, Gauss-Seidel, and Half-Fast


These three parallel solvers require grid coloring. The basic
requirement for grid coloring is that no two adjacent grids (i.e., grids
having connections to each other) have the same color. Each process
loads multiple grids with different colors, and each color should be
present on all processes. Usually the number of colors is very small in
practice. As shown in Figure 1.1, it is a simple example of two-
dimensional grid decomposition. Four grids are colored in two colors,
and then grid 1 and grid 2 are loaded to process 1 and the remaining
two grids to process 2. The coefficient matrix is reordered according as
shown in Figure 1.2. All operations proceed according to the grid
colors. For example, firstly grid 1 and 4 are handled simultaneously on
process 1 and 2, respectively, and initiate cross-process message
passing, and then treat grids 2 and 3 with local information and finally
update grid 2 and 3 using cross-process information. The cross-process
communication is overlapped with local computations.

R5000.0.2 Parallel Processing: Parallel Solver Implementation 13


Nexus® Technical Reference Manual Landmark

Figure 1.1: Example of Grid Coloring

As a very effective iterative solver, the threshold-based incomplete LU


factorization (ILUT) determines the potential in-fills based on the
matrix entry values instead of solely on structure of the matrix. But the
lower and upper triangular factors (L and U) of the coefficient matrix
have to be created dynamically, which is formidably expensive in
parallelization. Thus a phase of pre-factorization is designed. In this
phase, all the nodes are ordered, and the potential in-fill patterns are
determined and stored in a template using the coefficient matrix at a
certain time step. This template is updated as necessary. Obviously
performance of the solver is compromised a little bit to save cost on
parallelization. Then the factorization is pretty much like the level-
based incomplete factorization.

14 Parallel Processing: Parallel Solver Implementation R5000.0.2


Landmark Nexus® Technical Reference Manual

Figure 1.2: Structure of a Reordered Coefficient Matrix

AMG, AMG-RS
The aggregation type of AMG solver1 differs from AMG-RS solver2
only in the generation of grid hierarchy as described in the chapter on
the Solver. The difficulty in parallelizing AMG solver lies in the grid
coarsening, which is sequential in nature. There has been extensive
research on parallel AMG solver. We adopted both the decoupled and
coupled aggregation approaches for the aggregation-type AMG 
solver 3. In the decoupled aggregation method, each process defines the
aggregates on its local grid without considering the cross-boundary
dependency between boundary nodes. This approach avoids a lot of
message passing in the setup phase, and in both restriction and
prolongation calculations in the solution phase. In the coupled
aggregation approach, first all boundary nodes are processed and
aggregates information is sent to adjacent processes. Then each process
defines its local interior aggregates in parallel. If there is conflict on
definition of boundary aggregates between two adjacent processes, the
process with a smaller grid size prevails.

The grid coarsening procedure of AMG-RS includes three steps. Our


approach is similar to RS3 in Henson and Yang's work4. In the first
step, each process defines local C/F splitting on its own grid ignoring
cross-boundary connections, and then initiates message passing of

R5000.0.2 Parallel Processing: Parallel Solver Implementation 15


Nexus® Technical Reference Manual Landmark

boundary C/F splitting information to adjacent processes. In the second


step, the interpolation weight for interior nodes and C boundary nodes
is calculated. The final step checks the dependence between the
boundary and ghost nodes and adjusts the C/F splitting to avoid strong
cross-boundary F-F dependence. In the current implementation, the
cross-boundary F-F dependence is eliminated by making one of F
nodes to C node. To preventing from penetrating too deep into external
grids on the coarser level, all boundary nodes must be interpolated by
direct connecting neighboring C nodes, and only the strongest cross-
boundary dependence is interpolated.

Parallelizing the solution phase is straightforward. The major


components in this phase are update of residual, restriction of residual,
pre-smoothing, prolongation of solution and post-smoothing. We use
block Jacobi smoothing, in which point Gauss-Seidel or ILU(0) is
applied to each grid with old values on cross-process nodes used. A
sparse direct solver is applied on the coarsest grid level.
Communication involved in calculation and restriction of residuals and
prolongation of solution is readily overlapped with local computation.

ILU Full System Preconditioner


A parallel ILU solver is implemented as a preconditioner for the full
system5. The algorithm for incomplete factorization is:

1. Divide all nodes into interior nodes (I) and boundary nodes (C).

2. Color the boundary nodes connected to multiple external grids. If


more than two colors are needed, all colors but color 1 and 2 are
made color 3. Local connections among boundary nodes are not
included in the coloring procedure.

3. Color all other boundary nodes with color 1 and color 2. Only the
cross-grid connections between boundary nodes are included for
coloring. If necessary, color 3 is used to break the chain
connections and switch colors from one side to the other on the
boundary. The requirement is that the number of nodes with those
two colors should be close and the number of breaking nodes with
color 3 is as small as possible.

4. The breaking nodes with color 3 are accessible to both sides of the
boundary. This can be achieved by message passing.

5. When message passing is initiated, all the local interior nodes are
to be factored. This part is CPU time intensive.

16 Parallel Processing: Parallel Solver Implementation R5000.0.2


Landmark Nexus® Technical Reference Manual

6. Then factor local boundary nodes with color 1.

7. Non-blocking receive upper factorization coefficients related to


color 1 nodes and those interior coefficients related to boundary
color 3 nodes from adjacent processor.

8. Update local color 2 and 3 boundary nodes using local interior


connections.

9. Non-blocking send upper factorization coefficients related to color


1 nodes and those interior coefficients related to boundary color 3
nodes to adjacent processor.

10. Factor color 2 and color 3 nodes with coefficients sent from color
1 nodes.

Message passing is required in the factorization (Steps 5, 7 and 9), and


fortunately it can easily be overlapped with the local computation.

Figure 1.3 shows a re-ordered matrix for two processors. Each


processor has only one grid. I and C represent the interior nodes and
boundary nodes, respectively. As stated earlier, C3 might be empty.

The forward substitution proceeds as follows:

1. Initiate message passing of right hand side (RHS) of C3 nodes if


exist.

2. Forward solution of local interior nodes (I) on each process.

3. Forward solution of local C1 nodes on each process.

4. No-blocking receive solution of C1 nodes and I-C3 nodes from


adjacent process;

5. No-blocking send solution of C1 nodes and I-C3 nodes to adjacent


process;

6. Update C2 and C3 nodes due to local I and C1 solutions;

7. Update C2/C3 nodes due to remote I and C1 solutions;

8. Forward solution of C2/C3 nodes on each process;

The backward substitution proceeds as follows:

1. Backward solution of C2 nodes on each process;

R5000.0.2 Parallel Processing: Parallel Solver Implementation 17


Nexus® Technical Reference Manual Landmark

2. No-blocking receive solution of C2 nodes from adjacent process;

3. No-blocking send solution of C2 nodes to adjacent process;

4. Update C3/C1/I nodes due to local C2 solutions;

5. Update C3/C1/I nodes due to remote C2 solutions;

6. Backward solution of C3 nodes on each processor;

7. Backward solution of C1 nodes on each process;

8. Backward solution of I nodes on each process;

In the algorithm, I-C3 denotes the interior nodes that have connections
to local C3 nodes if C3 nodes exist in this grid.

Figure 1.3: Incomplete Factorization of Coefficient Matrix


with Re-ordered Boundary Nodes

1. P. Vanek, J. Mandel, and M. Brezina, Algebraic multigrid based on smoothed


aggregation for second arnd fourth order problems, Computing, Vol. 56, pp. 179-196,
1996.

18 Parallel Processing: Parallel Solver Implementation R5000.0.2


Landmark Nexus® Technical Reference Manual

2. K. Stuben, An introduction to algebraic multigrid, in Multigrid, authors: U.


Trottenberg, C. Oosterlee, A. Schuller, Elsevier Ltd, 2001.

3. C. H. Tong and R. S. Tuminaro, Parallel soothed aggregation multigrid: aggregation


strategies on massively parallel machines, Proceedings of Supercomputing, Nov.
2000.

4. V. Henson and U. Yang, BoomerAMG, A parallel algebraic multigrid solver and


preconditioner, Applied Numerical Mathematics, Vol. 41, pp. 155-177, 2002.

5. Q. Wang and J.W. Watts, A parallel incomplete LU factorization algorithm for


distributed linear system.

6. Amdahl, G.M.. Validity of single-processor approach to achieving large-scale


computing capability, Proceedings of AFIPS Conference, Reston, VA. 1967. pp. 483-
485.

R5000.0.2 Parallel Processing: Parallel Solver Implementation 19


Nexus® Technical Reference Manual Landmark

20 Parallel Processing: Parallel Solver Implementation R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 2
Solver

Introduction

At each Newton iteration, it is necessary to solve a matrix equation.


Depending on the number of cells used to represent the reservoir, the
reservoir part of this equation must be solved iteratively. For the
simulation to be successful, this iteration must converge in a reasonable
number of iterations.

In general, the overall convergence rate will be limited by convergence


of a particular part of the overall process. Potentially limiting the
convergence rate are the following

• Convergence problems related to the coupling between the facility


network and the reservoir.

• In implicit computations, convergence of the CPR computation.

• Convergence of the reservoir pressure solution.

• In multiple subgrid runs, which typically use multiple processors,


convergence problems related to coupling between neighboring
subgrids.

In selecting solver parameters, we are generally attempting to deal with


issues related to the potential problem areas listed above. The
following is intended to help in doing so.

R5000.0.2 Solver: Introduction 21


Nexus® Technical Reference Manual Landmark

Overview

As noted above, at each Newton iteration it is necessary to solve a


global matrix equation. It takes the following form.

2-1

⎡ Ann Anr ⎤ ⎡ xn ⎤ ⎡ rn0 ⎤


⎢A =⎢ ⎥
⎣ rn Arr ⎥⎦ ⎢⎣ xr ⎥⎦ ⎣ rr0 ⎦

Ann and Anr contain the network equation coefficients that multiply
network and reservoir unknowns, respectively. Arn and Arr contain the
reservoir equation coefficients that multiply these same unknowns. xn
and xr are the network and reservoir unknown vectors, respectively.
The network unknowns are pressures and compositions at network
nodes and total component mass rates on network connections,
including perforations. The reservoir unknowns are cell pressures if
IMPES is being used and cell pressures and component masses if the
calculations are fully implicit. r 0 and r 0 are the initial residual
n r
vectors.

We normally solve Equation 2-1 iteratively. Before beginning the


iteration, we perform a network solve and update the reservoir
residuals. The network is solved exactly, within roundoff error, so we
assume that rn0 = 0 . That brings us to the state of Equation 2-1. We
begin each iteration with a reservoir solve, which generally is only
approximate.

2-2
Arr xrk +1 = rrk

This solve can be performed in several ways, which are discussed


below. As the reservoir solve proceeds, we continually update the
reservoir residuals. At the end of the solve, they are current with the
reservoir solution, which means that in effect the following
computation has been performed.

2-3
rrk +1/ 2 = rrk − Arr xrk +1

We then compute the network residuals resulting from the change in


reservoir solution, recalling that the network residuals were initially
zero.

22 Solver: Overview R5000.0.2


Landmark Nexus® Technical Reference Manual

2-4
rnk +1/ 2 = − Anr xnk +1

Then we solve the network equation.

2-5
Ann xnk +1 = rnk +1/ 2

Following this, the network residuals are again zero. We update the
reservoir residuals.

2-6
rrk +1 = rrk +1/ 2 − Arn xnk +1

Red-Black Reduction

To decrease the cost of solving Equation 2-2, we perform a red-black


reduction of the reservoir grid. In a rectangular structured grid, this
eliminates half of the reservoir unknowns and yields a set of equations
that is often easier to solve iteratively. Whether the reduction is done is
controlled by the keyword SYSTEM_REDUCED ON or OFF. The
default is ON. The option not to use the reduction is provided because
sometimes the AMG pressure solver works much better on the original
matrix than on the reduced matrix. The line Gauss-Seidel full system
preconditioner also works better on the original matrix.

On a structured grid, the reduction results in a checkerboard pattern,


and we refer to the process as coloring the cells, with the colors being
red and black. We determine the cell colors as follows.

1. Designate all cells to be uncolored.

2. Designate the first cell as red. This creates the first group of red
cells.

3. Find all uncolored cells connected to the latest group of red cells.
Designate these to be black.

4. Find all uncolored cells connected to the latest group of black cells
(from Step 3). These are candidates to be red. Designate the first
one to be red. Cell by cell within this group, determine whether
each cell is connected to any red cell. If it is not, designate it to be

R5000.0.2 Solver: Red-Black Reduction 23


Nexus® Technical Reference Manual Landmark

red. If it is connected to a red cell, designate it to be black. The


red cells identified in this step become the next group of red cells.

5. Repeat steps 3 and 4 until no connected uncolored cells can be


found.

6. Search all cells for an uncolored cell. If one is found, designate it


to be red, and return to Step 3.

On a structured grid, this procedure yields the normal red-black


checkerboard pattern. The procedure results in two lists, one
containing the red cells and the other containing the black cells. Given
these lists, we can partition Arr and rewrite Equation 2-1 as follows.

2-7

⎡ ARR ARn ARB ⎤ ⎡ xR ⎤ ⎡ rR0 ⎤


⎢A ⎢ ⎥
⎢ nR Ann AnB ⎥⎥ ⎢⎢ xn ⎥⎥ = ⎢ rn0 ⎥
⎢⎣ ABR ABn ABB ⎥⎦ ⎢⎣ xB ⎥⎦ ⎢⎣ rB0 ⎥⎦

The R and B subscripts denote red and black cells, respectively. ARR is
diagonal for the IMPES pressure equation and block diagonal for the
fully implicit set of equations. As a result, it can be inverted
economically.

We next eliminate the red unknowns from Equation 2-7, yielding the
reduced matrix equation, which is of the form

2-8
⎡ A nn A nB ⎤ ⎡ xn ⎤ ⎡ rn0 ⎤
⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎣ ABn A BB ⎦ ⎣ xB ⎦ ⎣ rB0 ⎦

where

2-9

A nn = Ann − AnR ARR


−1
ARn

2-10
A Bn = ABn − ABR ARR
−1
ARn

2-11
A nB = AnB − AnR ARR
−1
ARB

24 Solver: Red-Black Reduction R5000.0.2


Landmark Nexus® Technical Reference Manual

2-12

A BB = ABB − ABR ARR


−1
ARB

2-13
−1 0
rn0 = rn0 − AnR ARR rR

2-14
−1 0
rB0 = rB0 − ABR ARR rR

We actually solve the reduced matrix equation, Equation 2-8, rather


than the original global matrix equation, Equation 2-1. We obtain xR by
backsolving.

R5000.0.2 Solver: Red-Black Reduction 25


Nexus® Technical Reference Manual Landmark

Network Coupling and Solution

To solve Equation 2-8, we use what the mathematicians call a


multiplicative Schwartz procedure. We solve for the reservoir
unknowns, update the network equations based on the new reservoir
solution, solve the network equations, update the reservoir equations
based on the new network solution, solve the reservoir equations, etc.
We continue this process until the solution is deemed to be accurate
enough.

Generally, this procedure is adequate. At times, however, it is


necessary to use more complex equations. To do this, we “extend” the
network into the reservoir. That is, we add some of the reservoir
unknowns and accompanying equations in the network equation set,
while also retaining them in the reservoir set. The result is an
overlapping Schwartz procedure, where the overlap region consists of
the reservoir cells included in the network set. We can extend the
network one to five cells using the keyword FACILITIES EXTENDED
n, where n is a value in the range 1-5. When the extended network is
used, it is also necessary to specify IMPLICIT_COUPLING NONE for
implicit grids or IMPES_COUPLING NONE for IMPES grids.

The meaning of n is as follows. If n = 1, the network set includes the


normal network plus the cells containing the perforations. If n = 2, the
network set includes the n = 1 set plus the perforated cells’ neighboring
cells. The n = 3 set includes the n = 2 set plus the perforated cells’
neighbors’ neighbors, and so on for n = 4 and 5.

In practice, we have never found it best to use n larger than 2. In part


this is because as n increases, the cost of the network solve increases
and can become quite expensive. It may be possible to reduce this
expense by performing the network solve iteratively by specifying
FACILITIES ITERATIVE.

Another choice relating to the network-reservoir coupling is the


IMPLICIT_COUPLING or IMPES_COUPLING. The default for these
is ROWSUM. Other possibilities are COLSUM and NONE. We don’t
know of a way to tell in advance which of these will be best, but recent
experience has shown that sometimes using COLSUM reduces cpu
time. As noted above, NONE should be used if the facilities are
extended.

26 Solver: Network Coupling and Solution R5000.0.2


Landmark Nexus® Technical Reference Manual

CPR

CPR stands for Constrained Pressure Residual. As we use the term, it


refers to a method in which an implicit model is solved iteratively, with
each iteration consisting of

1. A fairly accurate pressure solution

2. An inexpensive and not very accurate solution of the full set of


equations

There are two ways to generate the pressure equation, selected by


specifying CPR_PRESSURE_EQUATION NORMAL or IMPES. If
CPR_PRESSURE_EQUATION NONE is specified, then no pressure
solution is used.

The idea behind the method is as follows. Pressure changes can be


transmitted rapidly over large distances. As a result, the convergence
rate of the iterative solution is often controlled by how fast pressures
converge. At the same time, solving for the full set of unknowns
greatly increases the cost of an iteration. If we solve at the same time
for all unknowns, we get the worst of both worlds – a number of
iterations associated with a pressure solution at the higher cost for each
iteration associated with solving for all unknowns. CPR allows us to
determine an improved pressure solution at a cost associated with
pressure only and then to use this to improve the solution for the other
unknowns with a relatively inexpensive calculation.

The default pressure equation is NORMAL, and this generally works at


least reasonably well. There are cases, typically associated with the
large transmissibilities and small pore volumes of fractures, where the
IMPES pressure equation is much better. Only in very rare cases is the
omission of the pressure equation (CPR_PRESSURE_EQUATION
NONE) best.

CPR requires a pressure solution and an iterative method for the full
unknown set. The next two sections discuss the methods used for
these.

R5000.0.2 Solver: CPR 27


Nexus® Technical Reference Manual Landmark

Pressure Solution

If the reservoir equations are IMPES, we need to solve the IMPES


pressure equation. If they are fully implicit, we normally use CPR,
which also requires solving the pressure equation. In either event, we
need to solve for pressures, and for this we have three choices of
preconditioner, one incomplete factorization method and two algebraic
multigrid methods. (A preconditioner computes an inexpensive,
approximate solution. It is used as part of an iterative solution method.
The more accurate the preconditioner’s solution is, the faster the
iteration will converge.)

Incomplete LU factorization
Incomplete LU factorization is specified by SOLVER PRECON_ILU.
To improve performance of the preconditioner, we do two things:

1. Reorder the unknowns and equations in a way that reduces the


amount of infill. In deciding which unknown to eliminate next, we
determine the infill that would be generated by each possibility,
and eliminate the unknown that generates the smallest infill. Here,
infill is computed as the sum of the magnitudes of all infill
coefficients that would be introduced into the matrix during the
elimination of this particular unknown.

2. Determine which infill coefficients to retain based on their sizes.


The procedure is similar to Saad’s ILUT. We retain a possible
infill coefficient if its magnitude is larger than 0.007 times the
magnitude of the diagonal coefficient in the row in which it falls.

The process of reordering the unknowns and determining which


potential infill to retain is quite expensive computationally. As a result,
we create a template containing the information needed to perform and
use the factorization. The template is constructed at the beginning of a
run based on the matrix coefficients for the first Newton iteration of the
first timestep. It can be updated from time to time later in the run if
needed by specifying OUTPUT TEMPLATE ENDOUTPUT in the
Run Control file.

28 Solver: Pressure Solution R5000.0.2


Landmark Nexus® Technical Reference Manual

Algebraic Multigrid
The multigrid method begins with a matrix equation on the original
fine grid and from this generates a hierarchy of grids and corresponding
matrices on these coarse grids. A simple relaxing iteration (e.g.. Gauss-
Seidel or ILU(0)) is carried out on each grid level to reduce the
different wave-length error components. In Nexus, the grid hierarchy is
constructed solely according to the fine matrix equation with two
different approaches, i.e., aggregation and the classic Ruge-Stueben
method.

In the aggregation AMG solver, the coarse grids are generated by


grouping the fine elements/cells according to their connection strength,
which is defined as the ratio of non-diagonal component to the main
diagonal ones in the matrix. The operators on the coarse grids are
obtained using the Galerkin approximation. Both the restriction and the
prolongation operators are piece-wise constants. This solver can be
improved by rescaling or smoothing the prolongation operator. But in
our numerical experiments, smoothing does not help in most cases.
The solver can be activated using SOLVER PRECON_AMG. Three
types of cycle are supported, V, F, and W. Only one cycle is applied to
the pressure preconditioning.

The classic Ruge-Stueben method (AMG_RS) defines a coarse/fine


splitting in which nodes in the fine set are interpolated by coarse nodes
directly or indirectly and nodes in the coarse set occur in the next
coarse grid level. The interpolation/prolongation operators are
calculated based on the finding that algebraic smooth (large scale) error
varies slowly in the direction of the strong connection, and the
restriction operator is taken to be the transpose of the prolongation
operator. The Solver can be activated using SOLVER
PRECON_AMG_RS. The user can specify the cycle type (V/F/W) and
the interpolation method (standard or classic).

Both AMG solvers work very well and have shown superior
performances in large problems if the pressure matrix equation is an M-
matrix or close to it. Aggregation AMG is much cheaper in setup and
solution, particularly as a pressure preconditioner with a coarse
convergence criterion, but Ruge_Stueben AMG seems more robust
with a much higher cost in setup phase.

R5000.0.2 Solver: Pressure Solution 29


Nexus® Technical Reference Manual Landmark

Full System Preconditioner

As noted above, a preconditioner computes an inexpensive,


approximate solution, and is used as part of an iterative solution
method. In an implicit model, at each iteration a preconditioning (i.e.,
an approximate solution) of the full set of unknowns is performed. If
CPR is being used, this preconditioning is part of an overall CPR
iteration (or preconditioning, where CPR is a two-step preconditioner).
If CPR is not being used, it is the entire preconditioning.

Nexus provides six full system preconditioners. The simplest of these


is point Gauss-Seidel, which is selected by specifying
IMPLICIT_PRECON GAUSS_SEIDEL. It solves one cell at a time,
using the latest solution at the cell’s neighbors as boundary conditions
for the solve. It tends not to work well when the transmissibilities in
one direction are much larger than in the other directions. The next
simplest preconditioner is selected by specifying IMPLICIT_PRECON
HALF_FAST. It is an incomplete factorization method, in which only
diagonal blocks are modified during the factorization process. It
provides some of the advantage of an incomplete factorization while
requiring less computational cost to generate the factorization and less
memory to store it. The most powerful general purpose preconditioner
is ILU.

The other three full system preconditioners are specialized. They can
only be used on structured grids, and they are most useful when the
transmissibilities in one direction are much, much larger than in the
other two. These are selected by specifying
X_LINE_GAUSS_SEIDEL, Y_LINE_GAUSS_SEIDEL, or
Z_LINE_GAUSS_SEIDEL. They perform Gauss-Seidel by lines in
the x-, y-, or z-direction, respectively. Line Gauss-Seidel solves a line
at a time, using the latest solution at the cells in the neighboring lines as
boundary conditions. This method works well when the
transmissibilities in the direction of the lines are very large.

30 Solver: Full System Preconditioner R5000.0.2


Landmark Nexus® Technical Reference Manual

Multiple Subgrids and Parallel Processing

The description up to this point has assumed execution on a single


processor. If computations are to be performed in parallel, the reservoir
is divided into grids. Depending on the solution used, only one grid
may be required for each process, or more may be required.
Specifically, PRECON_AMG, PRECON_AMG_RS, and
IMPLICIT_PRECON ILU require only one grid per process, while
PRECON_ILU and all IMPLICIT_PRECON’s other than ILU require
that the grids be colored as described below. When a method is based
on grid colors, effective parallelization requires that each process have
at least one grid of each color; hence, there will be more than one grid
on each process.

The grids are colored using a procedure similar to that described above
for coloring cells. There is one difference: grids of any given color
must not communicate with other grids of the same color. Thus, as
necessary, a group of black grids can be subdivided into two colors.
This process is repeated as needed to ensure the required non-
communication condition. The idea, of course, is to perform
computations in parallel on all grids of a given color, pass messages,
and then perform computations on grids of the next color, etc.

Overall, the procedure is to first do a global coloring of the cells. Then,


the red unknowns are eliminated as indicated by Equations 2-7 to 2-14.
Then the grids are colored based on the connectivity in the matrix
A and then assigned to processors.
BB

R5000.0.2 Solver: Multiple Subgrids and Parallel Processing 31


Nexus® Technical Reference Manual Landmark

Tolerances

Iterative solutions require tolerances to use in deciding when to stop the


iteration. Nexus uses as its stopping criterion a specified reduction in
the L2 norm of the residual. The L2 norm is the square root of the sum
of the squares. The residual is the error in the equation being solved at
a given point in the solution. For example, if we are solving the matrix
equation Ax = b, where A is a matrix, x is the solution vector, and b is
the right-hand side vector, the residual vector after k iterations will be
rk = b – Axk. The L2 norm of this residual vector will be

∑ (r )
2
rk = i
k
2
i

As mentioned above, the tolerance is specified as a reduction in the


residual L2 norm from its value at the beginning of the solution.

Nexus uses two such tolerances. The GLOBAL parameter


GLOBALTOL is the overall convergence criterion for the coupled
network-reservoir system. It is used regardless of whether the run uses
IMPES or implicit calculations or one or more grids.

If the global tolerance is too loose, the Newton iteration in an implicit


solution may converge slowly or not at all. Thus, on rare occasions
tightening the global tolerance may reduce the number of Newton
iterations. In IMPES runs, too loose a global tolerance results in
reduced timestep sizes, either through repeats or timestep restriction
due to large changes. Again, on rare occasions tightening the global
tolerance may improve performance.

The GRIDSOLVER IMPLICIT_RED and PRESS_RED parameters are


used only in single-grid implicit models. They relate to the
preconditioning of the full set of unknowns (as opposed to only
pressure) performed at each global solver iteration. If IMPLICIT_RED
is zero (the default), the preconditioner is applied once. If
IMPLICIT_RED is a specified fraction, the preconditioner is applied
repeatedly until the residual L2 norm has been reduced by the specified
fraction from its value before the preconditioning. At each
preconditioning the required pressure residual L2 norm reduction is no
smaller than PRESS_RED.

32 Solver: Tolerances R5000.0.2


Landmark Nexus® Technical Reference Manual

Miscellaneous

The following miscellaneous options are also available.

Direct Solution
Direct solution can be used for either the global system or the reservoir
system by specifying either GLOBAL DIRECT or RESERVOIR
DIRECT. This can be useful in small models that the iterative methods
have difficulty with. In large models, direct solution is prohibitively
expensive.

Action on Solver Failure


Unfortunately, on rare occasions the iterative solver can fail to
converge in the allowed number of iterations. In this case, two actions
are possible. SOLVER CUT will cause the timestep size to be reduced,
and then the solution will be attempted again. SOLVER NOCUT
allows the solution to proceed as if convergence had occurred.
Somewhat surprisingly, this often does not cause any problems.

Dual Porosity Feature


Multiple-porosity, single-permeability models have a special matrix
structure that can be exploited by specifying DUAL_SOLVER ON.
The result is a significant improvement in solver efficiency.

R5000.0.2 Solver: Miscellaneous 33


Nexus® Technical Reference Manual Landmark

34 Solver: Miscellaneous R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 3
PVT Representation

Introduction

In this chapter, the calculations involving fluid properties and fluid


phase equilibrium are discussed.

The major fluid types discussed are:

• Standard black oil


• Extended black oil
• API interpolation
• Water-oil
• Gas-water
• Equation of state for oil and gas phases in equilibrium
• Equation of state for oil, gas, and water phases in equilibrium.

For each of the fluid types the major calculations discussed are

• Calculation of fluid phase equilibrium


• Conversion to surface fluid volumes
• Calculation of volume derivatives
• Calculation of oil and gas phase properties including density and
viscosity.

Water phase properties are calculated the same way for all fluid
systems, except for the case where water is in equilibrium with oil and
gas phases.

R5000.0.2 PVT Representation: Introduction 35


Nexus® Technical Reference Manual Landmark

Water Properties

Multiple water PVT data methods can be used in Nexus. Different


gridblocks or connections in the surface network can be assigned
different water property methods.

Note that this discussion in this section does not apply when gas
solubility is allowed in the water phase.

The simplest water property method consists of specifying a reference


density  w ref , water compressibility cw, a reference water formation
volume factor Bw, a reference pressure pref, and a reference water
viscosity  w ref . Optionally, a derivative of viscosity with pressure
 wp can be specified. Otherwise, it is assumed that viscosity does not
vary with pressure.

Additionally, this set of properties can be entered for different values of


temperature and water salinity.

For any single value of temperature and salinity, water density is


calculated by

3-1
 w ref
 w = --------------  1 + c w  p – p ref  
Bw

For any single value of temperature and salinity, water viscosity is


calculated by

3-2
 w =  w ref  1 +  wp  p – p ref  

If the salinity is between the minimum and maximum tables values,


water properties will be linearly interpolated between properties
calculated from the appropriate pair of tables. If the salinity is below
the minimum, the properties will be the same as those calculated using
the minimum salinity. If the salinity is greater than the maximum, the
properties will be the same as those calculated using the maximum
salinity. No extrapolation beyond the table data is done.

Interpolation and extrapolation rules for temperature are the same as


those for salinity.

Temperature and salinity can both vary at the same time.

36 PVT Representation: Water Properties R5000.0.2


Landmark Nexus® Technical Reference Manual

Black Oil Models

Standard Black Oil Calculations

The Physical Model


Tables of saturated data and undersaturated data can be entered for
multiple fluid models. Different fluid models can be assigned to
different gridblocks in the reservoir and to connections in the surface
network. Additionally, PVT tables can be grouped together to be used
with the API interpolation option.

Nexus is not a traditional black oil simulator that uses as its primary
variables pressure and two of the three-phase saturations. Traditional
black oil simulations typically use variable substitution for the
undersaturated state, with Rs, the solution gas-oil ratio substituted for
one of the phase saturations.

Nexus is a compositional model that in black oil mode has three


components: stock tank oil, surface gas, and water. There is limited
solubility of the components in the three phases which we will call
liquid, vapor, and aqueous to avoid confusion. The water component
can only exist in the aqueous phase. In the traditional black oil model,
the oil component can only exist in the liquid phase. (See the extended
black oil model for a lifting of this restriction.) The gas component can
exist in both the liquid and vapor phases. As its primary variables,
Nexus uses pressure and the three component masses. The water
component mass is eliminated so that only three simultaneous
equations are solved in black oil mode.

Black oil data is typically available as tables of the following properties


with respect to pressure

• the formation volume factor of oil (Bo)


• the formation volume factor of gas (Bg),
• the solution gas-oil ratio (Rs).
• oil phase viscosity
• gas phase viscosity

The definition of Bo is the ratio of the volume of the liquid phase at


reservoir conditions and the volume of the liquid phase at stock tank
conditions.

R5000.0.2 PVT Representation: Black Oil Models 37


Nexus® Technical Reference Manual Landmark

The definition of Bg is the ratio of the volume of the vapor phase at


reservoir conditions and the volume of the vapor phase at surface
conditions.

The definition of Rs is the ratio of the volume of surface gas dissolved


in reservoir oil and the volume of stock tank oil.

Figure 3.1 illustrates how volumes of phases at reservoir conditions is


related to volumes at surface standard conditions. In a standard black
oil, the reservoir gas will expand to a surface gas with the same
composition. In the reservoir, the liquid phase contains both the stock
tank oil component and the surface gas component. As the liquid
reaches the surface, the surface gas will evolve from the liquid phase
leaving both a liquid and a vapor phase at the surface.

Surface gas
Reservoir gas

Surface gas from


reservoir oil
Reservoir oil with dissolved gas

Surface separator Surface oil

Figure 3.1: Relationship of Volumes at Reservoir Conditions to Volumes


at Surface Conditions for Standard Black Oil Model

The black oil data is usually provided by a laboratory experiment called


a differential liberation expansion (DLE) test. In this test, a fluid at
bubble point pressure is placed in a PVT cell. The pressure is lowered
in a series of steps, which results in the evolution of free gas. At each
stage, after equilibrium has been achieved, the evolved gas is removed
from the cell. The gas volume and gas gravity are measured, which in
turn provides the moles of gas evolved. The pressure is eventually
reduced to atmospheric pressure. A residual oil volume is measured at
atmospheric pressure and reservoir temperature. The residual oil
volume, Vor, becomes the basis for the tabular data of the DLE test.
Oil formation volume factor, Bod, and solution gas oil ratio, Rsd are

38 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

both based on Vor.. In summary, for each pressure stage, the DLE test
yields:

Gas volume, gas gravity, and moles of gas evolved

Rsd = (total standard volumes of gas evolved for this stage and all
subsequent stages)/ Vor

Bod = Vo / Vor

Bg = Vg / Vgs where Vgs is the volume of gas at standard temperature


and pressure.

Like most other black oil models (except VIP), Nexus expects black oil
data to be based on stock tank oil volume, and not residual oil volume.
To accommodate this, the laboratory will usually perform a surface
separator flash with the bubble point fluid for at least one set of
separator operating conditions. The separator train may have multiple
stages, but the last stage will be at standard temperature and pressure.

The separator flash test yields values of solution gas oil ratio, Rsf, and
formation volume factor, Bof. To correct the DLE data so that Rsf and
Bof are honored, the following equations are usually utilized

3-3
B of
R s = R sf –  R sdb – R sd  -----------
B odb

3-4
B of
B o = B od -----------
B odb

However, these equations are only approximate. They do a poor job


when the produced gas gravity is not constant. Additionally, at
atmospheric conditions, they lead to strange errors. Rs often becomes
negative, while Bo may drop below 1. These errors are usually ignored
in use. A better method would be to use an equation of state program to
simulate the effect of the separator flash.

The original black oil model (BOTAB) is based on the results of an


unadulterated DLE test. It uses a sophisticated material balance
calculation to take the original DLE table data and then uses it to
calculate reservoir condition oil and gas properties. The results of the
flash are entered separately and used to calculate the effects of the
surface flash as they are required during the simulation.

R5000.0.2 PVT Representation: Black Oil Models 39


Nexus® Technical Reference Manual Landmark

Knowledge of the internal workings of the VIP black oil model (in the
traditional BOTAB input format) have been used to convert data to the
more traditional Nexus black oil table form.

The Nexus Internal Representation


Internally, Nexus must convert the black oil engineering quantities to
tables that are functions of pressure, p, the mass of the oil component,
m o and the mass of the gas component, m g , where the symbol
o .represents the oil component as opposed to the oil phase, and the
symbol g represents the gas component as opposed to the gas phase.

The original black oil data is converted and stored internally as tables.
In the following discussion, we will only discuss field units, but
calculations in different unit systems will of course use different
conversion constants.

B g (RB/MSCF in field units) is converted to dry gas density (lb/SCF in


field units) by

3-5
 g std
 g = 178.0939 -------------
Bg

where  g std is the density of gas at standard conditions.

R s (MSCF/STB in field units) is converted to a mass ratio (lbs of gas/


lbs of oil in field units) by

3-6
 gstd
R go = 178.0939 ----------- R s
 ostd

where  o std is the density of oil at standard conditions.

B o (RB/STB in field units) is converted to oil density by

3-7
 ostd  1 + R go 
 o = ----------------------------------
-
Bo

Oil and gas viscosity data are stored in their original state.

40 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

The Nexus Black Oil Flash


The black oil flash consists of a test comparing the value of tabulated
R go at the flash pressure and the actual mass ratio given by m g  m o . If
the actual mass ratio is greater than the tabulated one, a free gas phase
will evolve. Otherwise, the fluid is in an undersaturated state.

In a saturated state, the oil phase mass fractions are given by

3-8
1
 o o = -----------------
-
1 + R go

3-9
R go
 g o = 1 –  o o = -----------------
-
1 + R go

3-10
 w o = 0

In an undersaturated state, the oil phase mass fractions are the same as
the overall mass fractions

3-11
mo
 o o = -------------------
-
mo + mg

3-12
mg
 g o = 1 –  o o = -------------------
-
mo + mg

Saturated densities and viscosities are acquired through interpolation of


the tabulated data. For undersaturated oil, density and viscosity factors
are tabulated are respected with respect to the difference between the
pressure and saturation pressure.

R5000.0.2 PVT Representation: Black Oil Models 41


Nexus® Technical Reference Manual Landmark

Nexus Volumes and Volume Derivatives


In the Nexus model, volumes and volume derivatives of each phase are
required. The volume of each phase is equal to the mass of the phase
divided by the density of the phase.

The mass of the gas phase in a saturated block is given by:

3-13
m g = m g – R go m o

The mass of the oil phase in a saturated block is given by

3-14
m o = m o  1 + R go 

The oil phase volume derivatives are given by

3-15
V o 1 + R go
= -----------------
-
 mo o

3-16
V o
= 0
 mg

3-17
V o
= 0
 mw

3-18
V o 1 + R go
= – m o d  ------------------
p d p  o 

The gas phase volume derivatives are given by

3-19
V g R go
= – -------
-
 mo g

42 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

3-20
V g 1-
= ----
 mg g

3-21
V g
= 0
 mw

3-22

–  m dR go + V d g
V g  odp gdp 
= ------------------------------------------------
-
p g

In the undersaturated state, the oil volume is given by

3-23
mo + mg
V o = -------------------
-
o

The volume derivatives are given by

3-24
V o 1  o 
= -----  1 – V o 
 mo o   m o

3-25
V o 1  o 
= -----  1 – V o 
 mg o   m g

3-26
V o 1  o
= -----  1 – V o 
p o  p 

The density of the undersaturated oil is calculated as the product of


density of the saturated oil and an undersaturated multiplication factor.
Both of these quantities are tabulated with respect to R go which is the
ratio of m g  m o . In addition, the undersaturated multiplication factor is
tabulated as a function of pressure.

R5000.0.2 PVT Representation: Black Oil Models 43


Nexus® Technical Reference Manual Landmark

Enhanced Black Oil Calculations

The Physical Model


A modification of the traditional black oil formulation exists in Nexus
to account for the surface liquid content in reservoir gases. Figure 3.2
is a schematic of the relationship between reservoir and surface phase
volumes for the enhanced black oil model. A new value, R v is
introduced which is the ratio of the surface oil from reservoir gas and
the surface gas from reservoir gas.

Reservoir gas Surface gas


with dissolved oil

Surface oil from


reservoir gas
Surface gas from
reservoir oil
Reservoir oil with dissolved gas

Surface separator Surface oil

Figure 3.2 Enhanced Black Oil Model

The R v values cannot be obtained directly from the differential


liberation test. For a condensate, a constant volume depletion (CVD)
experiment is usually performed in the laboratory. The constant
volume depletion experiment is meant to simulate the depletion of a
condensate fluid. Starting with a fluid sample at the dewpoint, the
pressure is dropped in increments. At each stage, a separate liquid
phase will form. After equilibrium, the volume of the cell is restored to
its value at the dewpoint by removing the appropriate amount of gas.
The oil and gas volumes, and the removed gas composition and density
are measured. In the Whitson-Torp method1, the experiment is
simulated by an equation of state package and the resulting fluid
characterization is used to conduct surface separator experiments to
yield the value of R v .

44 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

The Nexus Internal Representation


Analogous to the conversion of R s to R go , the solution ratio is
converted to a mass ratio.

The following equation is used for field units where R v units are in
STB/MSCF, and R og units are in lbs of oil/lbs of gas.

3-27
 ostd
R og = 0.005615 ----------- R v
 gstd

Equation 3-7 is used for liquid density.

The vapor phase liquid density becomes similarly complicated and is


defined by

3-28
 gstd  1 + R og 
 g = 178.0939 -----------------------------------
Bg

Implicit in these equations is the assumption that passing the reservoir


oil and gas fluids through the same separation systems would yield
identical standard oil and gas densities, and that these densities are
constant. For some fluids, especially gases, the standard density is far
from constant. This would be a good assumption to remove for future
development.

1. Whitson, C. H. and Torp, S.B. "Evaluating Constant Volume Depletion Data", JPT,
(March 1983) 610; Trans., AIME, 275.

R5000.0.2 PVT Representation: Black Oil Models 45


Nexus® Technical Reference Manual Landmark

The Nexus Enhanced Black Oil Flash


As in the basic black oil model, the input to the flash is pressure,
temperature, and the masses of the two components. The flash must
yield the mass fraction of each phase, and the composition of each
phase.

The mass balance for the oil component is

3-29
m o =  o o m o +  o g m g

The mass balance for the gas component is

3-30
m g =  g o m o +  g g m g

From these equations, the mass fractions of the phases can be derived.
In a saturated case, the mass fractions in the oil phase are

3-31
1
 o o = ------------------
1 + R go

3-32
R go
 g o = -----------------
-
1 + R go

3-33
R og
 o g = -----------------
-
1 + R og

3-34
1 -
 g g = -----------------
1 + R og

Combining the above six equations leads to the equations that yield the
mass of each phase

3-35
 1 + R og 
m g = -------------------------------  m g – m o R go 
 1 – R go R og 

46 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

3-36
 1 + R go 
m o = -------------------------------  m o – m g R og 
 1 – R go R og 

Where both m o and m g must be greater than 0 in a saturated state.

Equivalently, it can be stated that the saturated state exists when

3-37
mg 1
R go  ------  --------
m o R og

R5000.0.2 PVT Representation: Black Oil Models 47


Nexus® Technical Reference Manual Landmark

From these equations it is evident that the input data must be restricted
so that Equation 3-37 applies for each value of saturation pressure.
Additionally

3-38
R go R og  1

Nexus Volumes and Volume Derivatives


Volumes are calculated in the same way that are done for the standard
black oil model. Volume derivatives are somewhat more complicated.

In a saturated state, densities, viscosities, and mass ratios are strictly


functions of pressure and can be determined from the table look-up.
The partial volume derivatives of the oil phase are given by

3-39
V o 1 + R go
= ------------------------------------
-
 mo  o  1 – R go R og 

3-40
V o R og  1 + R go 
= – ------------------------------------
-
 mg  o  1 – R go R og 

3-41
V o 1 + R go
= – m o d  -------------------------------------
p d p  o  1 – R go R og 

The partial volume derivatives of the gas phase are given by

3-42
V g R go  1 + R og 
= – ------------------------------------
-
 mo  g  1 – R go R og 

3-43
V g 1 + R og
= ------------------------------------
-
 mg  g  1 – R go R og 

48 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

3-44
1  1 + R og dR go d g
–  -----  m o  ------------------------------- + Vg
V g   g    1 – R go R og  d p dp
=
p 1 + R og
–  m g – m o R go  d  ------------------------------- 
d p  1 – R go R og 

When only undersaturated oil exists, the oil volume derivatives are

3-45
V o 1 V o R go  o 
= -----  1 + --------------- 
 mo o  m o  R go

3-46
V o 1 V o  o 
= -----  1 – ------ 
 mg o  m o  R go

3-47
V o V o  o
= – ------
p o  p

When an undersaturated gas exists, the volume derivatives are

3-48
V g 1 V g  g 
= -----  1 – ------ 
 mo g  m g  R og

3-49
V g 1 V g R og  g 
= -----  1 + --------------- 
 mg g  m g  R og

3-50
V g V g  g
= – ------
p g  p

R5000.0.2 PVT Representation: Black Oil Models 49


Nexus® Technical Reference Manual Landmark

Conversion from VIP Black Oil Model


The VIP black oil model is in many ways more sophisticated than
either of the Nexus black oil models. It is also a two component
compositional model, but it allows for both oil and gas components to
exist in either hydrocarbon phase. It allows for variable produced gas
gravity, and it allows for complex surface separator calculations. Its
major weakness is that it is strongly predicated on the DLE test, and so
cannot easily be used for condensate systems.

Conversion of VIP black oil data to the Nexus enhanced black oil
model requires an intimate understanding of the VIP internal
representation, so that we can calculate the properties of the fluid at
input conditions. The Nexus black oil input is manipulated so that the
phase splits and the phase properties at reservoir conditions is matched
at conversion points. Additionally, while the Nexus model does not
require the application of separator calculations, in this case they are
necessary to match the surface volumes calculated by VIP.

In the first stage of the conversion process, the original DLE data and
surface separator data are converted to the same internal representation
as VIP.

From the DLE experiment, tabular values of the solution gas-oil ratio
( R s , in SCF/STB of residual oil), the formation volume factor (Bo, in
RB/STB of residual oil), gas compressibility factor ( Z g ), gas formation
volume factor (Bg, in RB/MSCF), gas density relative to air at standard
conditions (Gr), and oil and gas viscosities (o and g) as functions of
the saturation pressure. (Note that both the solution gas-oil ratio and the
oil formation volume factor are based on the standard state of the
residual oil, rather than on the stock tank oil.) In this form, the
formation volume factor is more frequently referred to as the relative
oil volume in typical laboratory reports. Such form allows the user to
enter the laboratory data directly, without first converting them to stock
tank oil conditions. The values of Bo and o at pressures above the
saturation pressure also are required for undersaturated conditions.

Since the simulator uses a compositional formulation internally, these


black oil data are converted into compositional parameters (e.g.,
fugacity coefficients, Zo, and o are as functions of pressure and gas
component mole fraction in the oil phase). The compositional
parameters then are reconstructed into equal-spaced tables. For
pressures beyond the range of the tabular data, VIP uses constant slope
extrapolation to derive values at those conditions. The conversion
procedure is described in the following sections.

50 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

The gas phase viscosity and compressibility factor are assumed to be a


function of pressure only (no compositional dependency). An equal-
space viscosity versus pressure table is constructed from the input
viscosity versus saturation pressure table. A Zg versus pressure table is
likewise constructed. If Bg instead of Zg is entered as a function of
pressure, then the following equation is used to convert Bg to Zg:

3-51
0.0056146 B g P o T s
Z g = ------------------------------------------------
-
Ps T

In deriving this equation, gas compressibility at the surface temperature


(Ts) and surface pressure (Ps) is assumed to be one.

Oil data are converted to equal-space tables of K-values (needed for


fugacity equality equations), Zo, and o.

Data conversion requires oil and gas component molecular weights,


which are set internally by the simulator. To ensure non-zero
component K-values, the simulator assumes that the oil component
molecular weight, M o , equals the maximum among all residual oil and
stock tank oil molecular weights plus two (2.0). Additionally, the gas
component molecular weight, M g , is assumed to equal the minimum
among all gas phase molecular weights (29Gr) minus one (1.0).
Consequently, the gas phase has at least a trace of the oil component at
any pressure level (including the surface pressure) and vice versa.

The residual oil molecular weight is either directly entered by the user
or derived by the simulator. Normally the user is required to enter either
the density and molecular weight of residual oil (  or , M or ) or those of
bubble-point oil (  ob , M ob ) following the BOTAB card. These
properties can be derived from each other based on the differential
liberation data. The procedure to derive  or and M or from  ob and
M ob is explained below.

The differential liberation data are entered in monotonically decreasing


pressure steps. The last pressure must be the surface pressure; i.e., p(i)
> p(i+1) and p(n) =ps, where n is the entry number of the last stage.
Based on 1 cc of the residual oil (equivalent to Bob cc or  ob x Bob gm
of residual oil plus gas at the bubble-point), the overall gas liberated in
gm for the differential liberation is

3-52
n–1
29. ps
G g = --------------------------------------- ---------   R s  i  – R s  i + 1  G r  i + 1 
5.6146  62.428 RT s
i=1

R5000.0.2 PVT Representation: Black Oil Models 51


Nexus® Technical Reference Manual Landmark

Thus, the density of the residual oil is given by

3-53
 or =  ob  B ob – G g

where  or and  ob are given in gm/cc, and Bob is the Bo (RB/STB of


residual oil) for the bubble-point oil. Again, based on 1 cc of the
residual oil, the overall gas liberated in gmole at the end of the
differential liberation for the bubble-point oil is

3-54
1 ps
G m = ------------------------------------------ ---------  R s  1  – R s  n  
5.6146  652.428 RT s

The amounts of bubble-point oil in gmole given 1 cc of residual oil is

3-55
B ob   ob
z o = ----------------------
-
M ob

The molecular weight of the residual oil then is

3-56
 or
M or = -----------------
-
zo – Gm

Following a similar procedure, the density and molecular weight of the


stock tank oil can be derived from  ob and M ob if the Rs, Bo (RB/STB
of stock tank oil), and Gr were known from the separator flash test.
This is the case when the SEPTEST card is entered in the VIP input
deck.

VIP provides two additional separator options that warrant special


attention since they may create an overly defined fluid system. The first
option is use of the BOSEP card. This option requires that the user
enter the API or density of the stock tank oil. Since the same quantity
also can be derived from  ob and M ob , we have an overly defined fluid
system. In this case, VIP honors the stock tank oil density entered by
the user and disregards the Gr in deriving all the relevant stock tank oil
properties.

The second option is the use of the SEPARATOR card, where K-values
for the separator are entered. The stock tank oil molecular weight can
be defined from the separator K-values. However, the user may enter
the stock tank oil molecular weight (MWL) which, if entered, produces

52 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

an overly defined fluid system. In this case, VIP honors the user-
entered MWL and disregards the molecular weight derived from the
separator K-values in deriving the stock tank oil compressibility
(ZLSEP).

The molecular weight of the liberated gas, M gd , at each liberation stage


(pressure entry No. I-1 to I) is

3-57
M gd  I  = 29  G r  I 

Having previously established the molecular weights of the oil and gas
components, the mole fraction of either component in a phase can be
calculated from knowing the molecular weight of that phase from the
relationship

3-58
M gd  I  = y o M o + y g M g

and

3-59
M od  I  = x o M o + x g M g

We also make use of the constraints for a two component system that

3-60
xo + xg = 1

3-61
yo + yg = 1

The gas component mole fraction in the liberated gas phase is then

3-62
M o – M gd  I 
y g  I  = -----------------------------
-
Mo – Mg

Based on 1 cc of residual oil, the amounts of the overall gas liberated


from stage I to the standard conditions in gm is

R5000.0.2 PVT Representation: Black Oil Models 53


Nexus® Technical Reference Manual Landmark


n–1
29. ps
G g  I  = --------------------------------------- ---------
5.6146  62.428 RT s   Rs  i  – Rs  i + 1  Gr  i + 1 
i=1

Thus, the density of the oil at stage I is

3-63
 or + G g  I 
 o  I  = ---------------------------
-
Bo  I 

Since the amounts of total gas liberated from stage I to the standard
conditions are given by

3-64
1 ps
G m  I  = --------------------------------------- ---------  R s  I  – R s  n  
5.6146  62.428 RT s

the molecular weight of the oil at stage I can be calculated as

3-65
o  I   Bo  I 
M o  I  = -----------------------------------------
-
 or  M or + G m  I 

54 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

Making use of Equation 3-59, the gas component mole fraction in the
oil at stage I can be calculated from

3-66
M o – M od  I 
x g  I  = -----------------------------
-
Mo – Mg

The equilibrium K-values of the gas component and the oil component
at stage I are calculated according to

3-67
yg  I 
K g  I  = -----------
-
xg  I 

and

3-68
1 – yg  I 
K o  I  = --------------------
-
1 – xg  I 

respectively. Oil compressibility then is calculated according to

3-69
p  I   Mo  I 
Z o  I  = -----------------------------------------------------------------------
-
5.6146  62.428   o  I   RT

The above procedure establishes K-values as a function of pressure,


and Zo as a function of x g (or the saturation pressure). The relationship
between x g and saturation pressure, which is needed in constructing
the full Z o  p x g  and  o  p x g  tables for undersaturated conditions,
also is established.

For the undersaturated oil phase, the user must enter ratios of the oil
formation volume factor at pressures above the saturation pressure to
the oil formation volume factor at the saturation pressure. Ratios of oil
viscosity at pressures above the saturation pressure to viscosity at the
saturation pressure also are required. To convert the undersaturated Bo
values to undersaturated Zo values, the following relationship is
recognized from Equation 3-69:

R5000.0.2 PVT Representation: Black Oil Models 55


Nexus® Technical Reference Manual Landmark

3-70
Z -----o
 p Bo  p 
----------- = ---------------
-
s s
 Z o Bo  p 
 -----s 
p 

where the superscripts denote saturated conditions. Note that the right
side of Equation 3-70 represents the input ratios of formation volume
factors. This equation suggests that the same ratios can be used directly
if the undersaturated Zo/p table is constructed. The independent
variables in the two-dimensional table are x g and p. For a given x g , the
saturation pressure is given by the x g -pressure relationship established
earlier in this section. For any pressure which is greater than the
saturation pressure, the right side of Equation 3-70 is determined from
the input undersaturated table through interpolation. The resulting
s s
value is then multiplied by Z o   p  to yield Zo/p for x g and p. The two-
dimensional oil viscosity table  o  p x g  is constructed likewise.

Finally, the K-values are used to establish the following fugactiy


equality equations:

3-71
 oi = K i  p  i = o g

3-72
 gi = 1 i = 1 2

After the K-values have been calculated for each of the data entries in
the differential liberation data, an equal-spaced table is constructed
through a linear interpolation process involving ln(Kijpi) versus ln(pi).

To convert this internal VIP representation to one that can be stored in


the Nexus format, a single value of standard oil density and standard
gas density for each set of tables is chosen. At each input saturation
pressure, the mass fraction of the oil and gas components in each phase
are determined. (These are intermediate values generated for the K-
value calculation). Thus, we have mass ratios R go and R og . Using
Equation 3-6 and Equation 3-27, respectively, the engineering
quantities R s and R v are calculated. The Z-factors and thus the
densities of each phase are also known at each saturation pressure. To
preserve the values of densities, B o is calculated by applying
Equation 3-7, and B g is calculated from Equation 3-29. The
viscosities are copied without any modification. Therefore, at each
input saturation pressure, Nexus and VIP will have identical oil and gas

56 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

phase densities, viscosities, and compositions. The same calculations


are performed for each undersaturated table entry. Values will differ in
between tabulated values because of differences in interpolation. Both
VIP and Nexus employ linear interpolation, but on the internally stored
values, which we have seen are quite different. Problems may arise
when there are large gaps in pressure in VIP tabulated data.

While the above procedure ensures that reservoir properties will be the
same for oil and gas phases in the two models, it does not ensure that
surface volume calculations will yield the same result. How this match
is accomplished is discussed in the next section.

Calculation of Surface Volumes


In Nexus, conversion to surface volumes is very simple. Internally, all
calculations in the network yield mass flow rates of the oil, gas, and
water components. The surface volume is calculated by dividing the
mass flow rate by the surface density of the corresponding phase.
These surface densities are constant input quantities for each PVT
table.

In VIP, surface separator calculations are applied. Regardless of the


separator type, VIP internally converts the data to constant K-values for
each separator stage. The total hydrocarbon molar rate is passed
through a series of separator stages. The split of oil and gas phases for
each separator stage is determined by a flash with constant K-values.
The final output gas stream molar rate is converted to a volume by
application of the gas law with gas compressibility factor set equal to 1,
and the pressure and temperature at standard conditions. The final
output oil stream molar rate is similarly converted to a surface volume,
but using a non-unit Z-factor. The oil phase Z-factor is internally
determined in VIP from separator input data and is a constant for each
separator train.

To ensure that Nexus will produce the same surface volumes as VIP, in
the conversion process, the molecular weights, the K-values for each
separator stage, and the oil phase surface Z-factors are saved. As stated
in the previous section, Nexus will have the same phase mass
compositions at each point. Application of the molecular weights, and
use of the same surface separator calculations as VIP uses will ensure
that Nexus will yield the same surface volumes.

Even when conversion from VIP is not required, the availability of the
Nexus surface separator input allows for additional flexibility. Thus,
Nexus can retain the same black oil table, but just change separator data
for the cases where multiple separator trains exist, or for a change in

R5000.0.2 PVT Representation: Black Oil Models 57


Nexus® Technical Reference Manual Landmark

separator output conditions. Otherwise, a different PVT table would


have to be input for these circumstances.

The API Interpolation Model


In the API interpolation model, three hydrocarbon components are
utilized instead of just two for the normal black oil model. There are
two oil components, a heavy component, and a light component.
Additionally, there is a gas component. The two oil components have
the same K-values. In other words, they will apportion in the same
ratio in each phase as they exist in the overall system.

Within a group of input black oil tables, each table has a distinct value
of oil surface density. This is converted to the mass fraction of the
heavy oil component by the calculation

3-73
1 – ---------------------1 -
-------------
 o std  o std ,min
 h = ---------------------------------------------------
-
1 1
----------------------- – ----------------------
 o std ,max  o std ,min

Whenever any calculation is performed with an API fluid, the value of


the heavy component mass fraction is calculated by

3-74
mh
 h = ------------------
-
mh + ml

where m h is the mass of the heavy component and m l is the mass of


the light component.

The value of  h is used to determine which pair of black oil tables are
used for calculation. If  h is less than or equal to the minimum  h ,
then the data corresponding to the minimum is used for the fluid
properties calculations. If  h is greater than or equal to the maximum
 h , the data corresponding to the maximum is used. Otherwise, the
data is determined by linear interpolation between tables.

The API interpolation is used on a step-by-step basis of the fluid


property calculation, rather than just being applied to the final result.
For example, to calculate the phase equilibrium, R go and R og will be
determined in each table and interpolated linearly by  h to use in the
calculation of the oil and gas phase fractions. This is done instead of

58 PVT Representation: Black Oil Models R5000.0.2


Landmark Nexus® Technical Reference Manual

doing each phase equilibrium calculation with a separate table and then
interpolating the result.

The Water-Oil Model and the Gas-Water Model


Nexus can use a variation of the standard black oil model where only
two components exist -- an oil component and a water component. The
system is treated as an undersaturated oil system so only data that is
appropriate for such a system is input.

Not only are the fluid calculations much simplified since the flash
calculation is unnecessary, but only two component flow equations are
solved. In implicit mode, this reduces the number of simultaneous
equations solved to 2 instead of 3 for the standard black oil model.

A constant non-zero gas-oil ratio (Rs) can be specified. In such a case,


when the fluid is converted to surface conditions, a surface oil volume
and a surface gas volume will be calculated even though only mass
flow rates of the oil component are calculated.

Similarly, Nexus can use a gas-water model, which has only two
components -- a gas component and a water component.
Computational advantages are similar to those of the water-oil model.

A constant non-zero oil-gas ratio (Rv) can be specified. In such a case,


when the fluid is converted to surface conditions, a surface oil volume
and a surface gas volume will be calculated even though only mass
flow rates of the gas component are calculated.

R5000.0.2 PVT Representation: Black Oil Models 59


Nexus® Technical Reference Manual Landmark

Equation of State (EOS) Model

A General EOS Model


Nexus uses a generalized form of a cubic EOS as follows:

3-75
RT a
p = ----------- – -----------------------------------------------
v – b  v + C1 b   v + C2 b 

where p is the absolute pressure, T is the absolute temperature, and v is


the molar volume. C1 and C2 are constants that depend on the equation
of state, while a and b are parameters that are compositionally
dependent.

a for a single component i is defined as

3-76
2 2
R T ci
a i =  ai  i -------------
p ci

b for a single component i is defined as

3-77
RT ci
b i =  bi -----------
p ci

where  ai and  bi are equation of state constants that have different


defaults for different equations of state, T ci is the critical temperature
of component i, p ci is the critical pressure of component i, and R is the
universal gas constant.

For the Redlich-Kwong equation of state (RK-EOS), and the Soave-


Redlich-Kwong2 equation of state (SRK-EOS), the default value of
 ai is 0.4274802 and the default value of  bi is 08664035. The value
of constant C1 is 1 and value of constant C2 is 0.

For the RK-EOS,

3-78
T ci
i = -------
T

60 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

For the SRK-EOS,

3-79
2
 i =  1 + m i  1 – T ri  

where

3-80
m i =  i  – 0.176 i + 1.574  + 0.48

and  i is the acentric factor.

For the Peng-Robinson3 equation of state (PR-EOS), the default value


of  ai is 0.457235529 and the default value of  bi is 077796074. The
value of constant C1 is 1 + 2 and value of constant C2 is 1 – 2 .

Equation 3-79 also applies to the PR-EOS, but the definition of m


differs.

For the original PR-EOS (specified by the PR_OLD keyword),

3-81
m i =  i  – 0.26992 i + 1.54226  + 0.37464 for all  i

For the newer version of the PR-EOS4 (specified by the PR keyword)

3-82
m i =  i  – 0.26992 i + 1.54226  + 0.37464 if  i  0.49

and

3-83
m i = 0.379642 +  i  1.48503 +  i  – 0.164423 + 0.016666 i  
if  i  0.49

For mixtures, the value of a is given by

3-84
nc nc

a =   xi xj  1 – ij  ai aj
i = 1j = 1

where  ij is the binary interaction coefficient between components i


and j, and xi is the mole fraction of component i.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 61


Nexus® Technical Reference Manual Landmark

For the mixture value of b, two possible mixing rules are available.
The default one is

3-85
nc

b =  xi bi
i=1

Alternatively, a mixing rule involving a binary interaction coefficient


for the b parameter can also be invoked.

3-86
nc nc

b =   xi xj  1 – dij  bi bj
i = 1j = 1

The above mixing rule is only used if the BINB table is input.

Calculation of Z-factors and Molar Density


The general EOS can be rearranged to become a cubic equation for the
Z-factor which is defined as

3-87
pv-
Z = ------
RT

The general cubic EOS can be written for each hydrocarbon phase as

3-88
3 2 2
Z +  C 3 B – 1 Z +  A – C 4 B – C 5 B Z + C 6 B  B + 1  – AB = 0

where

3-89
ap -
A = -------------
2
 RT 

and
3-90
bp-
B = ------
RT

62 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

The constants are defined as follows

3-91
C3 = C1 + C2 – 1

3-92
C4 = C1 + C2

3-93
C5 = C1 + C2 – C1 C2

3-94
C6 = –C1 C2

The cubic equation (Equation 3-88) may yield three real roots.
Normally, the largest root is chosen when evaluating the
compressibility factor for the gas phase, while the smallest positive root
is chosen as the compressibility factor for the oil phase. However, if the
user invokes option ZGIBBS, the Z-factor that yields the lowest Gibbs
free energy will be chosen regardless of the phase.

Equation 3-87 can be rearranged to provide the molar volume

3-95
v = ZRT
-----------
p

When the volume shift correction5,6 is used (caused by inputting the


VSHIFT column in the EOS data table), the molar volume is corrected
as follows

3-96
nc

v corrected = v –  xi ci
i=1

The correction parameter ci is related to the data input in the VSHIFT


column (si) by

3-97
ci = bi si

R5000.0.2 PVT Representation: Equation of State (EOS) Model 63


Nexus® Technical Reference Manual Landmark

Calculation of Fugacity Coefficient and Fugacities


Fugacities play the key role in determining fluid phase equilibrium.
When the oil phase is in equilibrium with the gas phase, the following
equation applies for each component

3-98
f g i = f o i

where f g i is the fugacity of component i in the gas phase, and f o i is


the fugacity of component i in the oil phase.

The fugacity coefficient of component i in phase j,  j i , is defined as

3-99
f j i
 j i = ----------
-
x j i p

The fugacity coefficient can be calculated from an EOS (dropping the j


phase index) by using

3-100

p RT
RT ln  i =    ni – ------
V
- dV – RT ln Z
V

Substituting the EOS into the above equation yields:

3-101
Z – 1  Z + C 2B
 nb  + C 7 -----------------2-  ---   an  – -----------   nb  ln --------------------
p 1 2 ART
ln  i = – ln  Z – B  + -----------------
b  ni B  RT  n  n i B  ni Z + C1B

64 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Other Thermodynamic Properties


The general EOS has been used to generate many other thermodynamic
properties.7

Second and third orders of derivatives of Helmholtz free energy with


respect to mole numbers are required for calculation of critical points.
The Helmholtz free energy (A) is calculated by substituting the EOS
into

3-102
 nc nc
nRT V
  p – ---------
- dV – RT  n i ln  ------------ +  n i   i – Ts i 
 
A =
V   n i RT
V i=1 i=1

 
where  i is the ideal chemical potential for component i and s i is the
ideal entropy for component i.

The EOS is also used to calculate enthalpy which is used in energy


balance equations. The EOS is substituted into

3-103
*
H 1- v  p 
– H - = Z – 1 + ------
RT    T
---------------- T – p dv
RT v

where H* is the ideal state enthalpy.

The EOS has been used to calculate heat capacities that are used in
compressor calculations.The EOS has been substituted into the
following equations:

3-104
* 2
Cv – Cv T v  p 
------------------ = ---   2  dv
R R  T 
v

*
where C v is the ideal state isochoric heat capacity.

3-105
2
 p 
Cp –
*
Cp Cv –
*
Cv   T
T v
------------------ = ------------------ – --- ------------------ – 1
R R R p
 
  v
T

R5000.0.2 PVT Representation: Equation of State (EOS) Model 65


Nexus® Technical Reference Manual Landmark

where Cp* is the ideal state isobaric heat capacity.

Hydrocarbon Phase Viscosities

Lohrenz-Bray-Clark Correlation
The viscosities of the oil and gas phases are calculated using the
Lohrenz-Bray-Clark (LBC) correlation.8

3-106
3 4 0.16667
 M j p cj
 j = 0.18383  --------------   LBC1 +  r {LBC2 +  r  LBC3
 T cj 


4 –4 U3
+  r  LBC4 +LBC5 r     – 10  + ----------------------------
nc
-

  xi Mi 
i=1
where

3-107
 r =  j V cj

3-108
Nc

Aj =  xi Ai  A = M P c T c V c
i=1

3-109
10.73615 Z ci T ci
V ci = --------------------------------------
-
5.6146 p ci

3-110
nc 3 4 0.16667
 M i P ci
U 3 = 0.18383  x i M i  --------------- U 5i
 T ci 
i=1

and

3-111
– 4 0.94
U 5i = 3.4  10 T ri if T ri  1.5

66 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

or

3-112
–4 0.625
U 5i = 1.778  10  4.58T ri – 1.67  if T ri  1.5

The symbol Mi denotes the molecular weight of component i. In


Equations through 3-112, j, Vci, pci, Tci, and j are in units of lbmol/
bbl, bbls/lbmol, psi, °R, and cp, respectively.

The default values for the LBC constants are

Constant Default

LBC1 0.1023

LBC2 0.023364

LBC3 0.058533

LBC4 -0.040758

LBC5 0.0093324

R5000.0.2 PVT Representation: Equation of State (EOS) Model 67


Nexus® Technical Reference Manual Landmark

Pedersen Correlation
The Pedersen correlation9,10 is useful for heavy oils where the LBC
correlation fails to give a proper viscosity prediction for some cases.

The Pedersen correction is based on the corresponding states principle.


A group of substances obeys the corresponding states principle if these
substances have the same reduced viscosity at the same reduced density
and reduced temperature. In such a case, only comprehensive viscosity
data for one component (the reference component) in the group are
needed. Other data can be calculated from the reduced viscosity. The
Pedersen correlation uses methane as a reference substance.

The viscosity of a hydrocarbon phase is calculated as

3-113
T co 1  6 p cm 2  3 M m 1  2  m p  p co  o T  T co  o
  p T  =  ---------  --------  -------- -------   o  --------------------- ----------------------
 T cm  p co   M o  o  p cm  m T cm  m 

where Tcm is the mixture critical temperature, Pcm is the mixture critical
pressure, and Mm is the mixture molecular weight. The subscripts o and
m refer to the reference substance and mixture, respectively. They are
calculated from the mixing rules:

3-114
nc nc
13 13 3
T ci T cj 12
  i j  pci x x ------
- + ------
 p cj
-  1 – X ij   T ci T cj 
T cm = i-------------------------------------------------------------------------------------------------------------------------------------
=1 j=1
nc nc
13 13 3
T ci T cj
  i j  pci x x ------
- + ------
 p cj
-
i=1 j=1

3-115
n n
13 13 3
8 T ci T cj 12
 x i x j ------
 p ci
- + ------
 p cj
-  T ci T cj 
p cm i=1 j=1
= -------------------------------------------------------------------------------------------------------------------
-
n n 2
 13 1  3 3
 T ci T cj 
   i j  p ci
x x ------
- + ------
-
 p cj 
i = 1 j = 1 

The coefficients Xij are introduced in Equation 3-114 to account for the
binary component interaction.

Mm is calculated by the following equation:

68 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

3-116
–4 2.303 2.303
M m = 1.304  10  M w – Mn 

where

3-117
nc
2
 xi Mi
M w = i--------------------
=1
nc
-

 xi Mi
i=1

3-118
nc

Mn =  xi Mi
i=1

Parameters m and o in Equation 3-113 account for the density and


molecular weight effects:

3-119
– 3 1.847 0.5173
 m = 1 + 7.378  10  r M m

3-120
– 3 1.847 0.5173
 o = 1 + 7.378  10  r M o

The symbol r denotes the reduced density for the reference


component:

3-121
P  P co T  T co
 o  ---------------- ---------------
 P cm T cm 
 r = ----------------------------------------------
-
 co

The density of the reference component (methane) o is calculated


from the three-parameter Peng-Robinson equation of state.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 69


Nexus® Technical Reference Manual Landmark

The viscosity of the reference component is based on the model of


Hanley et al.11

3-122
   o T  =  o  T  +  1  T  o + F 1    o T  + F 2    o T 

where

3-123
–1 –2  3 –1  3 13 23
o  T  = b1 T + b2 T + b3 T + b4 + b5 T + b6 T
43 53
+ b7 T + b8 T + b9 T

and

b1 = -0.2090975x105
b2 = 2.647269x105
b3 = -1.472818x105
b4 = 4.716740x104
b5 = -9.491872x103
b6 = 1.219979x103
b7 = -9.627993x10
b8 = 4.274152
b9 = -8.14153x10-2

3-124
T - 2
 1  T  = 1.6969859 – 0.13337235  1.4 – ln --------
 168

3-125
j
   o T  = exp  – j 1 + ---4-
 T
 0.1  j3  j j 
- +  o  j 5 + ---6- + ---7- – 1.0 
0.5
  exp  o  j 2 – ----------
 32  T T 
 T  

By default:

j1 = 1.035060586x10
j2 = 1.7571599671x10
j3 = 3.0193918656x103
j4 = 1.8873011594x102
j5 = 4.2903609488x10-2

70 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

j6 = 1.4529023444x102
j7 = 6.1276818706x103

3-126
k
   o T  = exp  – k 1 + ----4-
T
 0.1  k3  0.5  k k  
- +  o  j 5 + ----6- + -----7  – 1.0 
  exp  o  k 2 – ----------
32 T T 2
  T   

By default:

k1 = 9.74602
k2 = 18.0834
k3 = 4126.66
k4 = 44.6055
k5 = 0.976544
k6 = 81.8134
k7 = 15649.9

3-127
 o –  co
 = -------------------
 co

Coefficients j1 to j7 in Equation 3-125 are obtained from a least-squares


fit to the methane viscosity data at temperatures above the freezing
temperature of methane (set ”= 0), while k1 to k7 in Equation 3-126
are determined from temperature below the freezing point (set ’= 0).
To ensure continuity between viscosities above and below the freezing
point, two weighting factors F1 and F2 were introduced:

3-128
F 1 = 1-------------------------
+ HTAN
2

3-129
F 2 = 1------------------------
– HTAN-
2

3-130
exp  T  – exp  – T 
HTAN = ----------------------------------------------------
exp  T  + exp  – T 

R5000.0.2 PVT Representation: Equation of State (EOS) Model 71


Nexus® Technical Reference Manual Landmark

3-131
T = T – T F

where TF is the freezing point of methane. The units in Equations 3-122


through 3-130 are gm/cc for density, °K for temperature, and
micropoise for viscosity.

To invoke the Pedersen viscosity option, the user enters keyword


VISPE in the PVT methods file. The user may optionally specify
binary interacting coefficients Xij in Equation 3-114 (by using the
VISKKIJ table) to calculate the mixture critical temperature. If the
user does not use the VISKKIJ table, Xij are taken to be zero.
Additionally, the user optionally may override the default values of j1
to j7 in Equation 3-125 (by entering the VISKJ table) and k1 to k7 in
Equation 3-126 (by entering the VISKK table).

Principal Algorithms
Nexus employs several major EOS algorithms which are at the heart of
the simulator calculations. The following sections review the major
algorithms used.

Two Isothermal Phase Flash Calculation


Given a particular temperature, pressure, and overall composition, the
two-phase isothermal flash yields the phase split of the two phases, and
the composition of each phase. The flash calculation works very well
when two phases exist and there is a good initial estimate of the
compositions in each phase. It is however unreliable as a predictor of
whether two phases or a single phase exist when the initial composition
estimates are poor.

When two phases are in equilibrium, the fugacities of each component


in each phase are equal.

3-132
f o i = f g i i = 1  nc

In Nexus, the flash calculation is converged when

3-133
nf
 1 – f------
2
g i
  f 
o i
-  TOL
i=1

72 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

where TOL is some tolerance. The number nf is by default equal to nc,


the number of hydrocarbon components. However, the user can
specify nf to be less than nc.

The Successive Substitution Flash


In Nexus, when a flash calculation is solved (except for a gridblock
flash that is initially in a two-phase state) a two-step process is
followed. First, the flash is solved using the successive substitution
algorithm to a tolerance that is greater than the final tolerance. The
successive substitution flash is more robust and has a better change of
converging even when the initial guess is poor.

For the successive substitution calculation, initial K-values must be set.


The K-values are defined as

3-134
y
K i = ----i i = 1  nc
xi

Then, the Rachford-Rice 12 equation is solved for the vapor phase mole
fraction (fv)

3-135
nc nc
zi  Ki – 1 
g  fv  =   yi – xi  =  1--------------------------------
+ fv  Ki – 1 
= 0
i=1 i–1

The individual phase compositions are updated during each iteration by

3-136
zi
x i = --------------------------------
fv  Ki – 1  + 1

3-137
yi = Ki xi

Then, the fugacities are updated by the combination of Equation 3-99


and Equation 3-101. The K-values are then updated by

3-138
n f o i
n
n+1
Ki = K i -------
f g i

R5000.0.2 PVT Representation: Equation of State (EOS) Model 73


Nexus® Technical Reference Manual Landmark

The Newton-Raphson Flash


After the the successive substitution algorithm reaches its tolerance, the
flash is solved by the Newton-Raphson method.

The following matrix system is solved iteratively.

3-139

g 1 g 1 g 1 g 1

 y1  y2  y nc – 1  f v
y 1 g1
g 2 g 2 g 2 g 2 y 2
 g2
 y1  y2  y nc – 1  f v = – :
:
: : : : y nc – 1 .
. . . .
f v g nc
g nc g nc g nc g nc

 y1  y2  y nc – 1  f v

where

3-140
 f o i – f g i 
g i = -------------------------
-
1 – fv

Compositions are updated as follows

3-141
n+1 n
yi = yi + y i i = 1  nc – 1

3-142
nc – 1
n+1 n+1
y nc = 1–  yi
i=1

3-143
n+1 n+1
n+1 zi – fv yi
xi = --------------------------------- i = 1  nc
n+1
1 – fv

Then, g and its partial derivatives are updated, and the Newton-
Raphson iteration is repeated until convergence is reached.

74 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Solution in Two-Phase Gridblocks


In gridblocks that begin an outer iteration already in a two-phase state,
a special flash calculation is performed. In the course of the
construction of the Jacobian, the following matrix system is formed:

3-144
y 1
g 1 g 1 g 1 g 1 g 1 g 1 g 1 g 1 y 2
 
 y1  y2  y nc – 1  f v  z 1  z 2  z nc – 1  p :
g1
g 2 g 2 g 2 g 2 g 2 g 2 g 2 g 2 y nc – 1
  g2
 y1  y2  y nc – 1  f v  z 1  z 2  z nc – 1  p f v
= – :
: : : : : : : : z 1
.
. . . . . . . . z 2 g nc
g nc g nc g nc g nc g nc g nc g nc g nc :
 
 y1  y2  y nc – 1  f v  z 1  z 2  z nc – 1  p z nc – 1
p

where g is defined by Equation 3-140.

Forward elimination is carried out on the above system in the process


of forming the Jacobian that is passed to the solver. The solver returns
with solutions for z 1 ,z 2 ,z nc – 1 , and p . These are back-
substituted into the above equation to yield
y 1 ,y 2 ,y nc – 1 , and f v .

If the resulting solution meets the flash convergence criteria, the flash
is avoided altogether. Moreover, the partial derivatives of g which are
utilized in the construction of the matrix system sent to the solver are
left unchanged.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 75


Nexus® Technical Reference Manual Landmark

Variable Reduction
In solving the Newton-Raphson flash, it is evident that as the number of
components grows, so does the size of the Jacobian and of the
computational effort. Within Nexus, the variable reduction method13
has been applied to avoid this problem. Instead of using phase mole
fractions as the primary variables of the flash calculation, a smaller set
of variables are defined that will yield a solution that provides unique
phase mole fractions.

The new variable set is derived from consideration of the mixing rule
for EOS parameter a, as stated in Equation 3-84. The key is to
recognize that the term  ij =  1 –  ij  is symmetric. That means that
the matrix ̃ can be expressed as

3-145
–1
̃ = S̃D̃S̃

where D̃ is a diagonal matrix given by

3-146
d1  0
D̃ = : .d i :
0  d nc

whose diagonal elements are the eigenvalues of ̃ , and S̃ is the matrix


of the eigenvectors of ̃ .

If we define

3-147
nc

Qk =  x i q k i
i=1

where q k is the k’th eigenvector of ̃ , then it can be shown that

3-148
nc
2
a =  dk Qk
k=1

This is useful because only a few (usually 3 to 5) of the values of dk are


of significant size. If m is the number of significant eigenvalues, then

76 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

3-149
m
2
a  dk Qk
k=1

It can be further shown that the Z-factors and the fugacity coefficients
can also be expressed as functions of Qk (k = 1,...,m), and the EOS
parameter b (when the simple mixing rule for b is used) so that

3-150
Z  Z  Q 1  Q m b 

and

3-151
 i   i  Q 1  Q m b 

Using this method, the number of primary variables for the Newton-
Raphson flash calculation is reduced from nc to m+1.

Unfortunately, there is some overhead cost in the conversion of the Q


variables to the usual compositional ones. At this time, this calculation
is only implemented for the flash calculations of the surface network
calculations of the simulator. Obviously, this reduction factor could be
extended for use with the calculation of any thermodynamic quantity.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 77


Nexus® Technical Reference Manual Landmark

Saturation Pressure Calculation


Given a fluid composition and a temperature, the saturation pressure
calculation finds the pressure(s) where the fluid mixture is at
equilibrium with an infinitesimal amount of an incipient phase. If the
fluid is initially a liquid, a bubble point is found. If it is initially a
vapor, a dew point is found. When a phase boundary is drawn on a
pressure-temperature diagram, the saturation pressure is the pressure
corresponding to each temperature on the two-phase envelope.

The conditions for the solution of a saturation pressure are the


equilibrium of fugacities, Equation 3-132, and the sum of the mole
fractions of the incipient phase sum to 1.

Unfortunately, the trivial solution, a solution where an incipient phase


has the same composition as the original fluid, has the strongest
attraction. Saturation pressure calculations often fail because of
convergence to the trivial solution. This is especially true around the
critical point, because the differences in equilibrium phase
compositions are very small. Initiating a saturation pressure algorithm
with K-values that are close to the true ones provides the best chance at
finding the true solution. In Nexus, the initial K-values may be
provided by a Gibbs stability analysis (See next section).

In Nexus, the saturation pressure calculation may be calculated by a


successive substitution algorithm accelerated by GDEM14 (general
dominant eigenvalue method) proposed by Michelsen15 or by a
Newton-Raphson algorithm.

Gibbs Stability Analysis


Nexus employs the Gibbs tangent plane analysis proposed by
Michelsen16 to determine whether a hydrocarbon mixture at a
particular temperature and pressure is more stable in a single phase
state or in a two-phase state.

This calculation is more reliable than the saturation pressure


calculation around the critical region, and is not as dependent on having
good initial K-value estimates.

Simply put, the calculation determines the tangent plane of the Gibbs
energy surface at the mixture composition and parallel tangent planes at
possible incipient phase compositions. If any of the parallel tangent
planes lie below the tangent plane of the mixture composition, a two-
phase state will exist. To avoid testing every possible composition for
tangent plane location, the stationary points of the tangent plane
distance are calculated.

78 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

These stationary points are located at compositions x satisfying

3-152
ln x i + ln  i  x  – ln z i – ln  i  z  = k

where k is a constant that is equal to tangent plane distance (TPD), z is


the overall composition, and x is the composition of the incipient
phase.

In Nexus, Equation 3-152 is solved for two branches. In one branch,


the initial starting point assumes the fluid is a liquid, and the search is
for an incipient vapor phase. The phases are flipped in the second
branch. The Gibbs analysis will yield different results depending on
the position of the phase envelope.

Referring to Figure 3.3, point 1 is within the two-phase envelope. The


mixture composition is unstable. Equation 3-152 will have either one
or two solutions in which k is negative. One of the solutions may be a
trivial solution. Point 2 is right on the phase boundary and one solution
will be trivial and one will have a solution with k equal to 0. Point 3 is
in the single phase region, between the phase boundary, and the dotted
line, which will be in close proximity to the phase boundary. We could
call this region the near phase boundary region. A stability test at this
point will yield one branch with a trivial solution and one branch with a
positive value of k. Point 4 is in the single phase region and outside of
the near phase boundary region. Both branches of the stability test will
yield a trivial solution. With our example, all the points are on the
bubble point side, so trivial solutions will exist in the branch that starts
with a liquid-like estimate for the incipient phase composition.

It is evident that while the Gibbs stability test can identify whether the
phase state is single- phase or two-phase, in the vast majority of cases
that are in a single phase state, the outcome will be two trivial
solutions. When this happens, no useful information can be gleaned to
indicate whether the mixture is a liquid or a vapor phase, and no
estimates of K-values will be produced for a saturation pressure or
flash calculation.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 79


Nexus® Technical Reference Manual Landmark

4
x

2
x
3
x
x 1

T or x

Figure 3.3: Phase Diagram for a Typical Oil

80 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

The Search for a Two-Phase State


Significant flexibility exists in Nexus in the search for the transition of
a single phase state to a two-phase state. The most important choice is
the detection method used. Additionally, for reservoir calculations,
there are different methods available for choosing which gridblocks to
test.

Transition Test Technique


There are three possible methods available in Nexus to perform the
transition test. The default one is called the increasing pressure, which
uses a series of flash calculations. A second method is the saturation
pressure method, which is similar to the standard technique used in
VIP. A third method is the Gibbs stability analysis which is similar to
using the Gibbs option in VIP.

Increasing Pressure Method


The increasing pressure method performs a sequence of flash
calculations at the same temperature and compositions but at different
pressures. As discussed above, the two-phase isothermal flash is not
very reliable unless the initial K-values are good. It is easy for the flash
to converge to a single phase state even when two phases should exist.
As one moves away from the phase boundary within the two-phase
region, the flash calculation becomes more and more reliable. Also, at
low pressures, K-values can be estimated well by the Wilson
correlation:

3-153
T ci
p ci exp 5.37  1 +  i   1 – ------ -
T
K i = ---------------------------------------------------------------------------
p

Therefore, the increasing pressure starts by steadily decreasing the


pressure and performing a flash until a two-phase region can be found.
The initial K-values are obtained either from a good saved value of K-
values (from previous iterations) or from the Wilson K-value estimate.
If no two-phase region can be found when pressure reaches standard
pressure, it is concluded that the system is in a single phase state. If a
two-phase region is found, the pressure is steadily increased back
towards the original pressure. At each step, K-values are estimated
from the previous step by

R5000.0.2 PVT Representation: Equation of State (EOS) Model 81


Nexus® Technical Reference Manual Landmark

3-154
n p n+1 r
= K i  ----n- 
n+1
Ki 
p

where

3-155
n–1 n
ln  K  K -
r = ---------------------------------
n–1 n
ln  p p 

Of course, the trick is to not increase the pressure too quickly. If that
happens, the extrapolation may yield a poor result. This is especially a
problem in the critical region where K-values can change very rapidly
with small changes in pressure.

To help take smaller increments around the phase envelope, a


parameter PHASEFRAC is defined. If the flash finds a two-phase state
at 0.999 times the pressure, while the vapor phase mole fraction is
either equal to PHASEFRAC or (1 - PHASEFRAC), and then in the
next step finds a single phase state at the gridblock pressure, then the
increasing pressure calculation is retried starting at 0.9993 times the
pressure with another 4 increments to reach the gridblock pressure.
The default value of PHASEFRAC is 0.05.

We see that the increasing pressure method can be performed in a


manner that is very robust, but the cost can be excessive when we are
near a phase boundary, and especially around the critical region.

Figure 3.4 illustrates the increasing pressure mechanism. A series of


flashes is conducted along the vertical line. The first flash is performed
at a pressure below the initial pressure. If it does not yield a two-phase
state, the pressure is decreased until an eventual solution is found that
yields a two-phase state. This pressure may be much lower than the
initial flash pressure. Then, the pressure is built back up to the target,
which is the gridblock pressure. On the way up, good K-values are
estimated by the extrapolation. In the figure, it would eventually find
that conditions are in a single phase state after all.

82 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

target pressure

initial flash pressure

first pressure that yields two phases

T or x

Figure 3.4: Illustration of Increasing Pressure Method

Saturation Pressure Method

An obvious way to use the saturation pressure is to compare it with the


gridblock pressure. If the gridblock pressure is below the saturation
pressure and the saturation pressure is a bubble point, then a two-phase
state exists. If the saturation pressure is a dew point, we really can’t be
sure which state we are in without knowing whether we have an upper
or lower dew point. Usually the lower dew point is much below
reservoir pressure, and we can safely assume that we are in a two-phase
state if the pressure is below the dew point pressure. This is the
assumption made in both Nexus and VIP.

For any fluid, a region will exist near the critical region in which it is
nearly impossible to find the saturation pressure because of the
attractiveness of the trivial solution.. This region is illustrated in
Figure 3.5. In Nexus, when this occurs, the simulator switches to an
increasing pressure method.

The saturation pressure can be more computationally efficient than


performing a series of flashes when it can be found. Also, it provides a
reliable mechanism for determining whether a single phase fluid is a
liquid (because it finds a bubble point) or a vapor (because it finds a
dew point).

R5000.0.2 PVT Representation: Equation of State (EOS) Model 83


Nexus® Technical Reference Manual Landmark

The success of the saturation pressure calculation depends on starting


with good K-values. Sometimes the stability test can provide K-values
near the critical region.

region where saturation pressure


cannot be found

T or x

Figure 3.5: Illustration of Region Where No Saturation Pressure Can Be Found

Gibbs Stability Analysis


As discussed above, the Gibbs stability analysis is a good mechanism
for determining whether we have a two-phase state or a single phase
state. It is more reliable than either of the other two tests, but often
doesn’t yield any information about the whether a single phase is a
liquid or a vapor. When both branches of the stability test yield a trivial
solution, Nexus conducts an increasing pressure calculation to identify
the single phase state.

Choice of Gridblocks for Application of Transition Test


The transition test for a gridblock going from a single phase to a two-
phase state is one of the most expensive in reservoir simulation using
an EOS. Thus, for computational efficiency, it is advantageous to
avoid testing every gridlbock in every timestep.

There are five possible mechanisms that control the gridblock choice.
These are all specified by the TRANSITION keyword under the
EOSOPTIONS keyword.

84 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

The default mechanism is referred to by the keyword TEST. The TEST


algorithm will only test for a transition in gridblocks that contain
perforations or in single phase gridblocks that are adjacent to two-
phase gridblocks or single phase blocks that are of a different phase.
This mechanism may miss many blocks that should undergo phase
transition if large timesteps are taken in implicit mode or if there is a
general drop in pressures below the fluid saturation pressure.

A slight variation of this method is activated by the keyword


NEIGHBOR. The NEIGHBOR method tests the same gridblocks that
the TEST method would test. However, it uses the K-values of
neighboring two-phase gridblocks to initiate the transition test.

The DELTA method will result in more gridblocks being tested than the
default method, and will be more costly computationally. It may be
more appropriate depending on the operational mechanism. It is also
much more similar to the criteria used in VIP. In addition to all blocks
that would be included under the criteria established by TEST, the
DELTA method evaluates several criteria in each gridblock:

1. If a saturation pressure is available, a transition test will be


performed in gridblocks where the pressure has dropped below the
saturation pressure.

2. A transition test will be performed in gridblocks if pressure has


dropped by more than input parameter TDELP (default value of
0.05) multiplied by the gridblock pressure.

3. A transition test will be performed in gridblocks if the overall mole


fraction change of any component in the gridblock exceeds the
input parameter TDELZ (default value of 0.001).

4. A transition test will be performed in gridblocks that judged to be


near critical. The test for criticality is

3-156
nc

  xi – yi xi
i--------------------------------
=1
nc
-  TCRIT
2
 xi
i=1

where TCRIT is a user defined parameter that has a default value of


0.15.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 85


Nexus® Technical Reference Manual Landmark

The B method17 is similar to the DELTA method but additionally it


uses a parameter called the "b-parameter" to adjust the tests for their
location with respect to the phase envelope. In the section describing
the Gibbs stability test, the existence of a near phase boundary region
that exists just outside of the phase boundary in the single phase region
was discussed. This near phase boundary region approximately
follows the contours of the smallest eigenvalue of a matrix of
parameters B, whose elements are defined as

3-157
B ij =  ij + n i n j   ln  i 
 nj

Let’s denote the smallest eigenvalue of B as b. At the limit of intrinsic


stability and at the critical point, b equals 0. Inside the phase envelope,
b is mostly negative. If b is negative, we are in the two-phase region.
Outside the phase envelope, b is always positive. The value of b
becomes progressively more positive as the distance above the phase
envelope increases. The absolute value of b is proportional to the
square of the distance from the critical point. Thus it is possible to use
b to scale the changes required to trigger a phase transition test.

In Nexus, b is calculated and then used in the next outer iteration. It


can be seen as a smarter variation of the DELTA method. The
drawback is the additional overhead required to calculate b, and the
explicit use of b.

The transition test is triggered in any gridblock where any of the


following criteria are met:

1. Any gridblock that would be tested according to the criteria of the


TEST or NEIGHBOR method.

2. A gridblock that has a negative value of b.

3. If a saturation pressure is available, a gridblock where the pressure


has dropped below the saturation pressure.

4. A gridblock where pressure has dropped by more than input


parameter TDELP (default value of 0.1) multiplied by the
gridblock pressure and multiplied by b. This means that near the
critical point and the phase boundary, smaller changes in pressure
will trigger the transition test.

5. A gridblock where the change in the overall mole fraction of any


component exceeds TDELZ (default value of 0.1) multiplied by b.

86 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Near the critical point and the phase boundary, smaller changes in
composition will trigger the transition test. The default value of
TDELZ is larger than when used in the DELTA criteria, because
near the phase envelope b is usually less than 0.1.

Finally, the most extreme selection method available is the ALL


criteria. This forces every single phase gridblock to undergo a phase
transition test. While this of course is very costly, it ensures that all
gridblocks that should switch to a two-phase state do so. It provides a
standard by which the effectiveness of the other criteria can be judged.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 87


Nexus® Technical Reference Manual Landmark

Single Phase Identification


As noted above, in the course of a two-phase transition test, a single
phase state may be detected, and the single phase will be labelled as
either a liquid or a vapor. However, there are some cases where the
phase labelling may fail or be wrong. For example, if the temperature
is greater than the cricondentherm, no saturation pressure can be found,
the Gibbs stability will yield a trivial solution, and the flash will not
converge.

Nexus allows the user to use the PHASID keyword (which is a sub-
keyword to the EOSOPTIONS keyword) to give the simulator some
guidance in single phase labelling. The possible options are
PREVIOUS, DENSITY, FLASH, OIL_INITIAL, GAS_INITIAL, OIL,
GAS, or PSAT. Another alternative is to use the Li pseudocritical
temperature method18 which is triggered by entering the Li factor in the
equilibrium data.

Using the PREVIOUS option, the gridblock retains the same single
phase label that was in previous existence.

Using the DENSITY option, a density value is specified. If the phase


mass density is less than the specified density, the phase is labelled as a
gas. Otherwise it is labelled as an oil.

Using the FLASH option, if an increasing pressure was not already


applied, the increasing pressure method will be employed.

The OIL_INITIAL option only applies during initialization. All single


phase gridblocks initially will be labelled as oil.

The GAS_INITIAL option only applies during initialization. All single


phase gridblocks initially will be labelled as gas.

Using the OIL option will force all single phase gridblocks to be
labelled as OIL.

Using the GAS option will force all single phase gridblocks to be
labelled as gas.

Using the PSAT option, if a saturation pressure calculation has not


already been performed, one will be done to detect a dew point or
bubble point.

Using the Li method, the Li pseudo-critical temperature (Tpc) is


calculated in each gridblock using the following formula:

88 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

3-158
nc

 zi Vci Tci
T pc = i---------------------------
=1
nc
-

 zi Vci
i=1

where Vci is the component critical volume.

If the reservoir temperature is less than Tpc, the fluid is labelled as an


oil. Otherwise, it is labelled as a gas. Obviously, using a true critical
temperature would be preferable, but the Li pseudocritical temperature
consumes only a small fraction of the effort required to calculate the
true critical temperature.

The true critical temperature may differ significantly from the actual
critical temperature. The discrepancy can be mitigated by the
introduction of a Li multiplication factor. The multiplication factor is
applied to the pseudo-critical temperature before its comparison with
the reservoir temperature. Therefore, if the multiplication factor is less
than 1, Tpc will be shifted to the left, and single phase blocks will be
more likely to be labelled as a gas. If the multiplication factor is greater
than 1, Tpc will be shifted to the right, and single phase blocks will be
more likely to be labelled as oil.

Surface Separator Calculations


Surface separator calculations use one of two methods. In the usual
method, a multistage configuration is specified with the temperature
and pressure set for each stage, and a flash calculation performed for
each stage to determine the phase splits and the phase compositions.
The liquid phase density can be calculated from performing an EOS
calculation with the composition of the output liquid at standard
temperature and pressure. Alternatively, the Standing-Katz
method19,20 can be applied to calculate the surface density.

Recognizing that it may be difficult to create a single EOS that is


accurate for a wide range of conditions (especially temperatures), a
different EOS method may be specified for each stage.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 89


Nexus® Technical Reference Manual Landmark

Multi-stage Separator
The multi-stage separator capability in Nexus is similar to that found in
VIP. The user can specify any number of stages. The temperature and
pressure of each stage is set. The upper and lower outflow streams can
be split and the split streams can be assigned to other stages or to the
outlet.

VIP and Nexus allow a rather simple configuration of a separator


battery consisting of several separator stages connected in sequence. A
sample configuration is shown in Figure 3.6. Each stage has one feed
stream and two output streams, one vapor and one liquid. Specified
fractions of the vapor and liquid streams from a separator stage are sent
to the battery gas and oil sales lines. The remaining fractions of the
vapor and liquid streams are sent to downstream separator stages.

Gas Sales Line

Vapor
Stream

Feed
Stage Stage Stage Stage
1 2 3 Ns

Liquid
Stream

Oil Sales Line

Figure 3.6: Sample Separator Battery Configuration

The configuration of a separator battery does not allow recycling of


streams.

The feed stream (moles of hydrocarbon component i) to the first


separator stage (N1,i) is known and is equal to the battery feed. Here,
the first subscript is used as the notation for the stage number, while the
second subscript is used for the hydrocarbon component number. The
feed stream to the last stage ns is the sum of the vapor and liquid
streams sent to this stage from all preceding stages:

3-159
n–1
l l v v
N n i =   F mn N mi + F mn N mi 
m=1
i = 1 2  n c n = 2 3  n s

90 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Here, Flmn and Fvmn are fractions of the liquid and vapor streams that
are sent to stage n from stage m. These fractions are defined by a user
on the SEPARATOR card. The sum of the vapor and liquid streams in
moles for component i, Nvmi and Nlmi, respectively, which leaves stage
m, is equal to the feed stream to this stage:

3-160
v l
N mi = N mi + N mi i = 1 2  n c n = 1 2  n s

Moles that are sent to the oil and gas sales lines, No and Ng, are equal to
the sum of all streams sent to these lines from all the separator stages:

3-161
nc ns nc ns
l l v v
No =   Fno Nni Ng =   Fng Nni
i = 1n = 1 i = 1n = 1

Here, Flno and Fvng are fractions of the liquid and vapor streams, which
are sent to the sales lines. They are defined by a user on the
SEPARATOR card.

The main difference between the separator treatment in the two models
is the much higher level of implicitness in Nexus. The VIP separator
calculation is explicit and the conversion factor from moles to standard
volumes is lagged an iteration. The Nexus calculation is fully implicit.

In Nexus, the implicit separator calculation is based on forming two


matrices for each stage n

3-162
v v
N n 1 N n 1

 N n 1  N n 1nc
: :
v v
N n nc N n nc

 N n 1  N n nc

R5000.0.2 PVT Representation: Equation of State (EOS) Model 91


Nexus® Technical Reference Manual Landmark

and

3-163
l l
N n 1 N n 1

 N n 1  N n 1nc
: :
l l
N n nc N n nc

 N n 1  N n nc

For the final oil and gas output streams, the following vectors are also
formed:

3-164
T
q gas q gas

 N g 1  N g nc

and

3-165
T
q gas q gas

 N o 1  N o nc

where qgas is the volumetric flow rate of produced gas in standard


volumes, and qoil is the volumetric floweret of produced oil in standard
volumes.

Products and sums of the above equations are combined according to


the separator stage configuration to produce the following resulting
vectors (which are the derivatives of output volumetric rates with
respect to the molar feed rates)

3-166
T
q gas q gas

 N 1 1  N 1 nc

92 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

and

3-167
T
q oil q oil

 N 1 1  N 1 nc

Standard Conditions
For a multistage separator to behave properly, the last stage of the
separator should be at standard conditions of temperature and pressure.
As discussed in the keyword manual, if the standard conditions are
different than the last stage separator conditions for any separator, the
simulator will try to reconcile the differences if they are small enough.
It will also try to reconcile the differences between standard conditions
specified in different reservoirs.

If the standard conditions and last stage separator conditions are


different in a VIP dataset, the converted dataset may have difficulty
obtaining the same volumetric outputs in Nexus. That is because the
simulators treat the discrepancy inconsistently. In both simulators, the
gas volumes will be calculated at standard conditions, regardless of the
separator conditions. In VIP, the produced oil volume is calculated
using the Z-factor calculated at last stage conditions but with standard
temperature and pressure. In Nexus, the produced oil volume will be
calculated with the Z-factor, pressure, and temperature all evaluated at
last stage separator conditions.

The following set of rules applies to both the standard temperature and
standard pressure.

If a standard condition of the reservoir has been explicitly set in the


options file, then that standard condition is honored for that reservoir.
(Note: Use of TSTD or PSTD keywords for the individual reservoirs
will set the standard conditions for that reservoir. The standard
condition can also be set by the use of TSTD ALL or PSTD ALL in the
master case options file.). The last stage condition of each separator
belonging to that reservoir is checked against the standard condition. If
the difference is within a tolerance, the last stage condition of the
separator is reset to the standard condition. If the difference is greater
than the tolerance, a warning message is issued.

R5000.0.2 PVT Representation: Equation of State (EOS) Model 93


Nexus® Technical Reference Manual Landmark

If the standard condition of the reservoir has not been set, then the
condition of the last stage of each separator in the reservoir is checked.
If the conditions are all identical and the difference between the
common condition and the default standard condition is within a
tolerance, then the standard condition is reset to the common last stage
separator condition. If the conditions are all identical but the difference
is not within the tolerance of the default standard condition, a warning
is issued. If the conditions are not all identical, then the last stage
condition of each separator is checked against the default standard
condition. If the difference is within the tolerance, the last condition of
the separator is reset to the default standard condition. If the difference
is not within the tolerance, a warning is issued.

In addition, if for the master case, the standard condition has not been
explicitly set with the keyword in the options file, and the standard
condition of all the reservoirs is the same, then the standard condition
of the master case is set to the common value.

In the above rules, the following set of tolerances applies:

• For standard temperature and field units, the tolerance is 1.0


degrees F.

• For standard temperature and all other unit systems, the tolerance
is 0.5 degrees C.

• For standard pressure and field or lab units, the tolerance is 1.0
psia.

• For standard pressure and metric units, the possible tolerances are
7.0d0 kPa, 0.07 bars, and 0.07 kg/cm2.

• The default standard temperature is 60 degrees F in field units, and


15 degrees C for all other unit systems.

• The default standard pressures are 14.696 psia for field and lab
units, and 101.325 kPa or 1.01325 bars or 1.03321 kg/cm2 for the
various metric unit systems.

94 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Standing-Katz Correlation
The user can choose to apply the Standing-Katz correlation to calculate
the hydrocarbon liquid surface density instead of using the result of the
equation of state. The correlations were originally developed as a
graphical procedure by Standing and Katz19 to determine the liquid
phase density. Various authors have fitted the curves with
programmable formulas. The formulas used in VIP and Nexus are
similar to but not identical to those reported by Pedersen et al.20

Nexus uses the same mathematical equations as VIP. However, the


Nexus implementation is much more flexible in the way it identifies the
composition of the oil stream.

The procedure involves first determining the standard mass density of a


liquid which contains pseudo-components representing C3+ and H2S.
Then, a correction is applied for the presence of C2. Another
correction is applied for the presence of CO2. A third correction is
applied for the presence of C1 and N2. This is further corrected for
pressure, and then for temperature.

In VIP, the mole fractions of the C2, CO2, and C1+N2 are determined
by evaluation of the molecular weights of the pseudo-components. VIP
uses the following rules:

1. It assigns pseudo-components which have molecular weights of


30.07 +/- 0.01 (representing C2H6) to the C2 group.

2. The simulator will assign pseudo-components which have


molecular weights of 44.01 +/- 0.01 (representing CO2) and 64.06
+/-0.01 (representing SO2) to the CO2 group.

3. The simulator will assign pseudo-components which have


molecular weights of 2.016 +/- 0.01 (representing H2), 16.043 +/-
0.01 (representing C1), 28.01 +/- 0.01 (representing N2 or CO),
and 32.00 +/- 0.01 (representing O2) to the C1-N2 group.

The user can allow Nexus to use the same rules, or the user can
explicitly assign mole fractions of each pseudo-component to be a part
of the C2 group (FC2 ), the CO2 group ( FCO2) and the C1+N2 group (
FC1N2 ), by entering columns of data in the PROPS table with headers
STK_C2, STK_CO2, and STK_C1N2 respectively. These fractions
should be between 0. and 1, and for any one pseudo-component must
sum to be less than or equal to 1. That is,

3-168
0  F T i = F C2 i + F CO2 i + F C1N2 i  1 i=1,...,nc

R5000.0.2 PVT Representation: Equation of State (EOS) Model 95


Nexus® Technical Reference Manual Landmark

When using the Standing-Katz procedure, the user can choose to either
enter none of these columns or all three of these columns. If the three
columns are entered, the sum of the values for a particular component
must be positive and less than or equal to 1. Each entry must be
between 0 and 1. For example, a pseudocomponent could represent C1
(83 mole percent), N2 (5 mole percent), and CO2 (10 mole percent),
and H2S (2 mole percent). Then, the value of STK_C1N2 should be
0.88, the value of STK_CO2 should be 0.10, and the value of STK_C2
should be 0.0.

The implementation of Standing-Katz in VIP and Nexus is similar to


that published by Pedersen. However, it is not identical. The exact
algorithm has not been previously published, so they are outlined
below:

Step 1: Uncorrected Density


In the first step, the mass density at standard conditions of the fraction
comprised of C3+ and H2S components is calculated using the input
values of the component specific gravities:

3-169
nc

  1 – FTi xi Mi
i=1
 1 = ------------------------------------------
nc
 1 – F Ti x i M i
 --------------------------------
0.9991 i
-
i=1

where

Mi is the molecular weight of component i,

xi is the mole fraction of component i,

 i is the specific gravity of component i from the STKATZ column


of the PROPS table.

FTi is the fraction of the pseudo-component assigned to the


combined C2, C1+N2, and CO2 groups.

96 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Step 2: Correction for C2


First, the weight fraction of C2 (not considering the CO2 and C1N2
groups) is calculated:

3-170
nc

 FC2 i xi Mi
i=1
w C2 = --------------------------------------------------------------------
nc

  1 – FCO2 – FC1N2 xi Mi


i=1

Then, density is adjusted by:

3-171
 2 =  1 – w C2  0.3158 – 0.2583  1 – 2u  + 0.01457  1 + 6u  u – 1   

3-172
u = 2.5   1 – 0.46 

Step 3: Correction for CO2


3-173
nc nc

 FCO2 i xi Mi +   1 – FCO2 i – FC1N2 i xi Mi


i=1 i=1
 3 = -----------------------------------------------------------------------------------------------------------------------
-
nc nc

 FCO2 i xi Mi   1 – FCO2 i – FC1N2 i xi Mi


i------------------------------------
=1 - i=1
+ ---------------------------------------------------------------------------
0.8213 2

R5000.0.2 PVT Representation: Equation of State (EOS) Model 97


Nexus® Technical Reference Manual Landmark

Step 4: Correction for C1-N2


First, the weight fraction of the C1-N2 group is calculated:

3-174
nc

 FC1N2 i xi Mi
w C1N2 = i--------------------------------------
=1
nc
-

 xi Mi
i=1

Then, the density is corrected by

3-175
 3 –  0.088255 – 0.095509c 1 + 0.007403c 2 – 0.000603c 3 
4 =
–  0.142079 – 0.150175c 1 + 0.006679c 2 + 0.001163c 3    3 – 0.65 

where

3-176
c 1 = 1 – 5w C1N2

3-177
c 2 = 1 – 30w c1N2  1 – 5w C1N2 

3-178
2
c 3 = 1 – 5w C1N2  12 – 150w C1N2 + 500w C1N2 

Step 5: Correction for pressure


The correction is as follows:

3-179
 4 –  0.034674 + 0.026806p 1 + 0.003705p 2 + 0.000465p 3 
–  – 0.022712 + 0.015148p 1 + 0.004263p 2 + 0.000218p 3   1 – 2u 
5 =
–  – 0.007692 + 0.003521p 1 + 0.002482p 2 + 0.000397p 3   1 + 6u  u – 1  
2 3
–  – 0.001261 – 0.000294p 1 + 0.000941p 2 + 0.000313p 3   1 – 12u + 30u – 20u 

where

98 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

3-180
p 1 = 1 – 2g

3-181
p 2 = 1 – 6g  1 – g 

3-182
2
p 3 = 1 – g  12 – 30g + 20g 

3-183
u = 2.5   4 – 0.48 

3-184
g = 0.0001  p – 500 

and p is the pressure in psia.

Step 6: Correction for temperature


The correction is as follows:

3-185
 5 –  0.055846 – 0.060601t 1 + 0.005275t 2 – 0.00075t 3 
–  0.037809 – 0.049262t 1 + 0.012043t 2 + 0.000455t 3   1 – 2v 
6 =
–  0.021769 – 0.032396t 1 + 0.011015t 2 + 0.000247t 3   1 + 6v  v – 1  
2 3
–  0.009675 – 0.015500t 1 + 0.006520t 2 – 0.000653t 3   1 – 12v + 30v – 20v 

where

3-186
t 1 = 1 – 2h

3-187
t 2 = 1 – 6h  1 – h 

3-188
2
t 3 = 1 – h  12 – 30h + 20h 

3-189
v = 2.5   5 – 0.52 

R5000.0.2 PVT Representation: Equation of State (EOS) Model 99


Nexus® Technical Reference Manual Landmark

3-190
h = 0.005  t – 60 

and t is the temperature in degrees F.

Gas Plants
Gas plants can be used as an alternative to multistage separator
calculations. While the actual calculation is much simpler, the result
can be used to represent a complex surface gas plant that cannot be
represented by the simple multistage separator configuration.

This method uses liquid molar recovery fractions for each component,
input as a function of a key component plus composition in the well
stream. The key component plus composition is defined as the sum of
the over-all mole fractions for the components listed under the
KEYCPTLIST keyword.

The interpolated values of the liquid recovery fractions multiplied by


the overall composition for each component are used to obtain the

100 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

produced liquid composition. Figure 3.7 illustrates how the production


stream compositions are calculated using the input recovery factor

Figure 3.7: Illustration of Recovery Calculations Used in Gas Plant

R5000.0.2 PVT Representation: Equation of State (EOS) Model 101


Nexus® Technical Reference Manual Landmark

EOS parameters are then used to compute liquid densities. Liquid


density plus surface total molar production rate for the liquid provides
the standard surface rate. Gas composition and, thus, the densities are
determined by the difference of the overall composition and liquid
composition. Again, the total molar production rate of gas and the
density provide the standard surface production rate.

Calculation of Volume Derivatives


When using the EOS model, volume derivatives are required with
respect to total moles and pressure in the isothermal case.

In a single phase state, the volume derivative calculations are trivial.


The EOS calculations yield density derivatives for each phase and
volume equals moles divided by density.

In a two-phase state, the volume derivatives with respect to pressure


and overall moles must be solved simultaneously taking into account
how equilibrium phase compositions are affected by these changes.

For example for the oil phase, a following system of equations is


constructed

3-191

g 1 g 1 g 1 g 1 g 1 g 1 g 1
 
 y1  y2  y nc – 1  f v  z 1  z nc – 1  p
g 2 g 2 g 2 g 2 g 2 g 2 g 2
 
 y1  y2  y nc – 1  f v  z 1  z nc – 1  p
: : : : : : :
. . . . . . .
g nc g nc g nc g nc g nc g nc g nc
 
 y1  y2  y nc – 1  f v  z 1  z nc – 1  p
V o V o V o V o V o V o V o
 
 y1  y2  y nc – 1  f v  z 1  z nc – 1  p

where g is defined by Equation 3-140 and Vo is the oil phase volume.

Forward elimination of columns with derivatives of yi and fv will yield


a last row with the derivatives of Vo with respect to zi and p. A simple
transformation will yield derivatives with respect to Ni and p.

102 PVT Representation: Equation of State (EOS) Model R5000.0.2


Landmark Nexus® Technical Reference Manual

A similar system of equations is solved for the gas phase volume.

This system of equations is similar to the one described in detail by


Young and Stephensen.21 The proof that the above procedure yields
volume derivatives with respect to overall moles is described in detail
by Wong et al.22

R5000.0.2 PVT Representation: Equation of State (EOS) Model 103


Nexus® Technical Reference Manual Landmark

Three Phase Equilibrium

Nexus can be instructed to calculate the three-phase equilibrium state


where hydrocarbon components are weakly soluble in the water phase.

This calculation option is activated by inputting tables of hydrocarbon


solubility in water. For each hydrocarbon component that is soluble in
water, a table of solubility data can be entered at each level of
temperature and salinity. The tables have columns of saturation
pressure (PSAT), solubility (RSW), water formation volume factor
(BW), water compressibility (CW), water viscosity (VW), and water
viscosity variation with pressure (CVW). The properties of pure water
are entered for a RSW of 0. The properties of pure water at the same
temperature and salinity must be the same for all soluble components.
Water properties become a function of the amount of hydrocarbon
dissolved in the water phase.

Solubility should be limited to components which exist as gases at


atmospheric conditions, such as CO2, N2, H2S, and hydrocarbons
lighter than pentane. The combined solubility of all non-water
components in the water phase should not exceed a few percentage
points.

It is also assumed that the solubility of one component has no effect on


the solubility of other components. Again, this will only be
approximately true at low concentration levels.

Calculation of Water Properties


First, the properties of pure water are calculated from the data input for
table values of RSW = 0. For pure water, the input values are saturation
pressure ( p sat0 ), formation volume factor ( B w sat0 ), compressibility
( c w sat0 ), viscosity (  w sat0 ), and the derivative of visocity with
respect to pressure (  wp sat0 ).

The pure water density is calculated by


 w std
 w = -----------------  1 + c w sat0  p – p sat0   3-192
B w sat0
The pure water viscosity is calculated by

 w =  w sat0  1 +  wp sat0  p – p sat0   3-193

104 PVT Representation: Three Phase Equilibrium R5000.0.2


Landmark Nexus® Technical Reference Manual

Comparison of the above equations with Equation 3-1 and Equation 3-


2 show that the water property calculation for pure water is identical to
that of the normal water property calculation if p sat0 = p ref .

For each soluble component, the solubility data are internally converted
to tables of p sat , B w sat , c w ,  w , with mole fraction as the index.
Density is calculated by:
 w std  1 + R hw 
 w = -------------------------------------
- 3-194
Bw
where R hw is the mass ratio of hydrocarbon to water, and
1
1 = --------------
------  1 + c w  p – p sat  
Bw B w sat
Tables can be input for different levels of temperature and salinity. Data
is calculated by linear interpolation. However, data is not extrapolated.

Conversion of Solubility Data to Fugacity Coefficient Data


The two-phase equation of state calculations in Nexus use the condition
of the equality of fugacities to determine the equilibrium state. To
facilitate the calculation of the equilibrium state for a three-phase (oil,
gas, and water) system, the tabulated gas solubility data is translated to
the fugacity of the hydrocarbon component in the water phase. Chang
et al.23 introduced this concept for use with CO2 solubility in water. We
generalize this technique to any hydrocarbon component, while
ignoring the interaction between the different components. This
technique only works on the assumption of very limited solubility of
hydrocarbons in water. It should not be used for hydrocarbons with
molecular weights greater than pentane. When used with multiple
components, the solubility and the swelling of water will be
overestimated. It is best used with one or two components.

The phase equilibrium constraint for a non-aqueous component in a


binary system of water and hydrocarbon can be stated as

f i w = f i h 3-195

where f i w is the fugacity of component i in the aqueous phase, and f i h


is the fugacity of component i in the hydrocarbon rich phase.

The above equation can be expressed in terms of fugacity coefficients


as follows:

w i  i w = y i  i h 3-196

R5000.0.2 PVT Representation: Three Phase Equilibrium 105


Nexus® Technical Reference Manual Landmark

where w i is the mole fraction of component i in the aqueous phase,


 i w is the fugacity coefficient of component i in the aqueous phase,
y i is the mole fraction of component in the hydrocarbon rich phase, and
 i h is the fugacity coefficient of component i in the hydrocarbon rich
phase.

If we assume that the hydrocarbon rich phase contains virtually no


water, then y i  1 , and
 i h
 i w  ---------- 3-197
wi
The fugacity coefficient in the hydrocarbon rich phase can be
calculated from an equation of state given the pressure, temperature,
and the composition. For each of the components, we assume that
hydrocarbon rich phase is purely composed of that component, so that
the compositional dependence is removed. The value of w i is
calculated from the input solubility data. 3-198

Flash Procedure
For each gridblock or connection in the network, the phase equilibrium
for a three-phase system must be determined. With our assumptions, no
water component is allowed in the liquid or vapor hydrocarbon phases,
and some of the non-water components are allowed in the aqueous
phase.

In the first step, a two-phase flash with an aqueous phase and a single
hydrocarbon phase is performed. This establishes a good initial
estimate of the hydrocarbon content in the aqueous phase.

The composition of the hydrocarbon phase is then tested by a


combination of Gibbs stability analysis and saturation pressure
calculation to determine if it will split to form two hydrocarbon phases.
If the hydrocarbon phase does not split, the flash calculation is
considered finished.

If the hydrocarbon is determined to split into two phases, a two-phase


flash is performed to set the initial compositional estimates of the
hydrocarbon phases. The, Nexus employs a three-phase flash using the
successive substition technique, followed a three-phase flash using
Newton’s method.

Volume derivatives are then determined by solutions of several matrix


systems that are extensions of the ones used in the two-phase flash
procedure.

106 PVT Representation: Three Phase Equilibrium R5000.0.2


Landmark Nexus® Technical Reference Manual

References

1. Whitson, C. H. and Torp, S.B. "Evaluating Constant Volume Depletion Data", JPT,
(March 1983) 610; Trans., AIME, 275.

2. Soave, G., "Equilibrium Constants from a Modified Redlich-Kwong Equation of


State", Chem. Eng. Sci. (1972) 27, No. 6, 1197.

3. Peng, D.Y. and Robinson, D.B.: "A New Two-Constant Equation of State", Ind. &
Eng. Chem. (1976) 15, No. 1, 89.

4. Robinson, D. B., Peng, D.Y., and Ng, H-Y: "Capabilities of the Peng-Robinson
Programs, Part 2: Three-Phase and Hydrate Calculations", Hydrocarbon Process.
(1979), 58, 269.

5. Peneloux, A., Rauzy, E., and Freze, R.: "A Consistent Correction for Redlich-
Kwong-Soave Volumes", Fluid Phase Equilibria (1982), 8, 7.

6. Jhaveri, B. S. and Youngren, G. K.: "Three-Parameter Modification of the Peng-


Robinson Equation of State to Improve Volumetric Predictions", SPHERE, (Aug.,
1988) 1033.

7. Edmister, W. C. and Lee, B.I.: Applied Hydrocarbon Thermodynamics, Volume I,


2nd ed., Gulf Publishing Co., Houston, (1984),.

8. Lohrenz, J., Bray, B.G., and Clark, C.R.: "Calculating Viscosities of Reservoir
Fluids from their Compositions", J. Pet. Tech., (1964) 16, 1171.

9. Pedersen, K. S., Fredenslund, A., and Christensen, P. L.: "Viscosity of Crude Oils",
Chem Eng. Sci., (1984), 39, 1011.

10. Pedersen, K.S., Fredenslund, A., and Thomassen, P..: Properties of Oils and
Natural Gases, Gulf Publishing Co., Houston (1989).

11. Hanley, H.J.M., McCarty, R.D., and Haynes, W.M.: Cryogenics (1975), 15, 413.

12. Rachford, H.H. and Rice, J.D.: "Procedure for Use of Electrical Digital Computers
in Calculating Flash Vaporization Hydrocarbon Equilibrium", JPT (Oct., 1952), 19.

13. Pan, H. and Firoozabadi, A.: "Fast and Robust Algorithm for Compositional
Modeling: Part II-Two-Phase Flash Computations" SPE 71603 presented at the SPE
Annual Technical Conference and Exhibition (Sept., 2001), New Orleans.

14. Crowe, A.M. and Nishio, M.: "Convergence Promotion in the Simulation of
Chemical Processes-the General Dominant Eigenvalue Method", AICHE J. (1975) 21,
528.

15. Michelsen, M.L.: "Saturation Point Calculations", Fluid Phase Equilibria (1985)
23,181.

16. Michelsen, M.L.: "The Isothermal Flash Problem. Part I. Stability", Fluid Phase
Equilibria (1982), 9, 1.

17. Rasmussen, C. P. et al: "Increasing Computational Speed of Flash Calculations


with Applications for Compositional, Transient Simulations", SPE 84181 presented at
the SPE Annual Technical Conference and Exhibition (Oct., 2003), Denver.

18. Li, C.C.: "Critical Temperature Estimation for Simple Mixtures", Can. J. Chem.

R5000.0.2 PVT Representation: References 107


Nexus® Technical Reference Manual Landmark

Eng. Data, (1987) 32(4), 447.

19. Standing, M. B. and Katz, D. L.: "Density of Crude Oils Saturated with Natural
Gas", Am. Inst. Min. Metall. Eng., Tech Pub. No. 1397, meeting in Los
Angeles,(1941), 159.

20. Pedersen, K. S., Thomassen, P. and Fredenslund, Aa.: "Thermodynamics of


Petroleum Mixtures Containing Hydrocarbons. 2. Flash and PVT Calculations with the
SRK Equation of Stage", Ind. Eng. Chem. Process Des. Dev., (1984), 23, 566.

21. Young, L.C. and Stephensen, R. E.: " A Generalized Compositional Approach for
Reservoir Simulator", SPEJ (Oct., 1983), 727; Trans., AIME, 275.

22. Wong, T. et al.: "Relationship of the Volume Balance Method of Compositional


Simulation to the Newton-Raphson Method", SPERE (Aug, 1990), 5, 3, 415.

108 PVT Representation: References R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 4
Network Calculations

Introduction

The network model in Nexus represents the wellbores, pipelines, and


equipment in injection and production networks as a series of nodes,
connections between them, connections from nodes to reservoir cells
(perforations), and connections to sinks and from sources. Network
flow is assumed to be steady state (i.e., no accumulation of fluid in the
network), phases are treated as being in equilibrium in the connections,
and all phases flow in the same direction in each connection. The
network equations consist of perforation rate equations, component
mass balances at network nodes, hydraulics equations, network
constraint equations, and composition equations. The network
constraint equations may include surface or in-situ rate constraints on
connections and/or pressure constraints on nodes. The composition
equations result from source composition specifications, and from
outflows of multiple connections from a node, including nodes
representing separator batteries. The primary network variables are the
mass flow rate of each component for each perforation, the mass flow
rate of each component for each connection, and the pressures at each
node. With only a few exceptions, all network equations are treated
fully implicitly.

At any point in time, not all of the network equations are active. For
example, consider a well connection which has a maximum rate
constraint. If the rate constraint is active, i.e., the well is flowing at its
maximum allowed rate, the pressure drop across the connection will be
greater than the hydraulic pressure drop (which is calculated using
whatever hydraulics method is specified for the connection, i.e
hydraulics table, pressure drop correlation, hydrostatic gradient etc), so
the hydraulic equation will be inactive. Note that this implies that there
is a flow control device in the connection which is restricting flow, i.e.,
an implied valve. On the other hand, if the hydraulic equation is active,
then the well connection will be flowing at a rate less than the specified
rate constraint, and the rate constraint equation is not active.

At the start of each Newton iteration (non-linear iteration of the


combined reservoir/network system), the network is first solved using

R5000.0.2 Network Calculations: Introduction 109


Nexus® Technical Reference Manual Landmark

fixed pressure and fluid mobilities at the perforated grid blocks as a


boundary condition. The purpose of this “standalone” network solution
is to determine which equations should be applied during the
simultaneous solution of the reservoir and network equations. If there is
no targeting, and either no procedures, or the procedures make no
changes to the network, then this standalone solve of the network is
performed only once per Newton. If the input data includes targeting,
or procedures, then several network solves may be necessary.

This is illustrated in Figure 4.1 and discussed in the following two


sections.

110 Network Calculations: Introduction R5000.0.2


Landmark Nexus® Technical Reference Manual

Network Solution Caused By Procedures

If the user has specified one or more procedures that result in a change
to the network, such as a change in a constraint, activating or
deactivating connections, changing the hydraulic, PVT or separator
methods assigned to a connection etc, the network must be solved
again. Note that procedures that return information on the state of the
network, such as cum (cumulative surface production or injection), q
(component rates), p (node pressures) etc, return the values obtained
from the first network solve. The network is not resolved after each
change made by the procedures, only after all the procedures are
completed. So if updated information is required by subsequent
procedure statements, the user must invoke the solve_network
function. Procedures are only executed on the first Newton of a
timestep, unless one or more connections have been opened to flow. In
this case, the estimate of network rates and pressures obtained from the
first network solve can be quite inaccurate, because the network is
solved assuming a fixed reservoir pressure, which is a very poor
assumption when wells first start producing or injecting. To alleviate
this inaccuracy, the procedures are executed again on the second
Newton.

R5000.0.2 Network Calculations: Network Solution Caused By Procedures 111


Nexus® Technical Reference Manual Landmark

Network Solutions Caused By Targeting

Targeting involves satisfying a group constraint (a target) by allocating


it between the connections that make up the group. The allocation that
each connection gets constitutes a constraint to be applied to that
connection, and a change in constraint requires the network to be
solved again. In addition, before allocating the group target amongst
the connections, the program must know what each connection is
capable of producing or injecting. Therefore, the first step of the
targeting calculations, is to solve for the network potential. The
network potential is another network solve, but with the group targets
disregarded. All individual connection (rate) constraints and node
(pressure) constraints are still applied. The targeting algorithms then
allocate the target constraints to the individual connections, and the
network is solved again. In some cases, the allocation might prove to be
incorrect, usually because evaluating the hydraulic equations at the
reduced flow rates imposed by the allocated constraints, can result in
some connections being unable to flow. In this case, the targeting
allocation must be repeated, and the network solved yet again.

112 Network Calculations: Network Solutions Caused By Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

Simultaneous Reservoir/Network Solution

After the final standalone network solve, the correct set of active
network equations has been determined, including any actions taken by
the procedures and any allocated constraints from the targeting. Up to
this point, the reservoir conditions have been taken to be fixed and have
been applied as a boundary condition at each perforation -- i.e, as fixed
grid block pressure and fixed fluid in the perforated grid blocks. To
couple the network to the reservoir, the full perforation equations are
used. These equations include terms for the perforated grid block
pressure and for the dependence of component mobility on both the
component masses in the grid block and the grid block pressure. The
full system of network and reservoir equations are solved
simultaneously in the linear solver. The linear solve is performed
iteratively. The network and each grid are treated as separate domains,
and the residuals for the equations are updated on each iteration with
the contributions from the coupling terms.

Nexus provides several options for solving the network domain, which
are controlled by the SOLVER FACILITIES keywords. The default
options are NOGRID, DIRECT, which results in the use of an efficient
direct solver for the network equations. Usually, the DIRECT solver
does not generate any infill, so an ITERATIVE solve will be less
efficient. Instead of NOGRID, the EXTENDED ncells option can be
selected, in which case the network domain is augmented to include the
reservoir terms for at least one grid block (the perforated grid block) for
each perforation equation. The number of grid blocks to include is
controlled by the ncells parameter, which defaults to 1. Use of the
EXTENDED option can speed convergence of the linear system, but at
the cost of a more expensive network solve on each iteration. In some
cases, when the EXTENDED option is used, particularly with ncells >
1, the ITERATIVE solution method may be faster.

R5000.0.2 Network Calculations: Simultaneous Reservoir/Network Solution 113


Nexus® Technical Reference Manual Landmark

Figure 4.1: Sequence of Network Calculations

114 Network Calculations: Simultaneous Reservoir/Network Solution R5000.0.2


Landmark Nexus® Technical Reference Manual

Targeting

Targeting provides the capability to satisfy group constraints on


production or injection. For example, a gathering center may have
maximum water handling capacity of 100000 STBD, which requires
the production from the wells feeding into the gathering center to be
controlled so that this limit is not exceeded. This is illustrated below.

Figure 4.2: Illustration of Targeting

Nexus allows the input of constraints at any point in the network, so it


would be possible to specify a water rate constraint of 100000 STBD
on the outlet connection from the gathering center, gc_offtake.
However, this implies that production is controlled by a control device
located in connection gc_offtake, which would reduce the production
rate from all five wells by applying a back pressure. This does not
represent a reasonable operating scenario, and also results in the
network solution being non-unique when the constraint is active. For
example, it may be possible to produce 100000 STBD with fewer than
all five wells producing, so that any one well shut in, and the four
others producing may satisfy the constraint. For this reason, it is highly
recommended that constraints are only used when they control only

R5000.0.2 Network Calculations: Targeting 115


Nexus® Technical Reference Manual Landmark

one well. i.e., constraints should be used only in the linear series of
connections flowing to or from a single well.

Instead of using a constraint at gc_offtake, a target could be used. For


example, the water production target could be apportioned between
each of the wells, and controlled by adjusting control devices at the
wellhead connection for each well (connections wh1, wh2, wh3, wh4
and wh5). This would result in the program having five degrees of
freedom with which to satisfy a single condition, so in addition to
specifying the target rate and the controlling connections, the user must
also specify a method that will uniquely determine what fraction of the
target rate to allocate to each well. For example, to control water
production rate, the user might specify that the highest water cut wells
are shut in until the target is not exceeded.

The example above illustrates a case where control of the target


conforms to the physical layout of the network, but this need not be the
case. For example, the off take limit of 100000 STBD could be met by
two targets, one of which is controlled by connections wh1 and wh2,
and the other by wh3, wh4 and wh5, where the sum of the two targets is
100000 STBD. Nexus accommodates this by allowing targets to be
controlled by arbitrary groups of connections, which are defined in
connection lists (CONLIST keyword), or well lists (WELLLIST
keyword).

Targeting Input
Targets are input in a TARGET table in Nexus. This input provides for
a method to determine the target rate (the rate which can not be
exceeded), the list of connections which will control the target, and the
method which will be used to determine how each connection should
be operated (how much of the target should be allocated to each
controlling connection). The TARGET table keywords that specify
how the target is controlled are the following:

CTRL Specifies what fluid is being controlled. i.e., oil,


water gas, liquid, hydrocarbon or total fluid.

CTRLCOND The conditions used when evaluating the control


rate, which could be surface conditions, or average
reservoir or region conditions (pressure and
temperature).

CTRLCONS The list of connections where the control devices are


located.

116 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

CTRLMETHOD The method used to determine how to allocate the


target rate among the control connections. For
example, the SCALE method scales back each well
in proportion to it’s potential productivity/
injectivity. The potential is determined by solving
the network in the absence of any targets, but with
all other constraints imposed. The possible
CTRLMETHODs are discussed in more detail
below.

QMIN The minimum control rate allowed for a control


connection. Note that the targeting algorithm does
not consider any minimum constraints specified for
the control connections other than the QMIN value
input for that target.

QGUIDE The guide rate used for allocation if the


GUIDERATE CTRLMETHOD is specified. The
target rate is allocated to the control connections in
proportion to the input guide rate, or alternatively, a
formula can be used to calculate the guide rates.

RANKDT The minimum time change between reranking of


connections if the CTRLMETHOD is one which
shuts in connections based on some measure such as
water cut, or gas/oil ratio.

The target rate can be a specified value, or it can be computed by the


program. The TARGET table keywords that specify how the target rate
is calculated are the following:

CALCMETHOD The method used to calculate the target rate. The


method can be a specified rate, the sum of flow rates
of a specified phase in the CALCCONS list of
connections, production or injection of a specified
phase from or into a specified region, or a rate
sufficient to maintain region pressure or replace
voidage. The possible CALCMETHODs are
discussed in more detail below.

CALCCOND The conditions used when evaluating the target rate,


which could be surface conditions, or average
reservoir or region conditions (pressure and
temperature).

R5000.0.2 Network Calculations: Targeting 117


Nexus® Technical Reference Manual Landmark

CALCCONS The list of connections used to calculate the target


rate (if applicable to the CALCMETHOD chosen).

VALUE The target rate, if the CALCMETHOD is a specified


rate, or a multiplier that is applied to the target rate
calculation.

ADDVALUE An amount added to the target rate.

REGION The region used for voidage, or pressure


maintenance calculations (if applicable to the
CALCMETHOD chosen).

MAXDPDT The maximum rate of change of region pressure


versus time if a pressure maintenance
CALCMETHOD is chosen.

The target table also allows each target to be given a priority, which can
be used to control the order in which the program satisfies the targets.

Target Rate Calculations


The target rate is calculated using the results of the first network
solution (if there are no procedures), or the network solution following
execution of the procedures. This network solution is at fixed reservoir
pressure and perforation fluid mobilities. All recurrent data for the
timestep has been processed, so any changes to the network and wells
are incorporated, but the previous Newton iterations target allocations
are still applied (on the first Newton of the first timestep there are no
target allocations). This is an explicit calculation, so for example, if the
target rate is calculated from the sum of production of several wells, it
will be calculated at the start of the Newton iteration, and will differ to
some degree from the sum of production of those wells at the end of the
Newton iteration.

The methods available to calculate the target rate are as follows:

• A specified value

• The sum of the flow rates of a specified phase in the list of


CALCCONS connections, evaluated at the conditions specified by
CALCCOND. Note that flow rates are positive values, when flow
is in the direction from the inlet node to the outlet node, so the sum
of a list of connections that contains both injectors and producers
will be additive. i.e., The injection rates will be added to the

118 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

production rates, assuming that all connections flow in the forward


direction.

• The sum of the potential flow rates of a specified phase in the list
of CALCCONS connections, evaluated at the conditions specified
by CALCCOND

• The sum of the net production or injection flow rates of a specified


phase in the list of CALCCONS connections, evaluated at the
conditions specified by CALCCOND. For net production, the
flow rates in connections which are part of the injection network
are subtracted from flow rates in connections which are part of the
production network. For net injection, the flow rates in
connections which are part of the production network are
subtracted from flow rates in connections which are part of the
injection network.

• The total injection or production of a specified phase, into a


specified region, evaluated at the conditions specified by
CALCCOND (which could be the average region pressure and
temperature).

• The injection (or production) rate required to maintain a specified


pressure in a specified region. The specified pressure can be a
pore volume weighted average, or a hydrocarbon pore volume
weighted average. Details of the algorithm used are given below.

• The injection (or production) rate required to ensure that net


voidage is replaced in a specified region. Details of the algorithm
are given below.

For the methods that involve summing the flow in the CALCCONS
connection list, a multiplier for each connection can be specified in a
TGTCON table.

R5000.0.2 Network Calculations: Targeting 119


Nexus® Technical Reference Manual Landmark

Net Voidage/Fillup Algorithm


To calculate the injection rate required to replace net voidage, the mass
in place, average pressure and average temperature are calculated, and
the change in mass from the previous timestep is determined. The mass
in place is flashed at the average pressure and temperature, to get the
partial molar (or mass) volume (dvdm), which is used to determine the
change in reservoir volume that would result from a change in the mass
in place of each component. The net voidage rate of each component is
calculated explicitly by

4-1
vi = ∑ qji − dmi * dtold
j

where

vi is the voidage rate of component i

qji is the mass rate of component i for the jth connection in the
CTRLCONS list of connections, during the previous timestep.
CTRLCONS should consist of connections which inject into the
region.

dmi is the change in mass in the specified region during the previous
timestep

dtold is the size of the previous timestep

The rate required to replace net voidage is then given by

4-2
np nc
qv = ∑ ∑ dvdmij * vi
j =1 i =1

where

qv is the rate required to replace net voidage

dvdmij is the partial molar (or mass) volume of component i in phase j,


calculated by flashing the mass in place in the region at the average
region pressure and temperature.

vi is the voidage rate of component i

nc is the number of components

120 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

np is the number of phases

This target rate is allocated between the connections in the


CTRLCONS connection list, which should consist of connections that
inject into the region, each of which will be assigned some fraction of
qv as a constraint. When this constraint is applied, the rate in each
connection is calculated using the expression for qv given above, but
with vi replaced with the mass flow rate in the connection.

The production rate required to balance net fillup for a region is similar,
except that the first equation is replaced by

4-3
vi = ∑ qji + dmi * dtold
j

and the connections in the CTRLCONS connection list should consist


of connections that produce from the region.

Pressure Maintenance Algorithm


The net voidage algorithm will approximately maintain reservoir
pressure, but because it is an explicit calculation, the average region
pressure may drift over time. The pressure maintenance algorithm
provides a method to maintain the pressure of a region at a specified
value. If the pressure is initially below the specified pressure, the
algorithm will over inject until the average pressure is reached. If the
pressure is initially above the specified pressure, the algorithm will
reduce injection until the average pressure is reached. The pressure
maintenance algorithm calculates the target injection rate as follows:

4-4
qt = qv + qm

where

qv is the net voidage rate

R5000.0.2 Network Calculations: Targeting 121


Nexus® Technical Reference Manual Landmark

qm is the make up rate to raise (or lower) the reservoir pressure from the
current pressure to the specified pressure

qm = min(qm* , q lim), qm* ≥ 0 



qm = max(qm* , −q lim), qm* < 0

np 
qm* = ( pv * cravg − ∑ dvdpj ) * dp / dt 
j =1

dp = min( pm − pavg , dpdtmx * dt ), pm ≥ pavg 



dp = max( pm − pavg , −dpdtmx * dt ), pm < pavg

q lim = max(abs (qv ), abs (qm* ) * min(0.02 * dt , 0.5))

where

pv is the total pore volume of the region

cravg is the average rock compressibility of the region

dvdpj is the derivative of volume of phase j wrt pressure

dt is the current timestep size

pm is the target pressure for the region

pavg is the current average pressure of the region

dpdtmx is the maximum allowed rate of change in the pressure


(MAXDPDT)

qv is the net voidage rate

In the above equations, qm* is the make up rate, restricted only by the
user specified maximum allowed rate of change in region pressure. qlim
is an additional restriction on the maximum allowed make up rate, to
prevent unintentionally large injection rates. This limitation primarily
restricts the make up rate to be no larger than the calculated net voidage
rate. Once the region reaches the specified pressure, the make up rate
becomes very small, just accounting for the small drift in pressure
caused by the explicit nature of the net voidage calculation.

122 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

Note that the Nexus pressure maintenance algorithm is significantly


different from that used in VIP.

Control of the target rate


In order to allocate the target rate among the controlling connections,
the maximum flow rate that each connection is capable of making must
be known. To determine this, the network is solved with all targets
removed, but with all constraints still active (see the section on
Network Solutions caused by Targeting). This potential solution gives
the maximum mass flow rates in every connection in the network. The
potential solution is then summed over all connections in the
CTRLCONS connection list, for the phase specified by CTRL, and at
the conditions specified by CTRLCOND to get the potential control
rate. If the potential control rate is less than the target rate, then no
control is needed. If the potential control rate is greater than the target
rate, then the connections in the CTRLCONS connection list are
constrained, so that the sum of the constrained production equals the
target rate. These allocated constraints are fixed values, which are
honored implicitly, so the target rate will be exactly honored as long as
all the connections remain capable of producing the rate that they are
allocated when the full reservoir/network solution is computed.

If there is more than one target, the reductions in flow rates necessary
to meet a target may reduce the potential flow rate for subsequent
targets, and therefore the allocations that the subsequent target
calculates. Therefore, the order in which the targets are processed can
affect the result. This order can be set using PRIORITY input in the
TARGET table.

Nexus provides 10 methods of allocating the target rate, plus a gas lift
optimization method that is discussed separately.

The SCALE, SCALEQP, GUIDERATE, AVG, AVGGOR, and


AVGWCUT all use the same basic algorithm to allocate the target rate,
differing only in the way in which the proportioning factor (the guide
rate) is calculated. The potential flow rate for each connection, for the
phase specified by CTRL and at the conditions specified by
CTRLCOND, is first reduced by a decline factor, given by

4-5
* −0.0005*dt
q = 0.95 * e
pi * qpi

*
where q pi is the adjusted potential for connection i in connection list
CTRLCONS

R5000.0.2 Network Calculations: Targeting 123


Nexus® Technical Reference Manual Landmark

qpi is the potential flow rate of the phase specified by CTRL, at the
conditions specified by CTRLCOND, for connection i in connection
list CTRLCONS

dt is the timestep size.

The purpose of the decline factor is to allow for decline in production


rate over the timestep, so that when a connection is allocated a fraction
of the target rate, it will be able to make the allocated rate. The
program attempts to allocate each connection a rate (which will be
imposed as a constraint) given by

4-6
nctrlcons
qi * = qt * qgi / ∑j =1
max(qgj , q min j )

qi = max(qi* , q min i ), q*pi < q min i


qi = 0, q*pi < q min i

where

qi is the allocated rate for connection i, in connection list CTRLCONS

qt is the target rate

qgi is the guide rate for connection i, in connection list CTRLCONS,


which is calculated from the specified CTRLMETHOD method.

qmini is the minimum flow rate for connection i, specified in the


TARGET table, or by connection in the TGTCON table. The default
value for qmini is zero.

nctrlcons is the number of connections in connection list CTRLCONS

It is possible that the application of this formula will result in the sum
of the allocated rates being greater than the target rate, for example if
all connections can flow at qmini, and ∑ q min i is greater than the target
rate. In this case, connections with the lowest potential flow rates are
shut in, until the target rate is not exceeded.

The guide rate, qgi, used in the above equations, is calculated as


follows:

For the SCALE CTRLMETHOD, the guide rate is the potential flow
rate of the phase specified by CTRL, at the conditions specified by
CTRLCOND, reduced by previously applied targets.

124 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

For the SCALEQP CTRLMETHOD, the guide rate is the potential


flow rate of the phase specified by CTRL, at the conditions specified by
CTRLCOND, without any reduction due to previously applied targets.

For the GUIDERATE CTRLMETHOD, the guide rate is input by the


user, or calculated by the guide rate formula.

For the AVG CTRLMETHOD, the guide rate is 1 for all connections,
so they will all be allocated the same rate, unless this rate is less than
qmini.

For the AVGGOR CTRLMETHOD, the guide rate is the oil/gas ratio of
each connection, which results in the highest GOR connections being
allocated the least rate.

For the AVGWCUT CTRLMETHOD, the guide rate is the oil/(water +


oil) ratio of each connection, which results in the highest WCUT
connections being allocated the least rate.

The WCUT, GOR, WRATE and GRATE methods also all use the same
basic algorithm to allocate the target rate, differing only in the criteria
used to determine which wells to shut in, or scale back. In each case,
the criteria is calculated using the potential network solution, without
any reduction due to the effect of other targets. The criteria are: the
water cut of each connection for the WCUT method, the gas/oil ratio
for the GOR method, the water rate for the WRATE method, and the
gas rate for the GRATE method. The connections are ordered from the
lowest value of the criteria, to the highest (this ordering is only
performed every RANKDT days (default 0) so that frequent changes in
the wells to be shut in are avoided). Starting with the connection with
the lowest value for the criteria, the wells are allocated a rate equal to
their potential multiplied by a decline factor. When the sum of the
allocated rates exceeds the target rate, all connections with higher value
for the criteria are shut in, and the last connection still flowing (the
swing connection) is allocated a rate which is just sufficient for the
target rate to be met. In the event that this would result in the swing
connection being allocated less than qmini, it will instead be allocated
qmini, and the allocation for the previous connection will be reduced so
that the target rate is still met. Note that all of the connections that are
not shut in are allocated a fraction of the target rate, which will be used
as a constraint during the subsequent network solve. This means that
the target rate should be exactly met, but that each of the active
connections is not flowing at its full potential.

R5000.0.2 Network Calculations: Targeting 125


Nexus® Technical Reference Manual Landmark

Tree Structured Guide Rates


The TGTCON table PARENT column can be used to specify a
hierarchical structure for allocating target rates. Tree structured guide
rates can be used for targeting using the GUIDERATE, SCALE,
SCALEQP, WRATE, GRATE, AVG, AVGGOR, and AVGWCUT
options for the CTRLMETHOD. For each parent connection in the
tree, the calculated guide rates of the connections that have that parent
are normalized by dividing by their sum, and multiplying by the
normalized guide rate of the parent. The targeting logic attempts to
preserve the ratio of the guide rates at each level in the tree. This is
illustrated by the following example.

TGTCON ptarg PARENT CGATH1


CON QGUIDE
PRD1 0.6
PRD2 0.4
ENDTGTCON
TGTCON ptarg PARENT CGATH2
CON QGUIDE
PRD3 0.5
PRD4 0.5
ENDTGTCON
TGTCON ptarg PARENT CGATH4
CON QGUIDE
CGATH1 0.6
CGATH2 0.4
ENDTGTCON
TGTCON ptarg
CON QGUIDE
PRD5 0.2
CGATH4 0.8
ENDTGTCON

126 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

This example corresponds to the following network.

Figure 4.3: Illustration of Tree Structured Guide Rates

In this example, the normalized guide rates of connections CGATH1


and CGATH2 are determined by dividing each guide rate by the sum of
the guide rates (1.0 in this case), and multiplying by the parent guide
rate (0.8), to obtain a normalized guide rate of 0.48 for CGATH1 and
0.32 for CGATH2. Similarly, the normalized guide rates for
connections PRD1 and PRD2 are obtained by dividing each guide rate
by the sum of their guide rates, and multiplying by 0.48, the normalized
guide rate of their parent. This results in PRD1 having a normalized
guide rate of 0.288, and PRD2 having a normalized guide rate of 0.192.
This calculation is repeated for all the connections, resulting in the
normalized guide rates for PRD1, PRD2, PRD3, PRD4 and PRD5 of
0.288, 0.192, 0.16, 0.16 and 0.2. The targeting logic will attempt to
preserve the ratio of the guide rates at each level in the tree. So, if for
example, PRD1 is not capable of making its fraction of the target, but
PRD2 can make more than its fraction, then the production from PRD2
would be increased so that CGATH1 could make it’s fraction of the
target. Likewise, if CGATH1 could not make its fraction of the target,
then production from CGATH2 will be increased (if possible) to
maintain the ratio between CGATH4 and PRD5.

This example used a specified guide rate, but the method works the
same if the guide rates are actually calculated using one of the other
methods, such as SCALE. In this case, the TGTCON table would not
need to include the QGUIDE column.

R5000.0.2 Network Calculations: Targeting 127


Nexus® Technical Reference Manual Landmark

Multiple Targets and the Order of Target Calculations


There are no restrictions on the number of targets that can be input for
Nexus. If the same connections are used to control multiple targets,
then the most restrictive target will be imposed. For example, if a
CTRLCONS connection list is given a pressure maintenance target,
and the same connection list is given a net voidage target (with a
multiplier of 1.0), and the initial region pressure is less than the target
pressure, then the target pressure will never be reached, because the net
voidage target will limit injection to net voidage, and will not allow the
make up injection required to raise the reservoir pressure. However, if
the net voidage target was given a multiplier greater than 1, then both
targets could work in concert, with the net voidage target controlling
the maximum amount of injection during the pressure up phase, and the
pressure maintenance target taking over to maintain pressure once the
target pressure had been reached.

Targets are processed according to the PRIORITY assigned in the


TARGET table, in the order of increasing priority number. Targets
which have the same priority are processed in the order in which they
are input. For multifield runs, target input at the same time for different
reservoirs is read in the order that the reservoirs are specified in the fcs
file, with the multifield network file being read last. The order of
processing the targets can have a large effect on the result.

For example, if two gathering centers flow into a flow station, and each
gathering center has an maximum oil handling capacity, and the flow
station also has a maximum oil handling capacity, then if the flow
station target is processed first, and as a result of imposing the flow
station target, the target for gathering center 1 is still exceeded, while
oil production for gathering center 2 is less than the target, then
imposing the target for gathering center 1 will further reduce
production and the flow station target will not be met. If on the other
hand, the two gathering center targets are imposed first, then the
imposition of the flow station target will only result in further reduction
in production if the flow station target is exceeded, which is a more
desirable result.

As another example, if a connection list has both a water production


target, which uses the WCUT method of control, and an oil production
target, which uses the SCALE method of control, then if the water
production target is processed first, connections will be shut in until the
water production target rate is met. If at that point, the oil production
target rate is exceeded, the connections that are not shut in will have
their production further reduced in order to satisfy the oil target rate.
As a result, water production will be less than the water production
target rate. On the other hand, if the oil target is processed first, the

128 Network Calculations: Targeting R5000.0.2


Landmark Nexus® Technical Reference Manual

connections will be scaled back to meet the oil production target rate.
If at that point, the water production target is exceeded, then some of
the connections will be shut in to meet the water production target rate,
and the oil production will be less than the oil production target rate.

R5000.0.2 Network Calculations: Targeting 129


Nexus® Technical Reference Manual Landmark

Remote Control of Constraints

By default, rate constraints input in a CONSTRAINTS table are


controlled by an implied valve located in the connection where the
constraint is imposed, PMIN constraints are controlled by an implied
valve located in the connection immediately downstream of the node
where the PMIN constraint is imposed, and PMAX constraints are
controlled by an implied valve in the connection immediately upstream
of the node where the PMAX constraint is imposed. When the
constraint is active, there is an additional pressure drop in the control
connection (over and above the normal hydraulic pressure drop), which
is sufficient to restrict the rate or pressure to the specified constraint
value. This additional pressure drop is the result of the implied valve
being adjusted. Note that the valve need not be explicitly modeled. It
is sufficient for the program to know that a device is present which is
capable of imposing an additional pressure drop. The location of the
control device (the implied valve), can be specified in a CONTROL
table, or by using WELLCONTROL WELLHEAD keywords if the
control is at the wellhead connection. In this case, the additional
pressure drop necessary to satisfy the constraint, is imposed in the
connection specified in the CONTROL table, rather than in the default
location.

The control device must be located at a point in the network where the
constraint can be controlled. If the control connection is downstream
of the constrained connection, then there can be no stream split
between a constrained connection and the controlling connection, and
all connections feeding into a gathering node between the constrained
connection and the controlling connection must not allow backflow.

split_con

constrained_con control_con

Figure 4.4: Control Downstream of Constrained Connection With Stream Split

Figure 4.4 is an example of an invalid control location. In this case,


control_con can not control constrained_con, because fluid from
constrained_con could flow out split_con, bypassing the attempted
control.

130 Network Calculations: Remote Control of Constraints R5000.0.2


Landmark Nexus® Technical Reference Manual

inflow_con

constrained_con control_con

Figure 4.5: Control Downstream of Constrained Connection With Gathering Node

Figure 4.5 is an example of a valid control location. In this case,


control_con can control constrained_con, as long as inflow_con is not
allowed to backflow.

If the control connection is upstream of the constrained connection,


then there can be no gathering node between the control connection and
the constrained connection, and any stream split must not allow
backflow in the outflowing connections

split_con

control_con constrained_con

Figure 4.6: Control Upstream of Constrained Connection with Stream Split

Figure 4.6 is an example of a valid control location. In this case,


control_con can control constrained_con, as long as split_con is not
allowed to backflow.

inflow_con

control_con constrained_con

Figure 4.7: Control Upstream of Constrained Connection with Gathering Node

Figure 4.7 is an example of an invalid control location. In this case,


control_con can not control constrained_con, because fluid from
inflow_con can flow through constrained_con, bypassing the attempted
control.

There are several other restrictions on remote control.

• A connection (or node) can only be controlled by one other


connection.

R5000.0.2 Network Calculations: Remote Control of Constraints 131


Nexus® Technical Reference Manual Landmark

• Connections below the bottom hole node can not be specified as a


control connection.

• Connections below the bottom hole connection and nodes below


the bottom hole node can not be remotely controlled.

• If a connection is the control connection for multiple nodes (or


connections), then only one of the constraints specified for the
nodes (or connections) can be exactly satisfied, and the constraints
at the remaining nodes (or connections) will not be violated. E.g.,
if the production from three wells are gathered into a single node,
with one outflow connection, and the outflow connection is
specified as the PMIN control connection for the bottom hole
pressure of all three wells, then (in the absence of other
constraints), the bottom hole pressure of one of the wells will be
PMIN, and the bottom hole pressure of the two other wells will be
greater than PMIN.

• If a connection is the control connection for multiple connections,


then only one of the constraints specified for the connections can
be exactly satisfied, and the constraints at the remaining
connections will not be violated. E.g., if the production from three
wells are gathered into a single node, with one outflow connection,
and the outflow connection is specified as the rate control
connection for the bottom hole well connection of all three wells,
then (in the absence of other constraints), the rate of one of the
wells will exactly satisfy its most restrictive rate constraint, and
the rate at the other wells will be less than any of their rate
constraints.

• Remote control of rate constraints also applies to allocated targets


-- i.e., if a connection has specified a controlcon in a CONTROL
table, then if that connection is part of a CTRLCONS connection
list in a TARGET table, the fraction of the target allocated to the
connection will be a rate constraint controlled by the controlcon
connection.

132 Network Calculations: Remote Control of Constraints R5000.0.2


Landmark Nexus® Technical Reference Manual

Hydraulic Calculations

General Description
Hydraulic models of a multi-phase fluid flow in different surface
network devices (tubings, pipelines, separators, valves, etc.) are basic
elements of the surface pipeline network system. They are “building
blocks” from which the surface pipeline network system is constructed.

The hydraulic model of the flow device determines relationships


between a pressure at an inlet of the device, a pressure at its outlet, and
flow rates of multi-phase fluids in the device. It is assumed that each
device has one inlet and one outlet.

Mass/molar rates of hydrocarbon components are assumed to be known


in the models of the flow devices. However, volumetric rates and PVT
properties of hydrocarbon phases are required for the determination of
a pressure drop in the flow device. For this reason, phase-equilibrium
computations are applied for the calculations of the number of the
hydrocarbon phases, their compositions, volumetric rates, and PVT
properties.

Hydrostatic Gradient
In this option, the fluid density gradient is used to calculate the pressure
drop over a pipe (connection). The pressure loss due to friction and
kinetic change are ignored. The value of the fluid density gradient in a
pipe can be either input or calculated. See the description of keyword
METHOD in the CONFEDAULTS table or in the NODECON table in
Nexus Keyword Document1.

If the fluid density gradient is specified by input, the pressure drop over
the pips is evaluated as follows,

4-7
Δp = −∇pL sin 

where:

Δp pressure drop over the pipe

∇p input fluid density gradient in the pipe

R5000.0.2 Network Calculations: Hydraulic Calculations 133


Nexus® Technical Reference Manual Landmark

L pipe length

 inclination angle from horizontal of the pipe

If the fluid density gradient is to be calculated, the pressure drop over


the pipe is evaluated as follows,

4-8
g
Δp = −  L sin 
gc

where:

g gravitational constant

gc unit conversion factor

 average density of fluid mixture in the pipe

The average fluid density is calculated as follows,

4-9
 = S w  w + So o + S g  g

where:

w average water phase density in the pipe

o average oil phase density in the pipe

g average gas phase density in the pipe

Sw average water saturation in the pipe

So average oil saturation in the pipe

Sg average gas saturation in the pipe

The average fluid densities and saturations are evaluated with the
phase-equilibrium computations based on the current average pressure
and temperature in the pipe, assuming the gas and liquid travel at the
same velocity (no-slippage).

134 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Hydraulic Tables
Hydraulics tables may be used to calculate the pressure change
between the inlet and outlet nodes of a connection. Hydraulic tables
specify the pressure at one end of a pipe (usually the inlet end for
producers, and outlet end for injectors), as a function of the pressure at
the other end (usually the outlet end for producers, and inlet end for
injectors), and as a function of a stock tank phase rate such as oil rate,
gas rate, water rate, or liquid rate, a gas ratio such as GLR, GOR, OGR
or GWR, a water ratio such as Water cut, WOR, WGR or Oil cut, and
possibly an artificial lift quantity which could represent gas lift, or a
pump setting.

Ideally, the hydraulic table assigned to a connection would be


calculated using the exact geometry of the connection i.e length,
elevation change, deviation profile, pipe inner diameter, roughness etc.
However, this would lead to a very large number of tables, and often
many connections have the same diameter and roughness, but differ in
length and elevation change. For example, vertical tubings may have
the same properties, but because the reservoir depth is not constant, the
length and elevation change will not be the same. To approximately
account for this, the length used to calculate the hydraulics table may
be specified. The program will then multiply the pressure change
obtained by looking up the table by the ratio of the length of the
connection divided by the length in the table. This is illustrated below.

Figure 4.8: Illustration of Hydraulic Table Correction for Length

R5000.0.2 Network Calculations: Hydraulic Calculations 135


Nexus® Technical Reference Manual Landmark

Note that this is different from the treatment in VIP. To the pressure
change obtained from the table, VIP adds a hydrostatic correction term
to account for the difference between the elevation change used to
calculate the table, and the actual elevation change for the connection.
To mimic the VIP treatment in Nexus, it would be necessary to add an
extra node and connection, so that the connection that has the hydraulic
table assigned has the same geometry as that used to calculate the table,
and the added connection fills the gap created by truncating, or
extending the original connection. The extra connection should then be
assigned a hydraulics method of GRADCALC so that it will use a
hydrostatic gradient to calculate the pressure change across it. This is
illustrated below.

Figure 4.9: Illustration of Using Additional Connection to Mimic VIP Hydraulic Table
Correction

It is also possible to specify a datum in the table input. If a datum is


input, then the program will account for any difference between the
datum depth of the table, and the datum depth of the outlet node if the
table is a function of the inlet pressure, or the inlet node if the table is a
function of the outlet pressure, using a hydrostatic correction. The

136 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

method used for the hydrostatic correction can be chosen to be either


the flowing fluid gradient evaluated at the outlet (or inlet) node, the
initial average oil gradient in the reservoir, the initial average gas
gradient in the reservoir, or the initial average water gradient in the
reservoir. Note that the only network node that can have a datum
specified, is the bottom hole node (input in the WELLS table). For any
other node, the hydrostatic correction will account for the difference
between the datum depth of the table, and the depth of the outlet (or
inlet) node.

In some cases, the hydraulics table may not encompass the range of
flow rates or pressures encountered during the simulation. This is
particularly true during the Newton iterations performed to solve the
network, when at any given iteration, the flow rates may not be
representative of the converged flow solution. It is good practice to
input a wide range of flow rates in the hydraulic table input, because
large extrapolations of the table can cause unrealistic and numerically
difficult behavior. But in the event that the range of the table is
exceeded, the program will do the following. Up to the limits specified
by the LIMITS table in the hydraulic table input (if any), the program
will linearly extrapolate the table. The default minimum limits are 0
for flow rates and fluid ratios, and the maximum values input for the
maximum limit. For PIN or POUT, the default limits are the minimum
and maximum values input. Beyond the extrapolation limits, the
program will smoothly asymptote to the result that would be obtained
by looking up the table at 90% of the minimum limit, or 110% of the
maximum limit. For example, an extremely large flow rate would
return the pressure change calculated from a flow rate of 110% of the
maximum flow rate limit. The equation used to perform the asymptotic
lookup (using flow rate q as an example) is

4-10
q * = a + b / (q − c)

where q is the actual flow rate, q* is the value used to lookup the table,
and

4-11
a = d * q lim

where qlim is the extrapolation limit, and d = 0.9 for a minimum limit
and 1.1 for a maximum limit

R5000.0.2 Network Calculations: Hydraulic Calculations 137


Nexus® Technical Reference Manual Landmark

4-12
c = 2* q lim − a

4-13

b = − ( q lim − c )
2

This equation results in a lookup that is both continuous, and


continuously differentiable at the table limit.

Hydraulic Correlations
Analytical hydraulic correlations can be applied to calculate the
pressure drop of gas-liquid two-phase flow in a pipe. The correlations
predict pressure gradient, liquid holdup, and possibly flow patterns
(regimes) in pipes. The flow may be vertical, inclined, or horizontal
and a temperature distribution along the pipe may be specified.

The description of PDCORR table in the Nexus Keyword Document


lists all correlations implemented in Nexus. A correlation can be
specified through keyword METHOD in a CONFEDAULTS table or in
a NODECON table.

The NOSLIP correlation assumes the gas and liquid travel at the same
velocity (no-slippage), while all other correlations take into account the
effect of gas-liquid slip. Some of the correlations use different
formulations for different flow regimes, such as Bubble Flow, Slug
Flow, Mist Flow, Annular Flow and Transition Flow, etc.

The detailed description and formulations of the correlations (except


for correlation SUPRIB) can be found in Reference 2. The formulations
of correlation SUPRIB (the drift flux slip model) are described in
Reference 3.

Use of Correlations
The correlations were developed based on the experiments of two-
phase flow in pipes of different inclination angles. Although all
correlations implemented in Nexus have been adjusted with inclination
angle so that they can be theoretically applied to any inclination angles,
a correlation may be most accurate at a limited range of inclination
angles on which they were originally developed for. The following is
the recommendation of the correlation usage according to the pipe
inclinations.

138 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Horizontal or Inclined Pipe Correlations


• NOSLIP - Without slip effect.

• DUKLER - Dukler II with Flanigan correction for elevation.

• DUKEAT - Dukler II with Eaton holdup and Flanigan correction


for elevation.

• BEGGS - Beggs and Brill.

• HAG_BEG - Use Beggs and Brill correlation if the angle is in the


range -45 to 45 degrees, otherwise use Hagedorn and Brown.

Vertical or Inclined Pipe Correlations


• NOSLIP - Without slip effect.

• HAGEDORN - Hagedorn and Brown.

• DUNROS - Dunns and Ross.

• BEGGS - Beggs and Brill.

• AZIZ - Aziz, Govier, Fogarasi.

• ORKISZ - Orkiszewski.

• GRIFFITH - Griffith, Lau, Hon, and Pearson.

• HAG_BEG - Use Beggs and Brill correlation is the angle is in the


range -45 to 45 degrees, otherwise use Hagedorn and Brown.

• SUPRIB - Drift flux slip model.

R5000.0.2 Network Calculations: Hydraulic Calculations 139


Nexus® Technical Reference Manual Landmark

Model Description
The pipe hydraulic models determine the pressure distribution (p(L))
along the pipe assuming that the following parameters are known:

• pressure pout at the pipe outlet L = LENGTH (where LENGTH is


the total pipe length), p(LENGTH) = pout

• molar rates of hydrocarbon components and water component

• temperature profile along the pipe

• inclination angle profile along the pipe

• pipe parameters such as diameter, thickness, length, roughness,


etc.

In steady-state conditions, the following energy conservation equation2


is applied in the models for the determination of the pressure gradient
at different pipe locations:

4-14
dp g  v dv f  v 2
( L ) = −  L sin  − −
dL gc g c dL 2 g c d

where:

L variable pipe length from the inlet to the current location

dp
( L) total pressure gradient at the current pipe location
dL

⎛ dp ⎞ g
⎜ ⎟ =−  L sin 
⎝ dL ⎠elev gc component of the pressure gradient due to a potential energy or
elevation change

g gravitational constant

gc unit conversion factor

 fluid density

 inclination angle from horizontal of the pipe, which can change


along the pipe.

140 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

⎛ dp ⎞  v dv
⎜ ⎟ =− component of the pressure gradient due to kinetic energy change
⎝ dL ⎠ acc g c dL
or convective acceleration

v fluid velocity

dv
dL fluid velocity gradient

⎛ dp ⎞ f v2
⎜ ⎟ fric = − component of the pressure gradient due to friction losses
⎝ dL ⎠ 2 gc d

f Moody friction factor

d pipe diameter.

Figure 4.10: Pressure Gradient in Pipes

Analytical correlations can be applied to evaluate all components of the


pressure gradient, dp , at location L, using the known parameters.
( L)
dL
All the correlations were originally developed for flow in pipes.
However, they can be applied to casing-tubing annular using the
hydraulic diameter, dhyd, evaluated as follows:

4-15
d hyd = d outer − dinner

R5000.0.2 Network Calculations: Hydraulic Calculations 141


Nexus® Technical Reference Manual Landmark

where douter and dinnerr refer to the outer and inner diameters of the
annulus, respectively. They are specified through keywords DIAM and
INNERDIAM, respectively. The hydraulic diameter works as the pipe
diameter in the correlations. The area used in velocity calculation is the
area of the annulus, which is  2 .
4
( )
2
d outer − dinner

Algorithm of Pressure Drop Calculations


Since the pressure gradient of gas-liquid flow may vary significantly
over a connection as the fluid properties change with pressure and
temperature, the connection needs to be gridded so that it has multiple
integration intervals (or length increments). In general, the pressure
drop across an interval should be no larger than one-tenth of the
average pressure in the interval. The fluid properties and pressure
gradient of an interval are evaluated using a correlation based on the
average conditions of pressure, temperature and pipe inclination in the
interval. The overall pressure drop over the connection is the sum of the
pressure drops of all intervals.

An automatic selection of integration intervals is performed as follows:

1. Start with the known pressure, temperature and component mass


flow rates at the pipe outlet L = Length, calculate the phase
volumetric flow rates using phase-equilibrium computations;
determine the viscosities of all phases using Lohrenz-Bray-Clark
or Pederson correlations for EOS fluids, or table look up for black
oil fluids; calculate gas-oil and gas-water surface tensions. These
properties are necessary for the correlation calculations.
dp
2. Calculate a pressure gradient, ( L) , at current pipe location, L,
using the correlation. dL

3. Select an integration interval, ΔL , to assure that the pressure drop


in this interval is not larger than the user specified value PRESIN
and that L1 = L − ΔL is not smaller than zero:

dp
( L)ΔL ≤ PRESIN , L − ΔL ≥ 0
dL

142 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

4. Calculate pressure, p ( L0.5 ) , at the middle of the interval as




 dp
p ( L0.5 ) = p ( L) − 0.5 ( L)ΔL , where L0.5 = L − 0.5ΔL 
dL

dp
5. Calculate a pressure gradient, ( L0.5 ) , at the middle of the
dL
interval, L , using the correlation.
0.5

6. Calculate pressure, p ( L1 ) , at the location L1 as

dp
p ( L1 ) = p ( L) − ( L0.5 )ΔL
dL

7. Set the current pipe location L to L1 and repeat Steps 1 – 6 if the


current location is not smaller than zero.

Once the integration intervals are determined, an equation of the


pressure drop at an integration interval n is obtained:

4-16
⎡ dp dp ⎤ ( L − Ln +1 )
p ( Ln +1 ) − p ( Ln ) = − ⎢ ( Ln +1 ) + ( Ln ) ⎥ n , n = 1....N
N
⎣ dL dL ⎦ 2

where N is the total number of intervals at the connection, Ln and Ln+1


are the positions of the outlet node and inlet node of the interval n,
respectively. The equations of all intervals can be solved for the
pressures at all interval end nodes (except for pressure at the outlet
node, which is known) using Newton iterations. Since the
computations of phase-equilibrium, the pressure gradient and their
derivatives with respect to node pressure and component mass flow
rates are repeated for each Newton iteration at each interval end node,
these computations may require a significant amount of CPU time
(especially for compositional models).

The overall pressure drop over the connection, as well as the


derivatives of the overall pressure drop with respect to the pressure and
component mass flow rates at the outlet, can be obtained through
integration. These values will be used in construction of the hydraulics
equation of the connection in the network solve.

R5000.0.2 Network Calculations: Hydraulic Calculations 143


Nexus® Technical Reference Manual Landmark

Pump Model
The pump is assumed to be of the centrifugal kind with variable speed.

A pump increases the pressure of the liquid flowing through it. It is


supplied a specified level of power, and the increase in the pressure that
it achieves is dependent on the rates and fluid properties. The specified
power level is treated as a maximum: If it exceeds the power that the
pump can consume at the current fluid flow rate, then the pump will
operate at the maximum speed, consuming a lower level of power that
corresponds to that speed and the rate.

The pump characteristics are defined though the water performance


curves that are input in tabular from. The curve for a given speed
consists of the variation of pressure rise (head) generated by the pump
with regard to flow of water, along with the pump efficiency and the
Net Positive Suction Head required for avoiding cavitation (NPSHR).
The last item defines the minimum pressure at the inlet of the pump for
a given rate and speed. The performance curves for different speed are
assumed to not intersect, and the pressure head declines with increasing
rate, starting with a maximum at zero rate and reaching a zero at the
maximum rate. The pressure head curves for different speeds form a
nested set, with the highest speed curve on the outer side as viewed
from the origin, and the speed reducing inwards. Figure 4.11 shows an
example of the head vs. rate curves. The top curve defines the
maximum speed and the innermost curve defines the minimum speed
of pump operation. If the input power level is below the power
required to operate the pump at the lowest speed at the current rate,
then the pump will be shut off, and no pressure rise will occur from
inlet to outlet. Similarly, if the fluid flow rate exceeds the maximum
flow rate for the highest-speed curve, the pump will be shut off. Once
shut off, the pump may be restarted periodically through the “TEST”
option.

144 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Calculation Method
Since the pump performance characteristics are available for input for
water as the flowing fluid, a calculation method is needed to translate
the pump performance for a fluid other than water. This calculation is
carried out using the correlation published by the Hydraulic Institute
(Reference 6). This correlation provides the formulas to calculate the
non-water viscous fluid rate ( qvis ), the pressure head ( hvis ) and the
efficiency (  vis ), given a water rate and the pump speed, the fluid
specific gravity(  ), the fluid viscosity and the water performance
curve for the pump. From the output the power can be calculated by,

4-17
pvis = qvishvis  /  vis

The correlation is used iteratively to obtain the specified power level


and the viscous (non-water) fluid flow rate; the output of this
calculation is the speed of operation of the pump that achieves these.
The specified power level is achieved subject to the limitations
mentioned above on the minimum and maximum power that can be
actually consumed by the pump. Suitable interpolation is used to
determine the performance at speeds intermediate between the curves.

If the actual pressure at the pump inlet is smaller than the NPSHR value
at current operating point, then the pump will be shut off as cavitation
will be assumed to occur.

In multiphase flows, the flow cannot have significant volumetric


fraction of gas phase for successful pump operation. Hence if the gas
fraction in the flow exceeds a set fraction (4%), the pump will be shut
off. The liquid viscosity for a mixture of two or more liquid phases is
obtained by volumetric fraction weighting of the individual phase
viscosities.

R5000.0.2 Network Calculations: Hydraulic Calculations 145


Nexus® Technical Reference Manual Landmark

Pump Performance Curves

120

100

Head, m of water
80
Speed=500
60 Speed=400
Speed=300
40

20

0
0 10 20 30 40
Water flow rate, m3/hr

Figure 4.11: Pump Performance for Water Flow

146 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Valve Model
The valve model determines the pressure drop from inlet to the outlet
of a valve assuming that the

following parameters are known:

• molar rates of hydrocarbon components,


• water rate at stock tank conditions,
• temperature at the outlet of the valve (used in flash calculations),
• valve control,
• valve coefficient profile.

The model (VALVEC valve model) predicts subcritical pressure drop


across the valve using the following equation:

4-18
pout − pin = −cvx ( x)qspabs (qsp ) / 

where:

pout pressure at the outlet of the valve in psi,

pin pressure at the inlet of the valve in psi,

qsp The mass flow rate of fluid of the specified type in lb per second.
The mass rate used for valve calculations may be one of the following
as selected by the user: total fluid, oil, gas, water or liquid mass rate.

 density of the mixture in lb. per cu.ft.

cvx ( x) valve coefficient which depends on a valve setting x.


The determination of the valve coefficients for different types of valves
is described in References 2 and 9. The user must input the valve
coefficients in a valve table, and the valve setting may be specified in a
CONSTRAINT table in the surface network file. The setting can also
be modified by procedures.

The setting of the valve is used to look up (with interpolation) the


coefficient and used in the above equation to determine the pressure
drop across the valve. If the valve setting is outside the range of the
input table of valve coefficient data, the valve is set to CLOSED.

R5000.0.2 Network Calculations: Hydraulic Calculations 147


Nexus® Technical Reference Manual Landmark

Solution Algorithm
The solution procedure for determining the pressure drop in a valve is
as follows:

1. Determine the number of the hydrocarbon phases, their


compositions, and compressibility factors using the phase-
equilibrium computations, or the black oil model. Determine the
densities of oil, gas, and water phases. (Flash calculations.)

2. Determine the specified type of mass rate.

3. Calculate density of the fluid mixture.

4. Determine a valve coefficient as described in the previous section.

5. Determine the pressure differential across the valve using the


above equation.

148 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Choke Model
The choke flow is modeled using the Perkins model7. The Perkins
model accounts for multiphase flow through the choke. The liquid
phase compressibility is ignored, and no phase changes are assumed to
occur.

The flow is first examined to determine if it is critical, wherein the fluid


velocity in the throat is equal to the sonic velocity, and fluid mass flow
is independent of the downstream pressure when the upstream pressure
is held constant. For relating the flow conditions at the orifice throat to
those at the inlet, the flow is assumed to be adiabatic and with no
friction loss (isentropic). The energy conservation and continuity
conditions are used to determine the pressure ratio. The critical
pressure ratio is determined from the maximum mass flow rate
condition. (See Equation A-30 in Reference 7.) Perkins also provides
the method to determine whether the flow through a choke is critical or
subcritical. This method depends on comparing the choke throat
pressure against the calculated pressure (p3) several diameters
downstream of the throat in assumed subcritical flow. Pressure p3 is
related to the overall pressure drop across the choke (far-field upstream
pressure minus far-field downstream pressure) by an approximated
Perry relationship8. This relationship accounts for pressure recovery
downstream of the orifice including the energy loss due to turbulence in
the flow expansion, when liquid is present in the flow stream. If the
critical pressure at the throat is higher than p3, then it is concluded that
the flow is critical, otherwise the flow is deemed subcritical.

Once the throat flow conditions are determined, the mass flow rate is
calculated by multiplying the isentropic flow rate with a discharge
coefficient. The value of the discharge coefficient used in this
calculation is 0.8562. This value is based on analysis of experimental
results at Tulsa University by A. Pilehvari; both critical and subcritical
data points were included in this analysis.

Two special settings of choke are treated separately:

• When the choke throat diameter is greater than or equal to the inlet
pipe diameter, no pressure drop is assumed to occur in the choke
(full open choke).

• When the choke is fully closed, no flow is assumed to occur in this


case.

In implementation of the Perkins choke model, the total mass flow rate
through the choke is calculated given the pressures upstream and
downstream of the choke and the phase mass fractions. The flow rate is

R5000.0.2 Network Calculations: Hydraulic Calculations 149


Nexus® Technical Reference Manual Landmark

then incorporated in the network equations that are solved iteratively


such that the total flow rate in the network branch with the choke
equals the choke flow. Thus, in the absence of other flow constraints,
the choke will either limit (critical flow) or determine (subcritical flow)
the actual flow through a network path containing it.

150 Network Calculations: Hydraulic Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Wells

Nexus treats wells as part of the network, and represents each well with
nodes, connections between nodes, and perforations which connect
nodes to grid blocks. The network representation for each well is
automatically generated from the data input in a WELLSPEC table (see
the Well Specification Table in the Keyword document), and the well
connection data input in a WELLS table (see the Well connection Data
in the Keyword document). In addition, the CONDEFAULTS and/or
WELLBORE input can be used to specify whether the well should be
represented with as few nodes as possible (the LUMPED option, which
causes all perforations assigned to a single flow section to flow to the
same node), or gridded, with one node assigned to each perforation.
The LUMPED option is computationally less expensive, and also more
similar to the well treatment usually employed in the prior generation
of reservoir simulators.

The pressure distribution in gridded wells can be calculated by using


the hydrostatic pressure gradient calculated by flashing the fluid
flowing in each connection at the average pressure in the connection
(GRADCALC method), or by using the hydrostatic pressure gradient
calculated assuming that the fluids in the wellbore are fully mixed and
flashed at the average pressure in the connection (MIXED method), or
by using a pressure drop correlation. Hydrostatic gradients, and the
pressure drop calculated by a correlation in the wellbore, are treated
explicitly in Nexus, meaning that the derivatives of these terms are not
used during the Newton iteration to solve the network. This is because
these terms are discontinuous when flow directions change, as they can
in the wellbore, and this frequently would result in the Newton
iterations failing to converge. The pressure calculations described here
can all be selected by flow section on a well by well basis. A flow
section (keyword FLOWSECT in the WELLSPEC table) specifies a
contiguous section of the wellbore with common flow properties (such
as tubing diameter). For example, each lateral in a multilateral well
would be a separate flow section. However, there is a special option
that applies to all wells in a reservoir, which can be invoked with the
GRADIENT VIP input. This specifies that the fluid gradient will be a
mobility weighted average of the grid block fluid densities for
producers, and the density of the injected stream at wellbore pressure
for injectors. This option most closely approximates the treatment in
VIP.

R5000.0.2 Network Calculations: Wells 151


Nexus® Technical Reference Manual Landmark

Gridded Wells
For a gridded well, each entry in the WELLSPEC table usually
represents a perforation, or a connection from the specified reservoir
grid cell to a network node at the center of the (optionally specified)
wellbore section (keyword SECT in the WELLSPEC table). An entry
in the WELLSPEC table may also represent an unperforated node in
the wellbore connected to one or more perforated nodes, but we still
refer to these entries here as ‘perforations’. The default section
number is the perforation number in the order specified. This optionally
specified section number is used when several grid blocks flow to the
same section of the wellbore, such as in a radial case with multiple
angular increments. The section number could also be used to generate
a coarse wellbore model relative to the reservoir grid, such that groups
of grid cells singly penetrated by a section of wellbore are connected to
a single network node.

Since as many perforations as desired may be defined in the


WELLSPEC table for any given grid cell, the amount of refinement in
a gridded wellbore representation is completely user controlled by the
number of defined perforations and sections. A single network node is
created for each section, at the depth specified in the WELLSPEC table
for the first perforation in the section (all perforation depths in a given
section should be the same and equal to the depth at the center of the
wellbore section). All perforations in the section are attached to the
section node. These ‘perfnodes’ are automatically connected to one
another sequentially in the order of their section number. The default
flow directions of these perfnode connections are inferred from the
well type specified in the WELLS data (producer or injector). For
other than simple linear, single flow channel wellbores (like branching
wellbores with more than two branches, or wells with annular/tubular
communication), the user must define nodes in the wellbore in a
WELLNODE table, then connect these nodes appropriately for the
desired well configuration.

The automatically generated node corresponding to section n is named


wellname%k, where k is the first perf in the section, in the order
defined in the WELLSPEC table. The automatically generated
wellbore connection between section n-1 and section n is wellname%k,
with a default direction depending on whether the well is a producer or
injector. A connection named wellname%bh is automatically made
between the withdrawal/injection node wellname%1 to a bottom hole
node, named wellname. If a bottom hole depth is not entered in the
WELLS table, then it is defaulted to the depth of the first perf. If the
bottom hole node is at the same location as the first perf, the connection
wellname%bh is a ‘ghost’ connection and there is no pressure change

152 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

across the connection. A default sink or source connection, named


wellname, is attached to node wellname. The well sink and source
connections may then be optionally redefined to connect to user-
defined nodes to form networks.

The following example illustrates the well sub-network created for a


simple, gridded, single flow section well, that is not connected to a
network. The nodes are represented by solid circles, with the default
node names in italics. The connections are represented by an arrow
connecting nodes, with the direction of the arrow going from the inlet
node to the outlet node. And the perforations (connections to grid
blocks) are represented by the cell number and a dashed line. Note that
wellbore connections are allowed to flow in the reverse direction, so
the direction of the arrow does not necessarily represent the direction of
flow at all times. Since the depth of the bottom hole node is not
specified in the WELLS table, it defaults to the depth of the first perf,
so node well and node well%1 are actually coincident, and connection
well1%bh has no length or depth change. It is illustrated as a very short
connection in the figure.

WELLSPEC well1
CELL KH SKIN RADW RADB
18 432.1 0.0 0.5 3.71
23l 364.2 0.0 0.5 3.71
468 295.4 0.0 0.5 3.71
92 489.9 0.0 0.5 3.71
359 395.5 0.0 0.5 3.71
592 934.5 0.0 0.5 3.71
WELLS
NAME STREAM
Well1 PRODUCER
ENDWELLS

R5000.0.2 Network Calculations: Wells 153


Nexus® Technical Reference Manual Landmark

Figure 4.12: Network Representation of Gridded Well

154 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

Lumped Wells
If the wellbore treatment is specified as LUMPED, then one node is
created for all perforations assigned to the same flow section. This perf
node is located at the average depth of all the perforations that connect
to it, and is given the name wellname%k, where k is the first
perforation (in the order input in the WELLSPEC table) that is
connected to it. If there are multiple flow sections, then by default,
each perf node is connected to the preceding perf node with a
connection also named wellname%k. As for a gridded well, a
connection named wellname%bh is automatically made between the
first perf node and the bottom hole node, which, as for a gridded well,
is located at the depth of the first perf, and is called wellname.

The following example illustrates the well sub-network created for a


simple, lumped, well with two flow sections. The well is not connected
to a network. In this example, the perf node well%1 is located at the
average depth of the first three perfs, and the perf node well%4 is
located at the average depth of perfs 4 through 6. Unlike the gridded
well, node well1%1 and node well1 are no longer coincident, and
connection well1%bh will usually have a non-zero length and depth
change. This representation of the well is computationally more
efficient, because with fewer nodes and connections, there are many
fewer variables to be solved.

WELLSPEC well1
CELL KH SKIN RADW RADB FLOWSECT
18 432.1 0.0 0.5 3.71 1
23l 364.2 0.0 0.5 3.71 1
468 295.4 0.0 0.5 3.71 1
92 489.9 0.0 0.5 3.71 2
359 395.5 0.0 0.5 3.71 2
592 934.5 0.0 0.5 3.71 2
WELLS
NAME STREAM
Well1 PRODUCER
ENDWELLS

R5000.0.2 Network Calculations: Wells 155


Nexus® Technical Reference Manual Landmark

Figure 4.13: Network Representation of Lumped Well

156 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

Branched Wells
Simple branched wells can be specified using the PARENT, MD and
MDCON input in the WELLSPEC table. The PARENT table column
specifies the parent flow section, to which the first completion in the
current flow section will connect. This input is only applicable to the
first perforation in a flow section. The MD table column specifies the
measured depth for each perforation. Measured depth is the length
measured from a reference point to the location of the perforation in the
wellbore, and should increase monotonically in each flow section. The
combination of flow section and measured depth identifies a unique
location in the wellbore. The MDCON table column, like the PARENT
column, is only applicable to the first perforation in a flow section, and
specifies the measured depth in the parent flow section where the
current flow section will connect.

The automatic generation of the wellbore configuration for a branched


production well with 2 branches is illustrated below. The perforated
length of each branch passes through three grid cells, with a single
perforation defined in each grid cell, each connected to a separate node.
The perforation in each flow section must be ordered starting with the
perforation closest to the offtake point.

WELLSPEC well1
CELL KH SKIN RADW RADB DEPTH FLOWSECT PARENT MD MDCON
18 432.1 0.0 0.5 3.71 # 1 NA 5150 NA
23l 364.2 0.0 0.5 3.71 # 1 NA 5250 NA
468 295.4 0.0 0.5 3.71 # 1 NA 5350 NA
92 489.9 0.0 0.5 3.71 # 2 1 5175 5010
359 395.5 0.0 0.5 3.71 # 2 NA 5275 NA
592 934.5 0.0 0.5 3.71 # 2 NA 5375 NA

The # in the depth column indicates that the midpoint of each


perforated section is at reservoir cell depth.

WELLS
NAME STREAM BHDEPTH BHMD
Well1 PRODUCER 4950 5000
ENDWELLS

The WELLS table indicates that the bottomhole node is at a depth of


4950, and a measured depth of 5000. A node is created at the point
where the second flow section joins the first flow section, and this is
named well1%b1.

R5000.0.2 Network Calculations: Wells 157


Nexus® Technical Reference Manual Landmark

Figure 4.14: Network Representation of Branched Well

158 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

Complex Wells
More complex well configurations, including wells with controllable
connections (connections where constraints can be specified), and flow
control devices such as valves or chokes, can be specified using
WELLNODE input. A WELLNODE table provides for the
specification of user named nodes in the wellbore, which can then be
connected to any other node, in the network, including nodes in the
same wellbore. Well nodes are located by specifying a measured depth
and flow section, and will be inserted between two existing nodes.
When this occurs, the connection between the two existing nodes must
be replaced by a connection between the first existing node and the new
well node, and optionally (depending on the CONNECT data in the
WELLNODE table), between the new well node and the second
existing node. This is illustrated in the following example. The input

WELLSPEC well1
CELL KH SKIN RADW RADB MD
18 432.1 0.0 0.5 3.71 5150
23l 364.2 0.0 0.5 3.71 5250
468 295.4 0.0 0.5 3.71 5350
592 934.5 0.0 0.5 3.71 5375

would result in the normal well sub-network shown below.

Figure 4.15: Default Network Representation of Well

R5000.0.2 Network Calculations: Wells 159


Nexus® Technical Reference Manual Landmark

The input

WELLNODE
NODE WELL MD CONNECT
new_node well1 5360 NO
ENDWELLNODE

would result in the node new_node being inserted between nodes


well1%4 and well1%3. To accomplish this, the existing connection
between nodes well1%4 and well1%3 is modified by the program, to
be a connection between well1%4 and new_node. The input in the
connect table column indicates that there should be no connection
generated between new_node and well1%3. This is shown below.

Figure 4.16: Well Sub-network with Inserted Well Node

If YES was input in the CONNECT column, then a new connection,


also named new_node, would be created to connect new_node to node
well1%3

The following example illustrates how well nodes can be used to model
a smart well. In this case, the reservoir produces through perforated
casing into the annulus, and valves (sleeves) control flow from the
annulus into the tubing contained inside the casing. Annular flow in
the casing is blocked by packers above and between three perforated
sections of the wellbore.

160 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

WELLSPEC P-1
CELL KH SKIN RADW RADB MD
1080 500.0 0.0 3.5 117.9126 5050
1264 500.0 0.0 3.5 117.9126 5150
1440 500.0 0.0 3.5 117.9126 5250
1772 500.0 0.0 3.5 117.9126 5350
1956 500.0 0.0 3.5 117.9126 5450
2140 500.0 0.0 3.5 117.9126 5550
!
! ADDTUBING entry of 1 adds 1 tubing string from the bottom
! hole node down through the perforated section of the wellbore.
! Because there is only one flow section in the WELLSPEC data, the
! tubing is given a flowsection index of 2.
!
WELLS
NAME STREAM TYPE METHOD BHMD ADDTUBING BHDEPTH DIAM ROUGHNESS
P-1 PRODUCER PIPE HAGEDORN 4950 1 4900 3.5 0.0005
ENDWELLS

WELLNODE
NODE WELL MD FLOWSECT CONNECT
P-1-T1 P-1 5000 2 YES ! Point in tubing, just
! below packer 1
P-1-A1 P-1 5000 1 NO ! Point in annulus, just
! below packer 1
P-1-T2 P-1 5200 2 YES ! Point in tubing, just
! below packer 2
P-1-A2 P-1 5200 1 NO ! Point in annulus, just
! below packer 2
P-1-T3 P-1 5400 2 YES ! Point in tubing, just
! below packer 3
P-1-A3 P-1 5400 1 NO ! Point in annulus, just
! below packer 3
ENDWELLNODE
NODECON
NAME NODEIN NODEOUT TYPE METHOD
VALVE1 P-1-A1 P-1-T1 VALVE 1 ! valve connecting annulus to
! tubing
VALVE2 P-1-A2 P-1-T2 VALVE 1 ! valve connecting annulus to
! tubing
VALVE3 P-1-A3 P-1-T3 VALVE 1 ! valve connecting annulus to
! tubing
ENDNODECON

R5000.0.2 Network Calculations: Wells 161


Nexus® Technical Reference Manual Landmark

Figure 4.17: Network Representation of Smart Well

162 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

Connecting Wells to the Network


By default, the well connection (defined in a WELLS table) connects
the bottom hole node to a sink if the well is a producer, and to an
injection source, if the well is an injector. It is not required for the
wells to be connected to a network, and the simulator can be run in this
mode, with all wells flowing directly to a sink, or from a source. This
might be appropriate for a history run, where the historical flow rates
and/or bottom hole pressures are known, and the conditions in the
network are not required to model the reservoir behavior. However, for
prediction runs, it will usually be necessary include at least the
production/injection tubing to the wellhead, and often also the surface
pipeline network and other facilities. To connect the wells to the
network, the default well connection is reconnected to a node (rather
than the sink) in a NODECON table.

For example, production well P-1 and injection well I-1 can be
connected to a simple network as follows:

NODES
NAME TYPE DEPTH
WH-P-1 WELLHEAD 0
NODE1 NA 0
WH-I-1 WELLHEAD 0
ENDNODES

NODECON
NAME NODEIN NODEOUT TYPE METHOD DIAM LENGTH
P-1 P-1 WH-P-1 PIPE HAGEDORN 3.5 #
WH-P-1 WH-P-1 NODE1 PIPE BEGGS 3.5 1000
SINK NODE1 SINK NA NA NA NA
SOURCE WATER WH-I-1 NA NA NA NA
I-1 WH-I-1 I-1 PIPE NOSLIP 3.5 #
ENDNODECON

Here well P-1 is connected to a well head node named WH-P-1, and the
Hagedorn and Brown correlation is used to calculate the hydraulic
pressure drop. Therefore, connection P-1 represents the tubing, and
has a diameter (the inner diameter of the tubing) of 3.5 inches. The
wellhead node is then connected by the wellhead connection (a 1000 ft
pipe) to another node named NODE1, and from there flows to a sink.
The wellhead connection uses the Beggs and Brill pressure drop
correlation. Note that the length and depth change of the tubing,
connection P-1, is defaulted, and will be calculated by the program
from the difference in depth between the well head node (depth 0) and
the bottom hole node.

R5000.0.2 Network Calculations: Wells 163


Nexus® Technical Reference Manual Landmark

The injection well connection I-1 is similarly reconnected to flow from


the wellhead node, WH-I-1, to the bottom hole node, using the
NOSLIP pressure drop correlation.

In the NODES table, the wellhead nodes are identified in the TYPE
column. The well head node need not be the first node after the bottom
hole node for a producer (or before the bottom hole node for an
injector), but there must not be any branches in the network between
the well head node and the bottom hole node, except for gas lift in the
case of a producer. The designation of a wellhead node is important,
because it is used for several purposes. In particular, remote control of
wells at the wellhead (WELLCONTROL keyword), requires that the
location of the well head is known. Also, the procedures automatically
create a list of well head nodes and connections, which also requires
that the well heads are identified.

Well Constraints
Rate and pressure constraints can be applied to any user named
connection or node, and in addition, to the automatically named well
bottom hole connection, which has %bh appended to the well name.
The WELLS table names the bottom hole node, and the well
connection, which is the offtake from the bottom hole node in the case
of a producer, or the intake to the bottom hole node in the case of an
injector. So if a production well is named well1, inputting a PMIN
constraint for well1 specifies a minimum bottom hole pressure, and
inputting a rate constraint for well1 specifies a maximum rate in the
well connection. Both the pressure constraint and the rate constraint
are controlled by an implied control device (valve) located in the well
connection, unless remote control is in use (see the section on remote
control of constraints). The location of the implied control device
means that an additional pressure drop will be applied to that
connection, over and above that obtained by the hydraulic calculation,
so that the constraint is not violated. If one of the well constraints is
active, the network pressures downstream of the well connection are
then determined by the flow conditions downstream of the well
connection, i.e., the hydraulic pressure drops and constraints. For
example, if a well has a 100 psi minimum pressure specified at the well
head node, and a rate constraint of 1000 STB/Day of oil, and the rate
constraint is active, then the pressure at the well head node will be 100
psi, regardless of the pressure at the bottom hole node, and the implied
control device located in the well connection sets the bottom hole
pressure to the value required for the well to flow at 1000 STB/Day of
oil.

164 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

Rate constraints can also be applied to the well bottom hole connection.
This is particularly useful in the case of gas lift injection, because the
rates downstream of the gas lift injection node, which is often the
bottom hole node, will include the gas lift gas.

A drawdown/buildup constraint can also be specified for wells


(DPBHMX keyword). This constrains the maximum drawdown (or
buildup) at any perf to be less than or equal to the specified value. The
equation used to calculate drawdown/buildup is given in Equation 4-20
in the perf equations section below. Note that this treatment of
drawdown is different from that used by VIP, which uses an average
drawdown for the well as a whole, rather than the maximum drawdown
at any individual perforation.

Treatment of Datum Depth


The datum may be specified for the bottom hole pressure constraint in
the WELLS table. By default, the datum is set to the same depth as the
bottom hole node depth. If it is different from the bottom hole node
depth, then a datum correction is made when applying a bottom hole
pressure constraint. If the difference between the datum depth and the
bottom hole node depth is d, then a bottom hole pressure constraint of
pmin will result in the actual pressure at the bottom hole node being
constrained to not less than pmin – d * fluid_gradient, where the
fluid_gradient is calculated by one of five methods. The OILGRAD
method uses the initial average density gradient of the oil phase in the
reservoir, the GASGRAD method uses the initial average density of the
gas phase, the WATGRAD method uses the initial average density of
the water phase, the WELLGRAD method uses the density gradient of
the fluids flowing in the bottom hole connection, evaluated at the
bottom hole pressure, and the MOBGRAD method uses the mobility
weighted reservoir density gradient in the perforated grid blocks. The
MOBGRAD method is the method used by VIP. The datum correction
term is treated explicitly in the simulator, and if the WELLGRAD or
MOBGRAD methods are used, can lead to unexpected behavior, such
as well shut ins, if the difference in depth between the bottom hole node
and the datum depth is large. The default method is OILGRAD if oil is
present in-situ, otherwise GASGRAD if there is free gas, otherwise
WATGRAD, and for stability of the calculations, one of these three
methods is recommended.

If the datum depth is deeper than the bottom hole node, and the depth
difference is large, then it is possible that a small value for the PMIN
constraint at the bottom hole node, might translate to a negative
pressure at the bottom hole node. This is physically impossible, and
indicates that the value input for PMIN should be increased. But in the

R5000.0.2 Network Calculations: Wells 165


Nexus® Technical Reference Manual Landmark

event this occurs, the simulator will make an automatic adjustment to


the constraint to prevent the pressure from falling below the minimum
allowed pressure, issue a warning message, and continue execution.

Crossflow
By default, flowing wells in Nexus are allowed to crossflow, and shut
in wells are not allowed to crossflow. This means that for a producing
well, individual perfs can either produce or inject, depending on the
pressure calculated for the perf nodes, and the pressures in the grid
blocks. In addition, the connections between perf nodes can flow in
either direction. Crossflow can be enabled or disabled for individual
wells by input in the WELLS table. The default behavior can be
changed for all wells using the CROSSFLOW keyword. If crossflow is
disabled, then on each network solve, Nexus first opens all active perfs
to flow if the well is not shut in, and solves the network equations
allowing the perfs to backflow. When the network calculations
converge, all back flowing perfs are plugged, and additional iterations
are taken until convergence is reached again. This is repeated until no
perfs are back flowing. Note that within the network solve, the wells
are solved individually to speed convergence. From one timestep to the
next, or even from one global Newton iteration to the next, the perfs
which are open to flow may change, and this may slow convergence of
the timestep, and possibly cause smaller timesteps. If crossflow is
allowed, perfs may change flow direction during the timestep, or from
one timestep to the next, but this is usually a less abrupt change than the
opening and closing of perfs when cross flow is off. For this reason, it
is recommended that cross flow be enabled for flowing wells in Nexus.

166 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

Perforation Equations
The mass production rate of component i from reservoir cell r through
each producing perforation p to network node n is given by

4-19
N phases

Qip = C p ΔΦ p ∑
k =1
kr  kr zikr

4-20
ΔΦ p = Φ rp − Φ wp

4-21
Φ rp = Pr +  r ( D p − Dr )

4-22
Φ wp = Pn +  wp ( D p − Dn )

where C is the wellbore constant (see Equation 5-1), equal to the well
index times the permeability-thickness product, kr is the volumetric
mobility (relative permeability/viscosity) of phase k in cell r, kr is the
density of phase k in cell r, and zikr is the mass fraction of component i
in phase k in cell r. Φ rp is the perforation reservoir potential, obtained
by correcting the reservoir cell pressure to perforation depth Dp using
an explicit hydrostatic pressure gradient in the reservoir cell, r. Φ wp 
is the perforation wellbore potential, obtained by correcting the node
pressure Pn to perforation depth using the wellbore gradient  wp .
Capillary pressure is neglected.

For injecting perforation p contained in reservoir cell r, the component


mass rate equations are not independent, and the single equation
representing the total mass perforation rate (negative for injection) is

4-23
QTp = C p Tr  inj
p ΔΦ p

where Tr is the total reservoir cell mobility (sum of kr) and  p is the
inj

perforation injected fluid density. Optionally, endpoint mobility can be


used instead of the total cell mobility, using the water endpoint or gas
endpoint mobility depending on the injection source. The injected fluid
density is treated implicitly or explicitly and is computed from phase

R5000.0.2 Network Calculations: Wells 167


Nexus® Technical Reference Manual Landmark

saturations and densities obtained by flashing the perforation fluid


composition at perforation node pressure.

For gridded wellbores, the node to which each perforation connects is


placed at perforation depth, so the wellbore gradient correction
appearing in Equation 4-22 is zero. If the wellbore is lumped, then the
perf node depths will be different from the grid block depths, and an
approximate explicit mixed wellbore gradient is computed for each
perf from the sum of phase densities weighted by their saturations,
which are obtained from a flash of an average perforated grid cell
composition (weighted by the product of phase mobilities and wellbore
constant) at the node pressure. Optionally, if GRADIENT VIP is
specified, the wellbore gradient for producers is computed from the
mobility weighted average of the grid block fluid densities.

Usually, the perforation depth and grid block depth are coincident, so
there is no gradient correction in Equation 4-21. However, if the
perforation depth can be optionally input in the WELLSPEC table, in
which case the gradient used in Equation 4-21 is obtained from the
saturation weighted average fluid density in the grid block.

168 Network Calculations: Wells R5000.0.2


Landmark Nexus® Technical Reference Manual

WAG (Water-Alternating-Gas) Injection

In order for a well to be a WAG injector, it must be connected to two


sources, one of which is a water source, and the other a hydrocarbon
source. This is illustrated in Figure 4.18. Injection is switched from
water to gas by constraining the water injection rate (QWSMAX) in
Connection 1 to zero, while removing any constraints on Connection 2.
Similarly, to switch from gas to water, the gas injection rate
(QGSMAX) would be constrained to zero in Connection 2, and all
constraints would be removed on Connection 1. The WAG procedures
do this switching automatically. After cycling starts, any rate constraint
specified by the user for these connections will be ignored. The
maximum injection rate of gas or water is controlled by one of the
connections in the linear series leading to the well, which in this
example would be Connection 3, the Wellhead Connection, or the Well
connection. The user specifies these constraints (QWSMAX and
QGSMAX) in a CONSTRAINTS table, just like any other constraint
data. The switching connections (Connections 1 and 2) must be the last
branch in the network before the well is reached. I.e downstream of the
inlet node to Connection 3, there can be no connections that either
remove fluid, or inject additional fluid, otherwise the amount of fluid
injected into the well can not be controlled.

Figure 4.18: Source Connections for WAG Wells

R5000.0.2 Network Calculations: WAG (Water-Alternating-Gas) Injection 169


Nexus® Technical Reference Manual Landmark

The WAG procedure is used to control the cycling automatically.


Automatic WAG cycling is activated by inputting a PROCS section in
the surface network file that includes one or more variations of the
WAG procedure. (See the Procedures section of the Keyword
document.) For example

WAG
WELL WSCUM GSCUM
I1 300 300
ENDWAG

CONSTRAINTS
I1 PMAX 8000.0 QGSMAX 2000 QWSMAX 1000
ENDCONSTRAINTS

PROCS NAME WAG_1


INTEGER NCYCLE = 5
WAG("WW", NCYCLE, I1)
ENDPROCS

Here the WAG procedure takes three arguments, WW, to indicate that
the first cycle is water, and that water should be injected after cycling is
finished, the integer variable NCYCLE, which in this case is set to 5,
indicating that the procedure should execute five WAG cycles (where a
cycle means injection of both a water slug and a gas slug), and I1,
which is the name of a WAG injection well, which is connected to both
a water and hydrocarbon source, as discussed above. The size of the
slugs, is determined for each WAG well by data input in a WAG table
(see Water-Alternating-Gas (WAG) Wells in the keyword document).
In the above example, the WAG table specifies a water cycle slug size
of 300 MSTB, and a gas cycle slug size of 300 MMSCF. The WAG
procedure does not attempt to exactly honor the slug sizes specified in
the WAG table, because in order to do so might severely restrict the
timestep size, particularly if there were many WAG injectors. Instead,
the procedure switches from water to gas, or vice versa, as soon as the
specified slug size is exceeded. The size of the next slug of the same
kind (i.e., water or hydrocarbon), is reduced by the amount by which
the current slug is exceeded, so that the over injection does not
accumulate with each cycle. The WAG procedure controls the
cumulative amount of fluid injected in each cycle only. The injection
well is still subject to whatever other constraints are specified
(including targets). In the above example, the WAG injection well is
constrained to a maximum gas injection rate of 2000 MSCF/Day, and a
maximum water injection rate of 1000 STB/Day, and the bottom hole
node has a maximum injection pressure of 8000 psia.

170 Network Calculations: WAG (Water-Alternating-Gas) Injection R5000.0.2


Landmark Nexus® Technical Reference Manual

The other variations of the WAG procedure provide for initiating WAG
on a group of wells (specified in a WELLLIST), and allow for
multipliers to be applied to the slug sizes specified in the WAG table.
These are documented in the Procedures section of the keyword
document.

R5000.0.2 Network Calculations: WAG (Water-Alternating-Gas) Injection 171


Nexus® Technical Reference Manual Landmark

Separation Nodes

A separator can be defined as a separation node (SEPNODES) in


Nexus1. It is not necessary to define terminal nodes as separation
nodes if the separator outflows may all be considered as sink
connections – fluids produced to a sink are always automatically
flashed through the separator battery defined for the sink connection.
However, if internal separations are desired (for example, for modeling
gas reinjection or gaslift), separation node data are required. Separation
nodes may have an arbitrary number of outflow connections, but are
restricted to having a single inflow connection, and inflow and outflow
connections may not be allowed to backflow. A typical separation node
and its inflow and outflow connections are illustrated below.

Figure 4.19: A Separator with Three Outflow Connections.

For compositional fluids, separation nodes may represent any of the


separator batteries or gas plants described in the separator method files.
Total phase rates obtained by flashing the inflow through a separator
battery (at the stage pressures and temperatures specified in the
separator method file, which is referred to by the separator battery
number assigned through keyword IBAT in a CONDEFAULTS table or
in a NODECON table), or through a gas plant, are implicitly split
among the outflow connections using user-defined volumetric phase
fractions for the arbitrarily defined outflow connections (these fractions
are essentially separation efficiency factors). Therefore, the mass/mole
flow rate of component i of outflow connection n, qni, is evaluated as:

4-24
np

qni = ∑ Fnk Q fk  k zik , i = 1...nc, n = 1...N


k =1

172 Network Calculations: Separation Nodes R5000.0.2


Landmark Nexus® Technical Reference Manual

Here, np is the number of phases, nc is the number of components, N is


the number of separator outflow connections, Qfk is the volumetric rate
of phase k obtained by flashing the flow of the separator inflow
connection f, k is the density of phase k, zik is the mass/mole fraction
of component i in phase k, Fnk is the user-defined volumetric fraction of
the phase k that is sent to outflow connection n, which must satisfied,

4-25
N

∑F
n =1
nk = 1, k = 1...np

Fnk are assigned through keywords FOIL, FGAS and FWATER in a


SEPNODES table.

Network node pressures computed by the model are independent of


separator battery stage pressures; rather they are determined by active
network constraints, reservoir behavior, and hydraulics. In other words,
it implies that there may be hydraulic devices (such as valves or
pumps) in a separation node to make up the pressure difference
between the separator battery stage pressures and the separation node
pressure, although these devices are not explicitly simulated in the
network model.

For black-oil or compositional fluids, separation nodes may also


represent separator stages which can be sequentially connected to form
separator batteries of arbitrary configuration. For each stage node, the
volumetric phase splits among the defined outflow connections are
specified, and for compositional fluids, the EOS method (IPVT) to be
used for the flash calculation (phase-equilibrium computations). The
flash calculation at each separation node is performed implicitly at
network node conditions of temperature and pressure. Node pressures
are always determined by some combination of active network
constraints, network hydraulics, and reservoir conditions. Appropriate
constraints, targets, and hydraulics must be specified in order to, for
example, set up a separator battery system that operates at fixed stage
pressures. Node temperatures may be input by (in order of increasing
precedence):

1. The temperature associated with the EOS method, for


compositional fluids.

2. Specification of NETTEMP in the surface network file, defining a


single temperature for all non-perforation network nodes.
Required for black oil, gas-water, oil-water, and gas-water fluid
types when using the temperature dependency option. Perforation

R5000.0.2 Network Calculations: Separation Nodes 173


Nexus® Technical Reference Manual Landmark

nodes are internally assigned average connecting reservoir grid


cell temperatures.

3. Specification of node temperatures in the NODES table of the


surface network file.

Alternatively, node temperatures may be approximately calculated


using the Network Heat Loss Option.

The use of separation nodes introduces physical and corresponding


numerical restrictions upon placement of constraints. Of the N outflow
connections of a separation node, N-1 of them are considered to be
controlled by proportioning devices such as level controllers. The
remaining connection is referred to as the control connection, which
may contain a device that can be used to regulate minimum pressure at
the separation node. The model takes the control connection of a given
separation node as that outflow connection with the highest specified
gas fraction. Separation systems are defined as groups of
interconnected separation nodes and their connections flowing only
fluids originating from a single common upstream separator inflow
connection. Since, with respect to rates, all connections within the
system downstream of any proportioned connection are considered
proportioned, separation systems have a single control path (or path of
possible hydraulic communication) from the common upstream
connection into the first (furthest upstream) separation node to a
junction, a sink, or a reinjection system. Rate constraints in separation
systems are allowed to be applied only in connections along the control
path of the system. Constraints on rate-proportioned connections of a
separation system must currently be targeted to devices in connections
upstream of the inlet separation node, or remotely controlled by
connections upstream of the inlet separation node or by connections in
the control path. Maximum pressure constraints cannot be specified for
nodes that are not in the system control path (such as for pumps for
water disposal wells). These constraints must be handled through the
predictive logic with constraint modifications or flow rerouting.
Applying a prohibited constraint within a proportioned connection
while keeping other controls fixed would physically result in flooding
of the upstream separator stages and system shutdown, and would
numerically result in a singular system of equations. There are no
limitations on specifications of minimum pressure constraints on
nodes. If a node is a separation node, its minimum pressure constraint
is automatically applied within the control connection for that node.

Stream splitting nodes limit the split of the total flow rate into a node
amongst the outflow connections by specified fractions. No phase
separation occurs. Specification of the split implies the presence of

174 Network Calculations: Separation Nodes R5000.0.2


Landmark Nexus® Technical Reference Manual

flow controlling devices in each defined outflow connection of the


node. Each device is assigned its specified maximum split as a
maximum split constraint. If the sum of the specified splits is unity,
and at any given time, no other constraints are user-specified for these
outflow devices, then N-1 of the N outflow devices will be actively
constraining the specified split. Which of the N-1 devices are
controlling is dependent upon hydraulics behavior and other active
network constraints, and is automatically determined by the program.
If the sum of the fractions is unity, then the specified fractions are
honored unless other constraints specified by the user in at least two of
the outflow connections become violated. In this case, the devices in
the other connections (those without other violated constraints) will
continue to constrain their maximum split to the specified value.

R5000.0.2 Network Calculations: Separation Nodes 175


Nexus® Technical Reference Manual Landmark

Treatment of ONTIME factors

ONTIME factors can be specified for wells in the WELLS table.


ONTIME is the fraction of the time that the well is actually producing
or injecting, and can be used to approximately account for periods
when the well is not on line. When an ONTIME factor is input for a
well, all connections in linear series with the well are assigned the same
ONTIME factor. At gathering nodes, the outlet connections (and the
inflowing gaslift connection if there is one) are given a total mass rate
weighted average of the ontime factors of the inflowing connections,
not including gaslift connections. This means that a gas lift connection
injecting into the tubing string for a single well, will get the same
ontime factor as the well, while a gas lift connection injecting into a
riser that several wells produce into, will get the average ontime factor
of the contributing wells. Connections from an external source, which
inject into a production network, will be given an ontime factor of 1.0.

ONTIME factors modify the network equations as follows. Wellbore


constants for the perforations and rate constraints are multiplied by the
ontime factor. The rates used in all hydraulics calculations are the full
on rates, i.e., the calculated connection rate divided by the connection
ontime factor. This results in the network pressures being calculated as
if the wells were fully on. To illustrate this, consider a well with a
single perforation, with a grid block pressure of 1000 psia, flowing
against a bottom hole pressure constraint of 900 psia, and say this
results in a total mass flow rate of 10000 lb/day if the ontime factor is
1.0. If the ontime factor is reduced to 0.9, then the total mass flow rate
will be 9000 lb/day, and because the hydraulics are evaluated at the full
on rate of 9000/0.9 lb/day, and the wellbore constant has been
multiplied by 0.9, the pressure drop from the grid block to the bottom
hole node is still 100 psia.

Ontime factors significantly less than unity are not recommended,


because the assumption that pressures downstream of gathering nodes
should be evaluated using the full on rate becomes less and less valid as
the ontime factors are reduced. For example, if two wells are gathered
at a node, each has an ontime factor of 0.5 and are flowing at the same
total mass flow rate, and if the periods that the wells are on are random,
then the offtake connection from the gathering node would expect to
flow at the full rate 25% of the time, have one well flowing 50% of the
time, and have no flow 25% of the time, where as the treatment in
Nexus would assume that the wells were on and off simultaneously, so
that the offtake connection would see all of the flow for 50% of the
time, and no flow for the remaining 50% of the time.

176 Network Calculations: Treatment of ONTIME factors R5000.0.2


Landmark Nexus® Technical Reference Manual

Network Heat Loss Calculations

The simplified heat transfer calculations in the surface network are


used to approximately determine the fluid temperature at all points in
the network. This option is activated by the HEATTR keyword. Fluid
temperature affects the in-situ phase flow rates and fluid densities, and
these are used in imposing in-situ rate constraints and hydraulics
calculations involving hydrostatic fluid gradients, pressure drop
correlations, valves, chokes and pumps. The fluid temperature does not
affect hydraulic tables, because these are input as functions of stock
tank phase rates; however, the table should have been generated using
representative fluid temperatures. Network node temperatures can be
input in NODES tables, and connections can be assigned temperature
profiles in NODECON tables. Perforation temperatures are determined
by the temperatures input for the reservoir grid. If the heat transfer
option is not activated, then these input temperatures are taken to
represent the temperatures in the network. If the heat transfer option is
activated, then these temperatures represent the ambient temperature.

The simplified heat transfer calculations make the following


assumptions:

• The calculations are steady state. That is, there is no heat capacity
associated with the network components or the surroundings.

• Latent heat as a result of phase change is neglected

• Conductive heat flow in pipes and other network components is


neglected

• A simple approximation of fluid heat capacities is used

At each node in the network, a heat balance is imposed.

4-26
hi = ( SHCOIL * qoil + SHCGAS * qgas + SHCWAT * qwat ) * Ti

4-27
ninflow noutflow


i =1
hi = ∑i =1
hi

where

hi is the enthalpy of the fluid flowing in connection i at the node.

R5000.0.2 Network Calculations: Network Heat Loss Calculations 177


Nexus® Technical Reference Manual Landmark

Ti is the temperature, either the outlet temperature of the connection for


connections flowing into the node, or the inlet temperature for
connections flowing out of the node (which is the same as the node
temperature).

SHCOIL, SHCGAS and SHCWAT are the heat capacities of the oil, gas
and water phases

qoil, qgas and qwat are the in-situ flow rates, evaluated at temperature Ti
and the node pressure.

ninflow and noutflow are the number of inflowing and outflowing


connections at the node.

Heat loss from a connection to the surroundings are calculated using

4-28
dh / dx = − htc *  * d *(T − Tamb)

where

x is the distance from the inlet of the connection

h is the enthalpy at distance x

htc is the input heat transfer coefficient

d is the connection diameter

T is the temperature at distance x

Tamb is the ambient temperature of the surroundings at distance x

Integrating the above equation from the inlet to outlet of a connection


gives the enthalpy at the outlet, as a function of the enthalpy of the
inlet.

The boundary conditions are that fluid flowing into the network from
the perforations is at the temperature of the grid block, and the fluid
temperature at the injection source is the ambient temperature of the
source node.

These equations are used to determine network temperatures explicitly.


i.e., The network temperatures are treated as known, invariant
quantities for the combined reservoir/network solution.

178 Network Calculations: Network Heat Loss Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Drilling Queues

Drilling queues can be used to automatically add or replace wells over


time, in order to meet production or injection requirements. A drill
queue is started by specifying the drill or redrill function in a
procedure. These procedures require that data has been input to define
drill sites (DRILLSITE table), rigs (RIG table) and the time to drill and
complete each well (DRILL table). Drill site data consists of the names
of the drill sites, and optionally the maximum number of rigs allowed at
the drill site (the default is 1). Rigs can be assigned to an initial drill
site, or the program can decide the initial location. The time to move a
rig from one drill site to any other drill site, and the default time
required for a rig to drill a well (which can be superseded on a well by
well basis) is also input for each rig. For each well, the drill site from
which it will be drilled, the rigs that can be used to drill the well, the
time required to drill the well and the time required to complete the
well can be specified. Also, for use with the redrill procedure, the wells
which can replace an existing well can be specified. All wells in the
drill queue must be fully defined in the surface network input, along
with their connections to the network, but initially deactivated.

The Drill Procedure


There are two ways to invoke the drill procedure. The first method
mimics the options available in VIP for determining when wells should
be drilled. The second allows for arbitrary user defined criteria to be
used. For the first method, well(s) are drilled if an adjusted target rate
(specified in a TARGET table), can not be met. The drill procedure is
as follows:

drill(key1, key2, target, adjust, wl, nw, mask)

key1 can be either RIGS or NORIGS. If NORIGS is specified, then


drilling is not subject to rig availability, but only nw wells can be in
progress simultaneously. If RIGS is specified, then a well can only be
drilled if there is a rig available, and the drill site(s) from which the
well can be drilled has less than the maximum number of rigs
operating. The procedure first checks the first nw inactive wells in the
drill queue well list, wl, to see if this criteria can be met without
moving a rig. If not, it will check all the inactive wells in the drill
queue (in the order specified in the drill queue well list), allowing rigs
to move between drill sites.

key2 can be either MULT, ADDVALUE or VALUE. This specifies


how the argument adjust is used to adjust the target rate. The target

R5000.0.2 Network Calculations: Drilling Queues 179


Nexus® Technical Reference Manual Landmark

must have been input in a TARGET table, and when the adjusted target
rate can not be met, the program will attempt to drill a well(s). To
determine whether the adjusted target rate can be met, the program will
solve the network potential (with all targets removed), then compare
the flow rates from this potential solution with the adjusted target. If
key2 is MULT, then the target rate will be multiplied by the argument
adjust. If key2 is ADDVALUE, the amount adjust will be added to the
target rate, and if key2 is VALUE, then the argument adjust will be
used instead of the target rate.

adjust is a real number or variable, which is used to adjust the target


rate, as discussed above.

wl is a well list, containing all the wells in the drill queue, in the order
that the procedure will attempt to drill them. These wells should
initially be inactive.

nw is an integer number or variable. If key1 is NORIGS, then this is


the number of wells that can be drilling simultaneously. If key1 is
RIGS, then this is the number of inactive wells in the drill queue well
list that the procedure will check (to see if a rig is available at the drill
site from which the well would be drilled), before allowing rigs to
move between drill sites. If the target rate can not be met, and RIGS is
specified, the program will start drilling wells until all rigs are in use
(subject to the limitations on the number of rigs that can drill at each
drill site).

mask is an array of logicals (true or false), which if false, will prevent


the corresponding well in the drill queue well list from being drilled.
This provides a means for the user to override the automatic drilling
algorithm, but will usually be input as ALL1D, which specifies a value
of true for all members of the well list.

When an inactive well on the drill queue is drilled, the well will be
available to start production or injection after the sum of the drill time,
and completion time, specified in the DRILL table, plus, the move time
specified in the RIG table if the rig had to be moved from one drill site
to another. The rig is available to drill another well after the sum of the
drill time and the move time (if any). Timesteps are not adjusted to
coincide with start of production or injection, but rather, the well will
start operations as soon as the simulation time equals or exceeds the
availability time for the well.

The second form of the drill procedure is more general, and allows
users to specify their own criteria to determine when wells should start
drilling. This form assumes that drilling will be subject to RIG
availability, but if the rigs are given zero move time, are made available

180 Network Calculations: Drilling Queues R5000.0.2


Landmark Nexus® Technical Reference Manual

to all drill sites, and the drill sites have no limitations on the number of
rigs that can drill, then this will act the same as the NORIGS option in
the first form of the drill procedure. The arguments are as follows:

drill(wl, nw, mask). Here the arguments are:

wl is a well list, containing all the wells in the drill queue, in the order
that the procedure will attempt to drill them. These wells should
initially be inactive.

nw is integer number or variable. This is the number of inactive wells


in the drill queue well list that the procedure will check (to see if a rig is
available at the drill site from which the well would be drilled), before
allowing rigs to move between drill sites. The program will start
drilling wells until all rigs are in use (subject to the limitations on the
number of rigs that can drill at each drill site).

mask is an array of logicals (true or false), which if false, will prevent


the corresponding well in the drill queue well list from being drilled.
This provides a means for the user to override the automatic drilling
algorithm, but will usually be input as ALL1D, which specifies a value
of true for all members of the well list.

The following example illustrates the use of this form of the drill
procedure. In this example, inactive wells on the drill queue will start
drilling, subject to rig availability, if the field potential oil rate falls
below 100000 STBD and the field water rate is less than 300000
STBD. Here, the wells in the drill queue have been specified in a well
list called wl.

PROCS
REAL field_potential_oil_rate, field_water_rate
field_potential_oil_rate = sum(qp(“OS”,prodbhcons,ALL1D))
field_water_rate = sum(q(“WS”,prodbhcons,ALL1D))
if(field_potential_oil_rate < 100000 and &
field_water_rate < 300000)then
drill(wl,3,ALL1D)
endif
ENDPROCS

The Redrill Procedure


The redrill procedure provides a means to automatically drill
replacement wells when the production (or injection) from existing
active wells is no longer sufficient. There are two ways to invoke the
redrill procedure. The first method mimics the options available in VIP
for determining when replacement wells should be drilled. The second

R5000.0.2 Network Calculations: Drilling Queues 181


Nexus® Technical Reference Manual Landmark

allows for arbitrary user defined criteria to be used. For the first
method, replacement well(s) are drilled if a trigger criterion is violated.
The redrill procedure is as follows:

redrill(key1, key2, wl, value, mask)

key1 can be either RIGS or NORIGS. If NORIGS is specified, then


drilling is not subject to rig availability. If RIGS is specified, then a
well can only be drilled if there is a rig available, and the drill site(s)
from which the well can be drilled has less than the maximum number
of rigs operating.

key2 can be any one of 14 trigger keywords, such as MINQOS, which


would trigger the drilling of a replacement well for any well whose oil
rate fell below the specified value. See the keyword document for a list
of all the possible triggers.

wl is a well list, containing all the wells which should be checked for
replacement. For each well in this well list, the possible replacements,
must be specified in a DRILL table. The possible replacement wells
should initially be inactive. If the DRILL table specifies a well list as
the replacement, rather than a single well, then the first well in that list
that is inactive and not currently drilling, and that can be drilled by an
inactive rig, will become the replacement. The same well can be listed
as a possible replacement for more than one well, in which case, once it
is chosen as a replacement for one of the wells, and starts drilling, it is
no longer available as a replacement for any other well. Only one
replacement well is drilled for each well in the well list wl, even if the
replacement well subsequently violates the trigger. However, the
replacement well could itself be replaced, if it is listed in well list wl,
and has possible replacement wells specified in a DRILL table.

value is the value used when determining whether the trigger has been
violated.

mask is an array of logicals (true or false), which if false, will prevent


the corresponding well in the well list from being replaced. This
provides a means for the user to override the automatic drilling
algorithm, but will usually be input as ALL1D, which specifies a value
of true for all members of the well list.

When a replacement well is drilled, the well will be available to start


production or injection after the sum of the drill time, and completion
time, specified in the DRILL table, plus the move time specified in the
RIG table if the rig had to be moved from one drill site to another. The
rig is available to drill another well after the sum of the drill time and
the move time (if any). Timesteps are not adjusted to coincide with

182 Network Calculations: Drilling Queues R5000.0.2


Landmark Nexus® Technical Reference Manual

start of production or injection, but rather, the well will start operations
as soon as the simulation time equals or exceeds the availability time
for the well. The well which is being replaced is immediately
deactivated at the time that the trigger is violated. If desired, the redrill
procedure can be specified multiple times in a PROCS block, using
different triggers for the same well list, in which case the replacement
will be drilled as soon as the first trigger is violated.

The second form of the redrill procedure is more general, and allows
users to specify their own criteria to determine when replacements are
needed. The arguments are as follows:

redrill(key1, wl, mask). Here the arguments are:

key1 can be either RIGS or NORIGS. If NORIGS is specified, then


drilling is not subject to rig availability. If RIGS is specified, then a
well can only be drilled if there is a rig available, and the drill site(s)
from which the well can be drilled has less than the maximum number
of rigs operating.

wl is a well list, containing all the wells which should be checked for
replacement. For each well in this well list, a replacement or
replacements, must be specified in a DRILL table. The replacement
wells should initially be inactive.

mask is an array of logicals (true or false), which if true, will cause a


replacement well to be drilled for the corresponding well in the well list
wl.

The following example illustrates the use of this form of the redrill
procedure. In this example, producers in the well list PROD_WELLS,
which have an oil rate less than 60 STBD, and a water cut greater than
0.95 will be replaced.

PROCS
LOGICAL_1D redrill_mask
redrill_mask = q("OS",PROD_WELLS,ALL1D) < 60.0 and &
wcut(PROD_WELLS,ALL1D) > 0.95
REDRILL("NORIGS",PROD_WELLS,redrill_mask)
ENDPROCS

R5000.0.2 Network Calculations: Drilling Queues 183


Nexus® Technical Reference Manual Landmark

Gaslift Optimization

Gaslift is used for gas-liquid two-phase producers to boost the


production. Increasing gas-liquid ratio (GLR) reduces the average fluid
density in the well connection, and therefore reduce the hydrostatic
pressure drop (pressure drop due to elevation change) and hence
reducing the bottomhole pressure (assuming tubing head pressure is
fixed), resulting in a higher production rate. However, as the fluid flow
rate further increases, the increase in the frictional pressure drop will
offset the decrease in the hydrostatic pressure drop, therefore an
optimal gaslift gas rate exists for a maximum production rate, or more
generally, a maximum production profit.

In Nexus, the gaslift gas rate can be specified by a QGSMAX


constraint at the gaslift connection. It can also be automatically
allocated using either an optimal gaslift table, or an optimization
algorithm using a nonlinear optimizer, while the QGSMAX constraint
will be the upper bound of the gaslift flow rate.

184 Network Calculations: Gaslift Optimization R5000.0.2


Landmark Nexus® Technical Reference Manual

Optimal Gaslift Table Method


The optimal gaslift table is used to calculate the gas rate for the gaslift
connection to which it assigned (see the TYPE keyword in the
NODECON table, described in the Surface Network section of Nexus
Keyword Document). The gaslift rate is calculated by interpolating the
optimal GLR or GOR from the gas lift table at the oil rate (or liquid
rate) and water cut in the connection into which the gas is injected, and
the mobility weighted average wellbore pressure (if it is in a linear
series of connections that start at a production well). Referring to
Figure 4.20, for a table of optimal GLR, the gas rate in connection 2
would be given by:

4-29
qgs2 = max(0, GLR * qliqs
3
− q1gs )

where
qgs2 is the surface gas rate for connection 2

3
qliqs is the surface liquid rate for connection 3

q1gs is the surface gas rate for connection 1

GLR is the GLR value interpolated from the table at the oil (or liquid)
rate, and water cut in connection 3, and the mobility weighted average
wellbore pressure of the well that the production is flowing from.

And for a table of optimal GOR, the gas rate in connection 2 would be
given by:

4-30
qgs2 = max(0, GOR * qliqs
3
− q1gs )

where

GOR is the GOR value interpolated from the table at the oil (or liquid)
rate, and water cut in connection 3, and the mobility weighted average
wellbore pressure of the well that the production is flowing from.

The gas rate in the gaslift connection can also not exceed the maximum
gas rate assigned to the gaslift connection in a CONSTRAINT table.

R5000.0.2 Network Calculations: Gaslift Optimization 185


Nexus® Technical Reference Manual Landmark

Connection3
(towards well head
or sink)

Connection 2
(gas lift
connection)
Connection 1
(from well)

Figure 4.20: A Well with a Gaslift Connection.

Optimization Using a Nonlinear Optimizer


The objective of this option is to automatically allocate gaslift gas rates
so that the profit of the production operation can be maximized. This
option achieves the "instantaneous" optimization at the each time step.
Unlike the conventional method that uses a performance curve4, there
is no requirement that the tubing head pressure must be specified; in
other words, the interaction between wells has been taken into account.
Besides, a gaslift connection can be connected to any node of the
production network.

Mathematically, the automatic gaslift gas allocation problem can be


formulated to a constrained nonlinear optimization problem, or a
Nonlinear Programming (NLP) problem in the following form,

Maximize F(x), 4-31

subject to constraints,

hi(x) = 0, for i = 1, ..., m1, 4-32

lgi  gi(x)  ugi , for i = 1, ..., m2, 4-33

lx  x  ux, 4-34

where F(x) is the benefit (objective) function, x is the vector of decision


variables; hi and gi are the constraint functions; lgi and ugi are the lower

186 Network Calculations: Gaslift Optimization R5000.0.2


Landmark Nexus® Technical Reference Manual

and upper bounds of the inequality constraints, respectively; m1 and m2


are the numbers of equality and inequality constraints, respectively; lx
and ux are the vectors of lower and upper bounds of the decision
variable, respectively.

We define the benefit function as the profit of the production,

4-35
F ( x) = Qoil Roil + Qgas Rgas − Qwat Rwat − Qglift Rglift

where Qoil is the oil phase volumetric production rate, Qgas is the gas
phase volumetric production rate, Qwat is water phase volumetric
production rate, Qglift is the gaslift gas volumetric injection rate, Roil is
the unit value of produced oil, Rgas is the unit value of produced gas,
Rwat is the unit processing cost of produced water, Rglift is the unit
operating cost of gaslift gas. The unit values and costs can be input
using the following keywords under the keyword GLIFTOPT.

Parameter Keyword
Roil OILVALUE
Rgas OILVALUE
Rwat WATCOST
Rglift GLIFTCOST

The decision variable x is the vector of the gaslift gas volumetric rates
at the gaslift connections. The lower bound of a decision variable is
zero, and the upper bound is the value of the QGSMAX constraint at
the corresponding gaslift connection. The constraints of the
optimization problem are constructed based on the user-specified
targets in TARGET tables, such as the maximum total oil phase
production rate of a list of production wells, and the maximum total
gaslift gas rate. (A target is the total rate of a group of connections.)
Normally all the constraints are inequality constraints.

The optimization problem is solved using an optimizer with


Generalized-Reduced-Gradient (GRG) method10, which is highly
efficient for solving nonlinearly constrained optimization problems.

This option is invoked by specifying the keyword GASLIFTOPT as the


CTRLMETHOD in a TARGET table, the maximum total gaslift gas
rate is specified through the VALUE in the TARGET table, and the
name of the gaslift connections list that is controlled by the

R5000.0.2 Network Calculations: Gaslift Optimization 187


Nexus® Technical Reference Manual Landmark

optimization algorithm is specified through the CTRLCONS in the


TARGET table. The maximum gaslift rate at a gaslift connection is
specified by the QGSMAX keyword in a CONSTRAINT table.

Since the optimization calculation may require multiple network


solves, which can be expensive, it is only performed at the first
network/reservoir global Newton iteration, and normally it is not
performed at every time step. The maximum time interval between
optimization calculations can be specified by keyword MAXNOGLDT
under keyword GLIFTOPT, and the minimum time interval between
optimization calculations can be specified by keyword MINNOGLDT
under keyword GLIFTOPT.

The method works in the following steps,

1. At the time step when the gaslift optimization is on, solve the
optimization problem using the GRG optimizer. The function
evaluations of the benefit function and the constraint functions are
provided by the "potential solve" of the network. A potential solve
is a network solve with all user-specified constraints (such as
QOSMAX and PMIN constraints, etc.) being imposed, and all
user-specified targets being relaxed.

2. Allocate the gaslift gas rates according to the solution of the


decision variables. Allocate all other targets according to the
solution of potential solve as usual. (See the "Targeting Input"
section in this chapter.)

3. Solve the network with the allocated gaslift rates and other
allocated targets, finish the reservoir/network global Newton
iterations of current time step.

4. March to the next time step and repeat from Step 1.

The gaslift gas rates from the previous time step are taken as the initial
guess of the decision variables of optimization problem. The initial
gaslift gas rates may need to be adjusted so that they are in the feasible
region -- that is, no constraints of the optimization problem should be
violated with the initial gaslift gas rates.

The derivatives of the benefit function and constraint functions with


respect to the decision variables are necessary for the GRG optimizer.
They can be evaluated by solving the perturbed network Jacobian
system, described as follows.

188 Network Calculations: Gaslift Optimization R5000.0.2


Landmark Nexus® Technical Reference Manual

The equation system of the network potential solve is,

4-36
F (u ,  ) = 0

where u is the vector of the primary unknowns of the network solve


(the component flow rates in the connections and the pressures at
nodes),  is the vector of the parameters (the gaslift gas rates) to be
perturbed. With a given value of , Equation 4-36 has been solved for
u using Newton iterations.

Now we impose a perturbation  to , the corresponding changes of


u would be u,

4-37
F (u +  u ,  +  ) = 0

Expanding Equation 4-37 in a Taylor series about (u, ) and including


only the first-order terms yields,

4-38
∂F ∂F
F (u ,  ) + u +  = 0
∂u ∂

Substituting Equation 4-36 into Equation 4-38 yields,

4-39
∂F ∂F
u +  = 0
∂u ∂

The Jacobian matrix of the system is defined as,

4-40
∂F
J (u ) =
∂u

Equation 4-38 can be rewritten as,

4-41
u ∂F F (u ,  +  ) − F (u ,  ) F (u ,  +  )
J (u ) =− ≈− =−
 ∂  

R5000.0.2 Network Calculations: Gaslift Optimization 189


Nexus® Technical Reference Manual Landmark

u F
The can be solved by a linear solver after the − on the
 
right-hand-side has been calculated by the perturbations.

The solution can be used to calculate the derivatives of the benefit


function and the constraint functions with respect to gaslift gas rates
(the decision variables) through train rule. Note that the Jacobian
matrix J(u) has already been factorized in the network potential solve
with a set of gaslift gas rates. Equation 4-41 can be solved with a
forward-substitution and a back-substitution. Since  (the gaslift gas
rates) is a linear item in the connection equations at the gaslift
connections, the right-hand-side of Equation 4-41 is -1 in the row
containing ; the right-hand-sides of other rows are zero.

190 Network Calculations: Gaslift Optimization R5000.0.2


Landmark Nexus® Technical Reference Manual

Network PVT Data

PVT and Separator Method Assignments


All connections in the network are assigned a PVT method, and for
EOS runs, a separator method. Connections in non-EOS runs may also
be optionally assigned a separator. The default PVT method (and
separator method for EOS runs) is the first method specified in the case
file (the .fcs file). The PVT method is used to calculate in-situ fluid
flow rates, densities, and possibly viscosities, as a function of the mass
flow rates, pressure and temperature. The in-situ flow rates are used in
evaluating in-situ constraints, and hydraulics calculations using
pressure drop correlations, hydrostatic gradients, valves, chokes and
pumps.

The separator method is used to calculate the stock tank flow rates that
would result if the fluid flowing in the connection was put through a
test separator. Stock tank rate constraints, such as QOSMAX, are
evaluated using this test separator calculation, as are hydraulic table
lookups. Note that in EOS runs, and in some non-EOS runs, the sum of
the stock tank phase rates for a group of connections will be different
from that calculated if flow from all the connections are first combined,
then fed through a separator. The COMMINGLE option provides an
alternative way to treat the test separators. In this case, the test
separation is performed, using the partial mass/molar volumes obtained
from a separation calculation using all the connections flowing to a real
separator. The real separator must be identified as a SEPNODE. If this
option is active, then the sum of the stock tank phase rates for a group
of connections that flow to a common SEPNODE will sum to the same
rates as that obtained by separating the combined flow.

Note that the PVT and separator methods are treated as a function of
location in the network, and not as a property of the fluid. This is the
same as PVT assignments for reservoir grid blocks, where the PVT is
treated as a function of the rock. This is of course, not correct, so the
user must be careful to avoid inconsistencies in PVT and separator
assignments, which could lead to apparent changes in the calculated
flow rates due to a difference in the PVT or separator method used by
two connections that actually have the same fluid flowing.

R5000.0.2 Network Calculations: Network PVT Data 191


Nexus® Technical Reference Manual Landmark

Multifield networks with Mixed PVT

For multifield simulations, Nexus allows each reservoir to have a


different “Black Oil” fluid system, with commingled production/
injection in the network. Here, “Black Oil” fluid systems include
Black Oil, API, Gas/Water and Water/Oil. It is assumed that all fluid
systems have three phases at surface conditions, (although one of the
phases may have zero volume) and that the network has at least as
many components as the largest number of components in any of the
grids. The network has one fluid system (one set of components), and
the fluid is transformed from one fluid system to another at the
perforations.

Fluid properties in the network can be evaluated using PVT methods


for any of the fluid systems. If the network fluid system is different
than the PVT method, then the fluid is converted to the same fluid
system as the PVT method before the flash is performed, then
converted back to the network fluid system after the flash.

The current implementation assumes no composition or pressure


dependence for the conversion from one fluid system to another. This
is appropriate for mixing gas-water, water-oil, black oil and API fluid
systems.

The fluid transformation at the perforations is handled as follows:

Producing Perforations
The grid perforation equations are

4-42
nphases
Qgi = C ∑
k =1
k  k zik ( g − n )

Where the subscript g means grid, and n means network, and i is the
component.

We also have an equation relating the grid components to the network


components

4-43
Qn = AgnQg

192 Network Calculations: Multifield networks with Mixed PVT R5000.0.2


Landmark Nexus® Technical Reference Manual

Where Agn is a matrix with ncn rows and ncg columns.

For gas-water/black oil system, if we choose Qg = {Qggas, Qgwater}, 



and Q = {Qngas, Qnwater, Qnoil}, then
n

4-44
1 0
Agn = 0 1
0 c

where

4-45
c = OGR oilstd /  gasstd


where

OGR is the oil/gas ratio, and oilstd and  gasstd are the oil and gas
densities at standard conditions.

Equation 4-43 can be used to eliminate the grid component rates.

4-46
p
Qg = Ang Q n

4-47
Qns = AnnQnp

where Ang is a matrix with ncg rows and columns, Qnp consists of ncg of
the network component rates, Qns consists of the remaining ncn - ncg
network component rates, and Ann is a matrix with ncn - ncg rows and
ncg columns.

R5000.0.2 Network Calculations: Multifield networks with Mixed PVT 193


Nexus® Technical Reference Manual Landmark

For the gas-water/black oil system, we chose Qnp = {Qngas, Qnwater} and
Qns = {Qnoil}, then
4-48
1 0
Ang =
0 1

4-49
Ann = c 0

We substitute Equation 4-48 into the grid perforation equations


(Equation 4-42), to obtain ncg perforation equations relating reservoir
variables (masses and pressure), to network variables (network
component rates), and Equation 4-49 provides the remaining ncn - ncg
equations.

Injecting Perforations
We have a single perforation equation for total mass rate, plus ncn – 1
composition equations, determined by the network. We use Equation
4-46 to eliminate the grid component mass rates.

IMPES Elimination and Elimination of Water Mass for Implicit Runs


The Impes elimination, and the elimination of water mass for Implicit
runs is performed exactly the same regardless of whether the network
and grid use the same component set or not. The perforation equations
are formulated in terms of component rates for the grid fluid system,
and all the elimination is performed using these variables. Then the
variable substitutions outlined above are performed when the
perforation equations are loaded into the solver.

Reservoir Equations
The source/sink term in the reservoir equations is converted from the
reservoir component rates to network component rates using Equation
4-48.

194 Network Calculations: Multifield networks with Mixed PVT R5000.0.2


Landmark Nexus® Technical Reference Manual

Mixing of Fluid in the Network


The properties of fluids in the network are calculated using the PVT
method (and separator method for stock tank rates) assigned to each
connection. These are a property of the connection and not the fluid, so
when fluids mix in the network, the user must select PVT methods
appropriate for the mixture. The only “mixing” model currently
available in Nexus is the API fluid system. In this model, the fluid
properties are a function of the standard density of the oil. Oil is
modeled using two components, oil1 and oil2, and the relative
proportion of these two components determines the standard density
used to look up the PVT table.

R5000.0.2 Network Calculations: Multifield networks with Mixed PVT 195


Nexus® Technical Reference Manual Landmark

Fuel and Shrinkage

Gas used as fuel, or lost to shrinkage, can be specified for connections.


Either the stock tank rate of fuel or shrinkage can be specified, or the
fraction of the gas flowing in the connection that will be used as fuel or
lost to shrinkage can be specified. This can only be specified if the
connection is the only outflow connection from a node. Therefore, fuel
and shrinkage can not be specified for the outflows of a SEPNODE or
from a stream splitting node. The fuel and or shrinkage are removed at
the inlet (upstream) node to the connection, so the rates reported for the
connection are the rates after fuel and shrinkage have been removed.
Fuel and shrinkage are only calculated if the connection is flowing in
the normal direction, from the inlet to the outlet node. If the connection
reverses flow direction, the fuel and shrinkage are set to zero.

196 Network Calculations: Fuel and Shrinkage R5000.0.2


Landmark Nexus® Technical Reference Manual

Calculation of Connection Length and Depth Change

The length of a connection and the depth change from the inlet to the
outlet node can potentially be determined from several different inputs,
and these inputs may be inconsistent. Nexus uses the following
procedure to calculate these values.

Depth Change (DDEPTH)


1. If DDEPTH is input in the NODECON table for this connection,
this value is used

2. If DDEPTH is not input, and node depths at both ends of the


connection have been input in a NODES table, then the difference
in the inlet and outlet node depths is used

3. If both node depths have not been input, and no elevation profile is
specified, then any node depth that has not been input it defaulted
to zero depth (except for the bottom hole node, which is either
input on the WELLS table in the BHDEPTH column, or defaulted
to the depth of the first perforation). These depths are then used to
calculate DDEPTH.

4. If there is an elevation profile, DDEPTH is calculated from the


difference in the depth of the start and end of the profile.

5. If DDEPTH is obtained by 1 or 2 above, and an elevation profile is


available, and ALLOW_BHMOVE is specified, then for the well
connection only, if DDEPTH is greater than the depth change in
the profile, the depth change from the profile is used, the bottom
hole node is moved to be consistent, and the connection from the
first perforation to the bottom hole node is extended to make up
the difference. If DDEPTH is less than the depth change from the
profile, then the profile is truncated.

R5000.0.2 Network Calculations: Calculation of Connection Length and Depth Change 197
Nexus® Technical Reference Manual Landmark

Connection Length (CON_LENGTH)


1. If MDIN and MDOUT are specified in the NODECON table, then
the difference in these values gives the connection length.

2. Else if an elevation profile is present, CON_LENGTH is


calculated from the length of the profile. Note that if
ALLOW_BHMOVE is specified, then the profile is truncated if
the DDEPTH is less than the depth change in the profile

3. Else if a temperature profile is present, CON_LENGTH is


calculated from the length of the temperature profile

4. Else if LENGTH is input in the NODECON table, that length is


used

5. Else if the X, Y and DEPTH values are all available for the inlet
and outlet nodes (input in a NODES table), then the length is
calculated from the straight line distance between the two nodes.

6. Else CON_LENGTH is set to the same value as DDEPTH.

Consistency Checks
Nexus performs the following consistency checks.

1. DDEPTH <= CON_LENGTH

2. DDEPTH <= Elevation Profile Depth Change

Nexus does not attempt to reconcile differences between node depths


input in the NODES table, and DDEPTH specified in the NODECON
table..

198 Network Calculations: Calculation of Connection Length and Depth Change R5000.0.2
Landmark Nexus® Technical Reference Manual

Network Reports

The rates for connections are calculated by flashing the mass flow rates
for the connection through the separator assigned to that connection. If
the run uses a black oil, API, gas/water or water/oil fluid, and no
separator is assigned, then the fluid is converted to stock tank
conditions using the standard densities from the PVT method.

Well rates are calculated by summing the mass flow rates from all
perforations, and separated using the separator (or PVT method if no
separator is assigned) assigned to the well. This separator (or PVT
method) can be specified in a WELLS table. The default separator is
the first separator specified in the case file, and the default PVT method
is the PVT method used by the grid block for the first perforation.

The total reservoir rate is obtained by summing the well rates. An


optional report, activated by the NETSUM keyword in the run control
file, outputs a total field rate obtained by summing production and
injection at the network sources and sinks. These rates can be different
than the sum of the wells, due to commingling of fluids in the network,
the separation system being different from the separator assigned to the
wells, or inconsistencies in the separator, or PVT methods in the
network.

Perforation rates are calculated using the partial molar/mass volumes


obtained from the separation of the total well flow rates. If the well is
shut in and crossflowing, then the separation is performed on the sum
of the producing perforations. The reported perforation rates represent
the contribution of each perforation to the total (commingled) well
production, and sums to the total well flow rate.

R5000.0.2 Network Calculations: Network Reports 199


Nexus® Technical Reference Manual Landmark

References

1. Nexus Keyword Document, Landmark Graphics Corp., 2007.

2. Brill, J.P. and Beggs, H.D., Two-Phase Flow in Pipes, University of Tulsa, Sixth
Edition, January, 1991.

3. ECLIPSE Technical Description, Chapter 34, Schlumberger, 2003.

4. VIP-EXECUTIVE Technical Reference, Chapter 39, Landmark Graphics


Corporation, 1997.

5. Fletcher, R., Practical Methods of Optimization, Chapter 8, John Wiley & Sons, Ltd,
Second Edition, 2004.

6. Hydraulic Institute standard HI 9.6.7-2004. “American National Standard for


Effects of Liquid Viscosity on Rotodynamic (Centrifugal and Vertical) Pump
Performance.”

7. “Critical and Subcritical Flow of Multiphase Mixtures Through Chokes”, by T. K.


Perkins, SPE Drilling and Completion, Dec. 1993, pp. 271-276

8. “Chemical Engineers’ Handbook”, third edition, John H. Perry (ed.), McGraw-Hill


Book Co. Inc., New York City (1950), p. 404.

9. Beggs, H. D., Production Optimization Using NODAL Analysis, OGCI


Publications, 1991.

10. Fletcher, R., Practical Methods of Optimization, Chapter 8, John Wiley & Sons,
Ltd, Second Edition, 2004.

200 Network Calculations: References R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 5
Well Data

Calculation of the Wellbore Constant for Each


Perforation

The wellbore constant is calculated as follows:


5-1
C = D * kh * pperf * wi

where
C is the wellbore constant.

kh is the permeability*(wellbore length) product for the grid block

pperf is a partial perforation factor (which will plug the perforation if it


is set to 0)

wi is the wellbore index

D is a constant that results in the correct units for flow rate.

Units Volumetric Flow Rate Units Conversion Constant D


ENGLISH ft3/d 6.328286*10-3
METRIC m3/d 8.5270171*10-5
METBAR m3/d 8.5270171*10-3
METKG/CM2 m3/d 8.3622802*10-3
LAB cc/hr 7.4665476

Wellbore Conversion Constants

The wellbore index wi is calculated as follows:


5-2
wi = 2 *( / 360) / (ln(rb / rw) + skin)

R5000.0.2 Well Data: Calculation of the Wellbore Constant for Each Perforation 201
Nexus® Technical Reference Manual Landmark

where

 is the angle open to flow (in degrees)

rb is the effective grid block radius

rw is the wellbore radius

skin is the skin factor

However, wi can be input in the WELLSPEC table, in which case the


input value is used instead of the calculated value. radb, radw and skin
must still be input in the WELLSPEC table, but are not used unless
radw or skin are modified. If modified values of radw or skin are input,
then Equation 5-2 is used to recalculate wi.

The wellbore constant is used in the perforation equations, given in the


"Network Calculations" chapter, to calculate the mass flow rates for
production and injection perforations.

202 Well Data: Calculation of the Wellbore Constant for Each Perforation R5000.0.2
Landmark Nexus® Technical Reference Manual

Effective Grid Block Radius RADB

One-Dimensional Flow

Linear Case
The first, and simplest, example of the calculation of WI is one-
dimensional, linear (i.e., rectilinear) flow, where the grid is as shown in
Figure 5.1.

x

1 5 z

y

x
2

Figure 5.1: One-Dimensional, Linear, Model

The boundary condition, pwf, is to be imposed at the left end of the


model, which is at a distance x/2 from the nearest node (also called
the “pressure center”), located at x1. Assuming single-phase flow (and
ignoring the dimensional constant 0.0001127), from Darcy’s law we
have
5-3
kyz
q = ----------------------  p 1 – p wf 
  x  2 

R5000.0.2 Well Data: Effective Grid Block Radius RADB 203


Nexus® Technical Reference Manual Landmark

so the “correction” that adjusts p1 to the correct value at the boundary is


5-4
q  x  2 
 p 1 – p wf  = -------------------------
kyz

For single phase flow, the well index is defined by


5-5
kz
q = WI -------------  p 1 – p wf 

Comparison of Equations 5-3 and 5-5 yields


5-6
y -
WI = -----------------
 x  2 

(where WI is dimensionless)

And comparison with Equation 5-2 yields an effective grid block radius
given by
5-7
rb = ( rw x) / y

204 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Two-Dimensional Flow

Well in Center of Square Gridblock


The simplest two-dimensional situation is shown in Figure 5.2.

Figure 5.2: Well in Square Grid

The figure depicts an areal model with uniform square gridblocks and
one well at the center of one of the blocks, arbitrarily designated by (i,j)
= (0,0). To determine the well index for the well, one may carry out a
simple finite-difference calculation for a situation where the exact
solution satisfies the steady-state single-phase radial flow equation:
5-8
q r
p = p wf + -------------------- ln -----
2 kz r w

p0,0 is not expected to be equal to pwf, but how well do the pressures at
the other nodes satisfy Equation 5-8? If we plot the difference between
pi,j and p0,0 versus the log of the radial distance from node (i,j) to node
(0,0), then a straight line with the expected slope of q/2kz is
obtained1. By plotting the dimensionless pressure drop:

(pij - p0,0)/(q/kz)

against the log of the dimensionless radius  r  x  = i2 + j2 , the straight


line has a slope of 1/(2), as shown in Figure 5.3. The pressure at node
(1,0) is slightly off from the straight line, but all the other pressures lie
extremely well on the line. This figure may be considered to be a

R5000.0.2 Well Data: Effective Grid Block Radius RADB 205


Nexus® Technical Reference Manual Landmark

universal plot, applicable to any square grid with a single well located
far from any boundaries.

The extrapolation of the straight line to the horizontal axis is extremely


significant. This is the point where the exact radial solution is equal to
the well block pressure, p0,0, and occurs when the radius equals 0.2x.
Thus the straight line of Figure 5.3 has the equation:
5-9
q r ij
p ij = p 0 0 + --------------------- ln --------------
2 kZ 0.2 x

Figure 5.3: Numerical Solutions for Pressure Plotted versus Radius

Comparison with Equation 5-8 shows that the well block looks like a
well with a wellbore radius of 0.2x. We call this radius the equivalent
radius of the well block, rb.

206 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

To obtain the well index, we proceed as follows. From Equation 5-8 we


can write:
5-10
q r ij
p ij = p wf + -------------------- ln -----
2 kz r w

Subtracting Equation 5-10 from Equation 5-9, and rearranging, yields:


5-11
2 kz
q = ---------------------------------------  p 0 0 – p wf 
 ln  0.2 x  r w 

Comparison of Equation 5-11 (in which the well block pressure is p0,0)
with Equation 5-5 (in which the well block pressure is p1) gives:
5-12
2
WI = ---------------------------------
ln  0.2 x  r w 

General Definition of rb
The following values apply for the square grid of the preceding section:

0.2x = rb, and p0,0 = pb (the well block pressure)

Therefore, Equation 5-11 can be written:


5-13

q rb
p b – p wf = -------------------- ln -----
2 kz r w

We shall take this as a general definition of rb, for any geometry of the
well block.

Similarly, Equation 5-12 can be written:


5-14
2 -
WI = -----------------------
ln  r b  r w 

We express the well index in this form, since rb in many cases is easy to
compute. Note that Equation 5-14 does not take skin into account.

We shall show how to incorporate skin in the "Incorporating Skin into


Well Model" section below.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 207


Nexus® Technical Reference Manual Landmark

An Approximate Derivation of rb for Square Well Block


One can take advantage of the fact that the pressure at (i,j) = (1,0)
almost satisfies the radial flow equation, to derive an approximate
formula for rb. The difference equation satisfied by the gridblock
pressures (for steady state) is:

------------- y
kz ------  p – 2 p ij + p i – 1 j 
 x i + 1 j

5-15
kz x
+ ------------- ------  p i j + 1 – 2 p ij + p i j – 1  – q ij = 0
 y

For the case shown in Figure 5.2 above, the pressures are symmetric
about (0,0), so that p0,1 = p-1,0 = p0,-1 = p1,0. Also x = y. Then:
5-16
q - = 0
4  p 1 0 – p 0 0  – ------------
kz

Assuming that p1,0 satisfies the radial flow Equation 5-8 exactly gives:
5-17
q x
p 1 0 = p wf + -------------------- ln ------
2 kz r w

since r1,0 = x. From the definition for rb, Equation 5-13 yields:
5-18
q rb
p 0 0 = p wf + -------------------- ln -----
2 kz r w

Subtracting Equation 5-18 from Equation 5-17 yields:

q x
p 1 0 – p 0 0 = -------------------- ln ------
2 kz r b

and combining with Equation 5-16, yields

x 2
ln ------ = ---
rb 

or
5-19
r –  2
-----b- = e = 0.208
x

208 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

We shall show later that an exact value for rb for a well far from the
boundaries or from any other well (i.e., an “isolated” well) in a uniform
square grid is 0.1985 x. Thus, a good rule of thumb to use for a square
well block is rb = 0.2 x.

The approximate method described in this section can be extended to


nonsquare grids, wherexy¼. It gives adequate results when the
aspect ratio y/x lies between 0.5 and 2.0. Outside that range, it gives
poor results2, because it is based on the assumption that the pressures in
all the blocks adjacent to the well block satisfy the radial flow equation
exactly, and that assumption breaks down badly for long skinny
gridblocks.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 209


Nexus® Technical Reference Manual Landmark

Well in Center of Rectangular Gridblock


Numerical experiments similar to that described in the "Well in Center
of Rectangular Gridblock" discussion can also be carried out for
uniform rectangular grids, where y is not equal to x. When the
gridblocks are not square, then rb is no longer a simple function of x
but depends also on the grid aspect ratio,  = y/x. The following
table lists values of rb/x and rb/y for a single well at the center of a
large rectangular grid for various aspect ratios3.

 = y/x rb/x r b / y 2 2
r b  x + y
1/16 0.1406 2.2502 0.140365

1/8 0.1415 1.1317 0.140365

1/4 0.1447 0.5787 0.140365

1/2 0.1569 0.3139 0.140365

1 0.1985 0.1985 0.140365

2 0.3139 0.1569 0.140365

4 0.5787 0.1447 0.140365

8 1.1317 0.1415 0.140365

16 2.2502 0.1406 0.140365

Neither rb/x nor rb/y are particularly constant with , but it can be
seen that rb/x converges to a limit for small y, and rb/y converges to
the same limit for small x. This leads to the possibility that a better
quantity to divide rb by is the length of the diagonal of each gridblock,
because:

rb
----------------------------
2 2
x + y

looks like rb/x as y goes to zero, and looks like rb/y as x goes to
zero. That ratio is very constant with as can be seen from the last
column of the table. So now we have the more general rule of thumb,
that:
5-20
2 2
r b = 0.14 x + y

210 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

In fact, Equation 5-20 can be derived mathematically. It is shown in


Reference 3 that:
5-21
rb – 
---------------------------- e
lim = -------
 NX   2 2 4
 NY   x + y

where  is Euler’s constant, one definition of which is the limit of the


difference between the finite harmonic series and the natural log, i.e.,

 n 
 = lim   1--- – ln n = 0.5772157...
n   k 
 1 

That gives, for the ratio of Equation 5-21, the value 0.1403649.

Note that, for a square grid with x = y, rb/x is 2 times this
constant, or 0.198506, so that gives us the complete mathematical
derivation of the first rule of thumb, that rb = 0.2x for a square grid.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 211


Nexus® Technical Reference Manual Landmark

Well in Center of Block in Anisotropic Rectangular Grid


In an anisotropic medium, where kx  ky , the finite-difference equation
satisfied by the gridblock pressures is:

k x z y
--------------- ------  p i + 1 j – 2 p ij + p i – 1 j 
 x

5-22
k y z x
+ --------------- ------  p i j + 1 – 2 p ij + p i j – 1  – q ij = 0
 y

There is an equivalent isotropic problem that is satisfied by the same


gridblock pressures, namely:

k e z y e
--------------- --------  p i + 1 j – 2 p ij + p i – 1 j 
 x e

5-23
k e z x e
+ --------------- --------  p i j + 1 – 2 p ij + p i j – 1  – q ij = 0
 y e

where

5-24
12
ke =  kx ky 

5-25
14
x e =  k y  k x  x

5-26
14
y e =  k x  k y  y

Corresponding to Equation 5-20, we have:


5-27
2 2
r be = 0.14 x e + y e

or
12 2 12 2
r be = 0.14  k y  k x  x +  k x  k y  y 5-28

212 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

In this case rbe is the radius of the (almost) circular isobar in the
transformed problem (i.e., in the xe-ye plane) that has the same pressure
as the well block.

However, in the transformed problem, the wellbore is elliptical, not


circular. It is shown in Reference 3 that the pressure solution to the
exact differential problem in the xe-ye plane essentially satisfies the
equation:
5-29
q r e
p – p wf = ---------------------- ln -------
2 k e z r we

where
5-30
2 2
re = xe + ye

and
5-31
1 14 14
r we = --- r w   k y  k x  +  kx  ky  
2

We see that Equation 5-31 is a correction to the wellbore radius that


accounts for the fact that the wellbore is elliptical in the xe-ye plane.

Now, from Equation 5-29, we can write:


5-32
q r be
p b – p wf = ---------------------- ln -------
2 k e z r we

Corresponding to Equation 5-13, which defines rb, we have:

5-33
q rb
p b – p wf = ---------------------- ln -----
2 k e z r w

Comparing Equations 5-33 and 5-32 yields:


5-34
r b = r be  r w  r we 

R5000.0.2 Well Data: Effective Grid Block Radius RADB 213


Nexus® Technical Reference Manual Landmark

Combining Equations 5-34, 5-28 and 5-31 then yields the final result
for rb, that is:
5-35
12 2 12 2
 k y  k x  x +  k x  k y  y
r b = 0.28 ---------------------------------------------------------------------------------
14 14
-
 ky  kx  +  kx  ky 

which can be used in Equation 5-14 for the well index.

General Extension of Isotropic Results to Anisotropic Grids


In the following sections, we shall be presenting formulas for
equivalent well block radius for various well geometries. These will be
derived for isotropic grids, presenting rbe in terms ofxe and ye,
which may be obtained from Equations 5-25 and 5-26. To obtain rb,
this rbe can be substituted into:
5-36
r be
r b = -----------------------------------------------------------------------
14 14
0.5   k y  k x  +  kx  ky  

This equation is obtained by combining Equations 5-31 and 5-34.

214 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Single Well Arbitrarily Located in Isolated Well Block


By an isolated well block, we mean one that is not near another well
block nor near the boundary of the grid, as shown in Figure 5.4.

Figure 5.4: Single Well in Isolated Well Block

A conservative requirement for an isolated well is that it be no closer


than 10x or 10y from any other well and no closer than 5x or 5y
from any grid boundary.

In Reference 2, it is shown that rbe is independent of the location of the


well within such an isolated well block, as in the above figure. Then
Equation 5-27 still holds:
5-37
2 2
r be = 0.14 x e + y e

This result, i.e., independence of position, is somewhat surprising, but


it does depend on the assumption that the well block is isolated.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 215


Nexus® Technical Reference Manual Landmark

Multiple Wells in Same Isolated Well Block

Two Wells with Same Rate


Figure 5.5: shows two wells in the same well block.

Figure 5.5: Two Wells in the Same Well Block

In Reference 2, it is shown that if two wells with the same rate are
placed in the same well block (which is otherwise isolated from any
other well block), then:
5-38
2 2 2
 0.14   x e + y e 
r be = -----------------------------------------------
r eAB

where reAB is the distance in the xe-ye plane between the two wells. In
terms of the actual coordinates of the two wells, this distance is given
by:
5-39
12 2 12 2
r eAB =  ky  kx   xA – xB  +  kx  ky   yA – yB 

Note that rbe is independent of the actual location of the two wells; the
only thing that matters is the scaled distance between them (provided
they are isolated from other wells).

216 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Two Wells with Different Rates


If the two wells in the same block have different rates, qA and qB, then
Equation 5-38 must be modified as follows:
5-40
qA + qB
2 2
q  0.14 x e + y e 
 r be  AA = ---------------------------------------------------------
-
qB
 r eAB 

Note that qA and qB do not have to be absolute rates; relative rates will
do. Also note that if qA  qB, then the two wells will have different
values of rbe.

Three Wells with Same Rate


Figure 5.6 shows three wells in the same well block.

Figure 5.6: Three Wells in the Same Well Block

Similarly, it can be shown for three wells with the same rate (A, B, and
C), that the following equation applies:
5-41
3 2 2 32
 0.14   x e + y e 
 r be  A = ------------------------------------------------------
-
r eAB r eAC

Note that when there are two wells and they have the same rate, they
have the same rbe. But when there are three wells, even with equal
rates, in general they do not have the same rbe (unless reAB = reBC =
reAC).

R5000.0.2 Well Data: Effective Grid Block Radius RADB 217


Nexus® Technical Reference Manual Landmark

Multiple Wells with Different Rates


The above results can be generalized to take into account any number
of wells, A, B, C, D, ... through the following equation:

5-42
q qk qt
2 2
 r be  AA   reAk  =  0.14 x e + y e 
k

where k = B, C, D, ...,  is the product over all k, and qt = qA +  qk .


k k

Two Wells With Same Rate in Adjacent Blocks


Figure 5.7 shows two wells in adjacent well blocks.

Figure 5.7: Two Wells in Adjacent Well Blocks

In Reference 4, it is shown that if two wells with the same rate are
placed in adjacent blocks in the same row, as in the above figure, then:
5-43
x y
r be r eAB =  0.14   x e + y e  exp 2 -------- tan  --------
2 2 2 e –1 e
y e  x e

On the other hand, if the two adjacent blocks are in the same column,
then x andy should be interchanged, to give:

y e –1 x e
r be r eAB =  0.14   x e + y e  exp 2 -------- tan  --------
2 2 2
x e  y e
Note again the isolation requirement: the pair of wells should be
sufficiently far from any other wells or from the grid boundaries. Also
note again that the scaled distance between the two wells is the
important quantity, rather than the actual location of the two wells.

218 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

If rcbe is the value of rbe when the two wells are at the centers of their
respective blocks, and rceAB is the distance between the block centers (in
the xe-ye plane), then, if the wells are not centered, we can write:
5-44
c c
r be = r be  r eAB  r eAB 

Note that rceAB is equal to either xe or ye.

Wells at Centers of Adjacent Blocks in Isotropic Square Grid


If the medium is isotropic, the gridblocks are square and the wells are at
the centers of two adjacent blocks, then Equation 5-43 reduces to:


r b x =  0.14   2 x  exp  ---
2 2
 2

or

r b = 0.190 x

This is not far from the rule of thumb of 0.2 x for a single isolated well
in a square grid. If the two wells are at the centers of two blocks that are
not adjacent, then this rule of thumb is even better. If the wells are not
at the centers of two blocks that are not adjacent, then Equation 5-44
can be used to find the correct rb. But we still require that the pair of
wells be isolated from other wells or from the grid boundary.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 219


Nexus® Technical Reference Manual Landmark

Single Well in Edge Block


In Figure 5.8 shows a single well in a block at the left edge of the grid.

Figure 5.8: Well in Edge Block

Because of the reflection boundary condition, the well and its block
have images. Thus, this situation is equivalent to two wells in adjacent
blocks, and Equation 5-43 is applicable, provided we take:

14
r eAB = 2  k y  k x  d

Note that rb will be independent of the vertical location of the well.

If the edge block is at the top or bottom boundary, then we should take:

14
r eAB = 2  k x  k y  d

where d is the vertical distance to the boundary.

Again we note that if the medium is isotropic, the grid is square, and
the well is at the center of the edge block, then:

r b = 0.190 x

220 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Single Well Exactly on Edge of Grid


We have already looked at cases of a single well near the edge of the
grid. It is perhaps less likely that the well will be exactly on the edge of
the grid, as shown in Figure 5.9.

Figure 5.9: Well on Edge of Grid

Equation 5-43 is not applicable here. Instead, as Reference 4 shows, the


applicable equation is:
5-45
x y
r be = 0.14 x e + y e exp -------- tan  --------
2 2 e –1 e
y e  x e

Note that rbe is independent of the vertical location of the well on the
edge. If the well is exactly on the top or bottom edge of the grid, then
xe and ye should be interchanged, to give:

y e – 1 x e
r be = 0.14 x e + y e exp -------- tan  --------
2 2
x e  y e

R5000.0.2 Well Data: Effective Grid Block Radius RADB 221


Nexus® Technical Reference Manual Landmark

Well Exactly on Edge of Isotropic, Square Grid


If the medium is isotropic, and the grid is square, then:


r b = 0.14 2 x exp  --- = 0.43 x
 4

This is quite different from the value of 0.2 x that one might expect.

Single Well Exactly at Corner of Grid


Figure 5.10 shows the situation where a well is located exactly at the
corner of the grid.

Figure 5.10: Well at Corner of Grid

This is an important case, as it occurs frequently in five-spot


calculations. In Reference 4, it is shown that:
5-46
2 2
r be = 0.14 x e + y e exp  E 

where
5-47
 y 1 x y – 1 y e
E = --- --------e + --- 1 +  --------e – --------e tan  --------
4 x e 2  y x   x e
e e

Since Equations 5-46 and 5-47 are rather unwieldy, it may be


preferable to use an empirical equation that fits them quite well:

222 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

5-48

2 2 0.2520
r be = x e + y e 0.3816 + ------------------------------------------------------------
x
 --------e
0.9401 y e 0.9401
+  --------
 y e  x e

Well Exactly at Corner of Isotropic, Square Grid


For the special case of isotropic medium and square grid, then
Equations 5-46 and 5-47 become:

r b = 0.14 2 x exp  --- + 1


--- = 0.72 x
 4 2

This value of rb, combined with Equation 5-14, should be used for the
well index in five-spot calculations, if kx = ky and x =y.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 223


Nexus® Technical Reference Manual Landmark

Single Well Arbitrarily Located in Corner Block


Figure 5.11 shows a single well A located somewhere in the interior of
a corner block.

Figure 5.11: Well in Corner Block

This situation is perhaps not too likely, but is included here for
completeness. Images of the well and the corner block are shown. In
Reference 4 it is derived that:
5-49
4 2 2 2
 0.14   x e + y e  exp  4 E 
r be = ----------------------------------------------------------------------
-
r eAB r eAC r eAD

where E is given by Equation 5-47.

224 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Well at Center of Corner Block in Isotropic, Square Grid


For the special case where kx = ky , x = y, and the well is at the
center of the corner block, then Equation 5-49 reduces to

4 2
r b = -------------------------------------------------------------
0.14   2 x  exp   + 2 -
x  2 x x

or

r b = 0.188 x

This is not far from the rule of thumb of 0.2 x. But it does require that
the well be exactly at the center of the corner block, which is not too
likely.

Horizontal Well
Equation 5-35, which shows rb as a function of x, y, kx, and ky, was
derived for an isolated vertical well. For a horizontal well, it appears to
be sufficient to replacey by z and ky by kz, to yield:
5-50
12 2 12 2
 k z  k x  x +  k x  k z  z
r b = 0.28 --------------------------------------------------------------------------------
14 14
-
 kz  kx  +  kx  kz 

The assumption that the well is not near any grid boundary may be hard
to satisfy in the simulation of a horizontal well. The question arises:
how far does the well have to be from the top or bottom boundary in
order to use Equation 5-50?

Reference 5 shows that Equation 5-50 is satisfied to within 10 percent


if:
5-51
k 1  2 zw
x
------  ----z  0.9 ------
z  k x z

where zw is the distance from the well to the nearer of the top or bottom
boundary. Since kz is usually much smaller than kx, this inequality
should be easy to satisfy, if x is not too much bigger than z.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 225


Nexus® Technical Reference Manual Landmark

However, if the inequality of Equation 5-51 is not satisfied, it is


necessary to use the much more complicated general formula for rb that
was derived by Babu et al6, and which is repeated in Reference 5.

Figure 5.12 displays the result of using this formula for the special case
where the well is centered in a reservoir that is infinitely wide.

Figure 5.12: Effect of e and z/z on rbe for Centered Well

As a first approximation, this figure can be used even when the well is
not centered and the reservoir is of finite width, provided zw is
interpreted as the distance from the well to the nearer of the top or
bottom boundary.

226 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Inclined Well
The permeability-thickness for an inclined well is computed by
transforming an original anisotropic diffusion equation into an
equivalent isotropic equation. The equivalent isotropic equation is not
discussed here; however, details are available in Muskat.9 The
equivalent isotropic permeability ke is defined by
5-52
1---
3
ke =  kx ky kz 

where kx, ky, and kz are rock permeabilities in x, y, and z directions,


respectively. Nexus extends the theory to computation of a perforation
length inclined arbitrarily in space. Projected perforation lengths Lx, Ly,
and Lz onto each coordinate axis are transformed, then perforation
length Lp in the transformed plane is represented by the following:
5-53
2 2 2
Lp = Lx + Ly + Lz

where Lx, Ly , and Lz are x, y, and z components, respectively. These, in


turn, are transformed into the isotropic medium:
5-54
k
L x = l ----e sin  cos 
kx

5-55
k
L y = l ----e sin  sin 
ky

5-56
k
L z = l ----e cos 
kz

where l is the physical well perforation length,  is the angle of the well
segment with respect to vertical direction, and  is the angle with
respect to the x-axis as shown in Figure 5.13.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 227


Nexus® Technical Reference Manual Landmark

Lx
Ly 

Lz
x

l

Figure 5.13: Inclined Well Segment

Thus, the permeability-thickness for a well segment is expressed by


keLp using Equation 5-52 and Equation 5-53. Note that keLp = l(kxkz)0.5
if a well is parallel to the y-axis.

Well index WI is defined by


5-57
2 -
WI = ------------------------
r
ln  ----- + s
b
 r w

where rb is the equivalent radius, rw is the well radius, and s is the skin
factor. In computing rb, an analogy to Peaceman’s equation3 for a
vertical well is adopted. However, the equivalent radius and well radius
are obtained in the transformed plane similarly to the permeability-
thickness. Peaceman’s equivalent radius for a well parallel to the y-axis
is expressed as
5-58
12 2 12 2
 k z  k x  x +  k x  k z  z
R by = 0.14 --------------------------------------------------------------------------------
14 14
-
0.5   k z  k x  +  kx  kz  

where notation Rby indicates a well parallel to the y-axis. The


numerator can be simplified using properties in the transformed
isotropic medium.

228 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Transferring the denominator of Equation Equation 5-58 to Rwy , the


following can be concluded.
5-59
k ey k ey
R ey = 0.14  ------- x +  ------- z
2 2
 kx   kz 

where
5-60
1---
2
k ey =  k x k z 

where (key/kx)0.5 x and (key/kz)0.5 z are gridblock lengths in the


transformed plane and the equivalent isotropic permeabilities are equal
(kx’ = kz’= key). If a well is parallel to x or z direction, the same
principle can be applied to get the following:
5-61
k ex k ex
R ex = 0.14  ------- y +  ------- z
2 2
 ky   kz 

where
5-62
1---
2
k ex =  k y k z 

5-63
k ez k ez
R ez = 0.14  ------ x +  ------ y
2 2
 kx   ky 

where
5-64
1---
2
k ez =  k x k y 

For an arbitrarily inclined well, i.e., for any (,) in Figure 5.13, Nexus
approximates the equivalent radius as follows.
5-65
2 2 2
R be = r ex + r ey + r ez

where

R5000.0.2 Well Data: Effective Grid Block Radius RADB 229


Nexus® Technical Reference Manual Landmark

rex = Rex sin  cos 


rey = Rey sin  sin 
rez = Rez cos 5-66

Note that Equation 5-65 yields Equations 5-59, 5-61, and 5-63 as
special cases and any equivalent radii in Equation 5-65 stay in an
ellipsoid created by them.

The wellbore radius in the transformed plane is expressed in a similar


manner. For example, a horizontal well that is parallel to the y-axis is
approximated by
5-67
Rw
R wy = ------  k ey  k x + k ey  k z 
2

where Rw is the true pipe radius and Rw(key/kx)0.5 and Rw(key/kz)0.5 are
the well radii in major and minor axes. Similarly,
5-68
Rw
R wx = ------  k ex  k y + k ex  k z 
2

Rw
R wz = ------  k ez  k x + k ez  k y 
2

For arbitrary values of (,), the transformed wellbore radius is


approximated by
5-69
2 2 2
R we = r wx + r wy + r wz

where
rwx = Rwx sin  cos 
rwy = Rwy sin  sin 
rwz = Rwz cos 5-70

230 Well Data: Effective Grid Block Radius RADB R5000.0.2


Landmark Nexus® Technical Reference Manual

Combining Equations 5-65 and 5-69, we obtain the generalized


Peaceman’s equivalent block radius for an inclined well from
5-71
R be
R b = --------- R w
R we

The permeability-thickness and the well index computed using


Equations 5-52 through 5-71 are implemented in Nexus; but users can
override them if correct values are known. Radius Rwe also forms an
ellipsoid for arbitrary angles (,), as shown in Figure 5.14.

y’
Rwy

x’
Rwx

Rwz
z’

Figure 5.14: Ellipsoid

The equivalent radius as computed above may not always be accurate


because of the assumptions on which Peaceman’s equation is based.
Therefore, calibrate the perforation WI’s in proportion to the computed
values in such a way that WI from a well test or production data is
honored.

R5000.0.2 Well Data: Effective Grid Block Radius RADB 231


Nexus® Technical Reference Manual Landmark

Incorporating Skin into Well Model

Equation 5-14 presented the well index in terms of rb and rw as shown


below:

2 -
WI = -----------------------
ln  r b  r w 

This equation was derived without considering the effect of skin. In this
section, we show how skin may be taken into account.

Derivation of Skin Due to Altered Permeability


Figure 5.15 depicts radial flow from an outer radius, rd, into the
wellbore, which has radius rw .

Figure 5.15: Radial Flow With Zone of Altered Permeability

Let the pressure at rd be pd. The reservoir has permeability k, but an


inner zone of radius ra has an “altered” permeability, ka. Assuming
steady state:
q ra
p a – p wf = ---------------------- ln -----
2 k a z r w

q rd
p d – p a = -------------------- ln ----
2 kz r a

232 Well Data: Incorporating Skin into Well Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Adding and rearranging the above equations yields the following


equation:
5-72
q r
p d – p wf = --------------------  ln ----d- + s a
2 kz r w  

where

k – ka ra
s a = ------------- ln -----
ka rw

In this context, skin may be interpreted as causing additional pressure


drop due to decreased permeability in the altered zone. However, it
may be either positive or negative, depending on whether ka is less than
or greater than k. The skin due to altered permeability is also referred to
as “mechanical” skin.

Including Mechanical Skin In Well Index


Now suppose we consider solving the same steady-state radial problem
with a simulator on a uniform square grid, with x being much smaller
than rd. As mentioned above, the well block with pressure pb acts like a
well with radius rb. This results in:
5-73
q r d
p d – p b = -------------------- ln ----
2 kz r b

But the equation for the well model in terms of the well index, WI, is:
5-74
kz
q = WI -------------  p b – p wf 

Combining Equations 5-73 and 5-74 gives:

q rd q -
p d – p wf = -------------------- ln ---- + ------------------------
2 kz r b kz  WI 

and comparison with Equation 5-72 yields:

rd 2 rd
ln ---- + ------- = ln ----- + s a
rb WI rw

R5000.0.2 Well Data: Incorporating Skin into Well Model 233


Nexus® Technical Reference Manual Landmark

or
5-75
2 -
WI = ---------------------
rb
ln ----- + s a
rw

234 Well Data: Incorporating Skin into Well Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Skin Due to Restricted Entry


So far, we have assumed that the well fully penetrates the reservoir.
When the well is not fully penetrating, there can be an additional
pressure drop caused by restricted entry. This additional pressure drop
can be interpreted in terms of an extra skin term, sr (also called pseudo
skin). Before considering how this skin should be included in the well
index, let us discuss two methods for calculating sr.
.

Figure 5.16: Pseudo Skin Factor, after Brons and Marting

The first method uses the graph of Figure 5.16, due to Brons and
Marting7, which shows sr as a function of two parameters, hp/ht and hte/
rw , where hp is the length of the interval open to flow, ht is the total
thickness of the producing zone, hte = ht kH  kV , and kH/kV is the ratio
of horizontal to vertical permeability.

R5000.0.2 Well Data: Incorporating Skin into Well Model 235


Nexus® Technical Reference Manual Landmark

Figure 5.17 shows three ways in which hp and ht can be interpreted.


The first is simple partial penetration; the second is a centered open
interval; the third is with multiple entries. In the latter two cases, hp and
ht apply to a symmetry element.

Figure 5.17: Examples of Partial Well Completion

The second method for calculating sr , due to Odeh8, allows for a single
open interval anywhere in the producing zone. It is an empirical
equation derived from some numerical studies:
5-76
h 0.825
s r = 1.35   -----t – 1  ln  h te + 7  –  0.49 + 0.1 ln  h te   ln  r wc  – 1.95 
h  
p

where

h te = h t k H  k V

0.2126  2.753 + z m  h t 
r wc = r w e

and zm is the distance from the top of the sand to the middle of the open
interval. (See Figure 5.18.)

The two methods are obviously not the same. However, where they can
be compared (e.g., for zm = hp/2), they give comparable values for sr .

236 Well Data: Incorporating Skin into Well Model R5000.0.2


Landmark Nexus® Technical Reference Manual

zm

hp

ht

Figure 5.18: Partial Well Completion

R5000.0.2 Well Data: Incorporating Skin into Well Model 237


Nexus® Technical Reference Manual Landmark

Effects of Restricted Entry on Well Index


We need to distinguish two different effects of restricted entry on the
well index. First, there is the “overall” restricted entry that is included
in the total skin, st, determined in a well test. The skin due to this
overall restricted entry, sor , must be subtracted from the total skin to
get the mechanical skin:
5-77
s a = s t – s or

Secondly, there is what we might call “local” restricted entry due to


partial completion of the well within a layer of thickness zl. The skin
due to this local restricted entry must be added to the mechanical skin.
Thus, layer by layer, we have:
5-78
2
WI l = ---------------------------------
-
rb
ln ----- + s a + s lr
rw

For example, consider the 3D situation shown in Figure 5.19. The well
completely penetrates the top two layers and partially penetrates the
third layer. The overall skin, st, is determined from a well test. The skin
due to overall restricted entry is determined from hp1 and ht1 and
subtracted from st to get sa. Because total penetration through each of
the top two layers is assumed, slr = 0 there. In the third layer, slr is
determined from ht2, hp2, and zm2, and added to sa, as in Equation 5-78.

238 Well Data: Incorporating Skin into Well Model R5000.0.2


Landmark Nexus® Technical Reference Manual

Figure 5.19: Partial Well Completion

R5000.0.2 Well Data: Incorporating Skin into Well Model 239


Nexus® Technical Reference Manual Landmark

References

1. Peaceman, D.W., “Interpretation of Well-Block Pressures in Numerical Reservoir


Simulation,” Soc. Pet. Engr. J., pp. 183-194 (June 1978).

2. Peaceman, D.W.: “Interpretation of Wellblock Pressures in Numerical Reservoir


Simulation: Part 3 - Off-Center and Multiple Wells Within a Wellblock,” SPE Res.
Eng., pp. 227-232 (May 1990).

3. Peaceman, D.W., “Interpretation of Well-Block Pressures in Numerical Reservoir


Simulation with Non Square Grid Blocks and Anisotropic Permeability,” Soc. Pet.
Eng. J., June 1983, 531-543.

4. Peaceman, D.W.: “Interpretation of Wellblock Pressures in Numerical Reservoir


Simulation-Part 3: Some Additional Well Geometries,” Paper SPE 16976 presented at
the SPE Annual Fall Meeting, Dallas, TX, Sept. 27-30, 1987.

5. Peaceman, D.W., “Representation of a Horizontal Well in Numerical Reservoir


Simulation,” Paper SPE 21217 presented at the 11th SPE Symposium on Reservoir
Simulation held in Anaheim, CA, Feb. 17-20, 1991; also SPE Adv. Tech. Ser. 1, 7-16
(1993).

6. Babu, D.K., Odeh, A.S., Al-Khalifa, A.J., and McCann, R.C., “The Relation
Between Wellblock and Wellbore Pressures in Numerical Simulation of Horizontal
Wells,” SPE Res. Eng., pp. 324-328 (Aug. 1991).

7. Brons, F. and Marting, V.E., “The Effect of Restricted Fluid Entry on Well
Productivity,” J. Petr. Tech., pp. 172-174 (Feb. 1961); Trans. AIME, vol. 222

8. Odeh, A.S., “An Equation for Calculating Skin Factor Due to Restricted Entry,” J.
Petr. Tech., pp. 964-965 (June 1980).

9. Muskat, M., The Flow of Homogeneous Fluids Through Porous Media, McGraw-
Hill Book Co., 1937.

240 Well Data: References R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 6
Equilibrium

Introduction

This chapter discusses the methodology employed by Nexus for Model


initialization. The major topics covered are:

• Mainstream path
• Supercritical initialization
• Gibbs sedimentation
• Search for GOC

R5000.0.2 Equilibrium: Introduction 241


Nexus® Technical Reference Manual Landmark

Mainstream Path

Consider the multiple-equilibrium-region scenario depicted in Figure


6.20 below.

Initialization Scenario
Reservoir Cross-Section
GOC

WOC

Impermeable
Independent Equilibrium Regions Barriers

Figure 6.20: Multiple Independent Equilibrium Region Scenario

The following steps are applied:

1. Independent equilibrium regions are defined by the IEQUIL array.


These arrays associate blocks with equilibrium methods.
Equilibrium “methods” are the user-directed information needed
to generate the initial pressure, saturation and composition within
these regions. These equilibrium methods include fluid contacts,
initial pressures, compositions, and any special methodology that
is to be applied.

2. If more than one PVT type were to exist within an equilibrium


region then these user-designated regions are automatically
subdivided so that only one PVT type exists within a given
equilibrium region. These subdivisions will show up in some of
the detailed equilibrium output reports

3. Hydrostatic phase-pressure-versus-depth tables are constructed.

242 Equilibrium: Mainstream Path R5000.0.2


Landmark Nexus® Technical Reference Manual

• The depth table range of depths (dmin/dmax) closely


corresponds to the actual depth span of the cells within the
equilibrium region. If the DINIT is specified outside the dmin/
dmax span then table dmin or dmax is adjusted to include this
depth.

• If an equilibrium region depth span is less than 10 feet then the


dmin/dmax will be adjusted to give a table of at least 10 feet in
span.

• If a GOC is specified and is within the resulting dmin/dmax


span then the PINIT will be ignored and replaced by the PSAT
at the GOC.

• Any composition data is interpolated throughout the table. The


composition is interpreted as the overall composition.

• Saturation pressure (PSAT) is computed throughout the table.


If the type of PSAT (bubble point/dew point) does not
correspond with the input data fluid type then a fatal error is
reported.

• Phase pressures are calculated from a known pressure and


depth datum.

- The initial datum pressure and depth, PINIT/DINIT may be


specified in the water, oil or gas zones. However, these
specifications are ignored in cases where a GOC is specified
and within the resulting dmin/dmax span. This rule
(explained above) applies no matter where the PINIT/
DINIT is specified.

- A hydrostatic pressure march begins at PINIT/DINIT. Each


step to an unknown position in the table, upward or
downward, involves a quickly converging successive
substitution iteration where the density (function of
unknown composition and pressure) is computed first from
the know level and then successively at the unknown level.

- During each step, a flash at the interpolated composition is


performed. And the resulting phase compositions are used
for density calculations.

4. The phase pressures are interpolated from the depth-tables shown


in Figure 6.21 and assigned to each cell. Compositions are re-
interpolated from the original compositional-depth tables (if

R5000.0.2 Equilibrium: Mainstream Path 243


Nexus® Technical Reference Manual Landmark

entered) as is temperature. That is, they are not interpolated from


the depth tables. Saturation pressures are calculated for the cells
based on these interpolated compositions.

Pcgo at GOC
Gas
Zone

Pcwo at WOC
Depth Oil
Zone

Water
Zone

Reservoir Phase
Pressures

Figure 6.21: Depth Table Construction - Typical Fully Projected Pressure Profiles

PSATPSAT
DEPTH Po Pg Pw PcgoPcowDenoDengDenw(ADJ)ORIG)
[ft ] [psia [psia] [psia]psia[psia[lb/ft3][lb/ft3][lb/ft3][psia][psia]
--------------------------------------------------------------------------------------
----------------
5151.0 3459.5 3933.6 3000.9474.2458.637.441013.026260.58553933.6*4014.7
5184.0 3468.1 3936.6 3014.7468.6453.337.438913.036160.58603936.6*4014.7
5217.0 3476.6 3939.6 3028.6463.0448.037.436913.046060.58653939.6*4014.7
5250.0 3485.2 3942.6 3042.5457.4442.737.434813.055960.58713942.6*4014.7
5283.0 3493.8 3945.6 3056.4451.8437.437.432813.065860.58763945.6*4014.7
5316.0 3502.4 3948.6 3070.3446.2432.137.430713.075760.58823948.6*4014.7
5349.0 3511.0 3951.6 3084.2440.6426.837.428713.085660.58873951.6*4014.7
5382.0 3519.5 3954.6 3098.1435.1421.537.426613.095660.58933954.6*4014.7
5415.0 3528.1 3957.6 3111.9429.5416.237.424613.105560.58983957.6*4014.7

244 Equilibrium: Mainstream Path R5000.0.2


Landmark Nexus® Technical Reference Manual

5. Determine phase saturations by performing an inverse table


lookup using the input capillary pressure versus saturation tables.

• The default method (GBC for grid block center) is to use the
MDEPTH or grid block center as the basis for the phase-
pressure differential used in the inverse lookup. This produces
grid blocks which are in hydrostatic equilibrium (well, almost,
subject to some usually small effects covered below). It also
has the disadvantage that small variations in the fluid contact
positions can make the cell saturation change dramatically.
Smaller block thicknesses are required to capture the fluid
volumetrics through the transition zone with this method.

• A second option (INTSAT for integrated saturation) is to


integrate the saturation versus capillary pressure relationship
over the depth span of the cell. This produces potentially much
more accurate fluid volumetrics. However, it does not preserve
the hydrostatic equilibrium between blocks. (It is a different
saturation and therefore a different capillary pressure would be
associated with it and it no longer equals the phase pressure
differential at the cell mid-point.)

- At this point the default option is to create a special set of


additive constants for each cell which bring the system back
to equilibrium. In a three-phase situation two constants are
needed; one for the water-oil capillary pressure and another
for the gas-oil capillary pressure. The negative possible
negative impact of these constants is that while they bring
the system to equilibrium at time zero, they are permanent
and may not make physical sense later in the run if
transition zones have changed position significantly.

- The user may also refuse to calculate non-zero capadj


constants (NONEQ) and allow the system to be out of
equilibrium at the start of the run. This option may
obviously have negative consequences.

• In the case of thin oil zones, it is possible that there will be a


gas-water transition zone above the water-oil and gas-oil
transition zones. This situation is always anticipated as
synthetic stand-by gas-water capillary pressure tables are
routinely generated from the water-oil and gas-oil capillary
pressure curves by adding the values at appropriate equivalent
saturations. Inverse table lookups using the synthetic gas-
water tables are used when the water-oil and gas-oil capillary
pressure tables generate non-positive oil saturations.

R5000.0.2 Equilibrium: Mainstream Path 245


Nexus® Technical Reference Manual Landmark

6. Optionally, replace any of the above calculated saturations or


pressure by overreading values from an external source
(OVERREAD). The following rules apply:

• If overread data are present, then after performing


equilibration, any pressures or saturations input as an array will
replace the calculated values. If no pressure or saturation
arrays are input, then this has no effect.

• Either or both Sw and Sg may be overread.

• If Sw only is overread the following rules apply where ‘*’


indicates ‘overread’ data and ‘+’ is capillary-gravity-
equilibrium-based result:

- Sw = Sw*

- If(1 – Sw*) <=Sg+, then Sg = (1 – Sw*) and So = 0.

- If (1 – Sw*) > Sg+ , then Sg = Sg+ and So = (1 – Sw* - Sg+).

• Similarly, if only Sg is overread the following rules apply


where ‘*’ indicates ‘overread’ data and ‘+’ is capillary-gravity-
equilibrium-based result:

- Sg = Sg*

- If (1 – Sg*) <= Sw+ , then Sw = (1 – Sg*) and So = 0.

- If (1 – Sg*) > Sw+ , then Sw = Sw+ and So = (1 – Sg* - Sw+).

If both Sw and Sg are overread then:

- If Sw + Sg > 1 then Sw = 1 – Sg and So = 0

- Otherwise So = (1 – Sw* – Sg*)

- And If So < 1D-8 then So = 0

• The above rules apply for three-phase models except when


there is a gas-water contact. In that situation the following
applies:

- If Sw input then: Sw = Sw* and Sg = 1 – Sw*

- If Sg input then: Sg = Sg* and Sw = 1 – Sg*

246 Equilibrium: Mainstream Path R5000.0.2


Landmark Nexus® Technical Reference Manual

• By default overreading saturations will cause the static


capillary adjustment additive constant (same idea as employed
for INTSAT option described above) to be calculated unless
the NONEQ option is used. If pressure is overridden then no
capillary pressure adjustment will be calculated regardless of
the status of the NONEQ option.

• For WATEROIL models if Sw only entered:

- Sw = Sw*

- So = (1 – Sw*)

• For GASWATER models if Sw only entered:

- Sw = Sw*

- Sg = (1 – Sw*)

• For GASWATER models if Sg only entered:

- Sg = Sg*

- Sw = (1 – Sg*)

7. Assign grid block pressures

• Three-Phase

- No Capillary Pressure Adjustment (Additive constant)

• If not a GWC case and an oil saturation (See point 5 (c)


above) exists then:

a. If Sw >= Swmax – tol then P = Pw + pcowmin

b. Else If Sg >= Sgmax – tol then P = Pg – pcgomax

c. Otherwise, P = Po

• If not (1) then:

a. If Sw >= Swmax – tol then P = Pw + pcowmin

b. Else If Sg >= Sgmax – tol then P = Pg – pcgomax

R5000.0.2 Equilibrium: Mainstream Path 247


Nexus® Technical Reference Manual Landmark

c. Else Po = Pw - Pcwo

• Capillary Pressure Adjustment

- If not a GWC case and an oil saturation (See point 5 (c)


above) exists then:

a. If Sw >= Swmax – tol then P = Pw + pcowmin and


Pcadj(wat) = 0

b. If Sw > Swmin + tol and Sw < Swmax – tol then: Po =


Po and Pcadj(wat) = Pw – Po – Pcwo*. Where Pcwo* is
evaluated at overread or INTSAT conditions.

c. Else if Sg > sgmax – tol then P = Pg – pcgomax and


Pcadj(gas) = 0

d. Else if Sg > sgmin + tol then P = Po and Pcadj(gas) = Pg


– Po – Pcgo*.

- If not (1) then:

a. If Sw >= Swmax – tol then P = Pw + pcowmin and


Pcadj(wat) = 0

b. Else if Sg > sgmax – tol then P = Pg – pcgomax and


Pcadj(gas) = 0

c. Else P = Pg – Pcgo* and if Sw > swmin + tol then


Pcadj(wat) = Pw – Po – Pcwo*

248 Equilibrium: Mainstream Path R5000.0.2


Landmark Nexus® Technical Reference Manual

• Water-Oil

- No Capillary Pressure Adjustment

• If Sw >= swmax – tol then P = Pw + pcowmin

• Else P = Po

- Capillary Pressure Adjustment

• If Sw >= swmax – tol then P = Po and Pcadj(gas),


Pcadj(wat) = 0

• Else if Sw > swmin + tol then Pcadj(wat) = Pw – Po - Pcwo*

• Gas-Water

- No Capillary Pressure Adjustment

• If Sw > swmax – tol then P = Pw + pcgwmin

• Else P = Pg

- Capillary Pressure Adjustment

- If Sw >= swmax – tol then P = Pw + pcgwmin

- Else if Sw > swmin + tol P = Pg and Pcadj(wat) = Pw – Pg –


Pcwg*

8. Reconcile Flashed Compositions with Saturations

• Black Oil

- Constant Psat

• If Sg < tol and P < Psat then Psat = P

• Else if (GWC exists) then Psat = P – (Pg – Psat) where Pg


is generally what is calculated from hydrostatics. Now if P
< Psat then Psat = P.

- Variable Psat

• If Sg < tol and P < Psat then Psat = P

R5000.0.2 Equilibrium: Mainstream Path 249


Nexus® Technical Reference Manual Landmark

• If So < tol then Psat = P – (Pg – Psat) where Pg is


generally what is calculated from hydrostatics. Now if P <
Psat then Psat = P.

• EOS

- If 1 - Sw < tol then Hydrocarbon Mass Fractions remain at


interpolated values. These values will be reset when the
first flash is performed outside of the equilibrium
initialization routine and component masses set accordingly.

- If P < Psat then flash contents of cell.

- Look for inconsistencies between composition and


saturations. Honor saturation by adjusting composition as
necessary:

• Two-phase flash and two-phase lookup; Psat = P and the


overall mass fraction is computed from the saturations,
molar densities and flashed phase compositions.

• Two-phase flash but single-phase oil saturation lookup.


Then Psat = P and the overall mass fraction is set equal to
the flashed oil phase composition.

• Two-phase flash but single-phase gas saturation lookup.


Then Psat = P and the overall mass fraction is set equal to
the flashed gas phase composition.

• Single-phase flash (Oil)

a. Two-phase lookup; incrementally add incipient gas


(from PSAT determination of single phase oil) until oil
becomes saturated. This is done iteratively. And a
report will automatically be generated when this occurs
which details the incipient gas composition and the
final oil composition. Once the oil is in a saturated state
then Psat = P and the overall mass fraction is computed
from the saturations, molar densities and final phase
compositions.

b. Single-phase gas lookup; same procedure as above.

• Single-phase flash (GAS)

250 Equilibrium: Mainstream Path R5000.0.2


Landmark Nexus® Technical Reference Manual

a. Two-phase lookup; incrementally add incipient oil


(from PSAT determination of single phase gas) until
gas becomes saturated. This is done iteratively. And a
report will automatically be generated when this occurs
which details the incipient oil composition and the final
gas composition. Once the gas is in a saturated state
then Psat = P and the overall mass fraction is computed
from the saturations, molar densities and final phase
compositions.

b. Single-phase oil lookup; same procedure as above.

After reconciliation of the composition and saturations then the


mainstream equilibrium initialization is complete. Saturations and the
overall composition is passed on to be later flashed before the first
Newton is performed.

R5000.0.2 Equilibrium: Mainstream Path 251


Nexus® Technical Reference Manual Landmark

Supercritical Initialization

In some reservoirs, where the composition varies with depth, there is a


smooth transition from a fluid that would be labeled a gas (exhibits a
dew point) to a fluid that would be labeled oil. However, in these
special situations, at all points in the hydrocarbon column the fluid
pressure exceeds the Psat and is therefore undersaturated (See Figure
below). 

x
Tres
P

T Tc

Depth

Light
Heavy

Undersaturated
GOC

x
P

0.0 1.0
T Mole Fraction Temperature

Figure 6.22: Transition from Gas to Liquid without Two-Phase GOC

There is a point where the critical temperature of the fluid equals the
temperature of the reservoir. This point can be called an undersaturated
GOC. Actually, there may be more than one point where the phase
label flips from gas to oil or vice versa. When this option is invoked
some of the above mainstream procedure is altered somewhat. The
highlights are:

1. If the supercritical option is used (CRINIT) the program will


verify that the fluids are not saturated anywhere within the
equilibrium region domain. If this occurs it is a fatal error. This
could mean that this reservoir is not supercritical or there is a data

252 Equilibrium: Supercritical Initialization R5000.0.2


Landmark Nexus® Technical Reference Manual

entry problem. The error could be with the PINIT or the


compositional variation specified.

2. Flashes are not necessary during the depth table build.

3. Only an oil-water inverse table lookup is performed. Recall that


there will be always only one hydrocarbon phase. The actual
hydrocarbon saturation assigned is 1 – Sw and is assigned to the
phase determined by the Psat test.

4. No reconciliation step is needed for the supercritical case.

R5000.0.2 Equilibrium: Supercritical Initialization 253


Nexus® Technical Reference Manual Landmark

Gibbs Sedimentation

The Gibbs Sedimentation option (SEDIMENTATION) can be useful if


the only limited reservoir composition is known and it is expected that
isothermal gravity-chemical equilibrium theory should apply. Even if
the applicability of the theory is in question this option provides a
theoretical basis on how the composition could vary with depth.

The chemical potential – gravity equilibrium may be expressed with


the following equations:

6-1
i ( Pref , Z ref , T ) = i ( P, Z , T ) + M i g ( h − href )

i = 1, N c

Where:

i is the chemical potential of the i-th component

Pref is the pressure a given reference depth

Z ref is the single phase composition of the fluid at the reference


depth

P is the pressure at depth, h

Z is the single phase composition of the fluid at the depth, h

T is the isothermal temperature

h is a given depth

href is the reference depth

M i is the molecular weight of component i

254 Equilibrium: Gibbs Sedimentation R5000.0.2


Landmark Nexus® Technical Reference Manual

This equation may also be expressed in terms of component fugacity,


fi , as:
6-2

fi ( Pref , Z ref , T ) = fi ( P, Z , T ) + exp ⎡⎣ M i g ( h − href ) ⎤⎦

i = 1, N c

This represents N c +1 unknowns ( Z and P ) and N c . The


remaining equation is that the component mole fractions must sum to 1.

The solution algorithm starts at a known composition (user input or


previous step calculation) and then solves the non-linear equations
making a total of five tries. These tries are:

1. Standard Newton Iteration

2. Whitson Method without what they call GDEM

3. Whitson Method with GDEM + Standard Newton

4. Whitson Method with GDEM

5. Whitson Method with GDEM with relaxed convergence


constraints

The details of these iterations can be viewed if the debug option is


selected as described in the “Useful Debugging Output” section below.

If a GOC is specified the algorithm will generate a compositional


profile in the gas phase above the GOC and in the oil phase below the
GOC.

The supercritical option (CRINIT) maybe combined with the


SEDIMENTATION option.

R5000.0.2 Equilibrium: Gibbs Sedimentation 255


Nexus® Technical Reference Manual Landmark

Search for GOC

The purpose of the Search-for-GOC option is for the situation where


the user is unsure where the GOC is and suspects that it may be within
the equilibrium region of interest.

To fully understand this option it is import know what the initialization


algorithm will do if the user specifies a GOC above the equilibrium
region effective depth table span. Under this circumstance, the
composition of the oil will be modified if the fluid pressure ever drops
below the saturation pressure. Effectively, a flash takes place and the
resulting oil composition is used. In other words, the GOC
specification is honored and the composition is adjusted.

In the Search-for-GOC option the user omits the GOC data entirely
indicating to the program to look for a saturated condition. The
algorithm makes two loops, first it checks to see if a saturated condition
exists anywhere in the hydrocarbon column. If it does then that is
labeled as the GOC. Then a second loop is performed, this time the
treatment is identical to what would have happened if the user had
entered the “found” GOC. So, in contrast to the paragraph above, a
gas-oil transition zone will appear.

This option makes certain assumptions about the uniqueness of a GOC


and can fail under certain circumstances so it is important to inspect the
applicable depth-table report when using this feature.

256 Equilibrium: Search for GOC R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 7
Compaction

Introduction

Compaction options can affect the cell pore volume, the


transmissibility between cells, and well KH factors. The user can
choose between two mechanisms which can produce these changes --
pressure and change in water saturation. Effects can be reversible or
irreversible (hysteretic).

Like relative permeability data and other data in Nexus, compaction


input data are placed in method files -- in this case, rock property
method files. (See the “Rock Properties” chapter of the Nexus Keyword
Document for a description of rock property method files.)

Ordinary compressibility may be combined with these compaction


options. All of the options can vary by rock property region (defined
with the IROCK keyword).

R5000.0.2 Compaction: Introduction 257


Nexus® Technical Reference Manual Landmark

Pore Volume Adjustment

The pore volume may be modified by a pressure-dependent factor,


M Pi , and a water saturation dependent factor, M Swi .
7-1
PVi = PVi 0  M Pi  M Swi

where PVi is the i-th cell's resulting pore volume and PVi 0 is the
specified reference cell volume. The multipliers default to 1 if not
applicable to a given case. When using a constant or spatial varying cr,
the formula is:
7-2

(
M Pi = 1 + cri  Pi − Prefi )
Where Pi is the current gridblock pressure and Pref is the gridblock
i
reference pressure.

If pressure-dependent compaction tables are in effect, the following


calculations apply.

Reversible Cases
For reversible cases, the pore volume is modified as follows:
7-3
M Pi = CMT {Pi }

where CMT {Pi } signifies an evaluation of the compaction table at a


pressure, Pi .

The table below is an example of a compaction table.

CMT
P PVMULT
2000 0.9985
3000 0.9995
4000 1.0000
5000 1.000

258 Compaction: Pore Volume Adjustment R5000.0.2


Landmark Nexus® Technical Reference Manual

Irreversible Cases
For irreversible cases, the pore volume is modified as follows:
7-4
M Pi = CMT {Pi }

when
Pi − Ptolrev ≤ Pmini

where Ptolrev is a user-controllable tolerance and Pmini is the historic


minimum gridblock pressure,

and when Pi − Ptolrev > Pmini then

7-5

( ) {
M Pi = ⎡1 + crrepressure  Pi − Pmini − Ptolrev ⎤ CMT Pmini − Ptolrev
⎣ ⎦ }
Figure 7.1 illustrates the difference between the irreversible
compaction path and the reversible compaction path.

Figure 7.1: Reversible and Irreversible Compaction Factor Paths


(Does not include tolrev -- TOLREV_P)

R5000.0.2 Compaction: Pore Volume Adjustment 259


Nexus® Technical Reference Manual Landmark

Where crrepressure is a user-controllable repressurization compressibility

{ }
and CMT Pmini − Ptolrev is an evaluation of the compaction table at the
pressure, Pmini − Ptolrev .

(For a description of the repressurization method, see


CR_REPRESSURE in the Nexus Keyword Document.)

Finally, if simple compressible (as expressed in Equation 7-2) and


compaction tables are used simultaneously, then the combined effect on
M Pi is multiplicative.

Water-Induced Compaction Modeling


Water-induced compaction is modeled differently for reversible cases
than for irreversible cases.

For reversible cases,

7-6
M Swi = WIRTC {S wi − S wiinit }

where WIRTC {S wi − S wiinit } is an evaluation of the water-induced


compaction tables at, S wi − S wiinit with S wi the current gridblock water
saturation and S wiinit is the initial water saturation.

For irreversible cases, when S wi + S wtolrev ≥ S wmaxi then

7-7
M Swi = WIRTC {S wi − S wiinit }

where S wtolrev is a user controllable tolerance (TOLREV_SW) and


S wmaxi is the historic maximum gridblock water saturation,

and when S wi + S wtolrev < S wmaxi then

260 Compaction: Pore Volume Adjustment R5000.0.2


Landmark Nexus® Technical Reference Manual

7-8

{
M Swi = WIRTC S wmaxi − S wtolrev − S wiinit }

R5000.0.2 Compaction: Pore Volume Adjustment 261


Nexus® Technical Reference Manual Landmark

Transmissibility and Well KH Adjustment

The ij-th interblock connection transmissibility, FTRij may be modified


by block pressure dependent factors TPi, TPj or a water saturation
dependent factor TSwi, TSwj.
7-9
TPi TSwi + TPj ⋅ TSwj
FTRij = FTRij0 ⋅
2

0
where FTRij is the input reference interblock transmissibility.
Similarly, perforation KH values in block "i" are adjusted according to
the formula

7-10
KH i = KH i0 ⋅ TPi ⋅ TSwi

where KH i0 is the unadjusted input KH value for the i-th perforation.


The multipliers default to 1 if not applicable to a given case.

The adjustment method is different for reversible cases than for


irreversible cases.

For reversible cases,

7-11
TPi = CMT {Pi }

where, CMT {Pi } signifies an evaluation of the compaction table at a


pressure, Pi .

For irreversible cases,

when
Pi − Ptolrev ≤ Pmini

7-12
TPi = CMT {Pi }

262 Compaction: Transmissibility and Well KH Adjustment R5000.0.2


Landmark Nexus® Technical Reference Manual

where, Ptolrev is a user-controllable tolerance and Pmini is the historic


minimum gridblock pressure,

and, when Pi − Ptolrev > Pmin , then


i
7-13

( ) {
TPi = ⎡1 + kprepressure ⋅ Pi − Pmini − Ptolrev ⎤ ⋅ CMT Pmini − Ptolrev
⎣ ⎦ }
where, kprepressure is a user-controllable repressurization compressibility

{ }
(KP_REPRESSURE) and CMT Pmini − Ptolrev is an evaluation of the
compaction table at pressure Pmin − Ptolrev .
i

Water-Induced Compaction Table Effects


The calculation of water-induced compaction using compaction tables
is different for reversible cases than for irreversible cases.

For reversible cases,

7-14
TSwi = WIRTC {S wi − S wiinit }

where, WIRTC {S wi − S wiinit } is an evaluation of the water-induced


compaction tables at S wi − S wiinit , where S wi is the current gridblock
water saturation and S wiinit is the initial water saturation.

For irreversible cases,

7-15
TSwi = WIRTC {S wi − S wiinit }

when S wi + S wtolrev ≥ S wmaxi ,

S wtolrev is a user-controllable tolerance (TOLREV_SW) and S wmaxi is


the historic maximum gridblock water saturation,

and when S wi + S wtolrev < S wmaxi then

R5000.0.2 Compaction: Transmissibility and Well KH Adjustment 263


Nexus® Technical Reference Manual Landmark

7-16

{
TSwi = WIRTC S wmaxi − S wtolrev − S wiinit }
Note that Equation 7-16 becomes a constant for this part of the
irreversible case.

264 Compaction: Transmissibility and Well KH Adjustment R5000.0.2


Landmark Nexus® Technical Reference Manual

Implicitness of Calculations

Interblock transmissibility adjustment (pressure and water saturation)


is done explicitly for IMPES and is fully implicit for IMPLICIT. Well
KH adjustment is treated implicitly for both solution methods.

R5000.0.2 Compaction: Implicitness of Calculations 265


Nexus® Technical Reference Manual Landmark

266 Compaction: Implicitness of Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 8
Relative Permeability Methods

Introduction

Like other input for Nexus (for example, equilibrium regions and PVT
regions), input for relative permeability is done by methods. These
methods are assigned to individual grid blocks through the IRELPM
array. A method contains all of the information necessary to calculate
relative permeability for all of the phases present. Therefore it contains
saturation tables, three-phase relative permeability methods, hysteresis
options and any other special features relevant to the calculations.
Each method is independent; therefore there is total flexibility when
choosing the various options in different domains.

This chapter covers in detail the following topics:

• Three-phase oil relative permeability models

• Hysteresis

• End-point scaling

• Directional relative permeability

• Relative permeability and capillary pressure adjustment near the


critical point

The rules governing tabular data entry are fully covered in the
“Relative Permeability and Capillary Pressure” chapter of the Nexus
Keyword Document and are not repeated here.

R5000.0.2 Relative Permeability Methods 267


Nexus® Technical Reference Manual Landmark

Three-Phase Oil Relative Permeability Models

When describing three-phase flow through porous media, the relative


permeability to the intermediate-wetting phase (generally assumed to
be the oil phase) normally is calculated from two sets of two-phase
relative permeability data (krow and krog). Stone's Model I, Stone's
Model II, and the Saturation Weighted Interpolation Model are
available in Nexus to predict three-phase oil relative permeabilities.
There is also an option to model three-phase water relative
permeability by similar methodologies described further below.

Stone's Model I
Stone's Model I1 is invoked by entering the keyword "STONE1" in the
applicable relative permeability method file.

8-1
krog krow So*
kro =
krocw (1 − S ) (1 − S )
*
w
*
g

where

8-2
So − Sor
So* =
(1 − Sor − S wl )

8-3
Sg
S g* =
(1 − Sor − S wl )

8-4
S w − S wl
S w* =
(1 − Sor − S wl )

8-5
⎛ Sorw − Sorg ⎞
Sor = Sorw − ⎜ ⎟⎟ S g
⎜ 1 − Sorg − S wl
⎝ ⎠

268 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Or

8-6
Sor = Sorm

Which equation gets used depends on the SOMOPT option that is in


effect. Note that the original Stone1 methodology is equivalent to this
SOMOPT option and the default is the Fayers and Matthews3
modification.

In the above equations, krocw is the relative permeability to oil at


connate water ( S wl ), krow is the relative permeability to oil in the two-
phase water-oil system (without gas present), krog is the relative
permeability to oil in a gas-oil system with connate water, and Sorg is
the residual oil saturation in the water-oil (j = w) or gas-oil (j = g)
system.

Stone's Model II
Stone's Model II2 is invoked by entering the keyword "STONE2" in the
appropriate relative permeability method file. This is the default option.

8-7
⎡⎛ k ⎞ ⎛ krog ⎞ ⎤
kro = krocw ⎢⎜ row + krw ⎟ ⎜ + krg ⎟ − krg − krw ⎥
⎢⎣⎝ krocw ⎠ ⎝ krocw ⎠ ⎥⎦

Saturation Weighted Interpolation Model


The Saturation Weighted Interpolation4 three-phase model is invoked
by entering the keyword "KROINT" in the appropriate relative
permeability method file.

It assumes that the oil phase is uniformly distributed in the gridblock,


while the gas and water phases are completely segregated. Water
saturation in the gas zone is assumed to be connate water saturation
(Swl), while gas saturation in the water zone is zero. For average oil,
gas, and water saturations of So, Sg, and Sw, the full breakdown of the
saturation distribution is as follows.

In the gas zone, which occupies a fraction, Fg, of the pore volume:

R5000.0.2 Relative Permeability Methods 269


Nexus® Technical Reference Manual Landmark

Oil saturation = So

Gas saturation = Sg + Sw - Swl

Water saturation = Swl.

In the water zone, which occupies a fraction, 1 - Fg, of the pore


volume:

Oil saturation = So

Gas saturation= 0

Water saturation = Sg + Sw.

The material balance requires that the fraction of the pore volume
occupied by the gas zone, Fg, be

8-8
Sg
Fg =
S g + S w − S wl

The relative permeability to oil in the gas zone is krog (evaluated at S g


= 1 - So - S wl ), while the relative permeability to oil in the water zone
is k (evaluated at S w = 1 - So ). The average relative permeability
row
to oil in the gridblock, k , is the volume average of the oil relative
ro
permeabilities in the two zones:

8-9

kro =
( ) ( )
S g krog S g* + ( S w − S wl ) krow S w*
S g + S w − S wl

*
where S g* is gas saturation in the gas zone and S w is water saturation in
the water zone:

8-10
S g* = S g + S w − S wl

270 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

8-11
S w* = S g + S w

R5000.0.2 Relative Permeability Methods 271


Nexus® Technical Reference Manual Landmark

Guidelines for Selecting the Models


The optimal choice of a three-phase relative permeability model for
any simulation study depends on the reservoir system. If laboratory
three-phase relative permeability data are available, the best three-
phase model can readily be determined by comparing the isoperms
predicted by all three models with the data. Otherwise, a good
engineering judgment may be made by comparing the isoperms
predicted by all three models.

• Stone's Model II generally is regarded as too pessimistic at low oil


saturations. It predicts much lower oil relative permeabilities and
much higher residual oil saturations than the other models.
However, use of this model should not be ruled out completely
because the model has been shown to be superior to other models
in one of eight systems tested by Baker.4

• Stone's Model I as modified by Fayers and Matthews3


(SOMOPT1) predicts much more favorable oil permeabilities with
isoperms concave toward the 100% oil saturation apex and has
been suggested to predict a value of Kro that is too high at low oil
saturations for some systems.

• Saturation Weighted Interpolation Model4 may predict oil


permeabilities that are between those predicted by Stone's Model I
and Model II. The model gives apparently erroneous results in the
region of low oil isoperms if the krog and krow curves are dissimilar.
The relative permeability to oil in the three-phase region is
dominated by the two-phase curve with higher relative
permeability to oil. The predicted residual oil saturation
(corresponding to zero oil isoperm) equals the minimum
of Sorg and Sorw everywhere, except for one two-phase limit at
which a step jump in the residual oil saturation occurs (from Sorg
to Sorw at the water-oil two-phase limit if Sorg < Sorw , or from
Sorw to Sorg at the gas-oil two-phase limit if Sorw < Sorg ). The impact
of this behavior in the low oil isoperm region on simulation results
should be investigated first for any simulation study if the
Saturation Weighted Interpolation Model is to be employed.

272 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Hysteresis

Introduction
The hysteresis options allow the use of relative permeabilities and
capillary pressures that are a function of both phase saturation and the
history of the phase saturation. The option is useful for the rigorous
simulation of fluid flow in reservoirs where the saturation of a fluid
phase within a gridblock does not change monotonically.

Gas-phase relative permeability hysteresis is limited to the gas-phase


relative permeability function (krg). Oil-phase relative permeability
hysteresis is limited to the oil relative permeability function in a water-
oil system (krow). Four options are available to specify gas and oil
phase hysteresis: Carlson's method5linear interpolation, scaling of the
drainage function, and user-entered imbibition-drainage tables. Water
phase hysteresis is also available, but only the user-entered imbibition-
drainage tables.

The capillary pressure hysteresis option follows a simplified version of


the model proposed by Killough6. The user must enter both bounding
drainage and imbibition capillary pressure curves.

Water-oil capillary pressure hysteresis may be specified independently


of the relative permeability hysteresis option.

Background
The following discussion about non-wetting hysteresis applies to both
gas-oil and oil-water hysteresis. Oil-water hysteresis applicability is
mainly in the oil-water transition zone or areas where oil is displaced to
where it previously was mainly water. Use of the gas-phase hysteresis
option should be considered anytime it is anticipated that the reservoir
depletion scenario will involve an increasing and then decreasing gas
saturation trajectory over a significant portion or critical area of the
reservoir. Two possible applications are: wag injection and gas
conning.

In the discussion below it is assumed that oil is non-wetting relative to


water and that gas is non-wetting relative to oil.

R5000.0.2 Relative Permeability Methods 273


Nexus® Technical Reference Manual Landmark

The relative permeability curves employed during hysteresis


calculations are shown in the figure below. The primary drainage curve
is used so long as the non-wetting saturation is monotonically
increasing. If a saturation reversal occurs prior to reaching the
bounding non-wetting saturation value, Snwbound , then an
intermediate imbibition-drainage curve is constructed. The starting
point for this curve is the historical maximum gas saturation, Snwmax
and the ending point is the 'trapped' gas saturation, Snwtrap. There are
four methods of generating the intermediate imbibition-drainage curve.
In all the 'trapped' non-wetting saturation is computed from the
empirical relationship of Land7.

Details of the construction methods are provided below. As long as the


non-wetting saturation does not subsequently exceed, Snwmax, then
the non-wetting relative permeability will continue to follow the same
intermediate imbibition-drainage curve. If, however, the non-wetting
saturation reaches and surpasses the historical maximum non-wetting
saturation, then the primary drainage curve is rejoined. Subsequent
saturation reversals follow the same pattern described except with
different end points. Finally, if the non-wetting saturation reaches
Snwbound, the non-wetting relative permeability stabilizes to a single
bounding imbibition-drainage curve with end point at the user input
value of Snwtr(Sgtr or Sotr).

274 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Figure 8.1: Non-wetting Relative Permeability Hysteresis

R5000.0.2 Relative Permeability Methods 275


Nexus® Technical Reference Manual Landmark

Intermediate Imbibition-Drainage Construction Methods

For the first three construction methods described below, the trapped
gas saturation, Sgtrap is calculated using the approach of Land.

8-12
S nwmax
S nwtrap =
⎛ 1 1 ⎞
S nwmax ⋅ ⎜ − ⎟⎟ + 1
⎜ S nwtr Snwbound
⎝ ⎠

This relationship was derived from experimental observations on the


effect of initial non-wetting saturation on trapped non-wetting
saturation after imbibition.

276 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Linear Method
Once the Sgtrap is determined, the linear method simply creates an
intermediate imbibition-drainage curve by connecting the points, Sg =
Sgtrap, krg = 0 and Sg = Sgmax, krg = krg(Sgmax) with a line. An
example of the resulting curves generated by Falcon's relative
permeability modular tester are given below.

Figure 8.2: “Linear” Intermediate Imbibition-Drainage Curve Construction

R5000.0.2 Relative Permeability Methods 277


Nexus® Technical Reference Manual Landmark

Scaling of Primary Drainage Curve


This option generates an intermediate imbibition-drainage curve that
assumes a scaled form of the primary drainage curve. That is, the
PD
portion of the primary drainage curve, krg , from Sgc to Sgmax, is
IID
scaled for the intermediate imbibition-drainage curve, krg to the range
of Sgtrap to Sgmax. In equation form,
8-13
krgIID ( S g ) = krgPD ( S g* )

where
8-14
S g − S gtrap
S g* = S gc +
S g max − S gtrap
(S g max − S gc )

An example of the curves generated using the 'SCALED' option is


shown below.

Figure 8.3: “Scaled” Intermediate Imbibition-Drainage Curve Construction

278 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Carlson Method
The rationale behind the Carlson approach was first devised by Land.
It says that along the intermediate imbibition-drainage curve, at any
given Sg, a portion of the gas saturation is isolated and non-flowing,
Sgt, and a portion is connected and flowing, Sgf.
8-15
S gIID = S gtIID + S gtf
IID

Therefore, given a way of determining Sgf as a function of Sg then the


gas relative permeability could be obtained from the primary drainage
curve evaluated at the 'free' or flowing gas saturation, Sgf. In equation
form,
8-16
krgIID ( S g ) = krgPD ( S gf )

The needed relationship between Sgf, Sgt and Sg was derived by Land
and is as follows:
8-17

1 2
⎛ 1 1 ⎞
S gf = S gc + S gxn + 4 ⋅ S gxn ⋅ ⎜ − ⎟⎟
2 ⎜ S gtr S gbound
⎝ ⎠

where
8-18
S gxn = S g − S gtrap

An example of the curves generated using the 'CARLSON' option is


shown below.

R5000.0.2 Relative Permeability Methods 279


Nexus® Technical Reference Manual Landmark

Figure 8.4: “Carlson” Intermediate Imbibition-Drainage Curve Construction

User-Supplied Bounding Method (Non-Wetting Hysteresis)


In this method the user inputs the bounding imbibition-drainage curve
and intermediate curves are constructed from simple ratios as shown in
the diagram below. Consider being on an intermediate curve; the
following steps are performed:

1. A saturation, S nwinv on the bounding imbibition curve which


produces the same krnw as at S nwmax of the Drainage curve is
determined.

2. S nwlookup is determined which is the same fraction of the bounding


imbibition curve (in terms of saturation) as the saturation of
interest is on the imbibition-drainage curve.

3. krnw is looked up on the bounding imbibition curve at S nwlookup .

8-19

(
S nwlookup = S nwinv + S nw* − S nwmax )(S nwinv − Snwtrapmax ) / ( S nwmax − S nwtrap )

Where:

280 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

S nwlookup = saturation used to lookup on the Bounding Imbibition


curve to produce krnw

S nwmax = historical maximum non-wetting saturation

S nwinv= saturation on the bounding imbibition curve which gives


an equivalent krnw to the one from the Drainage Curve evaluated
at S nwmax

S nw* = non-wetting saturation for which the krnw is needed

S nwtrapmax = non-wetting maximum trapped saturation

S nwtrap = current trapped non-wetting phase saturation based on


Land's formula

Figure 8.5: “User” Method of Non-wetting Hysteresis

The imbibition-drainage curve constructed will be reversible until the


S nwmax value is exceeded by the non-wetting phase.

R5000.0.2 Relative Permeability Methods 281


Nexus® Technical Reference Manual Landmark

User-Supplied Bounding Method (Wetting Hysteresis)


This method is similar in form to the non-wetting hysteresis but
different in specifics. The user inputs the bounding imbibition-
drainage curve and intermediate curves are constructed from simple
ratios as shown in the diagram below. Consider being on an
intermediate curve; the following steps are preformed:

1. A saturation, S nwinv on the bounding imbibition curve which


produces the same krw as at S wmax of the drainage curve is
determined.

2. S wlookup is determined which is the same fraction of the bounding


imbibition curve (in terms of saturation) as the saturation of
interest is on the imbibition-drainage curve.

3. krw is looked up on the bounding imbibition curve at S wlookup .

8-20

(
S wlookup = S winv + S w* − S wmin )(S wu − S winv ) / ( S wu − S wmin )

Where:

S wlookup = saturation used to lookup on the Bounding Imbibition


curve to produce krw

S wmax = historical maximum non-wetting saturation

S winv = saturation on the bounding imbibition curve which gives an


equivalent krw to the one from the drainage curve evaluated at
S nwmax

S w* = non-wetting saturation for which the krnw is needed

S wtrapmax = non-wetting maximum trapped saturation

The imbibition-drainage curve constructed will be reversible until


the water saturation goes below the previously established S wmin
value is exceeded by the non-wetting phase. Note that, like the oil-
water hysteresis option described above, this option is most usual
in the transition zone or where the historical minimum water

282 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

saturation has room to move (i.e., is not already at connate water


saturation).

Figure 8.6: “User” Method of Wetting Hysteresis

R5000.0.2 Relative Permeability Methods 283


Nexus® Technical Reference Manual Landmark

End-Point Scaling

Introduction
Nexus allows the user to model spatial differences in relative
permeability and capillary pressure end points with a single set of
generic relative permeability and capillary pressure curves. Both the
saturation and relative permeability end points for any gridblock can be
different from those of the generic rock type to which the gridblock is
assigned.

The relative permeabilities and capillary pressures at a given saturation


are determined from the generic curves based on the assumption that
the normalized relative permeability and capillary pressure curves of
the generic rock type and the gridblock are identical.

The calculation of the relative permeabilities is divided into two steps:


saturation end-point scaling, then end-point relative permeability
scaling. Two- and three-point saturation scaling options are available
Nexus.

Just like every other relative permeability option in Nexus the end-
point scaling features are applied by relative permeability region and
are specified in the applicable method file.

Normalized Saturation End Points


Eight saturation end points can be defined for each gridblock, grouped
by water-oil and gas-oil normalized functions. They are:

• Water-Oil Normalized Functions

• SWL - Connate water saturation (the smallest water saturation


entry in a water saturation table).

• SWR - Residual water saturation (the highest water saturation


for which the water is immobile).

• SWRO - Water saturation at residual oil (one minus residual oil


saturation where the residual oil saturation is the highest oil
saturation for which the oil is immobile in the water-oil
system).

284 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

• SWU - Maximum water saturation (the highest water


saturation entry in a water saturation table).

• Gas-Oil Normalized Functions

• SGL - Connate gas saturation (the smallest gas saturation entry


in a gas saturation table).

• SGR - Residual gas saturation (the highest gas saturation for


which the gas is immobile).

• SGRO - Gas saturation at residual oil (one minus the residual


oil saturation minus the connate water saturation where the
residual oil saturation is the highest oil saturation for which the
oil is immobile in the gas-oil-connate water system).

• SGU - Maximum gas saturation (the highest gas saturation


entry in a gas saturation table).

• Gas-Water Normalized Functions

• SGL - Connate gas saturation (the smallest gas saturation entry


in a gas-water saturation table).

• SGRW - Gas saturation at residual water.

• SGU - Maximum gas saturation (the highest gas saturation


entry in the gas-water table).

• Optional Capillary Pressure Only Normalized Functions

• SWLPC - Capillary pressure connate water saturation. Will be


used only for water-oil capillary pressure scaling. Normally
this is equal to SWL.

• SWGPC - Capillary pressure connate gas saturation. Will be


used only for gas-oil and gas-water capillary pressure scaling.
Normally this is equal to SGL.

R5000.0.2 Relative Permeability Methods 285


Nexus® Technical Reference Manual Landmark

Linear transformation is used to correlate gridblock saturation to the


equivalent saturation in the generic rock table. This equivalent
saturation is then used to compute relative permeability or capillary
pressure. For example, if the saturation end points for the gridblock are
SL and SR and for the rock are SL and SR , then the equivalent rock
saturation, S , corresponding to the gridblock saturation, S, is
calculated as:

8-21


( S − S L ) ( S R’ − S L’ )
S =
( SR − SL )

S is then used in the table look-up for the relative permeability or


capillary pressure.

Two- and three-point scaling options are available to calculate relative


permeability and capillary pressure. The default option is the three-
point scaling option. It uses three-point scaling for relative
permeabilities and four-point scaling for capillary pressures. Whatever
method is selected is used both during initialization (for inverse table
lookups) and during the recurrent simulation.

286 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Rules for Missing or Incomplete End-Point Scaling Arrays and Data


Errors
It is always best to enter as many of the end-point scaling arrays as are
known or can be easily calculated. Missing data requires the simulator
to make some assumptions which might not be exactly what was
desired. The following rules are applied to missing data or data with
errors.

(In the discussion below, the S signifies an array of end-point


saturations.)

• In general, missing end-points assume the values from the


appropriate table of their relative permeability region. Nexus
attempts to fill in any missing end-point saturation data with
logical choices, but these are not unique. The best practice is for
the user to enter all of the end points or use the defaults only after
fully comprehending the defaulting rules.

• If the tabular S wr = S wl (within tolerance) and S wl has not been


entered, then that array is set equal to S wr (input or defaulted to
table). This does not apply to two-phase gas-water systems.

• If the tabular S gu + S wl = 1 (within tolerance), and if S gu was not


entered, then S gu is set equal to 1 - S wl . Conversely, if S wl is not
entered and S gu + S wl > 1, then the S wl is set equal to 1 - S gu .
This only applies to three-phase systems.

• If the tabular S gl + S wu = 1 (within tolerance), and S gl + S wu >


1, then, if S gl was not entered, S gl is set equal to 1 - S wu .
Conversely if S wu is not entered then it is set equal to 1 - S gl .
This only applies to three-phase systems.

• If the tabular S wl = S gr (within tolerance) and S gl is not


entered, then it is set equal to S gr (entered or defaulted). This only
applies to two-phase gas-water systems.

Data Errors

• If S gu - (1 - S wl ) > tolerance, then fatal error unless NOCHK is


active. This only applies to three-phase systems.

R5000.0.2 Relative Permeability Methods 287


Nexus® Technical Reference Manual Landmark

• If S gl - (1 - S wu ) > tolerance then fatal error unless NOCHK is


active. This only applies to three-phase systems.

• If S wl > S wr then fatal error. This does not apply to gas-water


systems.

• If S wr > S wro then fatal error. This does not apply to gas-water
systems.

• If S wro > S wu then fatal error. This does not apply to gas-water
systems.

• If S gl > S gr then fatal error. This does not apply to water-oil


systems.

• If S gr > S gro then fatal error. This only applies to three-phase


systems.

• If S gro > S gu then fatal error. This only applies to three-phase


systems.

• If S grw > S gu then fatal error. This only applies to gas-water


systems.

• If S grw <= S gl then fatal error. This only applies to gas-dependant


water relative permeability systems (three-phase).

Two-Point Scaling Option


The keyword SCALING TWOPOINT is used to invoke the two-point
scaling option. It uses two-point scaling for both capillary pressures
and relative permeabilities.

Two-Point Scaling of Capillary Pressure Functions


Two-point scaling uses the connate and maximum saturations as two
saturation end points in the calculation of capillary pressures:

Pcwo SWL and SWU

Pcgo SGL and SGU

288 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Two-Point Scaling of Relative Permeability Functions


Two-point scaling uses the residual and maximum saturations as two
saturation end points in the calculation of relative permeabilities:

krw SWR and SWU

krg SGR and SGU

krow SWL and SWRO

krog SGL and SGRO

R5000.0.2 Relative Permeability Methods 289


Nexus® Technical Reference Manual Landmark

Three-Point Scaling Option (Default Option)


The three-point scaling option uses four-point scaling for capillary
pressures and three-point scaling for the relative permeabilities. When
the three-point option is used, the saturation end points divide
saturation into different regions. The end points used depend on the
region to which the grid-point saturation belongs.

Four-Point Scaling of Capillary Pressure Functions


Four-point scaling uses connate saturation, residual saturation, water/
gas saturation at residual oil, and maximum saturation as four
saturation end points to calculate capillary pressure. The following end
points are used in the water-oil and gas-oil capillary pressure
calculation:

Pcwo SWL, SWR, SWRO, and SWU

Pcgo SGL, SGR, SGRO, and SGU

Three-Point Scaling of Relative Permeability Functions


In addition to honoring the end points used in the two-point scaling
option, the three-point scaling algorithm honors the relative
permeability of the mobile phase at the residual saturation of the other
phase. The following end points are used in the relative permeability
calculation:

krw SWR, SWRO, and SWU

krg SGR, SGRO, and SGU

krow SWL, SWR, and SWRO

krog SGL, SGR, and SGRO

290 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Normalized End-Point Relative Permeability

Nexus allows the user to specify the rock end-point relative


permeabilities for each gridblock. For a given gridblock saturation,
Nexus calculates a transformed saturation for use in the rock table.

The following end-point relative permeability arrays may be entered


for each gridblock:

• KRW_SWRO - The water relative permeability at residual oil


saturation. (Only relevant to three-point scaling.)

• KRW_SWU - The water relative permeability saturation.

• KRG_SGRO - The gas relative permeability at residual oil


saturation. (Only relevant to three-point scaling.)

• KRG_SGU - The gas relative permeability at maximum gas


saturation.

• KRO_SWL - The oil relative permeability at minimum water


saturation.

• KRO_SWR - The oil relative permeability at residual water


saturation. (Only relevant to three-point scaling.)

• KRO_SGL - The oil relative permeability at minimum gas


saturation.

• KRO_SGR - The oil relative permeability at residual gas


saturation. (Only relevant to three-point scaling.)

• KRG_SGRW - The gas relative permeability at residual water


saturation in a two-phase gas-water system (Only relevant to three-
point scaling.)

R5000.0.2 Relative Permeability Methods 291


Nexus® Technical Reference Manual Landmark

End-Point Relative Permeability Scaling for Oil (Two-Point Scaling)


The two-phase oil relative permeabilities for a gridblock, krow and
krog, are calculated from the rock curves and the gridblock to rock
endpoint relative permeability ratios according to the following
equations:

8-22
KRO_SWL
′ ×
krow = krow
KRO_SWL′

and

8-23
KRO_SGL
′ ×
krog = krog
KRO_SGL′

′ are the tabular values after any saturation scaling has


′ , krog
Where, krow
been applied, KRO_SWL′and KRO_SGL′ are the tabular relative
permeability end-points, and KRO_SWL and KRO_SWL are the array
values.

292 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

End-Point Relative Permeability Scaling for Water and Gas (Two-Point


Scaling)
The water and gas relative permeabilities are computed with the
following equations:

8-24
KRW_SWU
′ ×
krw = krw
KRW_SWU′

and

8-25
KRG_SGU
krg = krg′ ×
KRG_SGU′

′ and krg′ are the tabular values after any saturation scaling has
Where, krw
been applied, KRW_SWU′ and KRG_SGU′ are the tabular relative
permeability end-points, and KRW_SWU′ and KRG_SGU′ are the
array values.

R5000.0.2 Relative Permeability Methods 293


Nexus® Technical Reference Manual Landmark

End-Point Relative Permeability Scaling for Oil (Three-Point Scaling)


For the case of the oil-water table, if S w ≤ S wr_tab then
8-26

krow = KRO_SWL + ( krow


′ − KRO_SWL′ )
( KRO_SWR − KRO_SWL )
( KRO_SWR′ − KRO_SWL′)

However, if abs( KRO_SWR′ − KRO_SWL′) < tol , then

8-27
KRO_SWR
′ ×
krow = krow
KRO_SWR ′

For the case of the gas-oil table,


8-28

krog = KRO_SGL + ( krog


′ − KRO_SGL′ )
( KRO_SGR − KRO_SGL )
( KRO_SGR′ − KRO_SGL′)

However, if abs( KRO_SGR′ − KRO_SGL′) < tol , then

8-29
KRO_SGL
′ ×
krog = krog
KRO_SGL′

294 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

End-Point Relative Permeability Scaling for Water and Gas (Three-


Point Scaling)
For water relative permeability if S w > S wro _ tab , then

8-30

krw = KRW_SWRO + ( krw


′ − KRW_SWRO′ )
( KRW_SWU − KRW_SWRO )
( KRW_SWU ′ − KRW_SWRO′)

Unless abs ( KRW_SWU ′ − KRW_SWRO′) < tol , then

8-31
KRW_SWU
′ ×
krw = krw
KRW_SWU′

And if S w ≤ S wro _ tab , then

8-32
KRW_SWRO
′ ×
krw = krw
KRW_SWRO′

For gas relative permeability, if S g > S gro _ tab , then

8-33

krg = KRG_SGRO + ( krg′ − KRG_SGRO′ )


( KRG_SGU − KRG_SGRO )
( KRG_SGU ′ − KRG_SGRO′)

Unless abs ( KRG_SGU ′ − KRG_SGRO′) < tol , then

8-34
KRG_SGU
krg = krg′ ×
KRG_SGU′

And if S g ≤ S gro _ tab , then

8-35
KRG_SGRO
krg = krg′ ×
KRW_SGRO′

R5000.0.2 Relative Permeability Methods 295


Nexus® Technical Reference Manual Landmark

End-Point Relative Permeability Scaling for Gas-Water Cases (Two-


Point Scaling)
For gas relative permeability, if S g > S grw _ tab , then

8-36

krgw = KRG_SGRW + ( krgw


′ − KRG_SGRW′ )
( KRG_SGU − KRG_SGRW )
( KRG_SGU ′ − KRG_SGRW ′)

Unless abs ( KRG_SGU ′ − KRG_SGRW ′) < tol , then


8-37
KRG_SGU
′ ×
krgw = krgw
KRG_SGU′

And if S g ≤ S grw _ tab , then


8-38
KRG_SGRW
′ ×
krgw = krgw
KRG_SGRW′

For the case of the water phase,


8-39

krwg = KRW_SGL + ( krwg


′ − KRW_SGL′ )
( KRW_SGR − KRW_SGL )
( KRW_SGR′ − KRW_SGL′)

However, if abs( KRW_SGR′ − KRW_SGL′) < tol , then

8-40
KRW_SGL
′ ×
krwg = krwg
KRW_SGL′

296 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Data Defaulting and Errors Applied to End-Point Relative Permeability


Nexus attempts to fill in any missing end-point relative permeability
data with logical choices, but these are not unique. The best practice is
for the user to enter all of the end points. When not entering all the end
points, users should fully understand the defaulting rules listed below.

• For all end-point relative permeability arrays (e.g., KRW_SWL) if


an array is not entered, then that array will be populated with
values from the applicable table for the given cell. This default
value is subject to modification. (See below).

• If a -1 value is entered for an end-point array then its value will


also be taken from the applicable table, but this case will be treated
as if the value had been entered in the array. (See below for the
possible distinction.) This is different from the case where no array
is entered and a default is taken from a table — in that situation the
array is considered to have not been entered.

Three-Point Scaling Defaulting Rules


Note: The following defaulting rules also apply to water-oil two phase
systems, except for references to gas quantities.

• If the table values for KRO_SGR ′ and KRO_SGL′ differ by less


than a small tolerance AND KRO_SGL was not entered, then
KRO_SGL is set equal to KRO_SGR .

• If the table values for KRO_SGL′ and KRO_SGR ′ differ by less


than a small tolerance AND KRO_SGR was not entered, then
KRO_SGR is set equal to KRO_SGL .

• If the table values for KRO_SGR ′ and KRO_SGL′ differ by


greater than a small tolerance AND KRO_SGR entered but not
KRO_SGL then preserve the ratio of the table by setting

8-41
KRO_SGL′
KRO_SGL=KRO_SGR ×
KRO_SGR ′

R5000.0.2 Relative Permeability Methods 297


Nexus® Technical Reference Manual Landmark

• If the table values for KRO_SGR ′ and KRO_SGL′ differ by


greater than a small tolerance AND KRO_SGL was entered but
not KRO_SGR , then preserve the ratio of the table by setting

8-42
KRO_SGR ′
KRO_SGR=KRO_SGL ×
KRO_SGL′

• If after the above, KRO_SGL > KRO_SGR ,then KRO_SGL


is set equal to KRO_SGR .

• If the table values for KRO_SWL′ and KRO_SWR ′ differ by less


than a small tolerance AND KRW_SGL was not entered, then
KRW_SGL is set equal to KRO_SWR .

• If the table values for KRO_SWL′ and KRO_SWR ′ differ by less


than a small tolerance AND KRW_SGR was not entered, then
KRO_SWR is set equal to KRW_SGL .

• If the table values for KRO_SWL′ and KRO_SWR ′ differ by


greater than a small tolerance AND KRO_SGR was entered but
not KRO_SGL , then preserve the ratio of the table by setting

8-43
KRO_SWL′
KRO_SWL=KRO_SWR ×
KRO_SWR ′

• If the table values for KRO_SWR ′ and KRO_SWL′ differ by


greater than a small tolerance AND KRO_SWL was entered but
not KRO_SWR , then preserve the ratio of the table by setting

8-44
KRO_SWR ′
KRO_SWR=KRO_SWL ×
KRO_SWL′

298 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

• If after the above, KRO_SWL > KRO_SWR ,


then KRO_SWL is set equal to KRO_SWR .

• If the table values for KRW_SWU′ and KRW_SWRO′ differ by


less than a small tolerance AND KRW_SWU was not entered,
then KRW_SWU is set equal to KRW_SWRO .

• If the table values for KRW_SWU′ and KRW_SWRO′ differ by


less than a small tolerance, AND KRW_SWRO was not entered,
then KRW_SWRO is set equal to KRW_SWU .

• If the table values for KRW_SWU′ and KRW_SWRO′ differ by


greater than a small tolerance AND KRW_SWU was entered but
not KRW_SWRO , then preserve the ratio of the table by setting
8-45
KRW_SWRO′
KRW_SWRO=KRW_SWU ×
KRW_SWU′

• If the table values for KRW_SWU′ and KRW_SWRO′ differ by


greater than a small tolerance AND KRW_SWRO was entered but
not KRW_SWU , then preserve the ratio of the table by setting
8-46
KRW_SWU′
KRW_SWU=KRW_SWRO ×
KRW_SWRO′

• If after the above, KRW_SWU < KRW_SWRO then


KRW_SWU is set equal to KRW_SWRO .

• If the table values for KRG_SGU′ and KRG_SGRO′ differ by less


than a small tolerance AND KRG_SGRO was not entered, then
KRG_SGRO is set equal to KRG_SGU .

R5000.0.2 Relative Permeability Methods 299


Nexus® Technical Reference Manual Landmark

• If the table values for KRG_SGU′ and KRG_SGRO′ differ by


greater than a small tolerance AND KRG_SGUwas entered but
not KRG_SGRO , then preserve the ratio of the table by setting
8-47
KRG_SGRO′
KRG_SGRO=KRG_SGU ×
KRG_SGU′

• If the table values for KRG_SGU′ and KRG_SGRO′ differ by


greater than a small tolerance AND KRG_SGRO was entered, but
not KRG_SGU , then preserve the ratio of the table by setting
8-48
KRG_SGU′
KRG_SGU=KRG_SGRO ×
KRG_SGRO′

• If after the above, KRG_SGU < KRG_SGRO , then


KRG_SGU is set equal to KRG_SGRO .

Three-Point Scaling Defaulting Rules (Gas-Water)


• If the table values for KRG_SGU′ and KRG_SGRW′ differ by
less than by a small tolerance, AND KRG_SGRW was not
entered, then KRG_SGRW is set equal to KRG_SGU .
• If the table values for KRG_SGU′ and KRG_SGRW′ differ by
greater than by a small tolerance, AND KRG_SGU was entered
but not KRG_SGRW , then preserve the ratio of the table by
setting
8-49
KRG_SGRW′
KRG_SGRW=KRG_SGU ×
KRG_SGU′

300 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

• If the table values for KRG_SGU′ and KRG_SGRW′ differ by


greater than by a small tolerance AND KRG_SGRW was entered
but not KRG_SGU , then preserve the ratio of the table by setting
8-50
KRG_SGU′
KRG_SGU=KRG_SGRW ×
KRG_SGRW′

If, after the above, KRG_SGU < KRG_SGRW , then KRG_SGU is


set equal to KRG_SGRW .

R5000.0.2 Relative Permeability Methods 301


Nexus® Technical Reference Manual Landmark

Directional Relative Permeability

The directional relative permeability option in Nexus allows each


gridblock to have different relative permeability values in each flow
direction, rather than simply one computation per gridblock. For
vertical equilibrium problems (when VE option is invoked), the
program internally generates the relative permeability functions. Use of
the directional relative permeability option results in a different set of
functions generated for the areal and vertical directions. For non-VE
(vertical equilibrium) problems, the user may assign multiple saturation
function tables to each gridblock.

302 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

IFT Adjustment of Capillary Pressure and Gas/Oil


Relative Permeability

EOS type fluid grids may go through a compositional path that leads to
the critical point of the hydrocarbon mixture. In a gridblock near the
critical point, when a hydrocarbon mixture splits into two phases, the
compositions of the phases are similar. For this reason, interfacial
tension and capillary pressure between the phases become small and
approach zero, the oil and gas residual saturations decrease, and the gas
and oil relative permeability curves approach straight lines near the
critical point.

Nexus has a special option that automatically adjusts relative


permeabilities and gas-oil capillary pressure in near-critical blocks. The
adjustment correlates these rock properties to gas-oil interfacial tension
as follows:

8-51
So − Sorg f (  )
kro = f (  ) kror + ⎡⎣1 − f (  ) ⎤⎦ km ( S w )
1 − S w − Sorg f (  )

8-52
S g − S gc f (  )
krg = f (  ) krgr + ⎡⎣1 − f (  ) ⎤⎦ km ( S w )
1 − S w − S gc f (  )

8-53
r 
Pcgo = Pcgo
 ref

R5000.0.2 Relative Permeability Methods 303


Nexus® Technical Reference Manual Landmark

where kro , krg , Pcgo , are the adjusted relative permeabilities to oil,
r r
gas, and gas-oil capillary pressure, respectively; kro , krg , Pcgo r
are
the nonadjusted respective values as calculated by Nexus (by the active
three-phase method) from the rock curves; and km ( S w ) is the relative
permeability to miscible hydrocarbon fluid near the critical point. This
value is a function of water saturation only. Also, Sorg is the residual
oil saturation to gas,  is the gas-oil interfacial tension,  ref is the
reference interfacial tension of the gas-oil system on which the
capillary pressure rock curve Pcgor
has been measured, and f (  ) is a
function of the interfacial tension defined as:

8-54
e
⎛ ⎞
f ( ) = ⎜ * ⎟
⎝ ⎠

Here,  * is the threshold interfacial tension below which the above


relative permeability adjustment is used. For interfacial tensions greater
than the threshold value, f (  ) is assigned a value of one. Exponent e
is a positive number generally in the range from 0.1 to 0.25.

304 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

The relative permeability to miscible hydrocarbon fluid, km ( S w ) is


defined as the following arithmetical average:

8-55
1⎡ r
km ( S w ) = ⎣ kro ( So = 1 − S w , S g = 0 ) + krgr ( S g = 1 − S w , So = 0 ) ⎤⎦
2

The gas-oil interfacial tension depends on the oil and gas compositions
and is calculated from the correlation:

8-56
nc
1
 = ∑ ⎡⎣ Pchi ( o xi −  g yi ) ⎤⎦
1
4

i =1 2

where Pchi is the parachor of component i; o ,  g are molar


densities; and xi and yi and the mole fractions in the liquid and gas
phases, respectively.

R5000.0.2 Relative Permeability Methods 305


Nexus® Technical Reference Manual Landmark

References

1. Stone, H.L.: "Probability Model for Estimating Three-Phase Relative Permeability,"


JPT (Feb 1970) 214; Trans., AIME (1970) 249.

2. Stone, H.L.:"Estimation of Three-Phase Relative Permeability and Residual Oil


Data," J. Cdn. Pet. Tech. (April 1973) 12, N. 4, 53.

3. Fayers, F.J. and Matthews, J.D., "Evaluation of Normalized Stone’s Methods for
Estimating Three-Phase Relative Permeabilities," Soc. Pet. Eng. J., pp. 225-232 (Apr.
1984)

4. Baker, L.E., "Three-Phase Relative Permeability Correlations," paper SPE/DOE


17369 presented at the 1988 SPE/DOE Enhanced Oil Recovery Symposium, Tulsa,
OK, April 17-20.

5. Carlson, F. E., "Simulation of Relative Permeability Hysteresis to the Nonwetting


Phase," SPE Paper 10157 presented at the SPE-AIME 56th Ann. Fall Mtg., San
Antonio, TX, Oct.1981.

6. Killough, J. E., "Reservoir Simulation with History-Dependent Saturation


Functions," SPE Paper 5106 presented at the SPE-AIME 49th Ann. Fall Mtg.,
Houston, TX, Oct. 1974; also Soc. Pet. Eng. J., Feb. 1976, 37-48.

7. Land, C. S., "Calculation of Imbibition Relative Permeability for Two- and Three-
Phase Flow From Rock Properties," Soc. Pet. Eng. J., Trans. AIME, 243, 149-156,
June 1968.

306 Relative Permeability Methods R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 9
Tracers

Tracer Calculations

Tracer calculations consist of the explicit timestepping of component


molar or mass conservation equations at the end of a timestep.

At the end of a timestep, the pressure and fluxes between gridblocks


have been set.

The molar conservation equation for component i and tracer m is

9-1
n+1 n nconn
  c im M i  –  c im M i   n n
------------------------------------------------------------- =
t  F c im + Q im
c=1

where

 nphases k n
= T    --------  j x j i c j i m   p o + P c oj –   j M j g  D 
rj n n n
F c im
  j  
 j=1  c
i = 1  nc + 1 m = 1  ntracers

cj,i,m is the concentration of tracer m in component i of phase j.

It is assumed that

c j i  m = c i m 9-2

This is the default assumption used in VIP also, but VIP also allows the
user to alter the proportion of the tracer that will split between phases.
This could come in useful for many reasons. For example, the tracer
may represent a fraction of a pseudo-component that has a different K-
value than the pseudo-component as a whole. Alternatively, it may be
used to reduce dispersion effects in large gridblocks.

R5000.0.2 Tracers: Tracer Calculations 307


Nexus® Technical Reference Manual Landmark

Qim is the source/sink term for the tracer. For example, it could be the
stream tracer concentration multiplied by the molar flow rate of
component i.

The tracer solution does not necessarily use the same timestep size as
the general reservoir simulation. Because the calculation is being
performed explicitly, using the simulation timestep may cause
instability, especially if the grid is being solved implicitly and large
timesteps are being taken. Therefore, the tracer calculation may be
divided into many timesteps where the reservoir variables are held
constant and the concentrations are updated for every sub-timestep.
The sub-timestep is essentially calculated so that the molar (or mass)
flux into or out of the gridblock does not exceed the amount of moles
(or mass) assigned to the tracer of a component. However, a minimum
timestep is imposed, so it is still possible that the tracer calculations are
performed at a timestep exceeding the stability limit.

308 Tracers: Tracer Calculations R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 10
Grid

Introduction

Nexus has two forms for reading the grid array property values. In the
basic form, no grid structure is necessary and array data, for active cells
only, are supplied in separate files by property. This basic form of array
input is referred to as the “unstructured” form. Generating array data in
an unstructured form usually requires a separate program. The second
form of array data input uses a structured grid format and is therefore
referred to as the “structured grid” form. The input for the structured
grid form is like that of the VIP-CORE ARRAYS data section.

R5000.0.2 Grid: Introduction 309


Nexus® Technical Reference Manual Landmark

Unstructured Grid Form

When the unstructured form of array data input is used, the individual
property array files are specified in the casename.fcs file. Data in the
casename.fcs file are organized by section. Array data can be specified
in the PROPERTY_FILES, INITIALIZATION_FILES and
ROCK_ARRAY_FILES sections. For details on file formats, contents
and requirements, see the "Array Data" chapter of the Nexus Keyword
Document.

Additionally, connection transmissibility data are required input. The


connection data files are specified with the CONNECTIONS keyword
in the PROPERTY_FILES section of the casename.fcs file. For file
format and content details see the "Connection Data " chapter of the
Nexus Keyword Document.

Map Output
With the unstructured form of array data input, the default form of map
output to a flat map file follows that of the input data and assumes a
grid of shape NB*1*1, where NB is the total number simulation of
cells.

However, if GLOBALCELL array data are available, and contain


values that are consistent with the natural cell order of a structured grid
(including inactive cells), then the simulator can be instructed to write
flat map data that corresponds to the structure of the GLOBALCELL
data. This requires additional data about the shape of the structured grid
(or LGR grids) to be supplied in the OPTIONS file of the
PROPERTY_FILES section. The grid shape data are introduced by the
STRUCTURED_MAPS keyword in the OPTIONS file. For details and
restrictions see the "Structured Grid Data" section in the "Options
Data" chapter of the Nexus Keyword Document.

The simulator can also write map data directly to a VDB, provided that
the VDB contains INIT class data with the physical grid description
(corner point CORP data) for the specified case name, and the total
number of cells with PV greater than zero matches the total number of
cells in the simulator. When writing directly to a VDB, the grid shape
data are extracted from the VDB; therefore, STRUCTURED_MAPS
data in the OPTIONS file if present will be ignored.

310 Grid: Unstructured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

Structured Grid Form

The structured form of array data input uses the GRID_FILES section
instead of the PROPERTY_FILES section in the casename.fcs file. All
the required array data will be specified in the STRUCTURED_GRID
file instead of the PROPERTY_FILES, INITIALIZATION_FILES and
ROCK_FILES sections, as required by the unstructured grid form. In
addition to array property data, grid geometry data are also required
and specified in the STRUCTURED_GRID file. For details on the
contents of the STRUCTURED_GRID file see "Appendix A:
Structured Grid Data" of the Nexus Keyword Document.

Grid Geometry Data


Nexus always uses the corner point geometry for all the grid related
computations. Each grid cell is independently specified by the
coordinates of its eight corners. Corner point data can be directly input
using the CORP array option. Alternatively the grid geometry can be
defined either with the DX, DY, DZ, etc. arrays, or with the DXB,
DYB, DZB, etc. arrays, and Nexus will automatically compute the
coordinates of each cell's eight corners. All calculations that require
cell geometry (for example - cell volumes, transmissibilities, etc.) are
computed from the cell corner points.

Fault Specification
Faults and pinchouts are automatically detected and transmissibility
connections created when the grid geometry is defined with the CORP
data option. The DX or DXB grid specification options do not have any
facility for defining faults or pinchouts.

R5000.0.2 Grid: Structured Grid Form 311


Nexus® Technical Reference Manual Landmark

Calculations of Cell Bulk Volume and Center Depth


The bulk volume Vb, and center depth Dc, of a cell are defined as
follows:

10-1
Vb =  dV
V

10-2
1
D c = ------  z dV
Vb
V

where z is the Z-coordinate. A numerical integration technique is used


to estimate the three-dimensional integrals over the cell volume V in
the above expressions. Each cell is mapped into a unit cube using a
local coordinate transformation function. A quadrature formula with
one, two, or three quadrature points is used to approximate the three-
dimensional integral in the unit cube. The CORNER card is used to
specify the numbers of the quadrature points. See the "Corner-Point
Geometry" appendix of this manual for details.

Calculations of Cell Dimensions


The cell dimensions DXC, DYC and DZC that are output to the map
file and "vdb" are computed from the average lengths of the four lines
that join the relevant corner points along each direction. The cell
thickness is set equal to the value of DZC.

312 Grid: Structured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

Calculations of Intercell Transmissibility


Two methods of calculating inter-cell transmissibility are available -
the standard option, which uses "harmonic integration,” and the
NEWTRAN option.

See the "Corner-Point Geometry" appendix of this manual for details


on both options.

Standard Transmissibility Option


The following expression is used for calculations of inter-block
transmissibilities in the X-direction in the standard Nexus option (see
Figure 10.1):
10-3

C DARCY  TMLTX i
T ij = ---------------------------------------------------
-
right left
Ai Aj
------------------------ + -------------------- -
right left
A ij TX i A ij TX j

Ai right

I Aij
Aj left
J

Figure 10.1: Fault Block Connection

where

Aijarea of mutual intersection of Blocks I and J

R5000.0.2 Grid: Structured Grid Form 313


Nexus® Technical Reference Manual Landmark

right left
Ai , A j areas of the right face of the i’th block and the left
face of the j’th block (see Figure 10.1)
right left
TX i , TX j right and left transmissibilities of Blocks I and J in
the X-direction,

NEWTRAN Transmissibility Option


The NEWTRAN method, which is similar to the corresponding
ECLIPSE technique, has been incorporated in VIP-EXECUTIVE as an
option to improve the compatibility of both simulators. This option can
be invoked using the NEWTRAN keyword in the CORNER card. The
following expression is used to calculate the inter-block
transmissibility in this option:
10-4
C DARCY  TMLTX i
T ij = -----------------------------------------------
1 + --------
-------- 1
TX i TX j

where

CDARCY Darcy‘s constant in the appropriate units


(0.008527 in metric units and 0.001127 in field
units)

TMLTXi transmissibility multiplier in the X-direction for


the i’th block
A x DI x + A y DI y + A z DI z
TXi = PERMX i RNTG i --------------------------------------------------------
2 2 2
- 
DI x + DI y + DI z

RNTGi net-to-gross ratio, which appears in the X- and Y-


transmissibility, but not in the Z-transmissibility

PERMXi permeability in the X-direction in the i’th block

Ax, Ay, Az X-, Y-, and Z-projections of a mutual intersection


of Blocks i and j; i.e., projection on the y-z, x-z,
and x-y planes, respectively.

DIx, DIy, DIz X-, Y-, and Z-components of the distance


between the center of the i’th gridblock and the
center of relevant face of Block i.

314 Grid: Structured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

The expressions for transmissibilities in the Y- and Z-directions are


similar, but the net-to-gross ratio is not included in the expression for
the Z-transmissibility.

R5000.0.2 Grid: Structured Grid Form 315


Nexus® Technical Reference Manual Landmark

Local Grid Refinement (LGR)


Cartesian grid refinements are supported in Nexus. A Cartesian grid
refinement consists of any rectangular area comprising one or more
grid cells that have been refined into a finer grid structure. Any grid cell
within the rectangular area may subsequently be omitted from the
refinement. The following illustration shows a refined area REF2
within a refined area REF1, within a coarse base grid.

Figure 10.2: Example of Cartesian Refinement

When creating a Cartesian refinement, the following properties must be


defined:

• Grid name

• Range of coarse grid cells to be refined.

• Number of x, y, z fine grid divisions per parent grid division.

Optionally, the range of grid cells to be included or omitted within the


specified area may also be defined.

316 Grid: Structured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

LGR Keyword Parameters


Local grid refinements are defined through a nested set of keyword
parameters and data, describing the type, characteristics, and location
of the refinement relative to its parent grid. The nesting of the data sets
defines the levels of refinements within refinements. This represents
the minimum amount of data required for the LGR option.

The keyword parameters below are used to describe the refinement


structure shown above in Figure 10.2.

NX NY NZ NCOMP
5 5 1 2
LGR BASEGRID
CARTREF REF1
2 4 2 4 1 1
2 3 2
2 2 2
1
CARTREF REF2
2 3 3 4 1 1
3 2
4 2
1
ENDREF
ENDREF
ENDLGR

In this sequence of keywords and parameters, each keyword pertains to


a specific group of parameters, which are entered to the side or below
the keyword. For instance, the NX/NY/NZ keywords are used to
describe the number of grid cells in the coarse grid area. The
CARTREF keywords and following data specify the names and
corresponding structure of the Cartesian refinement grids, including the
i, j, k range of the refinements, the frequency of refinements in the
refined area, and any parts of the refined area to be omitted.

For more information about LGR keyword parameters, refer to


"Appendix A: Structured Grid Data" of the Nexus Keyword Document.

R5000.0.2 Grid: Structured Grid Form 317


Nexus® Technical Reference Manual Landmark

Propagation of Reservoir Properties to LGR Cells


When LGR grids are defined, the user has the option to specify all of
the properties for the coarse and refined grid cells or only to specify
properties for the coarse grid cells. Where properties are specified only
for the coarse grid cells, nexus will calculate unique depths for each
refined grid cell, based on interpolation of the corner points of the
coarse grid, but it will not calculate unique initial reservoir properties
for each refined grid cell. Instead, each refined grid cell will have the
same properties as its parent coarse grid cell.

Reservoir properties for specific grids may be entered using the


keywords ARRAY (grid name).

Example:

ARRAYS REF1
POR VALUE
INCLUDE POR_REF1.data

Grid Coarsening
The Grid Coarsening option is a feature that enables the user to
combine adjacent grid cells into coarser grid cells, thereby reducing the
number of cells used for simulation and reduce run time.

Grid coarsening data is entered with the COARSEN keyword. Detailed


information on the COARSEN keyword can be found in the "Appendix
A: Structured Grid Data" of the Nexus Keyword Document.

Coarse Cell Properties


The properties of coarse blocks are calculated from the properties of
the constituent fine blocks using a pore volume weighed average:

  A i  PV i 
i
A = -------------------------------
-
 PV i
i

318 Grid: Structured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

The following properties are exceptions:


For DX,DY,DZ,HNET a bulk volume weighted average is used, and
the result multiplied by the number of fine blocks in the appropriate
direction.

  DX i  BV i 
i
DX = nx  ------------------------------------
-
 BV i
i

  DY i  BV i 
i
DY = ny  ------------------------------------
-
 BV i
i

  DZ i  BV i 
i
DZ = nz  ------------------------------------
-
 BV i
i

  HNET i  BV i 
i
HNET = nz  --------------------------------------------
-

BV i
i

Porosity is calculated from PV,BV,DZ and HNET as follows:

PV DZ
POR = -------  ----------------
BV HNET

R5000.0.2 Grid: Structured Grid Form 319


Nexus® Technical Reference Manual Landmark

When table indices ISAT,ISATI,ICMT,OILTRF ,GASTRF, IEQUIL,


IREGION, IPVT, IPVTW, ITRAN, IWIRC are different for fine blocks
within a coarse block, a WARNING message is printed on the standard
output file, and they are assigned to the indices of the fine blocks whose
sum represents the largest pore volume within the coarse block.

The half transmissibilities of the coarse block are calculated from those
of the constituent fine blocks using the tubes in parallel method.

+ - 2
TX = TX =  -------------------------------------------
 1 1 
-
j k
  TX+ TX--
 -----------
- + ----------
i i i

+ - 2
TY = TY =  ------------------------------------------
 1 1
-

i k
  -----------
TY
+
- + ----------
TY 
-
j j j

+ - 2
TZ = TZ =  --------------------------------------------
 1 1
-

i j
  ------------
TZ
+
- + -----------
TZ 
-
k k k
The fine block transmissibility values will include changes applied
with the TOVER cards, but will not include changes applied with the
OVER, VOVER cards. Transmissibility values at coarse block
boundaries may be modified through the non-standard transmissibility
multipliers.

Average coarse block permeabilities KX, KY and KZ that are used for
calculating well, influx and polymer properties, and for other uses by
VIP-EXEC are calculated from the average coarse block properties as
follows:

-
TX DX
KX = -----------------------  --------
2  HNET DY

320 Grid: Structured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

-
TY DY
KY = -----------------------  --------
2  HNET DX

-
TZ DZ
KZ = ---------------  --------
2  DX DY
The face areas of the coarse block are calculated from the sum of the
face areas of the fine blocks that make a coarse block face.

R5000.0.2 Grid: Structured Grid Form 321


Nexus® Technical Reference Manual Landmark

322 Grid: Structured Grid Form R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 11
Procedures

Introduction

Procedures are sets of instructions which direct Nexus to perform


various (user-specified) actions depending on whether various (user
specified) conditions have been satisfied. A FORTRAN-like syntax is
used, allowing a great deal of flexibility in specifying constraints and
actions. (See the “Procedures” chapter of the keyword document for
details of the syntax). The procedures are input as part of the surface
network file.

During a timestep, the network is first solved using the most recent
recurrent data input, with fixed reservoir pressures and fluid mobilities.
On the first Newton iteration of a timestep, and also on the second
Newton iteration if connections have opened (started producing or
injecting), the procedures are executed. (See the network chapter for a
detailed description of the network calculations performed during a
timestep). The procedures can retrieve information from this network
solution, such as connection rates, node pressures etc, and take actions,
such as changing rate constraints, making changes to network
connections etc, based on that information. Note that the network
solution is not updated after each action (because that is
computationally expensive) unless the user directs the program to
resolve the network, using the solve_network function. However, after
all procedures have been executed, the program will then resolve the
network if any actions would result in a change to the network solution.

Nexus provides functions to retrieve the flow rates from the network
potential solution (the qp function). The network potential (obtained
by solving the network without targets) is normally calculated after the
procedures have been executed, so the qp function will actually return
flow rates calculated during the previous Newton iteration. The user
can force the potential solution to be resolved by using the
solve_network_potential function. When this function is used, then if
the procedure has already taken actions which would change the
network solution, such as changing constraints, the network solution is
resolved, and then the network potential is resolved. The network
solution is resolved because the network potential calculation uses

R5000.0.2 Procedures: Introduction 323


Nexus® Technical Reference Manual Landmark

information from the network solution if connections have reopened or


shut in. Subsequent functions will then reflect the fact that the network
has been resolved.

A set of procedures is enclosed between the PROCS and ENDPROCS


keywords, and there can be multiple sets of procedures. Procedures
remain active from the time that they are first input, until the end of the
run, unless subsequently cleared. A set of procedures may be given a
name, which can then be used to clear the procedure. A set of
procedures may also be given a priority. Procedures are executed in the
order of increasing priority, with procedures having the same priority
executing in the order in which they were input.

324 Procedures: Introduction R5000.0.2


Landmark Nexus® Technical Reference Manual

Procedure Functions

Nexus provides many functions which can be used in Procedures.


These are listed in the Procedures section of the keyword document.
Functions usually require one or more arguments and return a result
which may be any of the basic variable types, such as integer or real.
The syntax used for a function is as follows:

result = function(arg1, arg2, arg3, …)

where

result is the result returned by the function

function is the name of the function

arg1, arg2, arg3 etc are arguments required by the function

Function arguments can be keywords, strings, constants, procedure


variables, or network names such as connection or node names. The
keyword document lists what type each argument of a function should
be. There are basic functions, such as abs (absolute value), max
(maximum of two real or integer values) etc, functions to retrieve
network data, such as p (pressure at a node or well), gor (gas oil ratio of
a connection or well) etc, functions to change the network, such as
constraint (set a network constraint), activate (activate a connection)
etc, and functions to manipulate lists, such as intersection (the
intersection of two lists) etc. If the return type is an array or list, the
function will allocate the space for the array or list.

Many functions use logical arrays as “masks” to determine when to


perform the specified action. For example:

PROCS
LOGICAL_1D mask1, result
mask1 = gor(conlist,all1d) > 3.0
result = deactivate(conlist,mask1)
ENDPROCS

Here mask1 is a logical array, the value of which will be true for any
connection in the connection list named conlist, if the GOR of that
connection is greater than 3. The function deactivate will then
deactivate all connections in the connection list conlist, for which
mask1 is true, so all connections with a GOR greater than 3 will be
deactivated. Note that the argument all1d is a special variable which
takes the value of true for all elements of an array.

R5000.0.2 Procedures: Procedure Functions 325


Nexus® Technical Reference Manual Landmark

Network names, such as connection, node, well and target names,


which are used as function arguments must have been previously
defined in the surface network file.

Although most functions return results, it is not necessary to set a


variable equal to the function unless you want to store the result for
some purpose.

Most functions are “Overloaded”. This means that the result of the
function or result returned by the function depend on the number and
type of arguments used when invoking the function. For example, the
WOR function can return the Water/Oil ratio for a well, a connection, a
well list, a connection list, the completions in a well, or all the
completions for all wells in a well list, depending on the arguments
used.

Because the procedures are executed every timestep, the user must
specify logic in the procedures that prevents unwanted actions. For
example

PROCS
LOGICAL pmin_reduced = false
REAL X
! get the oil rate in the FIELD connection at surface
conditions
X = Q("OS",FIELD)
IF(X < 400.0)THEN
IF(not pmin_reduced)THEN
! Set the miniumum pressure constraint at the FIELD node
to 100 psi
CONSTRAINT("PMIN",FIELD,100.0)
pmin_reduced = true
ELSE
! If the field oil rate falls below 200, stop the run
ABANDON(FALSE)
ENDIF
ENDIF
ENDPROCS

In this example, when the oil rate for connection FIELD falls below
400, the minimum pressure at the FIELD node is reduced to 100 psi
(which presumably the user expects to result in an increase in oil rate.
A logical variable is then set to true, indicating that this action has
occurred. When the oil rate again falls below 400, this program will
then execute the abandon function, which stops the run, instead of
trying to reset the minimum pressure to 100 psi (which would
accomplish nothing).

326 Procedures: Procedure Functions R5000.0.2


Landmark Nexus® Technical Reference Manual

The value of each variable is preserved from the previous time each set
of procedures was executed. In the above example, this value of
pmin_reduced is initially set to FALSE the first time the procedure set
is executed (due to the declaration LOGICAL pmin_reduced = false),
then when it is set to true, this value is then saved and available to all
subsequent executions of the procedure set. Variables are only able to
be used within the procedure set in which they are declared, unless they
are declared as STATIC, in which case all procedure sets can use that
variable. The names of STATIC variables must be unique across all
procedure sets. I.e if an integer is declared as INTEGER, STATIC i, in
one set of procedures, then i can not be declared as a variable in any
other procedure set.

R5000.0.2 Procedures: Procedure Functions 327


Nexus® Technical Reference Manual Landmark

Debugging Procedures

Debug output can be turned on using the set_debug function. The


program then outputs the arguments to, and result of, every function
call and operation that is executed to the .dbg file. In addition, the
printout function can be used to print out the current contents of any
procedure variable.

328 Procedures: Debugging Procedures R5000.0.2


Landmark Nexus® Technical Reference Manual

Chapter 12
Aquifers

Introduction

When modeling aquifers, Nexus always treats outer boundaries of a


reservoir model as sealing barriers to flow. The influx/efflux of fluids
from outside the grid is treated by source/sink terms.

There are two methods available in Nexus to model aquifer influx/


efflux resulting from changes in reservoir conditions. The first
approach uses one of two analytical models which predict the idealized
aquifer response. The second approach extends the grid system to cover
the aquifer with the reservoir. In the latter case, interaction between the
reservoir and the aquifer automatically is taken into account. Each of
these methods has positive and negative aspects. The analytical
methods are easy to use. They are computationally efficient and do not
require a significant amount of additional computer memory. However,
the analytical models may be too restrictive because of assumptions
and simplifications. The grid extension approach has the possible
disadvantage of requiring significantly more memory and
computations.

R5000.0.2 Aquifers: Introduction 329


Nexus® Technical Reference Manual Landmark

Analytic Model — The Carter-Tracy Aquifer

The Carter-Tracy1 aquifer analytic model may be applied to an aquifer


of radial or linear geometry. The aquifer and the reservoir communicate
through the boundary AB as shown in in Figure 12.1.

ra

A Aquifer
re
Reservoir

 B

Figure 12.1: Aquifer Geometry

The water influx from the aquifer into the reservoir is the response to
pressure changes at this boundary. Water flow in the aquifer is
described by Equation 12-1 with the initial and boundary conditions:

 w c t p - p
1- ----
-------------- ------ = -- r ------ 12-1
k t r r r
12-2
p t=0 = pi

12-3
p r = re
= pe  t 

12-4
p
------ = 0
r r = ra

Here,  is aquifer porosity, w is water viscosity, ct is aquifer total


compressibility, and k is aquifer permeability.

Van Everdingen and Hurst2 derived the following superposition form of


the solution of the above problem:

330 Aquifers: Analytic Model — The Carter-Tracy Aquifer R5000.0.2


Landmark Nexus® Technical Reference Manual

12-5
td
dp e  t d1 
W  t  = – B  -------------------- Q  t d – t d1 dt d1
dt d1
0

where

12-6
t d = ---t-
t0

12-7
2
 w ct re
t 0 = -----------------------  RADIAL 
2 k

12-8
2
 w ct L
t 0 = -----------------------
-  LINEAR 
2 k

12-9
2
h c t 
re
B = ------------------------
-  RADIAL 
1

12-10
wL h c
B = -----------------------t-  LINEAR 
1

In Equation 12-5, W(t) is the cumulative water influx from the aquifer
and Q(td) is the standard function derived by Van Everdingen and
Hurst, which gives the cumulative influx in the case of the unit pressure
change at the boundary r = re. Parameter t0, which is given by
Equations 12-7 and 12-8, is the aquifer time constant. It is used to
define the dimensionless time td according to Equation 12-6. Parameter
B, as defined by Equations 12-9 and 12-10, is the aquifer capacity
parameter. Equation 12-9 contains two constants: h is the aquifer
thickness and  is the angle (in radians) subtended by the aquifer
(Figure 12.1). The  and  parameters are unit-dependent constants.
The terms w and L represent the width and length for the linear aquifer
case.

R5000.0.2 Aquifers: Analytic Model — The Carter-Tracy Aquifer 331


Nexus® Technical Reference Manual Landmark

Carter and Tracy derived an approximation of the solution


(Equation 12-5). This approximate solution of the problem
(Equations 12-1 through 12-4) is given by:

12-11
B  p i – p  t + t   – W  t P' d  t d + t d 
W  t + t  = W  t  + ------------------------------------------------------------------------------------------- t d
P d  t d + t d  – t d P' d  t d + t d 

Here, t is the timestep, td is the dimensionless timestep, and Pd(td) is


a function derived by Van Everdingen and Hurst.

The Carter and Tracy solution does not require integration and
therefore is more efficient. In the Nexus implementation of the Carter
and Tracy solution, the user may provide the dimensionless pressure
function Pd(td) in a tabular form through input data. One can find
tabulated pressure functions Pd(td) for finite aquifers in the published
literature.4 The dimensionless pressure function for infinite radial
aquifer4 is given in the table below. This is the default table that will be
used if the user does not provide an input table.

332 Aquifers: Analytic Model — The Carter-Tracy Aquifer R5000.0.2


Landmark Nexus® Technical Reference Manual

tD pD tD pD
.01 0.112 10 1.651
.05 0.229 15 1.829
.1 0.315 20 1.960
.15 0.376 25 2.067
.2 0.424 30 2.147
.25 0.469 40 2.282
.3 0.503 50 2.388
.4 0.564 60 2.476
.5 0.616 70 2.550
.6 0.659 80 2.615
.7 0.702 90 2.672
.8 0.735 100 2.723
.9 0.772 150 2.921
1.0 0.802 200 3.064
1.5 0.927 250 3.173
2.0 1.020 300 3.262
2.5 1.101 400 3.406
3.0 1.169 500 3.516
4.0 1.275 600 3.608
5.0 1.362 700 3.684
6.0 1.436 800 3.750
7.0 1.500 900 3.809
8.0 1.556 1000 3.860
9.0 1.604
Dimensionless Pressure Function for Infinite Radial Aquifer4

R5000.0.2 Aquifers: Analytic Model — The Carter-Tracy Aquifer 333


Nexus® Technical Reference Manual Landmark

Analytical Model - The Fetkovich Aquifer

The Fetkovich aquifer model3 is a more direct computational method


of performing water influx calculations. In this approach the flow of
aquifer water into a hydrocarbon reservoir is modeled in precisely the
same way as the flow of oil from a reservoir into a well. An inflow
equation of the form

12-12
dW e
---------- = J  p a – p 
dt

is used where,

J = aquifer productivity index,

p = pressure at the oil or gas water contact,

p a = average pressure in the aquifer.

The water influx is evaluated using the simple aquifer material balance

12-13
We = ct Wi  pi – pa 

in which,

p i = the initial pressure in the aquifer and reservoir,

c t = the total compressibility,

W i = initial aquifer water in place.

This balance can be alternatively expressed as

12-14
W
p a = p i  1 – -------e-
W ei

where

12-15
W ei = c t W i p i

334 Aquifers: Analytical Model - The Fetkovich Aquifer R5000.0.2


Landmark Nexus® Technical Reference Manual

is defined as the initial amount of encroachable water and represents


the maximum possible expansion of the aquifer. Substituting the
average aquifer pressure expression into the inflow equation results

12-16
dW e  We 
---------- = J p i  1 – --------  – p
dt W ei

After manipulation, it can be shown that


12-17
Jp i t
– ----------
-
W ei  W ei 
W  t  = --------  P a – P n   1 – e 
Pi  

Pa is evaluated from Equation 12-14 and


12-18
 t  + p  t + t -
Pn = p-------------------------------------
2

R5000.0.2 Aquifers: Analytical Model - The Fetkovich Aquifer 335


Nexus® Technical Reference Manual Landmark

Numerical Aquifer

In the numerical aquifer treatment, the grid system is extended to cover


the aquifer with the reservoir. This can be done in several ways. One
way is to extend the reservoir grid system as shown in Figure 12.2 to
cover both the reservoir and aquifer.

Aquifer

Reservoir

Figure 12.2: Natural Extension of Reservoir Grid

A model with the naturally extended grid system may require a


significant number of additional gridblocks in the model. This
significantly increases memory and CPU requirements.

Another method is to represent the aquifer by several blocks with large


pore volumes which are connected to reservoir blocks around the edges
of the grid as shown in Figure 12.3. This is done by defining
nonstandard connections between gridblocks.

Aquifer

Reservoir

Figure 12.3: Aquifer with Arbitrary Connected Blocks

Improvements made to the Nexus unstructured grid solver make solver


considerations for the choice between these methods less important
than they were to VIP, where the first method was better for the solver.

336 Aquifers: Numerical Aquifer R5000.0.2


Landmark Nexus® Technical Reference Manual

References

1. Carter, R. D. and Tracy, G. W., “An Improved Method for Calculating Water
Influx,” Trans. AIME, 219, 415-417.

2. Van Everdingen, A. F. and Hurst, W., “The Application of the Laplace


Transformation to Flow Problems in Reservoirs,” Trans. AIME, 186, 305.

3. Fetkovitch, M.J., “A Simplified Approach to Water Influx Calculations-Finite


Aquifer Systems”, J.Pet. Tech., July,1971, 814-828

4. Bradley, H.B., Petroleum Engineering Handbook, First Printing, Chap. 38, Society
of Petroleum Engineers, 1987

R5000.0.2 Aquifers: References 337


Nexus® Technical Reference Manual Landmark

338 Aquifers: References R5000.0.2


Landmark Nexus® Technical Reference Manual

Appendix A: Corner-Point Geometry

Mapping of Gridblock to Unit Cube

When the user chooses the corner-point geometry option, the location
of the eight corner points of each gridblock is quite arbitrary. In order to
calculate bulk volumes, block centers, and transmissibilities, Nexus
maps each gridblock into a unit cube. That mapping is described here.

Two-Dimensional Mapping
To introduce the mapping, let us first consider the simpler two-
dimensional problem of mapping an arbitrary quadrilateral in the x-y
plane into a unit square in the u-v plane, as shown in Figure A-A.1.

Figure A.1: Mapping of Quadrilateral to Unit Square

Let

x = x 1 +  x 2 – x 1 u +  x 4 – x 1 v +  x 1 + x 3 – x 2 – x 4 uv A-1

y = y 1 +  y 2 – y 1 u +  y 4 – y 1 v +  y 1 + y 3 – y 2 – y 4 uv A-2

It is easy to see that u = 0 corresponds to side 1-4, u = 1 to side 2-3, v =


0 to side 1-2, and v = 1 to side 4-3.

The differential area dx dy is given by:

dx dy = J(u,v)du dv

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 339


Nexus® Technical Reference Manual Landmark

where J(u,v) is the so-called Jacobian of the mapping of the unit square
back onto the quadrilateral. It may be considered to be a scaling, or
stretching, factor of the mapping. It is given by the determinant of a
certain matrix of partial derivatives, as follows:

A-3
x- x
----- -----
  x y  u v
J  u v  = ---------------- =
  u v  y- y
----- -----
u v

where, from Equations A-A-1 and A-A-2,

x
------ =  x 2 – x 1  +  x 1 + x 3 – x 2 – x 4 v
u

x
----- =  x 4 – x 1  +  x 1 + x 3 – x 2 – x 4 u
v

y- =  y – y  +  y + y – y – y v
----- 2 1 1 3 2 4
u

y
----- =  y 4 – y 1  +  y 1 + y 3 – y 2 – y 4 u
v

Thus, the area of the quadrilateral may be obtained by integrating the


Jacobian over the unit square:

A-4
1 1

A =   J  u v du dv
u=0 v=0

The centroid, or center of gravity, may be obtained by the integrals:

A-5
1 1
1
x c = ---
A   x  u v  J  u v du dv
u=0 v=0

340 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

A-6
1 1
1
y c = ---
A   y  u v  J  u v du dv
u=0 v=0

where x(u,v), and y(u,v), correspond, respectively, to Equations A-A-1


and A-A-2.

Three-Dimensional Mapping

Figure A.2: The Eight Corners of a Gridblock

In Nexus’s corner-point option, each gridblock is a solid defined by the


location of its eight corners, as shown in Figure A-A.2. Analogously to
Equations A-A-1 and A-A-2, the block can be mapped to a unit cube by
the following equations:

A-7
x = p 1 x u + p 2 x v + p 3 x w + p 4 x uv + p 5 x vw + p 6 x uw + p 7 x uvw + p 8 x

A-8
y = p 1 y u + p 2 y v + p 3 y w + p 4 y uv + p 5 y vw + p 6 y uw + p 7 y uvw + p 8 y


z = p 1 z u + p 2 z v + p 3 z w + p 4 z uv + p 5 z vw + p 6 z uw + p 7 z uvw + p8 z

where A-9

p 1 x = x 2 – x 1 p 2 x = x 4 – x 1 p 3 x = x 5 – x 1

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 341


Nexus® Technical Reference Manual Landmark

p 4 x = x 1 + x 3 – x 2 – x 4 p 5 x = x 1 + x 8 – x 4 – x 5 p 6 x = x 1 + x 6 – x 2 – x 5

p 7 x = x 2 + x 4 + x 5 + x 7 – x 1 – x 3 – x 6 – x 8 p 8 x = x 1

This works similarly for p1,y , ..., p8,y in terms of the y‘s, and p1,z , ...,
p8,z in terms of the z‘s. It can be seen that u = 0 corresponds to face 1-4-
8-5, u = 1 to face 2-3-7-6, v = 0 to face 1-2-6-5, v = 1 to face 4-3-7-8,
etc.

The differential volume dx dy dz in “real” space is given by:

dx dy dz = J(u,v,w) du dv dw

where the Jacobian J(u,v,w) is given by


A-10
x- x x-
----- ----- ------
u v w
  x y z  y y y
J  u v w  = ----------------------- = ------ ----- -------
  u v w  u v w
z z z
------ ----- -------
u v w

The partial derivatives are given by:

A-11
x- = p + p v + p w + p vw
----- 1 x 4 x 6 x 7 x
u

A-12
x
----- = p 2 x + p 4 x u + p 5 x w + p 7 x uw
v

A-13
x- = p + p v + p u + p uv
------ 3 x 5 x 6 x 7 x
w

Similarly fory/u, z/u, and so forth.

342 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Volumetric Calculations
The bulk volume of the gridblock is obtained by integrating the
Jacobian of Equation A-A-10 over the unit cube:

A-14
1 1 1

V =    J  u v w du dv dw
u=0 v=0 w=0

The centroid, or block center, is obtained by:

A-15
1 1 1
1
x c = ---
V    x  u v w  J  u v w du dv dw
u=0 v=0 w=0

A-16
1 1 1
1
y c = ---
V    y  u v w  J  u v w du dv dw
u=0 v=0 w=0

A-17
1 1 1
1
z c = ---
V    z  u v w  J  u v w du dv dw
u=0 v=0 w=0

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 343


Nexus® Technical Reference Manual Landmark

Finally, let us consider how we might obtain the “average” thickness of


the block in the vertical direction.

Figure A.3: Elemental Tube for Determining Thickness

In Figure A-A.3, consider the elemental tube (shown by dashed lines)


bounded by u, u+du, v, and v+dv. The thickness of the tube, i.e., its
vertical extent, is z(u,v,1) - z(u,v,0).

The volume of the tube is:

 J  u v w dw du dv
w=0

Thus the volume-averaged thickness of the entire block is

1 1 1
1
DZ = ---
V    z  u v 1  – z  u v 0    J  u v w dw du dv
u=0 v=0 w=0

which may be rearranged to the final form:

A-18
1 1 1
1
DZ = ---
V     z  u v 1  – z  u v 0   J  u v w du dv dw
u=0 v=0 w=0

344 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Figure A.4: Elemental Tube for Determining DX

Now we consider how we might obtain the average distance from the
left face to the right face of the block. In Figure A-A.4, consider the
element tube bounded by v, v+dv, w, and w+dw. The length of that tube
from the left face to the right face is
A-19
2 2 2
  x  1 v w  – x  0 v w   +  y  1 v w  – y  0 v w   +  z  1 v w  – z  0 v 2   

Define the distance between two points by

2
D   u 2 v 2 w 2   u 1 v 1 w 1   =   x  u 2 v 2 w 2  – x  u 1 v 1 w 1  
12
2 2
+  y  u 2 v 2 w 2  – y  u 1 v 1 w 1   +  z  u 2 v 2 w 2  – z  u 1 v 1 w 1   

Then the expression in Equation A-A-19 for the length of the tube can
be written

D   1 v w   0 v w  

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 345


Nexus® Technical Reference Manual Landmark

Thus the volume averaged distance from the left face to the right face is

1 1 1
1
DX = ---
V   D   1 v w   0 v w    J  u v w dw dudv
v=0 w=0 w=0

which may be rearranged to the final form


A-20
1 1 1
1
DX = ---
V    D   1 v w   0 v w  J  u v w du dv dw
u=0 v=0 w=0

Similarly,
A-21
1 1 1
1
DX = ---
V    D   u 1 w   u 0 w  J  u v w du dv dw
u=0 v=0 w=0

Integration by Gaussian Quadrature


A single integral may be evaluated quite accurately by the N-point
summation:

A-22
1 N

 f  x dx   wk f  xk 
x=0 k=1

for properly chosen values of wk and xk. The wk are weights and the xk
are Gauss points, or quadrature points, at which the function f(x) is
evaluated. For N=1, 2, or 3, the weights and Gauss points are given by:

N = 1: w 1 = 1 x1 = 1
---
2

1 1-  x = 1---  1 + ------


N = 2: w 1 = w 2 = 1
--- x 1 = ---  1 – ------ 1-
2 2  3  2 2  3

5 1 1
N = 3: w 1 = w 3 = ------ w 2 = 4
--- ---   x 2 = 1--- x 3 = ---  1 + 3
x 1 = ---  1 – 3 --- 
18 9 2 5 2 2 5 

346 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

If f(x) is a polynomial of degree d, then Gaussian quadrature is exact if


d 2N-1. Thus 2-point quadrature is exact for a cubic, and 3-point
quadrature is exact for a fifth-degree polynomial.

The triple integrals of the previous section may be approximated by the


triple summations:
A-23
1 1 1 Ni Nj Nk

   f  u v w du dv dw     wi wj wk f  u i v j w k 
u=0 v=0 w=0 i=1 j=1 k=1

where Ni, Nj, and Nk are, respectively, the number of quadrature points
in the x-, y-, and z-directions. These numbers are entered on the
CORNER card as iquads, jquads, and kquads.

It turns out that the integrands within all the triple integrals of the
preceding section for volumetric calculations are composite
polynomials of low enough degree that iquads = jquads = kquads = 2
provides exact integration. This is true no matter how arbitrarily the
corner points are located.

Of course, if the gridblocks are simple rectangular parallelepipeds,


iquads = jquads = kquads = 1 would be sufficient, but then there would
be little point in using the corner-point option.

However, the story is different for evaluating transmissibilities. We


shall see later that if the harmonic integration option is chosen, the
integrands are no longer polynomials. In that case, the user should
specify iquads = jquads = kquads = 3 to get the most accurate
integration.

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 347


Nexus® Technical Reference Manual Landmark

Transmissibility Calculations
For corner-point geometry, Nexus provides two options for calculating
the transmissibilities between adjacent gridblocks: the standard Nexus
option that uses “harmonic integration” (HARINT), and the
NEWTRAN option, which is similar to the corresponding ECLIPSE
technique. Both of these are described below, first for the simpler 2-D
case and then for the full 3-D case.

Calculation of Transmissibility in 2D

Simplest Case: Orthogonal Grid

Figure A.5: Orthogonal Gridblocks

Consider the two rectangular blocks in Figure A-A.5, where the points
A and B are the centroids of their respective blocks. Each block has its
own permeability, kA or kB. As this may be considered to be flow
through two resistances in series, the transmissibility from A to B is
given by:
A-24
1
T AB = -------------------
1 1
------ + ------
TA TB

where

T A = k A z W  L A

and

348 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

T B = k B z W  L B

In this simple 2D case, z, which is perpendicular to the plane of


Figure A-A.5, is considered constant. Note that TA may be considered
to be the “half-block transmissibility” from the point A to the right face
of block A.

Non-Orthogonal Grid with Parallel Sides

LAB

Figure A.6: Nonorthogonal Gridblocks with Parallel Sides

In Figure A-A.6, we consider the somewhat more general case where


the gridblocks are not orthogonal, but the layer boundaries are parallel.
Equation A-A-24 still holds, with TA again being given by:

T A = k A z W  L A

We note that LA is now specifically the distance from the centroid A to


the point C, where C is the center of the interface between blocks A and
B. If LAB is the length of that interface, and if  is the angle between the
interface and the parallel sides, then clearly:

W = L AB sin 

Alternatively, let n be the unit vector normal to the interface at point C,


and let  be the angle between line AC and the normal n. As  and 
are complementary angles, then:

W = L AB cos 

and

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 349


Nexus® Technical Reference Manual Landmark

A-25
T A = k A z L AB cos   L A

We shall see that it will be also useful to express this as the following
resistance from the point A to the right face:

A-26
LA
1- = ------------------------------------
----- -
TA k A z L AB cos 

Non-Orthogonal Grid with Non-Parallel Sides

Figure A.7: Gridblockwith Non-Parallel Sides

In Figure A-A.7, we show the more general case of a single gridblock


in which none of the sides are parallel. Point A is still the centroid, and
again we wish to calculate the half-block transmissibility from point A
to the right face. For this purpose, recognize that, in mapping the
gridblock to a unit square, the variable u represents a fractional distance
from the left face to the right face. Let point 5 be a point moving along
the upper edge, such that

x 5  u  = x 1 + u  x 2 – x 1  y5  u  = y1 + u  y2 – y1 

and let point 6 be a similar point moving along the lower edge, such
that:

x 6  u  = x 3 + u  x 4 – x 3  y6  u  = y3 + u  y4 – y3 

350 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Then the line L56(u), connecting points 5 and 6, is a moving line that
slices the block as shown in Figure A-A.8.

Figure A.8: Slice Parametrized by u

In particular, u = 0 corresponds to the left edge, u = 1 corresponds to the


right edge, and uc is the value of u corresponding to the line L56 that
passes through the centroid. (Note that uc is not necessarily equal to
0.5!)

We may conceptualize the half-block transmissibility from the slice


going through the centroid to the right face as being the sum of
transmissibilities of a collection of tubes formed by lines of constant v,
as shown in Figure A-A.9.

Figure A.9: Collection of Tubes and Slices

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 351


Nexus® Technical Reference Manual Landmark

In Figure A-A.9, we also show a sequence of slices formed by lines of


constant u. Let us call the intersection of a tube and a slice a chunk. A
typical chunk is shown in Figure A-A.10.

Figure A.10: Tube, Slice, and Chunk

By analogy with Equation A-A-26, the resistance of that typical chunk


is given by:

s
--------------------------------------------------
-
k A z L cos   u v 

wheres is the distance along the tube lying within the slice, L is the
distance along the slice within the chunk, n(u,v) is the normal to the
slice, and (u,v) is the angle between the tube and that normal. But the
area of the chunk is given by A = z L, so the resistance of the
typical chunk can be expressed somewhat more succinctly as:

s
------------------------------------------
k A A cos   u v 

352 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

In the limit, then, the resistance of the tube from the slice going through
the centroid to the right face is given by the integral:

ds-
u=1 -----  u v 
1- = du
-----
TA  ------------------------------------------
k A A cos   u v 
du
u=u c

Because of the appearance of the area A in the denominator, this


integral is referred to as a “harmonic integral”, by analogy to the
harmonic series  1--- , where the term n appears in the denominator.
n

Finally, the transmissibility of all the tubes in parallel is given, in the


limit, by:
A-27
1
1
TA =  --------------------------------------------------------------
u=1 ds
- dv
v=0
------  u v 
du
 -----------------------------------------
dA
- du
u = u c A dv k ------
- cos   u  v 

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 353


Nexus® Technical Reference Manual Landmark

Alternate Approach for Gridblock with Non-Parallel Sides

Figure A.11: Gridblockwith Nonparallel Sides

Consider the gridblock with nonparallel sides that is shown in


Figure A-A.11. We wish to calculate the half-block transmissibility
between the centroid and the right face of that block. Again, point A is
the centroid; point C is the center of the right face. The right face is the
interface between block A and block B (which is not shown). Let AC
be the vector from A to C. Let CD be a vector normal to the right edge,
whose length is equal to the length of the right edge, that is:

CD = L AB

Again, let  be the angle between AC and CD .

Now, while Equation A-A-25 was derived for a gridblock with parallel
sides, as in Figure A-A.6, it can also be applied to this more general
situation. Thus we can write

L AB cos  L A L AB cos 
T A = k A z ---------------------- = k A z ----------------------------
-
LA L 
2
A

354 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

where L A = AC . Then we can write the half-block transmissibility as:

AC CD cos -
T A = k A z -----------------------------------
2
AC

Now, the scalar (also known as inner or dot) product of two vectors a
and b having angle  between them can be expressed in the following
two ways:

a  b = a b cos 
a  b = ax bx + ay by

where ax and ay are the x- and y-components of the vector a, and bx and
by are the x- and y-components of the vector b, respectively. Thus we
see that the half-block transmissibility can also be expressed as:

 xC – xA   xC – xD  +  yC – yA   yC – yD 
T A = k A z ------------------------------------------------------------------------------------------------
2 2
-
 xC – xA  +  yC – yA 

But, since vectors EF and CD are perpendicular,

 xC – xD  =  yE – yF  = Lx
 yC – yD  =  xF – xE  = Ly

Then

A-28
Lx  xC – xA  + Ly  yC – yA 
T A = k A z --------------------------------------------------------------
2 2
-
 xC – xA  +  yC – yA 

This is the 2-D version of NEWTRAN.

The quantity Lx is to be interpreted as the x-projection of the interface


between blocks A and B on the y-axis. The quantity Ly can be
interpreted as the y-projection of that interface on the x-axis. It is
important that the correct signs of Lx and Ly be used. Thus, in Figure A-
A.11, Lx is positive while Ly is negative.

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 355


Nexus® Technical Reference Manual Landmark

Calculation of Transmissibility in 3D (HARINT)


Equation A-A-27, which was derived as the 2D version of HARINT,
may be extended to the general 3D case, where the eight corners of the
gridblock are completely arbitrary. However, considerable care must be
taken in interpreting and calculating the various terms in it. In doing so,
we will be making use of the mapping of the gridblock into the unit
cube, as described in the "Three-Dimensional Mapping"section.

That extended equation is, then:


A-29
1 1
1
TA =  ----------------------------------------------------------------------------
u=1 ds-
dv dw
v=0 w=0
-----  u  v  w 
du
 -------------------------------------------------------
dA -
- du
u = u c k A dv dw cos   u v w 
--------------

Tubes and Slices in 3D


In Figure A.2 on page -341, let Equations A-A-7, A-A-8, and A-A-9 be
the functions that map the coordinates of real space (x,y,z) into the
coordinates of the unit cube (u,v,w). Tubes are formed by surfaces of
constant v intersecting surfaces of constant w. On the other hand, any
surface of constant u over the range

0v1  0w1

defines a slice of the gridblock (in real space) that corresponds to the
slice shown in Figure A-A.8. In general, the slice will not be a planar
surface but, rather, a bilinear surface.

356 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Differential Area of the Slice


The differential area of this nonplanar slice is computed by1:

A-30
dA = D  u v w dv dw

where
A-31
2 2 2
D  u v  w  = J xy + J yz + J zx

with
A-32
x
----- y
----- y
----- z
----- z
----- x
-----
J xy =
v v ; J yz =
v v ; J zx =
v v
x- y- y- z- z- x-
------ ------ ------ ------ ------ ------
w w w w w w

The partial derivatives are obtained from Equations A-A-7, A-A-8,


and A-A-9 by:

x
----- = p 2 x + p 4 x u + p 5 x w + p 7 x uw
v
x
------- = p 3 x + p 5 x v + p 6 x u + p 7 x uv
w

Similarly for ¹y / v, z v, and so forth.

Location of Centroid, in Real Space, and in the Unit Cube


The coordinates of the centroid in real space, xc , yc , zc , are found by
application of Equations A-A-15, A-A-16, and A-A-17. Finding the
coordinates of that centroid in the unit cube, uc, vc, wc, involves
inverting the mapping functions in Equations A-A-7, A-A-8, and A-A-
9. This nontrivial task is accomplished by a Newtonian iteration, which
converges very rapidly. Prior to the first iteration, the first guess is uc =
vc = wc = 0.5. After convergence, the following is satisfied:

x c = x  u c v c w c 
y c = y  u c v c w c 
z c = z  u c v c w c 

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 357


Nexus® Technical Reference Manual Landmark

where x(u,v,w), y(u,v,w), and z(u,v,w) are the polynomials defined in


Equations A-A-7, A-A-8, and A-A-9.

Evaluation of Arc Length Derivative


Along each tube of constant v and w, the derivative of arc length is
given by:

A-33
2 2 2
ds-  dx   dy   dz 
-----  u v w  =  -------- +  -------- +  --------
du  du   du   du 

The partial derivatives in Equation A-A-33 are given above in


Equation A-A-11.

Evaluation of cos  (u,v,w)


The only quantity in the integrand of Equation A-A-29 now left to be
evaluated is the cosine of , the angle between the tube and the normal
to the slice. Let p be a vector along the tube, and n be a vector normal
to the slice. Then, from the two ways of expressing the scalar (or dot)
product of the two vectors in 3D:

p  n = p n cos 

p  n = px nx + py ny + pz nz

we have

px nx + py ny + pz nz
cos  = -------------------------------------------
-
p n

or
A-34
px nx + py ny + pz nz
cos  = -----------------------------------------------------------------------
-
2 2 2 2 2 2
 px + py + pz   nx + ny + nz 

The components of p are clearly equal to the derivatives of x, y, and z


with respect to u. That is:

358 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

x- ; p = -----
y- ; p = -----
z-
p x = ----- y z
u u u
The normal to the slice is obtained by first finding the equation for the
plane in real space tangent to the slice where the tube intersects it. To
get this equation, we find two lines (or vectors) in the slice through the
point u, v, w (in the unit cube) that correspond to the intersection point
x, y, z (in real space). See Figure A-A.12.

u=constant

Figure A.12: Lines a and b Defining Plane Tangent to Slice

Let line a be at constant u and v; let line b be at constant u and w. Then


the components of a and b are:

x y z-
a x = ------- ; a y = ------- ; a z = ------
w w w

x y z
b x = ----- ; b y = ----- ; b z = -----
v v v

The equation of a plane through the arbitrary point x1, y1, z1, parallel to
a and b is2:

x – x1 y – y1 z – z1
ax ay az = 0
bx by bz

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 359


Nexus® Technical Reference Manual Landmark

If the equation for that plane is expressed as:

Ax + By + Cz = D

then A is the cofactor of (x-x1), B is the cofactor of (y-y1), and C is the


cofactor of (z-z1). Thus:

ay az y z z y
A = = ------- ----- – ------- -----
by bz w v w v

ax az z x x z
B = – = ------- ----- – ------- -----
bx bz w v w v

ax ay x y y x
C = = ------- ----- – ------- -----
bx by w v w v

Note that A, B, and C are equal, respectively, to -Jyz, -Jzx, and -Jxy of
Equation A-A-32. But the quantities A, B, and C are also equal to the
components of the normal:

nx = A ; ny = B ; nz = C

Now we have all the quantities necessary to compute cos u,v,wby


Equation A-A-34. We also have all the quantities necessary to compute
the integrals of Equation A-A-29:
A-35
1 1
1
TA =   -------------------------------------------------------------------------------------
u=1 ds
- dv dw
v=0 w=0
------  u v w 
du
 ----------------------------------------------------------------
k A D  u v w  cos   u v w 
- du
u = uc

360 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Half-Block Transmissibility to Other Faces


All the above discussion of HARINT has dealt with the calculation of
half-block transmissibility from the slice through the centroid to the
right face. To get the half-block transmissibility from the slice through
the centroid to the left face, it suffices to change the limits of
integration In Equation A-A-35 as follows:
A-36
1 1
1
TA =   -----------------------------------------------------------------------------------
u = uc ds
- dv dw
v=0 w=0
------  u v w 
du
 ----------------------------------------------------------------
k A D  u v w  cos   u v w 
- du
u=0

To get half-block transmissibilities from the slice through the centroid


to the front and back faces, it suffices to rotate the gridblock about the
z-axis, and use the program that calculates the integrals of
Equations A-A-35 and A-A-36. Finally, to get half-block
transmissibilities from the slice through the centroid to the top and
bottom faces, it suffices to rotate the gridblock about the y-axis, and
again use that same program.

Calculation of Transmissibility in 3D by the NEWTRAN Option


Equation A-A-19 for the half-block transmissibility is easily
generalized to the 3D case as follows:
A-37
Ax  xC – xA  + Ay  yC – yA  + Az  zC – zA 
T A = k A -------------------------------------------------------------------------------------------------
2 2 2
 xC – xA  +  yC – yA  +  zC – zA 

Point A is again the centroid of the gridblock, while point C is to be


interpreted now as the center of the right face. The four corners of the
right face are projected onto each of the three coordinate planes, as
shown in Figure A-A.13. Ax is the area of the projection onto the y-z
plane, Ay is the area of the projection onto the x-z plane, while Az is the
area of the projection onto the x-y plane. It is even more important in
this 3-D case that considerable care be taken to get the correct sign of
these area terms.

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 361


Nexus® Technical Reference Manual Landmark

Figure A.13: Projections of Right Face onto the Three Coordinate Planes

362 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Half-Block Transmissibility to All Six Faces


While Equation A-A-37 was described as the equation for the half-
block transmissibility from the centroid to the right face, actually it
applies to all six faces. Point C is now interpreted as the center of the
relevant face, while Ax, Ay , and Az are the areas of the projections of
that face. The sign of TA may turn out to be negative, so its absolute
value is used.

Calculation of Full Transmissibility Between Gridblocks

Unfaulted Case
As pointed out in the previous sections, the half-block transmissibility
from the centroid to all six faces is computed for each gridblock. These
must be combined to yield the full transmissibility between adjacent
gridblocks. For example, if gridblock B is to the right of gridblock A,
then the transmissibility between their centroids is:

1 -
TX AB = ------------------ A-38
1- + -----
----- 1-
TA TB
where TA is the half-block transmissibility from the centroid of block A
to the right face of block A, and TB is the half-block transmissibility
from the centroid of block B to the left face of block B. Equation A-A-
38 is, of course, the same as Equation A-A-24. Similar combinations
are made to calculate TY between two adjacent blocks in the same y-
row, and to calculate TZ between two adjacent blocks in the same
vertical column.

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 363


Nexus® Technical Reference Manual Landmark

Faulted Case

Figure A.14: Fault Block Connection

In the case of the FAULT option, the adjacent blocks may share only
part of the common face, as illustrated in Figure A-A.14. In this figure,
AA is the total area of the right face of block A, and is used in the
calculation of TA. Similarly, AB is the total area of the left face of block
B, and is used in the calculation of TB. The area of their mutual
intersection is AAB. Then Equation A-A-38 is modified as follows:
A-39
A AB
TX AB = -------------------
-
AA AB
------ + ------
TA TB

364 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Choice Between HARINT and NEWTRAN Options


The following 2D radial problem provides a test for comparing the
accuracy of the above two options for transmissibility. It involves a
four-block (2 x 2) model in which the corner points are given by

x ij = i cos   j – 1  

y ij = 3 + i sin   j – 1  

Figure A-A.15 shows this model for the particular case of  = 45°.

Figure A.15: Radial problem, with  = 45°

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 365


Nexus® Technical Reference Manual Landmark

It can be shown that if the grid were truly radial, rather than
approximated by this corner-point geometry, then the angular
transmissibility between Blocks 1 and 3 in Figure A-A.15 would be:

T 1 – 3 = z ln  2  1 
---------------------------
-


while that between Blocks 2 and 4 would be:

T 2 – 4 = z ln  3  2 
---------------------------
-


In addition, the radial transmissibility, between Blocks 1 and 2, as well


as between Blocks 3 and 4, would be:

 z  z
TR = ------------------------------------------------------------- = -----------------------
33 – 23 23 – 13 19  5
ln ----------------- – ln ----------------- ln -------------
33 – 22 22 – 12 73

NOTE:  in these equations is in radians.

These equations should hold in the limit as  is reduced to zero.

Results for the two options are shown in Figures A.16, A.17, and A.18.
In Figure A-A.16, the angular transmissibility between Blocks 1 and 3,
multiplied by /z, is plotted against ,and we see that HARINT
converges to the correct value for small , and is only a few percent
low for  as large as 20-30 degrees. NEWTRAN is considerably
poorer, and converges to an incorrect value. Similar results are shown
in Figure A-A.17 for the angular transmissibility between Blocks 3 and
4.

In Figure A-A.18, the radial transmissibility, divided by  x z, is


plotted against , and here we see that HARINT gives the correct
answer for all , while NEWTRAN does not.

It may be concluded that HARINT is clearly superior to NEWTRAN


and is therefore the option of choice. NEWTRAN is offered only as an
alternative option, to provide compatibility with the corresponding
technique in the ECLIPSE simulator. When that compatibility is not
required, HARINT is the recommended, and hence the default, option.

366 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Figure A.16: Comparison of HARINT and NEWTRAN for Angular Transmissibility


Between Blocks 1 and 2

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 367


Nexus® Technical Reference Manual Landmark

Figure A.17: Comparison of HARINT and NEWTRAN for Angular Transmissibility


Between Blocks 3 and 4

368 Corner-Point Geometry: Mapping of Gridblock to Unit Cube R5000.0.2


Landmark Nexus® Technical Reference Manual

Figure A.18: Comparison of HARINT and NEWTRAN for Radial Tranmissibility

R5000.0.2 Corner-Point Geometry: Mapping of Gridblock to Unit Cube 369


Nexus® Technical Reference Manual Landmark

References

1. Franklin, P., A Treatise on Advanced Calculus, John Wiley & Sons, New York,
1940, Page 375, Equation 110.

2. Recktorys, K., Survey of Applicable Mathematics, M.I.T. Press, Cambridge, Mass.,


1969, Page 240, Theorem 11.

370 Corner-Point Geometry: References R5000.0.2

You might also like