Professional Documents
Culture Documents
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:
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 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
Chapter 9: Tracers
Tracer Calculations .................................................................................................. 9-307
Chapter 1
Parallel Processing
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.
1. Divide all nodes into interior nodes (I) and boundary nodes (C).
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.
10. Factor color 2 and color 3 nodes with coefficients sent from color
1 nodes.
In the algorithm, I-C3 denotes the interior nodes that have connections
to local C3 nodes if C3 nodes exist in this grid.
Chapter 2
Solver
Introduction
Overview
2-1
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.
2-2
Arr xrk +1 = rrk
2-3
rrk +1/ 2 = rrk − Arr xrk +1
2-4
rnk +1/ 2 = − Anr xnk +1
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
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
2-7
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 ⎤ ⎡ rn0 ⎤
⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎣ ABn A BB ⎦ ⎣ xB ⎦ ⎣ rB0 ⎦
where
2-9
2-10
A Bn = ABn − ABR ARR
−1
ARn
2-11
A nB = AnB − AnR ARR
−1
ARB
2-12
2-13
−1 0
rn0 = rn0 − AnR ARR rR
2-14
−1 0
rB0 = rB0 − ABR ARR rR
CPR
CPR requires a pressure solution and an iterative method for the full
unknown set. The next two sections discuss the methods used for
these.
Pressure Solution
Incomplete LU factorization
Incomplete LU factorization is specified by SOLVER PRECON_ILU.
To improve performance of the preconditioner, we do two things:
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.
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.
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.
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.
Tolerances
∑ (r )
2
rk = i
k
2
i
Miscellaneous
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.
Chapter 3
PVT Representation
Introduction
For each of the fluid types the major calculations discussed are
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.
Water Properties
Note that this discussion in this section does not apply when gas
solubility is allowed in the water phase.
3-1
w ref
w = -------------- 1 + c w p – p ref
Bw
3-2
w = w ref 1 + wp p – p ref
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.
Surface gas
Reservoir gas
both based on Vor.. In summary, for each pressure stage, the DLE test
yields:
Rsd = (total standard volumes of gas evolved for this stage and all
subsequent stages)/ Vor
Bod = Vo / Vor
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
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 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.
3-5
g std
g = 178.0939 -------------
Bg
3-6
gstd
R go = 178.0939 ----------- R s
ostd
3-7
ostd 1 + R go
o = ----------------------------------
-
Bo
Oil and gas viscosity data are stored in their original state.
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
3-13
m g = m g – R go m o
3-14
m o = m o 1 + R go
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
3-19
V g R go
= – -------
-
mo g
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
3-23
mo + mg
V o = -------------------
-
o
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 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
3-28
gstd 1 + R og
g = 178.0939 -----------------------------------
Bg
1. Whitson, C. H. and Torp, S.B. "Evaluating Constant Volume Depletion Data", JPT,
(March 1983) 610; Trans., AIME, 275.
3-29
m o = o o m o + o g m g
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
3-36
1 + R go
m o = ------------------------------- m o – m g R og
1 – R go R og
3-37
mg 1
R go ------ --------
m o R og
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
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
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
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
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
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.
3-51
0.0056146 B g P o T s
Z g = ------------------------------------------------
-
Ps T
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.
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
3-53
or = ob B ob – G g
3-54
1 ps
G m = ------------------------------------------ --------- R s 1 – R s n
5.6146 652.428 RT s
3-55
B ob ob
z o = ----------------------
-
M ob
3-56
or
M or = -----------------
-
zo – Gm
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
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).
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
n–1
29. ps
G g I = --------------------------------------- ---------
5.6146 62.428 RT s Rs i – Rs i + 1 Gr i + 1
i=1
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
3-65
o I Bo I
M o I = -----------------------------------------
-
or M or + G m I
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
3-69
p I Mo I
Z o I = -----------------------------------------------------------------------
-
5.6146 62.428 o I RT
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:
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.
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).
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.
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
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
3-74
mh
h = ------------------
-
mh + ml
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.
doing each phase equilibrium calculation with a separate table and then
interpolating the result.
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.
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.
3-75
RT a
p = ----------- – -----------------------------------------------
v – b v + C1 b v + C2 b
3-76
2 2
R T ci
a i = ai i -------------
p ci
3-77
RT ci
b i = bi -----------
p ci
3-78
T ci
i = -------
T
3-79
2
i = 1 + m i 1 – T ri
where
3-80
m i = i – 0.176 i + 1.574 + 0.48
3-81
m i = i – 0.26992 i + 1.54226 + 0.37464 for all i
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
3-84
nc nc
a = xi xj 1 – ij ai aj
i = 1j = 1
For the mixture value of b, two possible mixing rules are available.
The default one is
3-85
nc
b = xi bi
i=1
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.
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
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.
3-95
v = ZRT
-----------
p
3-96
nc
v corrected = v – xi ci
i=1
3-97
ci = bi si
3-98
f g i = f o i
3-99
f j i
j i = ----------
-
x j i p
3-100
p RT
RT ln i = ni – ------
V
- dV – RT ln Z
V
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
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.
3-103
*
H 1- v p
– H - = Z – 1 + ------
RT T
---------------- T – p dv
RT v
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
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
or
3-112
–4 0.625
U 5i = 1.778 10 4.58T ri – 1.67 if T ri 1.5
Constant Default
LBC1 0.1023
LBC2 0.023364
LBC3 0.058533
LBC4 -0.040758
LBC5 0.0093324
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.
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
13 13 3
T ci T cj 12
i j pci x x ------
- + ------
p cj
- 1 – X ij T ci T cj
T cm = i-------------------------------------------------------------------------------------------------------------------------------------
=1 j=1
nc nc
13 13 3
T ci T cj
i j pci x x ------
- + ------
p cj
-
i=1 j=1
3-115
n n
13 13 3
8 T ci T cj 12
x i x j ------
p ci
- + ------
p cj
- T ci T cj
p cm i=1 j=1
= -------------------------------------------------------------------------------------------------------------------
-
n n 2
13 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.
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
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
3-121
P P co T T co
o ---------------- ---------------
P cm T cm
r = ----------------------------------------------
-
co
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 13 23
o T = b1 T + b2 T + b3 T + b4 + b5 T + b6 T
43 53
+ 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 – ----------
32 T T
T
By default:
j1 = 1.035060586x10
j2 = 1.7571599671x10
j3 = 3.0193918656x103
j4 = 1.8873011594x102
j5 = 4.2903609488x10-2
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 – ----------
32 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
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
3-131
T = T – T F
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.
3-132
f o i = f g i i = 1 nc
3-133
nf
1 – f------
2
g i
f
o i
- TOL
i=1
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
3-136
zi
x i = --------------------------------
fv Ki – 1 + 1
3-137
yi = Ki xi
3-138
n f o i
n
n+1
Ki = K i -------
f g i
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
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.
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
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.
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̃
3-146
d1 0
D̃ = : .d i :
0 d nc
If we define
3-147
nc
Qk = x i q k i
i=1
3-148
nc
2
a = dk Qk
k=1
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.
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.
3-152
ln x i + ln i x – ln z i – ln i z = k
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.
4
x
2
x
3
x
x 1
T or x
3-153
T ci
p ci exp 5.37 1 + i 1 – ------ -
T
K i = ---------------------------------------------------------------------------
p
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.
target pressure
T or x
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.
T or x
There are five possible mechanisms that control the gridblock choice.
These are all specified by the TRANSITION keyword under the
EOSOPTIONS keyword.
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:
3-156
nc
xi – yi xi
i--------------------------------
=1
nc
- TCRIT
2
xi
i=1
3-157
B ij = ij + n i n j ln i
nj
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.
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 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.
3-158
nc
zi Vci Tci
T pc = i---------------------------
=1
nc
-
zi Vci
i=1
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.
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.
Vapor
Stream
Feed
Stage Stage Stage Stage
1 2 3 Ns
Liquid
Stream
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
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.
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
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
3-166
T
q gas q gas
N 1 1 N 1 nc
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.
The following set of rules applies to both the standard temperature and
standard pressure.
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.
• 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 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.
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
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:
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
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.
3-169
nc
1 – FTi xi Mi
i=1
1 = ------------------------------------------
nc
1 – F Ti x i M i
--------------------------------
0.9991 i
-
i=1
where
3-170
nc
FC2 i xi Mi
i=1
w C2 = --------------------------------------------------------------------
nc
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
3-174
nc
FC1N2 i xi Mi
w C1N2 = i--------------------------------------
=1
nc
-
xi Mi
i=1
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
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
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
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
3-190
h = 0.005 t – 60
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.
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
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.
f i w = f i h 3-195
w i i w = y i i h 3-196
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.
References
1. Whitson, C. H. and Torp, S.B. "Evaluating Constant Volume Depletion Data", JPT,
(March 1983) 610; Trans., AIME, 275.
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.
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.
18. Li, C.C.: "Critical Temperature Estimation for Simple Mixtures", Can. J. Chem.
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.
21. Young, L.C. and Stephensen, R. E.: " A Generalized Compositional Approach for
Reservoir Simulator", SPEJ (Oct., 1983), 727; Trans., AIME, 275.
Chapter 4
Network Calculations
Introduction
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.
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.
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.
Targeting
one well. i.e., constraints should be used only in the linear series of
connections flowing to or from a single well.
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:
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.
• A specified value
• The sum of the potential flow rates of a specified phase in the list
of CALCCONS connections, evaluated at the conditions specified
by CALCCOND
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.
4-1
vi = ∑ qji − dmi * dtold
j
where
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
4-2
np nc
qv = ∑ ∑ dvdmij * vi
j =1 i =1
where
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
4-4
qt = qv + qm
where
qm is the make up rate to raise (or lower) the reservoir pressure from the
current pressure to the specified pressure
np
qm* = ( pv * cravg − ∑ dvdpj ) * dp / dt
j =1
where
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.
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.
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
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
4-6
nctrlcons
qi * = qt * qgi / ∑j =1
max(qgj , q min j )
where
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.
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.
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.
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.
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.
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.
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.
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
inflow_con
constrained_con control_con
split_con
control_con constrained_con
inflow_con
control_con constrained_con
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.
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:
L pipe length
4-8
g
Δp = − L sin
gc
where:
g gravitational constant
4-9
= S w w + So o + S g g
where:
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).
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.
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
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
4-12
c = 2* q lim − a
4-13
b = − ( q lim − c )
2
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 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.
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.
• ORKISZ - Orkiszewski.
Model Description
The pipe hydraulic models determine the pressure distribution (p(L))
along the pipe assuming that the following parameters are known:
4-14
dp g v dv f v 2
( L ) = − L sin − −
dL gc g c dL 2 g c d
where:
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
fluid density
⎛ 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
d pipe diameter.
4-15
d hyd = d outer − dinner
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
dp
( L)ΔL ≤ PRESIN , L − ΔL ≥ 0
dL
dp
5. Calculate a pressure gradient, ( L0.5 ) , at the middle of the
dL
interval, L , using the correlation.
0.5
dp
p ( L1 ) = p ( L) − ( L0.5 )ΔL
dL
4-16
⎡ dp dp ⎤ ( L − Ln +1 )
p ( Ln +1 ) − p ( Ln ) = − ⎢ ( Ln +1 ) + ( Ln ) ⎥ n , n = 1....N
N
⎣ dL dL ⎦ 2
Pump Model
The pump is assumed to be of the centrifugal kind with variable speed.
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
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.
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
Valve Model
The valve model determines the pressure drop from inlet to the outlet
of a valve assuming that the
4-18
pout − pin = −cvx ( x)qspabs (qsp ) /
where:
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.
Solution Algorithm
The solution procedure for determining the pressure drop in a valve is
as follows:
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.
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.
• 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).
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
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.
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.
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
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.
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
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.
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
WELLS
NAME STREAM BHDEPTH BHMD
Well1 PRODUCER 4950 5000
ENDWELLS
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
The input
WELLNODE
NODE WELL MD CONNECT
new_node well1 5360 NO
ENDWELLNODE
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.
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
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.
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.
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.
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
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.
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.
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
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.
WAG
WELL WSCUM GSCUM
I1 300 300
ENDWAG
CONSTRAINTS
I1 PMAX 8000.0 QGSMAX 2000 QWSMAX 1000
ENDCONSTRAINTS
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.
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.
Separation Nodes
4-24
np
4-25
N
∑F
n =1
nk = 1, k = 1...np
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
• The calculations are steady state. That is, there is no heat capacity
associated with the network components or the surroundings.
4-26
hi = ( SHCOIL * qoil + SHCGAS * qgas + SHCWAT * qwat ) * Ti
4-27
ninflow noutflow
∑
i =1
hi = ∑i =1
hi
where
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.
4-28
dh / dx = − htc * * d *(T − Tamb)
where
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.
Drilling Queues
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.
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.
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
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:
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.
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
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:
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.
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:
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.
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
Gaslift Optimization
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
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.
Connection3
(towards well head
or sink)
Connection 2
(gas lift
connection)
Connection 1
(from well)
subject to constraints,
lx x ux, 4-34
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.
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.
3. Solve the network with the allocated gaslift rates and other
allocated targets, finish the reservoir/network global Newton
iterations of current time step.
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.
4-36
F (u , ) = 0
4-37
F (u + u , + ) = 0
4-38
∂F ∂F
F (u , ) + u + = 0
∂u ∂
4-39
∂F ∂F
u + = 0
∂u ∂
4-40
∂F
J (u ) =
∂u
4-41
u ∂F F (u , + ) − F (u , ) F (u , + )
J (u ) =− ≈− =−
∂
u F
The can be solved by a linear solver after the − on the
right-hand-side has been calculated by the perturbations.
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.
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.
4-43
Qn = AgnQg
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.
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.
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
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.
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.
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.
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.
R5000.0.2 Network Calculations: Calculation of Connection Length and Depth Change 197
Nexus® Technical Reference Manual Landmark
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.
Consistency Checks
Nexus performs the following consistency checks.
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.
References
2. Brill, J.P. and Beggs, H.D., Two-Phase Flow in Pipes, University of Tulsa, Sixth
Edition, January, 1991.
5. Fletcher, R., Practical Methods of Optimization, Chapter 8, John Wiley & Sons, Ltd,
Second Edition, 2004.
10. Fletcher, R., Practical Methods of Optimization, Chapter 8, John Wiley & Sons,
Ltd, Second Edition, 2004.
Chapter 5
Well Data
where
C is the wellbore constant.
R5000.0.2 Well Data: Calculation of the Wellbore Constant for Each Perforation 201
Nexus® Technical Reference Manual Landmark
where
202 Well Data: Calculation of the Wellbore Constant for Each Perforation R5000.0.2
Landmark Nexus® Technical Reference Manual
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
(where WI is dimensionless)
And comparison with Equation 5-2 yields an effective grid block radius
given by
5-7
rb = ( rw x) / y
Two-Dimensional Flow
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 kz 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/2kz is
obtained1. By plotting the dimensionless pressure drop:
(pij - p0,0)/(q/kz)
universal plot, applicable to any square grid with a single well located
far from any boundaries.
Comparison with Equation 5-8 shows that the well block looks like a
well with a wellbore radius of 0.2x. We call this radius the equivalent
radius of the well block, rb.
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:
q rb
p b – p wf = -------------------- ln -----
2 kz r w
We shall take this as a general definition of rb, for any geometry of the
well block.
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.
------------- y
kz ------ p – 2 p ij + p i – 1 j
x i + 1 j
5-15
kz 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 – ------------
kz
Assuming that p1,0 satisfies the radial flow Equation 5-8 exactly gives:
5-17
q x
p 1 0 = p wf + -------------------- ln ------
2 kz 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 kz r w
q x
p 1 0 – p 0 0 = -------------------- ln ------
2 kz r b
x 2
ln ------ = ---
rb
or
5-19
r – 2
-----b- = e = 0.208
x
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.
= y/x rb/x r b / y 2 2
r b x + y
1/16 0.1406 2.2502 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
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.2x for a square grid.
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
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
12
ke = kx ky
5-25
14
x e = k y k x x
5-26
14
y e = k x k y y
or
12 2 12 2
r be = 0.14 k y k x x + k x k y y 5-28
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.
where
5-30
2 2
re = xe + ye
and
5-31
1 14 14
r we = --- r w k y k x + kx ky
2
5-33
q rb
p b – p wf = ---------------------- ln -----
2 k e z r w
Combining Equations 5-34, 5-28 and 5-31 then yields the final result
for rb, that is:
5-35
12 2 12 2
k y k x x + k x k y y
r b = 0.28 ---------------------------------------------------------------------------------
14 14
-
ky kx + kx ky
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
12 2 12 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).
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.
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 32
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).
5-42
q qk qt
2 2
r be AA reAk = 0.14 x e + y e
k
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 andy 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.
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
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.
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:
14
r eAB = 2 k y k x d
If the edge block is at the top or bottom boundary, then we should take:
14
r eAB = 2 k x k y d
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
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
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.
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
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
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.
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
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 replacey by z and ky by kz, to yield:
5-50
12 2 12 2
k z k x x + k x k z z
r b = 0.28 --------------------------------------------------------------------------------
14 14
-
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?
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.
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.
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.
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
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.
Lx
Ly
Lz
x
l
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
12 2 12 2
k z k x x + k x k z z
R by = 0.14 --------------------------------------------------------------------------------
14 14
-
0.5 k z k x + kx kz
where
5-60
1---
2
k ey = k x k z
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
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.
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
where
rwx = Rwx sin cos
rwy = Rwy sin sin
rwz = Rwz cos 5-70
y’
Rwy
x’
Rwx
Rwz
z’
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.
q rd
p d – p a = -------------------- ln ----
2 kz r a
where
k – ka ra
s a = ------------- ln -----
ka rw
But the equation for the well model in terms of the well index, WI, is:
5-74
kz
q = WI ------------- p b – p wf
q rd q -
p d – p wf = -------------------- ln ---- + ------------------------
2 kz r b kz WI
rd 2 rd
ln ---- + ------- = ln ----- + s a
rb WI rw
or
5-75
2 -
WI = ---------------------
rb
ln ----- + s a
rw
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.
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 .
zm
hp
ht
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.
References
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.
Chapter 6
Equilibrium
Introduction
• Mainstream path
• Supercritical initialization
• Gibbs sedimentation
• Search for GOC
Mainstream Path
Initialization Scenario
Reservoir Cross-Section
GOC
WOC
Impermeable
Independent Equilibrium Regions Barriers
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
• 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.
- Sw = Sw*
- Sg = Sg*
- Sw = Sw*
- So = (1 – Sw*)
- Sw = Sw*
- Sg = (1 – Sw*)
- Sg = Sg*
- Sw = (1 – Sg*)
• Three-Phase
c. Otherwise, P = Po
c. Else Po = Pw - Pcwo
• Water-Oil
• Else P = Po
• Gas-Water
• Else P = Pg
• Black Oil
- Constant Psat
- Variable Psat
• EOS
Supercritical Initialization
x
Tres
P
T Tc
Depth
Light
Heavy
Undersaturated
GOC
x
P
0.0 1.0
T Mole Fraction Temperature
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:
Gibbs Sedimentation
6-1
i ( Pref , Z ref , T ) = i ( P, Z , T ) + M i g ( h − href )
i = 1, N c
Where:
h is a given depth
i = 1, N c
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.
Chapter 7
Compaction
Introduction
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.
Reversible Cases
For reversible cases, the pore volume is modified as follows:
7-3
M Pi = CMT {Pi }
CMT
P PVMULT
2000 0.9985
3000 0.9995
4000 1.0000
5000 1.000
Irreversible Cases
For irreversible cases, the pore volume is modified as follows:
7-4
M Pi = CMT {Pi }
when
Pi − Ptolrev ≤ Pmini
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.
{ }
and CMT Pmini − Ptolrev is an evaluation of the compaction table at the
pressure, Pmini − Ptolrev .
7-6
M Swi = WIRTC {S wi − S wiinit }
7-7
M Swi = WIRTC {S wi − S wiinit }
7-8
{
M Swi = WIRTC S wmaxi − S wtolrev − S wiinit }
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
7-11
TPi = CMT {Pi }
when
Pi − Ptolrev ≤ Pmini
7-12
TPi = CMT {Pi }
( ) {
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
7-14
TSwi = WIRTC {S wi − S wiinit }
7-15
TSwi = WIRTC {S wi − S wiinit }
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.
Implicitness of Calculations
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.
• Hysteresis
• End-point scaling
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.
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
⎝ ⎠
Or
8-6
Sor = Sorm
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 ⎠ ⎥⎦
In the gas zone, which occupies a fraction, Fg, of the pore volume:
Oil saturation = So
Oil saturation = So
Gas saturation= 0
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
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
8-11
S w* = S g + S w
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.
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.
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
⎝ ⎠
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.
where
8-14
S g − S gtrap
S g* = S gc +
S g max − S gtrap
(S g max − S gc )
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
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
8-19
(
S nwlookup = S nwinv + S nw* − S nwmax )(S nwinv − Snwtrapmax ) / ( S nwmax − S nwtrap )
Where:
8-20
(
S wlookup = S winv + S w* − S wmin )(S wu − S winv ) / ( S wu − S wmin )
Where:
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.
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.
8-21
’
( S − S L ) ( S R’ − S L’ )
S =
( SR − SL )
Data Errors
• 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.
8-22
KRO_SWL
′ ×
krow = krow
KRO_SWL′
and
8-23
KRO_SGL
′ ×
krog = krog
KRO_SGL′
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.
8-27
KRO_SWR
′ ×
krow = krow
KRO_SWR ′
8-29
KRO_SGL
′ ×
krog = krog
KRO_SGL′
8-30
8-31
KRW_SWU
′ ×
krw = krw
KRW_SWU′
8-32
KRW_SWRO
′ ×
krw = krw
KRW_SWRO′
8-33
8-34
KRG_SGU
krg = krg′ ×
KRG_SGU′
8-35
KRG_SGRO
krg = krg′ ×
KRW_SGRO′
8-36
8-40
KRW_SGL
′ ×
krwg = krwg
KRW_SGL′
8-41
KRO_SGL′
KRO_SGL=KRO_SGR ×
KRO_SGR ′
8-42
KRO_SGR ′
KRO_SGR=KRO_SGL ×
KRO_SGL′
8-43
KRO_SWL′
KRO_SWL=KRO_SWR ×
KRO_SWR ′
8-44
KRO_SWR ′
KRO_SWR=KRO_SWL ×
KRO_SWL′
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.
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
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 ( ) = ⎜ * ⎟
⎝ ⎠
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
References
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)
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.
Chapter 9
Tracers
Tracer Calculations
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
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.
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.
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.
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.
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.
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.
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.
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.
10-1
Vb = dV
V
10-2
1
D c = ------ z dV
Vb
V
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
where
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,
where
• Grid name
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
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.
A i PV i
i
A = -------------------------------
-
PV i
i
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
PV DZ
POR = ------- ----------------
BV HNET
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
-
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.
Chapter 11
Procedures
Introduction
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
Procedure Functions
where
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.
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).
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.
Debugging Procedures
Chapter 12
Aquifers
Introduction
ra
A Aquifer
re
Reservoir
B
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
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.
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
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.
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
12-12
dW e
---------- = J p a – p
dt
is used where,
The water influx is evaluated using the simple aquifer material balance
12-13
We = ct Wi pi – pa
in which,
12-14
W
p a = p i 1 – -------e-
W ei
where
12-15
W ei = c t W i p i
12-16
dW e We
---------- = J p i 1 – -------- – p
dt W ei
Numerical Aquifer
Aquifer
Reservoir
Aquifer
Reservoir
References
1. Carter, R. D. and Tracy, G. W., “An Improved Method for Calculating Water
Influx,” Trans. AIME, 219, 415-417.
4. Bradley, H.B., Petroleum Engineering Handbook, First Printing, Chap. 38, Society
of Petroleum Engineers, 1987
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.
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
dx dy = J(u,v)du dv
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
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
A-4
1 1
A = J u v du dv
u=0 v=0
A-5
1 1
1
x c = ---
A x u v J u v du dv
u=0 v=0
A-6
1 1
1
y c = ---
A y u v J u v du dv
u=0 v=0
Three-Dimensional Mapping
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
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.
dx dy dz = J(u,v,w) du dv dw
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
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
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
J u v w dw du dv
w=0
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
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
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
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
12
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
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
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
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
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
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.
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
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
T B = k B z W L B
LAB
T A = k A z W L A
W = L AB sin
W = L AB cos
and
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
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
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.
s
--------------------------------------------------
-
k A z L cos u v
wheres 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
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
CD = L AB
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
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
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
0v1 0w1
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.
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
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
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
A-33
2 2 2
ds- dx dy dz
----- u v w = -------- + -------- + --------
du du du du
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
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
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
Ax + By + Cz = D
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
Figure A.13: Projections of Right Face onto the Three Coordinate Planes
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.
Faulted Case
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
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°.
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
---------------------------
-
T 2 – 4 = z ln 3 2
---------------------------
-
z z
TR = ------------------------------------------------------------- = -----------------------
33 – 23 23 – 13 19 5
ln ----------------- – ln ----------------- ln -------------
33 – 22 22 – 12 73
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.
References
1. Franklin, P., A Treatise on Advanced Calculus, John Wiley & Sons, New York,
1940, Page 375, Equation 110.