Sie sind auf Seite 1von 527

Petroleum Experts

User Manual

IPM
OpenServer
January 2011

OpenServer
Communication Protocols to use IPM tools using external commands
by Petroleum Experts Limited

OpenServer is designed to provide an Open Architecture for all the Petroleum Experts IPM
products. This will allow the programs to be directly accessed and be driven by other third party
programs.
Applications for OpenServer are in Connections to:
Third Party Reservoir Simulator.
Process Simulators.
Economics Packages.
Data Base.
Field Control System.
In House and Proprietary Applications.
Specifically, the OpenServer allows other programs (such as Excel or
programs written in Visual Basic) to access public functions in Petroleum
Experts programs. An external program, in an automated procedure,
can then access the Petroleum Experts products.
As of IPM 7.0 OpenServer is a separately licenced product.

Copyright Notice
The copyright in this manual and the associated computer program are the property of Petroleum Experts
Ltd. All rights reserved. Both, this manual and the computer program have been provided pursuant to a
Licence Agreement containing restriction of use.
No part of this manual may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated
into any language, in any form or by any means, electronic, mechanical, magnetic, optical or otherwise, or
disclose to third parties without prior written consent from Petroleum Experts Ltd., Petex House, 10 Logie
Mill, Edinburgh, EH7 4HG, Scotland, UK.
Petroleum Experts Ltd. All rights reserved.
IPM Suite, GAP, PROSPER, MBAL, PVTP, REVEAL, RESOLVE, IFM and OpenServer are trademarks of
Petroleum Experts Ltd.
Microsoft (Windows), Windows (2000) and Windows (XP) are registered trademarks of the Microsoft
Corporation
The software described in this manual is furnished under a licence agreement. The software may be used or
copied only in accordance with the terms of the agreement. It is against the law to copy the software on any
medium except as specifically allowed in the license agreement. No part of this documentation may be
reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying,
recording, or information storage and retrieval systems for any purpose other than the purchaser's personal
use, unless express written consent has been given by Petroleum Experts Limited.

Address:
Petroleum Experts Limited
Petex House
10 Logie Mill
Edinburgh, Scotland
EH7 4HG
Tel : (44 131) 474 7030
Fax : (44 131) 474 7031
email: edinburgh@petex.com
Internet: www.petex.com
1990-2011 Petroleum Experts Limited

OpenServer

Table of Contents
0

Part 1 Technical Overview

1 Basic Functions
................................................................................................................................... 4
2 Calling...................................................................................................................................
Public Functions
5

Part 2 Support

10

Part 3 Using OpenServer

1 Tag Strings
................................................................................................................................... 10
2 Automation
................................................................................................................................... 11
Exam ple Macro
.......................................................................................................................................................... 11
Macro Fram ew
..........................................................................................................................................................
ork
14
DoCm d
.......................................................................................................................................................... 15
DoSet Sub Com
..........................................................................................................................................................
m and
16
DoCom m andAsync
.......................................................................................................................................................... 16
DoGet Sub Com
..........................................................................................................................................................
m and
17

3 Batch ...................................................................................................................................
File
18
Running a Batch
..........................................................................................................................................................
File
18
Form atting Com
..........................................................................................................................................................
m ands
19
DoCom m and .......................................................................................................................................................... 20
SetValue
.......................................................................................................................................................... 20
GetValue and ..........................................................................................................................................................
GetValPrint
21

4 Arrays...................................................................................................................................
and List Variables
21
Special Array ..........................................................................................................................................................
Operations
22
COUNT ......................................................................................................................................................... 22
NDIM
......................................................................................................................................................... 22
DIMSIZE ......................................................................................................................................................... 23
RESET
......................................................................................................................................................... 23
SORT
......................................................................................................................................................... 24
ADD
......................................................................................................................................................... 24
DELETE ......................................................................................................................................................... 24
INSERT ......................................................................................................................................................... 25

5 Multiple
...................................................................................................................................
Values for Arrays
25
Multiple DoGet
..........................................................................................................................................................
Values
25
Multiple DoSet..........................................................................................................................................................
Values
26
Using More than
..........................................................................................................................................................
One Multiple Array
26

6 Units ................................................................................................................................... 27
7 Start/Shutdown
...................................................................................................................................
Commands
29

32

Part 4 GAP and the OpenServer

1 Introduction
...................................................................................................................................
and Variable Lists
32
Ctrl + Right m ouse
..........................................................................................................................................................
click
33
Execute OpenServer
..........................................................................................................................................................
Statem ent
34

January, 2011

Contents

II

Specific Units ..........................................................................................................................................................


Handling Com m ands
35
Literal Constants
.......................................................................................................................................................... 36
Date Handling..........................................................................................................................................................
w ithin GAP
37
OpenServer "Wild
..........................................................................................................................................................
Cards"
38
Variables at Top
..........................................................................................................................................................
Level
39
Variables at MOD
..........................................................................................................................................................
Level
41
Model Options
......................................................................................................................................................... 41
Solver Setup and.........................................................................................................................................
Calculation Log
46
Prediction Setup ......................................................................................................................................... 48
Model Equipment
.........................................................................................................................................................
List
52
Variables at Node
..........................................................................................................................................................
Level
53
General fields
.........................................................................................................................................................
found in nodes of any type
53
Fields specific
.........................................................................................................................................................
to tanks
55
Fields Specific
.........................................................................................................................................................
to Wells
57
Fields specific to .........................................................................................................................................
all w ell models
58
Fields specific to .........................................................................................................................................
w ells modelled using VLP/IPR intersection
60
Fields specific to w ells modeled using Performance Curves /
Interpolated Performance
.........................................................................................................................................
Curves
65
Fields specific to .........................................................................................................................................
Stand-Alone Inflow s
67
Fields specific to .........................................................................................................................................
Stand-Alone Outflow s
67
Equipment Control.........................................................................................................................................
Section
68
PROSPER Online .........................................................................................................................................
Models
69
Fields specific
.........................................................................................................................................................
to pipelines
70
Pipeline Model Selection
......................................................................................................................................... 70
GAP Internal Correlation
.........................................................................................................................................
Pipeline Models
70
GAP Lift Curves Pipeline
.........................................................................................................................................
Models
74
GAP PROSPER Online
.........................................................................................................................................
Pipeline Models
75
Fields specific
.........................................................................................................................................................
to joints
76
Fields specific
.........................................................................................................................................................
to pump/compressor nodes
76
Fields Common to.........................................................................................................................................
Pumps and Compressors
77
Fields Specific to.........................................................................................................................................
Compressors
78
Fields specific
.........................................................................................................................................................
to separator / injection manifold nodes
79
Com position Records
.......................................................................................................................................................... 80
Compositional
.........................................................................................................................................................
Model Setup
80
Fluid Composition
.........................................................................................................................................................
Setup - Wells
80
Fluid Composition
.........................................................................................................................................................
Results
82
Enabling / Disabling
..........................................................................................................................................................
Options
82
Scheduling .......................................................................................................................................................... 84
Schedule Count
......................................................................................................................................................... 84
Date
......................................................................................................................................................... 84
Event type......................................................................................................................................................... 85
Constraint .........................................................................................................................................................
Type
86
Constraint .........................................................................................................................................................
Value
86
Schedule Reset
......................................................................................................................................................... 86
Apply Schedule
.........................................................................................................................................................
To
87
Constraints .......................................................................................................................................................... 87
Constraint .........................................................................................................................................................
Level and Type
87
Binding Constraints
......................................................................................................................................................... 89
Constraints.........................................................................................................................................................
and Potential Calculations
90
Obtaining the ..........................................................................................................................................................
Results
91
Solver Results
......................................................................................................................................................... 91
Prediction Results
......................................................................................................................................................... 92
Total System
.........................................................................................................................................................
Results
94
Snapshot Results
......................................................................................................................................................... 94

OpenServer User's Manual

January, 2011

II

III

OpenServer

SubFlow Sheets
.......................................................................................................................................................... 95

2 GAP OpenServer
...................................................................................................................................
Functions
95
GAP OpenServer
..........................................................................................................................................................
Functions Overview
96
CALCCOMPDP
..........................................................................................................................................................
(com p) / CALCPUMPDP (pum p)
102
CALCPIPEDP(pipe)
.......................................................................................................................................................... 103
COPYITEM( EquipDest,
..........................................................................................................................................................
EquipSrc )
105
DELITEM (node)
.......................................................................................................................................................... 105
ISMEMBEROFGROUP(Group)
.......................................................................................................................................................... 105
LINKITEMS ( equip1,
..........................................................................................................................................................
equip2, linklabel )
106
NEWFILE( ) .......................................................................................................................................................... 106
NEWITEM( type,
..........................................................................................................................................................
label, iposcode, equip, m odel )
106
Working w.........................................................................................................................................................
ith Flow sheets
107
OPENFILE( filenam
..........................................................................................................................................................
e)
108
PCCALC (equip,
..........................................................................................................................................................
PcCurve)
109
PCGMAX (equip,
..........................................................................................................................................................
PcCurve)
110
PCGSOLV (equip,
..........................................................................................................................................................
PcCurve)
110
PCPSOLV (equip,
..........................................................................................................................................................
PcCurve)
111
PREDDOSTEP..........................................................................................................................................................
(optim ise, potential)
112
PREDDOSOLVER
..........................................................................................................................................................
(tim estepsize, optim ise, potential, m odel)
113
PREDEND(dorest,
..........................................................................................................................................................
optim ise, potential)
114
PREDINIT (ignore
..........................................................................................................................................................
internal tim estep, ignore internal scheduling)
115
PURGEALLRESULTS
..........................................................................................................................................................
(m odel)
116
PURGEPREDLOG
..........................................................................................................................................................
(m odel)
116
PURGEPREDRESULTS
..........................................................................................................................................................
(m odel)
116
PURGEPREDSNAPSHOT
..........................................................................................................................................................
(m odel)
117
PURGESOLVERLOG
..........................................................................................................................................................
(m odel)
117
PURGESOLVERRESULTS
..........................................................................................................................................................
(m odel)
117
REFITPC(w ell)
.......................................................................................................................................................... 117
RESETSOLVERINPUTS
..........................................................................................................................................................
()
118
SAVEFILE( filenam
..........................................................................................................................................................
e)
118
SHUTDOWN (save)
.......................................................................................................................................................... 118
SOLVENETWORK()
.......................................................................................................................................................... 119
TRANSFERPROSPERIPR
..........................................................................................................................................................
(w ell, layernum ber, PVTMethod)
120
UNLINKITEMS..........................................................................................................................................................
(equip1, equip2)
120
VALIDATE (solverorpred)
.......................................................................................................................................................... 121
VLPIMPORT (equip,
..........................................................................................................................................................
filenam e)
121
VLPIPRPCGEN
..........................................................................................................................................................
(w ell, autow hp)
122
WELLCALC (w
..........................................................................................................................................................
ell)
122
MOD[i].CopyControls
..........................................................................................................................................................
(from , to, SkipFNAs)
123
MOD[i].ResetControls
..........................................................................................................................................................
(colum n)
124
MOD[i].RESETSCHEDULE
..........................................................................................................................................................
(type, equiptype)
124
MOD[i].VALIDATE
..........................................................................................................................................................
(solverorpred)
124
GROUPS
.......................................................................................................................................................... 125
EQUIP[i].ADDTOGROUP
..........................................................................................................................................................
(group)
126
EQUIP[i].BYPASS
..........................................................................................................................................................
()
126
EQUIP[i].DISABLE
..........................................................................................................................................................
()
126
EQUIP[i].ENABLE
..........................................................................................................................................................
()
126
EQUIP[i].IsMem
..........................................................................................................................................................
berOfGroup(group)
127
EQUIP[i].MASK
..........................................................................................................................................................
()
127
EQUIP[i].REMOVEALLGROUPMEMBERSHIPS
..........................................................................................................................................................
()
127
EQUIP[i].REMOVEFROMGROUP
..........................................................................................................................................................
(group)
127
EQUIP[i].UNBYPASS
..........................................................................................................................................................
()
128
EQUIP[i].UNMASK
..........................................................................................................................................................
()
128
EQUIP[i].VALIDATE
..........................................................................................................................................................
(solverorpred)
128

January, 2011

Contents

IV

TANK[i].CalcDCTankCurPres(CurProd)
.......................................................................................................................................................... 128
PIPE[i].DOMATCH
..........................................................................................................................................................
()
129
IPR[i].CONINGMATCH
..........................................................................................................................................................
()
129
IPR[i].DISABLE
..........................................................................................................................................................
()
129
IPR[i].ENABLE..........................................................................................................................................................
()
130
IPR[i].IPRMATCH
..........................................................................................................................................................
()
130
IPR[i].MASK ()
.......................................................................................................................................................... 130
IPR[i].UNMASK
..........................................................................................................................................................
()
131
IPR[i].VALIDATE
..........................................................................................................................................................
(solverorpred)
131

3 GAP ...................................................................................................................................
Internal Script
131

134

Part 5 MBAL and the OpenServer

1 Finding
...................................................................................................................................
a Variable Text String
134
2 Date ...................................................................................................................................
Handling within MBAL
135
3 Commands
................................................................................................................................... 135
General
.......................................................................................................................................................... 136
Material Balance
..........................................................................................................................................................
Com m ands
136
Monte Carlo .......................................................................................................................................................... 138
1D Model
.......................................................................................................................................................... 138
Decline Curve
.......................................................................................................................................................... 138
Multi-Layer .......................................................................................................................................................... 138
Production Allocation
.......................................................................................................................................................... 138
Tight Gas
.......................................................................................................................................................... 139
PVT
.......................................................................................................................................................... 139

4 OpenServer
...................................................................................................................................
Code Examples
140
DoGet, DoSet..........................................................................................................................................................
and DoCm d Exam ple
140
List Variables
.......................................................................................................................................................... 141
Material Balance
..........................................................................................................................................................
Step-by-Step Prediction
142
Production Allocation
..........................................................................................................................................................
Step-by-Step Prediction
144

5 Direct...................................................................................................................................
Access OPENSERVER
145
Overview
.......................................................................................................................................................... 145
Sum m ary .......................................................................................................................................................... 146
High Level Exam
..........................................................................................................................................................
ple
147
Low Level Exam
..........................................................................................................................................................
ple
155
Datablock Variable
..........................................................................................................................................................
Nam es
170

6 Variable
...................................................................................................................................
Text Strings
173
1D Model
.......................................................................................................................................................... 173
Monte Carlo .......................................................................................................................................................... 174
Decline Curve
.......................................................................................................................................................... 175
Multi-Layer Tool
.......................................................................................................................................................... 175
PVT
.......................................................................................................................................................... 177
Material Balance
.......................................................................................................................................................... 179
Production Allocation
.......................................................................................................................................................... 185
Tight Gas
.......................................................................................................................................................... 186
Relative Perm
..........................................................................................................................................................
eability Curves
186

189

Part 6 PROSPER and the OpenServer

1 General
...................................................................................................................................
Comments
189
Getting the strings
..........................................................................................................................................................
through Ctrl+Right Click
190
List of variables
..........................................................................................................................................................
in PROSPER file (NEW!!!)
190

OpenServer User's Manual

January, 2011

IV

OpenServer

Evaluate OpenServer
..........................................................................................................................................................
Statem ent Section (NEW!!!!)
195
Setting the Units
..........................................................................................................................................................
and Validation Lim its
196
Counting num
..........................................................................................................................................................
ber of entry data points or calculated results
198

2 Options
...................................................................................................................................
Summary Data
199
3 PVT Data
...................................................................................................................................
Section
202
INPUT - Input..........................................................................................................................................................
Data
202
MATCH - PVT..........................................................................................................................................................
Match Data
204
TABLE - Setting
..........................................................................................................................................................
data to the PVT Lookup Tables
205
CORREL Correlation
..........................................................................................................................................................
Matching Param eters
206
Black Oil -.........................................................................................................................................................
Oil
206
Black Oil -.........................................................................................................................................................
Gas
208
Black Oil -.........................................................................................................................................................
Retrograde Condensate
208
CALC - Calculation
..........................................................................................................................................................
Results
209
EOS - Equation
..........................................................................................................................................................
of State Data
211
DLL - External
..........................................................................................................................................................
PVT DLL Data
214
EMULSION - Em
..........................................................................................................................................................
ulsion Data
215
VISC - Viscosity
..........................................................................................................................................................
Data
215
HYD - Hydrates
..........................................................................................................................................................
Form ation Data
216

4 INPUT
...................................................................................................................................
Data Section
216
IPR Data
.......................................................................................................................................................... 217
Overview......................................................................................................................................................... 217
Single Branch
.........................................................................................................................................................
Data
217
Common Parameters
......................................................................................................................................... 217
Model Selection .........................................................................................................................................
and PVT Screen
218
Test/PI Entered Models
......................................................................................................................................... 219
MultiRate Models......................................................................................................................................... 220
Darcy-based Models
......................................................................................................................................... 221
External Entry Model
.........................................................................................................................................
Parameters
223
Multi-layer (no friction
.........................................................................................................................................
dP loss) Table
223
Horizontal Well w
.........................................................................................................................................
ith dP Friction Loss Table, Including Coning Screen
224
Multi-layer w ith dP
.........................................................................................................................................
Friction Loss Table
226
Skin Aide Model.........................................................................................................................................
Parameters
228
Tw o-term Model.........................................................................................................................................
Parameters
231
Fracture Model ......................................................................................................................................... 231
SPOT
......................................................................................................................................... 232
Mechanical Skin.........................................................................................................................................
Parameters
238
Deviation Skin-Specific
.........................................................................................................................................
Parameters
239
Gravel Pack-Specific
.........................................................................................................................................
Parameters
240
Relative Permeability
.........................................................................................................................................
Screen
241
Gas Coning Parameters
.........................................................................................................................................
for Oil
241
Multi-lateral
.........................................................................................................................................................
Well Data
242
Netw ork items ......................................................................................................................................... 242
Branch, Layer and
.........................................................................................................................................
Segment Details
248
Calculation Control
.........................................................................................................................................
Data
249
Visualisation Data
......................................................................................................................................... 249
Multilateral Results
......................................................................................................................................... 250
Equipm ent Data
.......................................................................................................................................................... 251
Overview......................................................................................................................................................... 251
DEVN Deviation
.........................................................................................................................................................
Survey Equipment
252
TEMP Flow
.........................................................................................................................................................
ing Temperature Survey
252
GEO Geothermal
.........................................................................................................................................................
Gradient
253
SURF Surface
.........................................................................................................................................................
Equipment
253
TURF Surface
.........................................................................................................................................................
Equipment (Enthalpy Balance)
254

January, 2011

Contents

VI

DOWN Dow
.........................................................................................................................................................
n Hole Equipment
255
TOWN Dow
.........................................................................................................................................................
n Hole Equipment (Enthalpy Balance)
256
SHC Fluid
.........................................................................................................................................................
Properties Average Heat Capacities
256
ENV Surface
.........................................................................................................................................................
Environment Data (Enthalpy Balance / Rough Approx.)
257
DRILL Drilling
.........................................................................................................................................................
Data (Enthalpy Balance)
257
LITHO Lithology
.........................................................................................................................................................
(Enthalpy Balance)
259
DB Databases
.........................................................................................................................................................
(Enthalpy Balance)
259
Artificial Lift ..........................................................................................................................................................
Data Section
260
Gas Lift (Continuous)
......................................................................................................................................................... 261
Electircal .........................................................................................................................................................
Submersible Pump
262
Hydraulic .........................................................................................................................................................
Drive Dow nhole PUmp
263
Progressive
.........................................................................................................................................................
Cavity Pump
263
Coil Tubing
.........................................................................................................................................................
Gas Lift
263
Jet Pump ......................................................................................................................................................... 264
Multiphase
.........................................................................................................................................................
Pump
264
Sucker Rod
.........................................................................................................................................................
Pump
264
Gas Lift (Intermittent)
......................................................................................................................................................... 265

5 Calculation
...................................................................................................................................
Input Data
265
INF - Inflow Sensitivity
..........................................................................................................................................................
Calculations
273
SYS - System..........................................................................................................................................................
Sensitivity Calculations
275
SYS - System..........................................................................................................................................................
Multi-Variable Calculations
279
GRD - Gradient
..........................................................................................................................................................
Sensitivity Calculations
281
VL3 - VLP Sensitivity
..........................................................................................................................................................
Calculations (3 Variables)
283
VL4 - VLP Sensitivity
..........................................................................................................................................................
Calculations (4 Variables)
286
VLM - Multi-Variable
.......................................................................................................................................................... 289
QLG - QuickLook
..........................................................................................................................................................
GasLift
290
QLE - QuickLook
..........................................................................................................................................................
ESP
291
QLH - QuickLook
..........................................................................................................................................................
HSP
292
TCC - Tubing..........................................................................................................................................................
Correlation Com parison
293
PCC - Pipeline
..........................................................................................................................................................
Correlation Com parison
295
GMT - Gradient
..........................................................................................................................................................
Matching
297
GDT - Gradient
..........................................................................................................................................................
Test Data
298
VMT - VLP Matching
.......................................................................................................................................................... 299
PMT - PipeLine
..........................................................................................................................................................
Matching
300
CHK - Choke ..........................................................................................................................................................
Perform ance
301
GEN - Generate
..........................................................................................................................................................
For GAP
302
WHP - BHP from
..........................................................................................................................................................
WHP
303
PLD - Plot Details
.......................................................................................................................................................... 304
COR - Flow Correlation
..........................................................................................................................................................
Data
308
THR - Correlation
..........................................................................................................................................................
Threshold Data
309
CST - Constrained
..........................................................................................................................................................
System Calculations
309
CVT - Constrained
..........................................................................................................................................................
VLP Calculations
311
UST - Unconstrained
..........................................................................................................................................................
System Calculations
313
UVT - Unconstrained
..........................................................................................................................................................
VLP Calculations
315
UGT - Unconstrained
..........................................................................................................................................................
Gradient Calculations
318

6 Artificial
...................................................................................................................................
Lift Design Input Data
320
GasLift Design
.......................................................................................................................................................... 320
Electical Subm
..........................................................................................................................................................
ersible Pum p Design
324
Hydraulic Drive
..........................................................................................................................................................
Dow nhole Pum p Design
324
Progressive ..........................................................................................................................................................
Cavity Pum p Design
325
Jet Pum p Design
.......................................................................................................................................................... 325
Sucker Rod Pum
..........................................................................................................................................................
p Design
326

7 Calculation
...................................................................................................................................
Results
327
OpenServer User's Manual

January, 2011

VI

VII

OpenServer

INF - Inflow Sensitivity


..........................................................................................................................................................
Calculations
328
SYS - System..........................................................................................................................................................
Sensitivity Calculations
329
GRD - Gradient
..........................................................................................................................................................
Sensitivity Calculations
338
GRD - Flow
.........................................................................................................................................................
Regime Number
340
QLG - QuickLook
..........................................................................................................................................................
GasLift
343
QLE - QuickLook
..........................................................................................................................................................
ESP
347
QLH - QuickLook
..........................................................................................................................................................
HSP
351
PCP - Pipeline
..........................................................................................................................................................
Correlation Com parison
355
TCC - Tubing..........................................................................................................................................................
Correlation Com parison
357
GMT - Gradient
..........................................................................................................................................................
Matching
360
VL3 - VLP Sensitivity
..........................................................................................................................................................
Calculations (3 Variables)
362
VL4 - VLP Sensitivity
..........................................................................................................................................................
Calculations (4 Variables)
364
GEN - Generate
..........................................................................................................................................................
For GAP
366
SPD - Sensitivity
..........................................................................................................................................................
PvD
369
SPT - Sensitivity
..........................................................................................................................................................
PvD (Enthalpy Balance)
372
GLN - Gas Lift
..........................................................................................................................................................
Design (New Well)
374
GLE - Gas Lift..........................................................................................................................................................
Design (Existing Well)
378
Gas Lift Design
..........................................................................................................................................................
(Interm ittent)
382
ESP - ESP Design
.......................................................................................................................................................... 382
HSP - HSP Design
.......................................................................................................................................................... 384
CST - Constrained
..........................................................................................................................................................
System Calculations
385
CVT - Constrained
..........................................................................................................................................................
VLP Calculations
392
UST - Unconstrained
..........................................................................................................................................................
System Calculations
392
UVT - Unconstrained
..........................................................................................................................................................
VLP Calculations
399
UGT - Unconstrained
..........................................................................................................................................................
Gradient Calculations
400
VLP Export .......................................................................................................................................................... 402

8 Commands
................................................................................................................................... 404
9 Functions
................................................................................................................................... 413
10 Code...................................................................................................................................
Samples
415

426

Part 7 PVTP and the Open Server

1 OverView
................................................................................................................................... 426
2 File and
...................................................................................................................................
Streams
426
3 BLACKOIL
................................................................................................................................... 427
4 OPTIONS
................................................................................................................................... 428
5 STREAMBASE
...................................................................................................................................
[stream no. or stream name]
431
6 STREAMRUN[stream
...................................................................................................................................
no. or stream name]
435
7 CALCUL[stream
...................................................................................................................................
no. or stream name]
437
8 Carrying
...................................................................................................................................
out Calculations and Obtaining Results
444
Analysis
.......................................................................................................................................................... 447
Flash Calculation
.......................................................................................................................................................... 449
Sm all Separator
..........................................................................................................................................................
Calculation
449
Saturation Pressure
..........................................................................................................................................................
at Reference Conditions
451
Recom bination
..........................................................................................................................................................
Calculation
451
Allocate: Blending
..........................................................................................................................................................
to a Target GOR
452

455

Part 8 REVEAL and the OpenServer

1 Scope
................................................................................................................................... 455

January, 2011

Contents

VIII

2 Commands
................................................................................................................................... 455
3 Script...................................................................................................................................
Data
456
4 Results
...................................................................................................................................
Data
457
5 Runtime
...................................................................................................................................
Data
458

467

Part 9 RESOLVE and the OpenServer

1 Overview
................................................................................................................................... 467
2 Top Level
...................................................................................................................................
Variables
468
Module variables
.......................................................................................................................................................... 470
Module Optimisation
.........................................................................................................................................................
variables
473
SrcSnk variables
......................................................................................................................................................... 474
Driver variables
.......................................................................................................................................................... 475
ModLink variables
.......................................................................................................................................................... 476
Schedule variables
.......................................................................................................................................................... 477
Scenario Manager
..........................................................................................................................................................
Variables
478
Connection variables
.......................................................................................................................................................... 478
Properties variables
.......................................................................................................................................................... 479
Optim iser param
..........................................................................................................................................................
eter variables
479
Optim iser schedule
..........................................................................................................................................................
variables
480

3 Commands
...................................................................................................................................
(COPY)
481
4 Sample
...................................................................................................................................
macros
482

484

Part 10 OpenServer Examples

1 OpenServer
...................................................................................................................................
VBA Template
484
2 GAP ...................................................................................................................................
Examples
484
Basic Code Structure
.......................................................................................................................................................... 484
Exam ple 1 GAP
..........................................................................................................................................................
Open Server Exam ple A
487
Exam ple 2 GAP
..........................................................................................................................................................
Open Server Exam ple B
489
Exam ple 3 GAP
..........................................................................................................................................................
Open Server Exam ple C
500
Exam ple 4 GAP
..........................................................................................................................................................
Open Server Exam ple D
500

3 MBAL...................................................................................................................................
Examples
503
Step-by-Step..........................................................................................................................................................
Material Balance Prediction Exam ples
504

4 Step-by-Step
...................................................................................................................................
Production Allocation Examples
505
5 Direct...................................................................................................................................
Access Examples
505
6 PROSPER
...................................................................................................................................
Example
505

OpenServer User's Manual

January, 2011

VIII

Chapter

Technical Overview

Technical Overview
OpenServer is a powerful utility that allows other programs (such as Excel, programs
written in Visual Basic) to access public functions in IPM to automate data input and
model calculations.
Specifically, OpenServer allows other programs such as Excel or programs written in
Visual Basic, to access public functions in the IPM Suite of tools. An external program,
in an automated procedure, can then access the IPM Suite of tools.
OpenServer can be used to run the IPM Suite of tools in conjunction with other
software applications and exchange data between them. For example, a Visual Basic
program or batch file could be used to successively initialize all IPRs in GAP from
MBAL simulations then retrieve all current IPR data.
OpenServer provides seamless data transfer to and from the PETEX tools to other
applications and database utilities. Also, the client program can use any technique to
access the values in the database, e.g. ODBC, DAO, SQL and then transfer them with
OpenServer to IPM.
Being able to automate data transfer, automate calculations and automatically
interrogate existing IPM model inputs provides a basis to develop streamline workflows that serves to free up valuable engineering time.
The following OpenServer uses is not an exhaustive list, and illustrates some
OpenServer possibilities:
Batch Runs
Consider a situation where a prediction calculation in MBAL has been set up and it is of
interest to check the final recovery for a range of OOIP values.
A spreadsheet in Excel can be created that lists all the OOIP's to be used in the
prediction.
A VBA macro can be written within Excel which:- Gets the first OOIP value from the spreadsheet and sets it in the MBAL tank
- Runs a production prediction
- Queries the final recovery from the production results and writes into the
spreadsheet.
- Repeat for the next OOIP, etc.
Custom Reporting
Although PETEX products provide a variety of report formats, it is possible that specific
reporting structures are required. A VBA macro within Excel can be written to query the
required values from a PETEX product and then written in the required format to the
1990-2011 Petroleum Experts Limited

OpenServer

spreadsheet.
Data Import/Export
The OpenServer can be used for transferring data to or from a database and PETEX
programs. The client program can use any technique to access the values in the
database (e.g. ODBC, DAO, and SQL) and then transfer them with OpenServer.
For example, production data may be stored in an Access database, a VBA macro can
be written in Access to query the data from the database and then use OpenServer to
set the data in MBAL for instance.
An example is available in the installed MBAL examples OPENSERV.MDB.
Enhanced Prediction Runs in GAP
Using OpenServer with GAP provides the ability to control field development strategies
during the prediction by performing a task such as well drilling and completing from
using OpenServer to dynamically monitor an overall facilities rate constraint. This
means that wells will now be drilled and completed based on the overall model
response, rather than driving well drilling scheduling from a scheduled date perspective.
Please see the GAP OpenServer Example D.GAR file that also contains the completed
drilling queue macro.
Running PETEX programs with other engineering software applications
OpenServer can be used to run the PETEX programs in conjunction with other software
applications and exchange data between them.
For example, a visual basic program or batch file could be used to successively:
- Run a process simulator to calculate a feed separator pressure
- Set the separator pressure in GAP
- Optimize the production system in GAP
- Pass the GAP rates onto the process simulator
-Run the process simulator, etc.
It is important to note that dynamic links to industry standards process and numerical
reservoir simulators are now available through RESOLVE.

OpenServer User's Manual

Technical Overview

1.1

Basic Functions
There are a number of public functions that have been made available. However the
three most important functions are as follows.
DoGet
This function allows an external program to query a data value in a PETEX program. It
should be possible to obtain the value of any data item that can normally be viewed
using the user interface of the PETEX programs. Each data item is defined by a unique
text string.
DoSet
This function allows an external program to change a data value in a PETEX program. It
should be possible to change the value of any data item that can normally be viewed
using the user interface of the PETEX programs. It should be possible to build a data
set from scratch using the DoSet function.
However, it is recommended that the user interface is still used to build parts of a data
set which do not require any automation. This will allow the normal quality checking to
take place which is a very important aspect of the model building process.
Each data item is defined by a unique text string.
These basic functions are already setup in the OpenServer template provided with the
software installation.
The OpenServer template is called OpenServer Template.xls and can be found at the
following location:
- C:\Program Files\Petroleum Experts\IPM 7.0\Samples\openserver\Template
This template should be used as a starting point when building an Excel based
OpenServer utility.
DoCmd
This function allows calculations to be performed in a PETEX program. Each calculation
type is defined by a unique text string.
Only a subset of calculations available via the normal user interface of the PETEX
products are available using the OpenServer.
In particular, the DoCommand function supports those calculations which are applicable
to automated use e.g. a GAP prediction.
However it generally does not support those calculations that require the user interface
for correct use e.g. MBAL graphical matching.
Different syntaxes can be used in certain cases to replace the command.
These different syntaxes can be:
- DoCmd (used to perform a PROSPER calculation)
- DoGAPFunc (used to perform a GAP calculation)
- DoSlowCmd (See note below)
1990-2011 Petroleum Experts Limited

OpenServer

The code for these commands has already been setup in the OpenServer template
provided with the software installation.
This OpenServer template is called OpenServer Template.xls and can be found at the
following location:
- C:\Program Files\Petroleum Experts\IPM 6.0\Samples\openserver\Template.
The OpenServer template can be used as a starting point when building an Excel
based OpenServer utility. Also, the variety of OpenServer example files that have
been constructed for each IPM tool can also be modified to meet individual needs.
Note:
Unfortunately, VBA was designed for use with simple functions that take only a few
seconds. If a function is called that takes more than one minute to complete, a timeout
error in Excel may occur depending on operating system, Excel version, setup etc. This
is where the DoSlowCmd would be required to replace the DoCmd sub fuction.
The DoSlowCmd will also be required if the license server has high traffic where the
speed of communication from the local PC to obtain a license has been reduced.

1.2

Calling Public Functions


There are two methods of calling public functions.
The following sections summarizes how to call the functions, syntax examples are also
provided.
Automation
The OpenServer is an Automation server. This means that the public functions can be
called from any program that can act as an Automation client.
There are many programs that can act as an Automation client and can therefore be
used to call the public functions in the PETEX programs.
These include:
- Any VBA macro. These macros are available in Excel, Access and many other
Microsoft products.
- Visual Basic programs can be written to act as an Automation client and
therefore call the public functions.
- C++ programs can also be written to act as an Automation client and therefore
call the public functions.
Many other products can act as Automation clients and will be illustrated in their

OpenServer User's Manual

Technical Overview

individual documentation.
Batch File
To avoid dependence on Automation, it is also possible to call the public functions in
the PETEX programs using a simple batch file.
The functions required are typed into a text file.
A program is supplied by Petroleum Experts (PXBATCH) which will interpret the text file
and call the functions in the PETEX programs.
It also writes the output of the DoGet function to another text file which can be viewed
afterwards.

1990-2011 Petroleum Experts Limited

Chapter

Support

Support
The main strength of the OpenServer is that users are now free to develop their own
applications which utilise the public functions within PETEX products. However this
does mean that a user of the OpenServer will require more computing knowledge than
a user of the standard PETEX programs. This is particularly the case where a user
writes a client application in VBA or Visual Basic. The user is expected to have (or be
trained in) the requisite computing skills to write these client applications.
Petroleum Experts will not be able to undertake to train users in these
computing skills.
The boundary of the PETEX products and the users applications needs to be defined
with respect to support provided by Petroleum Experts of the OpenServer feature.
Firstly, as with normal support, a maintenance agreement between the user and
Petroleum Experts must be in place.
Unfortunately, Petroleum Experts will not be able to undertake development of
VBA macros, batch files or other OpenServer clients for a particular user. The
strength of the feature is to allow the user to implement these client applications without
any further input by Petroleum Experts.
Similarly Petroleum Experts will be unable to assist in fixing bugs in users VBA macros,
batch files or any other OpenServer client.
Petroleum Experts will undertake to support any user who can demonstrate
(through a simple fragment of a batch file or VBA macro etc) that a public
function call to a PETEX product fails to work correctly.

1990-2011 Petroleum Experts Limited

Chapter

Using OpenServer

10

Using OpenServer
This chapter describes in detail how to access the public function in PETEX programs.
The TagStrings section describes how each data item is defined in the PETEX
programs using a variable text string.
The Automation section describes how to call the public functions using Automation.
We first describe the framework needed to use the OpenServer, then each function is
described in detail.
The Batch File section describes how to call the public functions using a batch file
system. We describe the framework and then describe each function in detail.
This section does not deal with specific issues relating to particular products e.g. GAP
or MBAL.
To use the public function for a particular PETEX program, the tools must be installed
on the local hard disk with access to a valid security authentication e.g. security key or
HARDLOCK.
When the public functions are being called (either using Automation or a batch file), the
appropriate PETEX product must be running. However, it does not need to be visible on
the screen (i.e. it can be minimized). Commands are available to start each of the
programs. Alternatively one can start the programs manually before running a macro/
batch file.

3.1

Tag Strings
Tag strings describe each data item in the PETEX programs. It is a string of characters
which is broken into a number of subnames separated by full stops. As one moves from
left to right along the string, the definition of the variable becomes more detailed.
The tag string of any data item in MBAL always begins with the subname MBAL.
Similarly, any data item from GAP, PVTP, REVEAL, RESOLVE or PROSPER will begin
with the subname
GAP, PVTP, REVEAL, "RESOLVE" or PROSPER
respectively.
The rest of the string depends on the section of the program. There may be several
subnames if the data item is part of a complex hierarchy.
For example, for the start time in the material balance prediction we may have MBAL.
MB.PRED.STARTTIME".
For this tag string:
- MBAL From the MBAL program
1990-2011 Petroleum Experts Limited

11

OpenServer

- MB In the material balance tool


- PRED In the prediction section
- STARTTIME Start time
All tag strings are case insensitive (i.e. it does not matter if lower or upper case
characters are used).
For specific details of the tag strings for each PETEX program, refer to the program
specific sections below.
It is also possible to capture the OpenServer string details directly from the given IPM
tool using a Ctrl + Right-Click keyboard and mouse work-flow.
Please note, it is not possible to capture an OpenServer string using the above
keyboard and mouse work-flow for a calculation button. For a list of IPM OpenServer
command strings, please review the corresponding OpenServer command reference
information.

3.2

Automation
This section describes how to access the public functions using Automation. This is a
Microsoft Windows standard (formally known as OLE Automation). This method
requires software which can act as an Automation client to call the public functions.
Probably the most commonly used example of such an Automation client that is used
in the engineering industry is the VBA macro language within Excel. We will therefore
demonstrate how the public functions are called by such macros the same rules
should extend to other Automation clients.
Rather than describing the functions in isolation, an example of an Excel VBA macro is
presented that uses all the available public functions. Each function within this example
will be described including macro error handling.
It is important to note that the OpenServer template already contains the necessary
macro communication error handling already built in.

3.2.1 Example Macro


This example performs a simple set of operations in the MBAL program.
These include:
- Open the OIL.MBI file
- Change the original oil in place to a new value
- Run a prediction
- Get the first oil rate and display it in the Excel spreadsheet.
This macro is available in the installed MBAL examples, OPENSERV.XLS, located in
OpenServer User's Manual

Using OpenServer

12

the directory C:\Program Files\Petroleum Experts\IPM 7.0\Samples\openserver\MBAL


The macro is split into a number of subroutines and functions:
- The main subroutine is called DoAll().
- There are five other subroutines and functions which allow calls to be made to
the PETEX public functions.
Option Explicit
Dim Server As Object
Dim AppName As String
Sub DoAll()
Connect
'establishes Excel communication
link to IPM
AppName = "MBAL"
DoSlowCmd "MBAL.OPENFILE=C:\PETEX\SAMPLES\OIL.MBI"
'See below for an alternative "file open" approach
DoSet "MBAL.MB.TANK.OOIP", "250.0" 'set the tank
OOIP value
DoSlowCmd "MBAL.MB.RUNPREDICTION"
'run the
prediction
Range("C11") = DoGet("MBAL.MB.TRES[2][0][0].
OILRATE") 'retrieve the first oil rate
Disconnect 'Closes the server object connection to
IPM
MsgBox "Macro completed"
End Sub
Alternative File Open Approach

If the MBAL file name was placed at a certain cell reference in Excel, then the
following File | Open approach could be used: "MBAL.OpenFile(""" + Range
("E12") + """)"
OpenServer Template Error Handling Code
The following code is part of the OpenServer template and manages error handling
between the application and macro:
Sub DoCmd(Cmd)
Dim lErr As Long
lErr = Server.DoCommand(Cmd)
If lErr > 0 Then
MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
End Sub

1990-2011 Petroleum Experts Limited

13

OpenServer

Sub DoSet(Sv, Val)


Dim lErr As Long
lErr = Server.SetValue(Sv, Val)
lErr = Server.GetLastError(AppName)
If lErr > 0 Then
MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
End Sub
Function DoGet(Gv As String) As String
Dim lErr As Long
DoGet = Server.GetValue(Gv)
lErr = Server.GetLastError(AppName)
If lErr > 0 Then
MsgBox Server. GetErrorDescription(AppName)
Set Server = Nothing
End
End If
End Function
Sub DoSlowCmd(Cmd)
Dim StartTime As Single
Dim EndTime As Single
Dim CurrentTime As Single
Dim lErr As Long
Dim bLoop As Boolean
lErr = Server.DoCommandAsync(Cmd)
If lErr > 0 Then
MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
While Server.IsBusy(AppName) > 0
StartTime = Timer
EndTime = StartTime + 2
Do
CurrentTime = Timer
DoEvents
bLoop = True
Rem Check first for the case where we have
Rem gone over midnight and the number of
Rem seconds will go back to zero
If CurrentTime < StartTime Then
bLoop = False
OpenServer User's Manual

Using OpenServer

14

Rem Now check for the 2 second pause


finishing
ElseIf CurrentTime > EndTime Then
bLoop = False
End If
Loop While bLoop
Wend
lErr = Server.GetLastError(AppName)
If lErr > 0 Then
MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
End Sub
Function DoGAPFunc(Gv As String) As String
AppName = GAP
DoSlowCmd Gv
DoGAPFunc = DoGet("GAP.LASTCMDRET")
End Function

3.2.2 Macro Framework


The Technical Overview section listed three main sub-commands that OpenServer
uses to set data, perform calculations and retrieve results to an Excel based VB macro.
The template OpenServer macro spreadsheet can be used to develop a macro for any
one of the IPM suite of tools.
There are only a few lines of code that need to be in an Excel macro to use
OpenServer. Before using any of the public functions, an object must be declared to
establish the communication link from the VB macro with the PETEX programs:
Di m Ser ver As Obj ect
Next, the object will be connected to the OpenServer using the line:
Set Ser ver = Cr eat eObj ect ( " PX32. OpenSer ver . 1" )
Alternatively, the above line can be replaced by the Connect function that has been
implemented in the OpenServer template.
The line then simply becomes:
Connect
Once the server is connected, the Server object can be used to call any number of
1990-2011 Petroleum Experts Limited

15

OpenServer

functions from any or all of the PETEX programs, i.e.,


Ser ver . DoCommand( Command1)
Ser ver . DoCommand( Command2)
Ser ver . Get Val ue( Var 1)
Once the public functions in the macro have completed, the server object connection
can be closed using:
Set Ser ver = Not hi ng
This line can be replaced by the Disconnect function that has been implemented in the
OpenServer template.
The line then simply becomes:
Di sconnect
These can be seen in the DoAll() subroutine above.

3.2.3 DoCmd
The DoCmd function is used to perform calculations and other functions such as file
opening and saving in the PETEX programs.
Only a subset of the commands available using the user interface are available. The
commands that are not supported are those that require some graphical interaction
such as graphical history matching in MBAL.
In the above example, DoCmd is used twice. The first time it is used to open the Oil.
MBI data file.
The second time it is used for running a prediction. The text string after the DoCmd
statement describes the command to be performed.
The text string always starts with the name of the program in which the calculation is to
be done. The rest of the text string describes the command check the following
sections describing each PETEX program for a list of possible calculations.
There is no output to the PXR file for this command. If there is any error, a message will
be written to PXBATCH.LOG.
Note that the abbreviation dc can be used in the batch file instead of DoCmd.
Note:
As previously mentioned, VBA was designed for use with simple functions that take only
a few seconds. If a function is called that takes more than one minute to complete, a
timeout error in Excel may occur depending on operating system, Excel version, setup
etc. If this happens, the DoSlowCmd should be used instead of the DoCmd.
OpenServer User's Manual

Using OpenServer

16

3.2.4 DoSet Sub Command


The DoSet command is used to set the value of a data item. It should be possible to
change most of the values that can normally be accessed via the user interface. Each
variable is identified by the unique text string that can be captured using a Ctrl + RightMouse Click keyboard and mouse action.
In the above example, the DoSet function is used in the DoAll() subroutine to change the
value of the initial oil in place to 250.0. The variable to be changed is determined by the
first input text string. The new value for the variable is passed in the second input text
string.
This function expects the value to be in the units currently displayed in the user interface.
It is the responsibility of the user writing the macro to ensure that the second text string
contains a valid number if the data item is numerical.
Unlike the DoCmd public function, the DoSet function does not return an error number.
As can be seen in the example macro subroutine DoSet(), the GetLastError() public
function must be called to check if any error occurred. This will return zero if the last
public function call was successful or an error number if not.
It is recommended that the DoSet() macro subroutine shown in the example
macro and provided in the OpenServer Template.xls file is used for all
applications as it already has error handling built in.
Please also see the main on-line help of PROSPER, as it contains a listing of
OpenServer variables and commands.

3.2.5 DoCommandAsync
This function is a variation of the DoCmd function. It is nearly always used in conjunction
with the IsBusy() function.
When a VBA macro is run, it executes and completes each line before moving onto the
next line. So when the DoCmd function is called for a long prediction, it may take
several minutes (or even hours) before the VBA can move onto the next line in the
macro.
Unfortunately, VBA was designed for use with simple functions that take only a few
seconds. If a function is called that takes more than one minute to complete, a timeout
error in Excel may occur depending on operating system, Excel version, setup etc..
The DoCommandAsync functions to be called that take a long time to complete without
any risk of timeouts. When a DoCommandAsync is called, the OpenServer starts the
calculation in the PETEX program but lets the VBA carry immediately on to the next line
in the macro. This avoids the timeout error in Excel.
Unfortunately it introduces another problem. What if the next line in the macro was a call
to the GetValue function to get the results of the calculation? The macro is likely to try to
1990-2011 Petroleum Experts Limited

17

OpenServer

get the calculated value before the calculation is finished! So the VBA still needs some
way of knowing when the calculation has finished.
Therefore it is usually necessary to append some VBA code after a call to
DoCommandAsync which loops until the calculation is finished. The inserted code uses
another function called IsBusy() to check if the calculation is finished.
This VBA code to do this is in the macro subroutine DoSlowCmd() in the example
macro. The code loops round until the IsBusy function returns a value greater than zero.
The only input argument is the name of the PETEX program in which the calculation was
called. Within the loop the code will wait 2 seconds before looping again. It also calls the
VBA function, DoEvents, which will allow other windows program to work whilst the VBA
is waiting for the calculation to finish.
It is recommended that the DoSlowCmd macro subroutine shown in the
example macro and provided in the OpenServer Template.xls file is used for all
applications as it already has error handling built in as well as the code to wait
for the function to finish.

3.2.6 DoGet Sub Command


The DoGet function is used to get the value of a data item or result. It should be
possible to query most of the values that can normally be accessed via the user
interface. Each variable is identified by a unique text string.
In the above example, the DoGet function is used in the DoAll() subroutine to get the
value of the first oil rate in the prediction tank results. The variable to be retrieved is
determined by the input text string. The return value of the function call is another text
string containing the value of the data item. If the value is numerical data, the return text
string will contain the formatted number and avoids having different functions for
different data types. The value will be returned in the units currently displayed in the user
interface.
As with the DoSet function, the GetLastError function must be used to check for errors
in the SetValue function. Note that in the macro subroutine DoGet, we use a different
function to get the actual error message using GetLastErrorMessage. This function
returns the error message corresponding to the last public function call for the
application specified by the input argument. If the last public function call was
successful, it will return a blank error message.
It is recommended that the DoGet macro subroutine shown in the example
macro and provided in the OpenServer Template.xls file is used for all
applications as it already has error handling built in.

OpenServer User's Manual

Using OpenServer

3.3

18

Batch File
This section describes how to access the public functions using a batch file. Each
command is typed into an ASCII file. A program is supplied by Petroleum Experts which
reads this ASCII file and calls the public functions in the PETEX programs and writes
the output to another ASCII file.

3.3.1 Running a Batch File


The first step to calling the public functions from the batch file is to create the batch file
itself. This is a simple ASCII file which can be created using NOTEPAD.EXE.
The only point to note is that when the batch file is saved it should have the file extension
PXB e.g. TEST.PXB.
Each public function to be called should be listed on a separate line.
Comment lines can be entered by starting the line with a # character e.g.
# This is my first batch file
# 1st January 2009
The details of how to list the public functions are shown in the following sections.
Once the batch file has been created and the functions listed in the file, we can run the
batch file:
Steps:
1. Run the latest version of the PETEX program that is going to be used e.g. MBAL and
GAP
2. Copy the file PXBATCH.EXE into the same directory as the PXB batch file (this file
can be found in the latest installation of the PETEX CD (C:/Program Files/Petroeum
Experts/IPM 7)
3. Run the PXBATCH program with the PXB file name as an argument
For example, if the batch file is called TEST.PXB, run PXBATCH b TEST.
PXBATCH will call each public function in turn and two files will be created by
PXBATCH. The first is called PXBATCH.LOG and will contain any error messages
from the batch run so it is important to examine the file after every batch run to check for
errors.
The second file will have the same file stem as the batch file but will have the extension
PXR.
In the above case, the second output file will be called TEST.PXR. This file will contain
any output from the public functions.

1990-2011 Petroleum Experts Limited

19

OpenServer

An example batch will be presented which shows calls to all the public functions in the
PETEX products. Then each function used in the example batch file will be described in
turn.
The example batch file is as follows (this file is available in the installed MBAL
examples, MBALTEST.PXB).:# Example batch file
PRINT Example batch file output
PRINT
docommand MBAL.OpenFile("C:\PETEX\SAMPLES\OIL.MBI")
setvalue MBAL.MB.TANK.OOIP 250.0
docommand MBAL.MB.RUNPREDICTION
getvalprint MBAL.MB.TANK.OOIP
PRINT "First oil rate ="
PRINTTAB
PRINTTAB
getvalue MBAL.MB.TRES[2][0][0].OILRATE
PRINT " bbls/day"
PRINT
PRINT End of example batch file output
The output PXR file from the above batch file is as follows:
250 ! MBAL.MB.TANK.OOIP
First oil rate =
16516.8 bbls/day
End of example batch file output

3.3.2 Formatting Commands


There are two commands, PRINT and PRINTTAB that can be used to format and write
text to the output PXR file.
The PRINT statement can be used in two ways:
- If some text is appended to the PRINT statement, the text will be printed out to
the PXR file. If desired the text might be enclosed in quotations.
- If the PRINT command is used without any text, it will move the output onto the
next line in the PXR file.
For example, consider the last three lines of the example batch file.
The first of these PRINT statements prints the text bbls/day. The second PRINT
statement moves the next output onto the next line. The third PRINT statement displays
the text End of example batch file output on the next line of the PXR file. Note that if the
second PRINT statement was not included, the output PXR file would look like:
. . bbl s/ dayEnd of exampl e bat ch f i l e out put
OpenServer User's Manual

Using OpenServer

20

The second formatting command is PRINTTAB. This command simply writes a tab
character to the PXR file.

3.3.3 DoCommand
The DoCmd function is used to perform calculations and other functions such as file
opening and saving in the PETEX programs.
Only a subset of the commands available using the user interface are available. The
commands that are not supported are those that require some graphical interaction
such as graphical history matching in MBAL.
In the above example, DoCmd is used twice. The first time it is used to open the Oil.
MBI data file.
The second time it is used for running a prediction. The text string after the DoCmd
statement describes the command to be performed.
The text string always starts with the name of the program in which the calculation is to
be done. The rest of the text string describes the command check the following
sections describing each PETEX program for a list of possible calculations.
There is no output to the PXR file for this command. If there is any error, a message will
be written to PXBATCH.LOG.
Note that the abbreviation dc can be used in the batch file instead of DoCmd.
Note:
As previously mentioned, VBA was designed for use with simple functions that take only
a few seconds. If a function is called that takes more than one minute to complete, a
timeout error in Excel may occur depending on operating system, Excel version, setup
etc. If this happens, the DoSlowCmd should be used instead of the DoCmd.

3.3.4 SetValue
This function is used to set the value of a data item. It should be possible to change
most of the values that can normally be accessed via the user interface.
In the example we use SetValue once to change the original oil in place to 250.0. The
first text string after SetValue defines the variable to be changed. The second text string
defines the new value of the variable. This function expects the value to be in the units
currently displayed in the user interface.
There is no output to the PXR file for this command. If there is any error, a message will
be written to PXBATCH.LOG.
Note that the abbreviation sv can be used in the batch file instead of SetValue.

1990-2011 Petroleum Experts Limited

21

OpenServer

3.3.5 GetValue and GetValPrint


These two functions are both used to get the value of a data item and print it to the PXR
output file. The only difference between the two functions is the format of the output to
the PXR file.
GetValPrint is used once in the example batch file to get the value of the original oil in
place this is to verify that the preceding SetValue worked correctly. The text string
after GetValPrint defines the variable to be written to the output PXR file. If the function
works correctly, the variable is written to the PXR file followed by the variable text string,
separated by an exclamation mark. It also moves the output onto the next line so any
further Print functions will start on the next line. This format can be seen in the example
PXR file above.
GetValue is also used once in the example batch file to output the first oil rate in the
prediction tank results. The function is called as for GetValPrint. The only difference is
that this function simply writes the value of the variable to the output PXR file without any
formatting. This means that other Print commands will be needed to format the output
as shown in the example batch file.
Note that the abbreviation gvp can be used in the batch file instead of GetValPrint. The
abbreviation gv can be used instead of GetValue.

3.4

Arrays and List Variables


Many of the variables in the programs have single values, such as a single reservoir
pressure in PROSPER. However some of the variables are arrays such as a multi-tank
system in MBAL. For this case, an index in the tag string must be specified.
Arrays in the programs can be variable or of a fixed size.
For example, if we have three tanks in an MBAL model then we access the OOIP of the
first tank using the following tag string :MBAL.MB.TANK[0].OOIP
Note that the index is zero based. By this, we mean that the 1st item has an index of 0,
the 2nd item will then have an index of 1, etc.
In some cases, one can identify an item in an array using the label of the item rather than
an index. For example if the label of the 1st tank is Lower05, the OOIP can be
accessed using the following tag string:
MBAL.MB.TANK[{Lower05}].OOIP

OpenServer User's Manual

Using OpenServer

22

One must place {} brackets around the label so the program will not interpret the label as
a numerical index.
NOTE: The label is the only part of a tag string which is case sensitive.
If there is only one item in the list, then the index is optional. For example, if there is only
one tank, the following tag string can be used:
MBAL.MB.TANK.OOIP
There are also some variables that are arrays with two or more dimensions. These
variables will require two or more indices in the tag string.
For example, consider the prediction results for the material balance tool in MBAL.
These have three indices where the first index indicates the result type, the second
index is the tank and the third index is the row.
A tag string for a result may look like:
MBAL.MB[0].TRES[0][0][3].GASSAT

3.4.1 Special Array Operations


There are a number of special features that can only be used with arrays.

3.4.1.1 COUNT
The COUNT feature returns the number of items that exist in an array. This feature only
works for arrays that have a variable size.
For example, the number of tanks in an MBAL model can be found using the command:
Range("C11") = DoGet("MBAL.MB.TANK.COUNT")
This command can also be used in multi-dimensional arrays to count the number of tank
prediction results for instance using the command:
Range("C11") = DoGet("MBAL.MB.TRES[2][3].COUNT")

3.4.1.2 NDIM
The NDIM feature can only be used for fixed length arrays. It is used to find the number
of dimensions in the array.

1990-2011 Petroleum Experts Limited

23

OpenServer

Consider a variable which is a three-dimensional array (this is not an actual variable).


An item in the array may be accessed as follows:
Range("C11") = DoGet("MBAL.MB.TANK.PV[1][5][9]")
One can find the number of dimensions by calling the following function:
Range("C11") = DoGet("MBAL.MB.TANK.PV.NDIM")
This function will return the value 3.

3.4.1.3 DIMSIZE
The DIMSIZE feature can only be used for fixed length arrays. It is used to find the fixed
number of items for a given dimension of the array.
Consider a variable which is a three-dimensional array (this is not an actual variable).
Now, this array has 3 items in the 1st dimension, 8 in the 2nd dimension and 20 in the
3rd dimension. So the maximum indices we can access would be (remembering that
the indices are zero based):
Range("C11") = DoGet("MBAL.MB.TANK.PV[2][7][19]")
One can find the fixed number of items in the second dimensions by calling the following
function:
Range("C11") = DoGet("MBAL.MB.TANK.PV.DIMSIZE[1]")
This function will return the value 8.
Similarly, DIMSIZE[0] will return 3 and DIMSIZE[2] will return 20.

3.4.1.4 RESET
The RESET feature can only be used for arrays with a variable number of items. It is
used to delete all the items in the array and thus reduce the number of items in the array
to zero.
For example, to delete all the items in the tank production history for an MBAL model,
use the command:
DoSet "MBAL.MB.TANK.PRODHIST.RESET", ""

OpenServer User's Manual

Using OpenServer

24

3.4.1.5 SORT
The SORT feature can only be used for arrays with a variable number of items. It is
used to sort all the items in the array in order. The method of sorting is the same as
used in the corresponding dialog of the program.
For example, the tank production history for an MBAL model is sorted by the date of
each item in the array.
To sort the production history, use the command:
DoSet "MBAL.MB.TANK.PRODHIST.SORT", ""

3.4.1.6 ADD
The ADD feature can only be used for arrays with a variable number of items. It is used
to add a new item to the end of an array.
For example, to add two rows to an empty table of tank production history for an MBAL
model, use the commands:
DoSet
DoSet
DoSet
DoSet
DoSet
DoSet
DoSet
DoSet

"MBAL.MB.TANK.PRODHIST.ADD", ""
"MBAL.MB.TANK.PRODHIST[0].TIME", "01/01/2009"
"MBAL.MB.TANK.PRODHIST[0].PRESS", "6980.0"
"MBAL.MB.TANK.PRODHIST[0].CUMGAS", "0.0"
"MBAL.MB.TANK.PRODHIST.ADD", ""
"MBAL.MB.TANK.PRODHIST[1].TIME", "01/02/2009"
"MBAL.MB.TANK.PRODHIST[1].PRESS", "6589.0"
"MBAL.MB.TANK.PRODHIST[1].CUMGAS", "12.8"

3.4.1.7 DELETE
The DELETE feature can only be used for arrays with a variable number of items. It is
used to delete a particular item in the list and it will reduce the number of items in the list
by one.
For example, the following command will delete the 4th row in the production history
table of an MBAL model:
DoSet "MBAL.MB.TANK.PRODHIST[3].DELETE", ""

1990-2011 Petroleum Experts Limited

25

OpenServer

3.4.1.8 INSERT
The INSERT feature can only be used for arrays with a variable number of items and it
is used to insert a new item at a particular position in the list. All the items at and above
the position to insert will be moved up one position in the list, so the new item can be
inserted.
For example, the following command will insert a new row in the production history table
of an MBAL model. The new row will become the 7th row:
DoSet
DoSet
DoSet
DoSet
DoSet

3.5

"MBAL.MB.TANK.PRODHIST[6].INSERT", ""
"MBAL.MB.TANK.PRODHIST[6].TIME", "10/01/2000"
"MBAL.MB.TANK.PRODHIST[6].PRESS", "2700.0"
"MBAL.MB.TANK.PRODHIST[6].CUMOIL", "4.0"
"MBAL.MB.TANK.PRODHIST[6].CUMGAS", "4000.0"

Multiple Values for Arrays


This section describes how the DoSet / DoGet functions are used to retrieve and set
more than one item in an array.

3.5.1 Multiple DoGet Values


Consider a situation where one wishes to extract tank pressures from a 5-tank MBAL
model.
The following fragment of VBA code could be used:
Range("C1")
Range("C2")
Range("C3")
Range("C4")
Range("C5")

=
=
=
=
=

DoGet("MBAL.MB.TANK[0].PRESS")
DoGet("MBAL.MB.TANK[1].PRESS")
DoGet("MBAL.MB.TANK[2].PRESS")
DoGet("MBAL.MB.TANK[3].PRESS")
DoGet("MBAL.MB.TANK[4].PRESS")

A quicker method is to get all the pressures in one DoGet call, and there are two
options to achieve the objective:
- Get the pressures for all the available tanks: Range("C1") = DoGet("
MBAL.MB.TANK[$].PRESS")
- Get the pressures for tank index zero through to tank index four: Range
("C1") = DoGet("MBAL.MB.TANK[0,1,2,3,4].PRESS")
The above example using multiple DoGet calls will return all the tank pressures in the
model.

OpenServer User's Manual

Using OpenServer

26

The values will be returned in a single text variable separated by the | character e.g.
5132.0|4893.0|4598.3|4882.0|4976.6
There are several other variations which can be used to extract data from multiple tanks
using the following syntax:
- Return the pressure for tank 0,1,2 and 4: Range("C1") = DoGet("MBAL
.MB.TANK[0:2,4].PRESS")
- Return the pressure for tank 1 and 3: Range("C1") = DoGet("MBAL.
MB.TANK[1,3].PRESS")

3.5.2 Multiple DoSet Values


The DoSet function can use multiple tag names in a similar manner to the DoGet
function as previously described. All the different forms of the variable tag names used
by the DoGet can be used for the DoSet function.
For the DoSet function, a text variable is passed to the function which contains a list of
the values to set, separated by the | character. For example, the following string can
be used to set multiple OOIP's in a multi-tank system to tank 1, 4 and 5:
DoSet " MBAL. MB. TANK[ 1, 4, 5] . OOI P" , " 250. 0| 129. 0|
349. 0"
The above command will set the OOIP of tank index 1 to 250.0, tank index 4 to 129.0
and tank index 5 to 349.0.
There is an extra feature available with the DoSet function, where all tanks specified in
the indices array [1,4,5] can have the same OOIP assigned using the following DoSet
command:
DoSet " MBAL. MB. TANK[ 1, 4, 5] . OOI P" , " 250. 0"
The above technique can be used to set many items in a list to the same value.

3.5.3 Using More than One Multiple Array


The examples shown so far allow more than one index of a particular array to be
accessed. However, we can also access multiple indices of more than one array at a
time.
Consider the tag name for accessing the production data for an MBAL tank:
MBAL.MB.TANK[2].PRODHIST[4].CUMOIL
This tag identifies the Np for the 4th index of the production history table for the 2nd index
1990-2011 Petroleum Experts Limited

27

OpenServer

tank.
We have already seen how we could access more than one production history record or
more than one tank e.g. :
MBAL.MB.TANK[2].PRODHIST[3 :7].CUMOIL
MBAL.MB.TANK[$].PRODHIST[4].CUMOIL
However we can also have multiple indices for both the production history records and
the tank in the same tag name.
For example :
DoSet "MBAL.MB.TANK[1,2].PRODHIST[4:6]", "11.2|14.5|16.3|
5.2|6.1|7.5"
The above command sets indices 4, 5 and 6 of the production history for both tanks 1
and 2. The data in the values to set is ordered such that the index to the right varies
first.
In other words the order is:
MBAL.MB.TANK[1].PRODHIST[4].CUMOIL
MBAL.MB.TANK[1].PRODHIST[5].CUMOIL
MBAL.MB.TANK[1].PRODHIST[6].CUMOIL
MBAL.MB.TANK[2].PRODHIST[4].CUMOIL
MBAL.MB.TANK[2].PRODHIST[5].CUMOIL
MBAL.MB.TANK[2].PRODHIST[6].CUMOIL
As before, this method will work equally well for the DoGet function.
The example shown above has two arrays. However, it is possible to use multiple
indices for any number of arrays in a tag string e.g. :
MBAL.MB.WELL[1:3].IPR[4,7].CONEMATCH[$][3,5:8].PRESS

3.6

Units
Units are handled the same way in all the IPM programs.
Use of Units in OpenServer:
By default, when a variable is accessed from the OpenServer using the DoGet function,
the value returned is in the same units as defined for the current model.
For example, if a GAP model has degrees Celcius selected for the surface temperature
variable of pipes, and the value entered for pipe pipe3 is 10 degrees C, then
performing a DoGet on the tag GAP.MOD[0].PIPE[{pipe3}].TMPSUR will return 10.

OpenServer User's Manual

Using OpenServer

28

Similarly, when a DoSet function is used, the value passed to the function is interpreted
as being in the current unit displayed in the interface.
The units a variable is using can be queried using the UNITNAME(tag) function. This
function will return the units label currently in use for that variable.
For example, performing a DoGet function on the string GAP.UNITNAME(MOD[0].
PIPE[{pipe3}].TMPSUR) would return the string degrees C.
The same information can be obtained by appending UNITNAME to a tag e.g. GAP.
MOD[0].PIPE[{pipe3}].TMPSUR.UNITNAME
There are a number of ways of modifying the above behaviour.
Variables are normally stored internally in the programs in field units. To access a
variable in field units, not the currently selected unit, use the RAWVAL(tag) function.
For example, performing a DoGet on the string GAP.RAWVAL(GAP.MOD[0].PIPE
[{pipe3}].TMPSUR) would return 50, since field units for temperature are degrees F.
Similarly, if the RAWVAL modifier is used for a tag name with a DoSet function, the
OpenServer will interpret the passed value as being in Oil Field units.
The automatic conversion of variable values from field units to user selected units can
be switched off completely if desired. This is accomplished by setting the global
variable DOUNITCONV, which is 1 by default, to zero. E.g.:
DoSet PROSPER.DOUNITCONV, 0
Setting the above flag means all subsequent DoGet and DoSet calls will use Oilfield
units. Note that unit conversion can be switched on again by setting the DOUNITCONV
variable back to 1.
The currently selected units system can be set using the SETUNITSYS() function.
Performing a DoCmd on the string MBAL.SETUNITSYS(""Norwegian S.I."") will set
the input and output units to the Norwegian S.I. system for the current MBAL model.
Use of Units Validation Ranges in OpenServer:
There are also methods to get and set the minimum and maximum validation ranges as
defined in the units system dialog.
To get the minimum value of variable, add UNITMIN to the end of the tag name e.g.
Range("C1") = DoGet("MBAL.MB.TANK[0].PRESS.UNITMIN")
Similarly, the maximum validation range of a unit value can be obtained by appending
1990-2011 Petroleum Experts Limited

29

OpenServer

the tag with UNITMAX.


Minimum and maximum values of a variable with the same tag can be changed by using
the DoSet function as per the following example:
DoSet MBAL.MB.TANK[0].PRESS.UNITMAX, 15000.0

3.7

Start/Shutdown Commands
To use the OpenServer to communicate with a particular IPM program, the IPM
program must be running.
The program can be started manually e.g. using the Start menu.
Alternatively there are two special commands that can be used to start an IPM program
and to shut down an IPM program.
To start an IPM program, use the command:DoCmd GAP.START()
This will start the GAP program that was last installed on the working PC.
Other IPM programs can be started using the same syntax by replacing GAP with the
appropriate program name i.e., MBAL, PVTp, PROSPER, REVEAL, and RESOLVE.
To start an IPM program installed in a particular directory, use the command:DoCmd GAP.START(C:\PETEXPROGS)
This will start the GAP program that has been installed in the directory C:
\PETEXPROGS.
Another method to start a particular program is to use the command SHELL. SHELL is
a Visual Basic command to run a particular executable.
For example, to start GAP, the command line will be
SHELL (C:\Program Files\Petroleum Experts\IPM 7\GAP.exe)
It is also possible to start a given IPM program with the users own timeout period. This
is particularly useful if the IPM executable and licenses are located on a network where
it takes a long period of time to access them. In such cases, the classic timeout period
might be too short.
To start an IPM program with this timeout option, use the command:

OpenServer User's Manual

Using OpenServer

30

DoCmd "GAP.STARTASYNC()"
It will be possible to check whether the program is ready to use by using the following
command:
DoGet "GAP.ISREADY"
This will return
0 : if the program is not ready
1 : if the program is ready
2 : if the program has not yet started or has been unable to find a license.
The ISREADY command can also be used with the other applications of IPM.
To shut down an IPM program, use the command:
DoCmd GAP.SHUTDOWN
This will shutdown the GAP program. It will close the program without asking if the
current data is to be saved, thus it is necessary to make sure the appropriate command
has been used to save the data file prior to using the SHUTDOWN command. Other
IPM programs can be shut down using the same syntax by replacing GAP with the
appropriate program name (MBAL, PVTP, PROSPER, REVEAL, RESOLVE).

1990-2011 Petroleum Experts Limited

Chapter

GAP and the OpenServer

GAP and the OpenServer

4.1

Introduction and Variable Lists

32

OpenServer provides GAP with a completely open architecture that enables access to
modify and control any data item within a given GAP model from any client application
capable of supporting Automation. OpenServer functionality with GAP provides
complete freedom with regard to importing, exporting or reporting data to and from
virtually any data source.
OpenServer also provides the added ability to execute field development decisions
during a GAP prediction from dynamically monitoring results at any level of a given
production system. For example, well drilling schedules can be developed from using
OpenServer to monitor an overall plant capacity, then perform drilling and completion
tasks to open new wells to maintain a given plant capacity.
GAP has also made a set of OpenServer commands available, which in addition to
providing a batch mode of working, can also be used to interfaceGAP to other
applications such as process simulators, external optimizers or reservoir simulators.
GAP has also been given a new prediction mode, the step-by-step mode, which allows
users, via OpenServer, to customize GAP prediction runs.
This section lists the variables available to the OpenServer from GAP. Most variables
in GAP are accessed using a tag string consisting of several levels (sections), each
level identifying a record (structure).
All variables from GAP begin with the string GAP. This is to allow OpenServer to
differentiate between the different Petroleum Experts products, and the remaining part
of the string identifies the OpenServer variable.
EXAMPLE: if we wish to access the surface temperature of the pipe with label pipe3
in the currently loaded GAP model, we would use the string GAP.MOD[0].PIPE[{pipe3}].
TMPSUR.
The first section of the string is GAP, which identifies the Petroleum Experts product
taken into account. This level is further defined as Top Level.
The next section is MOD[0], which identifies the currently loaded GAP model. This
level is further defined as MOD Level.
The next section is PIPE[{pipe3}], which identifies the pipe element with label pipe3.
This level is further defined as Node Level.
-

The final section is TMPSUR, the name of the field in the pipe record that
contains the surface temperature.

Depending of the type of variable to access, all these OpenServer string sections or
1990-2011 Petroleum Experts Limited

33

OpenServer

only part of them will be used in specific string.


It is important to notice that all the elements of an OpenServer string expressed inbetween brackets and curly brackets are case sensitive. All the other elements of the
OpenServer strings are not case sensitive.

4.1.1 Ctrl + Right mouse click


Most GAP dialogues and fields support the Ctrl+Right click feature, or by simply
right clicking in the given variable field. This feature enables to automatically obtain the
OpenServer string related to a certain variable.
To get the OpenServer tag of a variable, hold the Control key down and right click on
the variable field (or simply right click in the variable field). GAP display an information
box containing the OpenServer tag of the variable related to the field with, in some
cases, a list of possible keywords (see literal constants below) and the current value of
this variable.
For example, if we consider the previous example, and want to access the surface
temperature of the pipe with the pipe3 label, the following screen will be displayed,
specifying the access string previously described.

OpenServer User's Manual

GAP and the OpenServer

34

The OpenServer variable accessed through this screen can be directly copied on the
clipboard by clicking on the Copy button in the screen. The OpenServer variable can
then be directly pasted into the macro code for instance.

4.1.2 Execute OpenServer Statement


This option is available from the main GAP menu bar, using the following path: Edit /
Execute OpenServer Statement.
The following screen is then displayed and allows monitoring of specific data from
OpenServer commands.

A particular string can be entered by hand or copied from the clipboard. Then, the Eval
button will do the requested operation of:
- DoGet (i.e. obtain the current value of the variable considered)
- DoSet (i.e. set the value of the variable considered)
- DoCommand (i.e. execute a GAP calculation for instance).
Global Element Changes using OpenServer
This can be used for instance to change the value of a specific variable for all the wells
of a system simultaneously. To act on all elements of a specific type (i.e. all the wells, all
the pipelines, etc), it is possible to replace the label of the element by a $ sign.
For instance, the string GAP.MOD[{PROD}].WELL[$].IPR[0].PI will link to the
productivity indexes of all the wells of the system, and can be used to change the
productivity indexes of all the wells of the system in one operation.

1990-2011 Petroleum Experts Limited

35

OpenServer

Selected Items Only


Using the select feature in GAP (blue arrow from the main tool bar) enables specific
elements to be manually selected and doing so will place a blue circle around the
selected element.
Selecting several wells, then executing the following OpenServer statement (GAP.MOD
[{PROD}].WELL[$].IPR[0].PI), only the selected well PI's will be changed.

4.1.3 Specific Units Handling Commands


The Unit System in GAP can either be changed directly through Units section or
through Preferences (File| Preferences).
To specify input and output Units for the opened GAP model the following commands
can be used:
DoSet ("GAP.InputUnitSystem", "OilField")
DoSet ("GAP.InputUnitSystem", 0)
DoSet ("GAP.OutputUnitSystem", "OilField")
DoSet ("GAP.OutputUnitSystem", 0)
The argument can either be specified as a string or as a number; the following options
are available:
0 - "OilField"
1 - "NorwegianSI"
2 - "CanadianSI"
3 - "GermanSI"
4 - "FrenchSI"
5 - "LatinSI"

Preferences option allows the user to specify the DEFAULT input and output Unit
System that will be used as a reference. If in this case GAP file is opened or reloaded it
will be automatically converted into the specified DEFAULT Unit System.
The following OpenServer commands are available:
DoSet ("GAP.Preferences.DefaultInputUnitSystem", "OilField")
DoSet ("GAP.Preferences.DefaultOutputUnitSystem", "OilField)

OpenServer User's Manual

GAP and the OpenServer

36

EXAMPLE
The following example of code will define default Units System and reloads the GAP file,
to ensure that the file is successfully converted into the units specified:
set default Unit System
DoSet ("GAP.Preferences.DefaultInputUnitSystem", "CanadianSI")
DoSet ("GAP.Preferences.DefaultOutputUnitSystem", "CanadianSI)
DoSet ("GAP.Preferences.AlwaysUseDefaultUnitSystems", 1)
reload GAP file
DoGAPFunc ("GAP.OPENFILE(""file_path"")")

4.1.4 Literal Constants


In previous releases (i.e. previous to GAP version 5.0), variables such as the
WELLTYPE were defined using numerical indexes (0 - Oil naturally flowing, 1
Gaslifted, 2 ESP lifted, etc).
The use of numerical indexes has two main drawbacks:
They make the OpenServer script code more difficult to read. One has to remember
what well types 0, 1, 2, 3, ...n correspond to.
The GAP internal values for these variables may have to change in the future, making
existing scripts incompatible.
Since version 5.0, GAP uses keywords rather than numerical indexes to represent such
variables.
For instance, the well type is now defined as OilProducerNoLift for a naturally flowing
oil well, OilProducerGL for a gas lifted oil well, OilProducerESP for an ESP lifted oil
well, etc.
If we use the Right Click option in order to obtain the OpenServer access string
defining the well type from the GAP well Summary screen, the screen obtained
displays the access string as well as the literal constants available for each variable.

1990-2011 Petroleum Experts Limited

37

OpenServer

This means that DoGet(GAP.MOD[{PROD}].WELL[{welllabel}].WELLTYPE) will return


OilProducerNoLift instead of 0. This may make some existing scripts created before
the GAP version 5.0 incompatible with this release of GAP.
The DoSet command supports both literal and numerical constants.
recommend to use literal constants instead of numerical constants.

We highly

To eliminate the short term incompatibility issue of existing scripts when considering a
DoGet command, a new OpenServer variable called OpenServerUseKeywords has
been added. It allows the script to switch on or off the use of literal constants (see
OpenServerUseKeywords below). The default value for this variable is 1 which means
that GAP will use literal constants whenever possible.
It is highly recommended that new OpenServer scripts use literal constants, and that
existing scripts are upgraded as soon as possible. This will hugely reduce the amount of
maintenance required on these scripts in the future.
In the following descriptions, the variables using literal constants will be marked
by an asterisk *.

4.1.5 Date Handling within GAP


By default, the dates in GAP are refered to using a numerical constant format, with the
reference being 01/01/1900, which corresponds to day1 and a value of 1 for the date
numerical constant.
As soon as a DATE OpenServer keyword is used, it will refer to that type of numerical
OpenServer User's Manual

GAP and the OpenServer

38

format.
If the suffix DATESTR is added after the suffix DATE, i.e. DATE.DATESTR, then the
date will be converted automatically from a numerical format to a day/month/year format,
or month/day/year, depending on the regional settings of the machine.
If the suffix DATETIMESTR is added after the suffix date, then the date will be
converted automatically from a numerical format to a day/month/year hrs/min/sec format.
If the suffix TIMESTR is added after the suffix date, then the date will be converted
automatically from a numerical format to a hrs/min/sec format.
NOTE: In some cases when the date is retrieved from GAP into the Excel spreadsheet
using DATE keyword, and then internal Excel conversion is used to translate it from
numerical into dd/mm/yyyy format day and month numbers can be flipped with
erroneous date in result. To avoid this CDate() VBA command can be used for date
conversion.

4.1.6 OpenServer "Wild Cards"


The GAP OpenServer includes some syntax options that can act as "Wild Cards". A
certain syntax used in the OpenServer string will replace a label for instance.
The use of the following signs can be considered:
Dollar Sign ($):
In an OpenServer string such as GAP.MOD[{PROD}].PIPE[{Riser}].Desc[1].Length
that relates to the length of the first pipeline section of the pipeline labelled "Riser", the
name of the pipeline i.e., {Riser}, could be replaced by a $ sign between the square
brackets.
The OpenServer string will then become: GAP.MOD[{PROD}].PIPE[$].Desc[1].
Length
If a DoSet command is used with this OpenServer string, then the length of every first
pipeline section in the GAP model will be changed to the value specified.
@ Sign:
In an OpenServer string such as GAP.MOD[{PROD}].EQUIP[{Riser}].Label that
relates to the label of the pipeline labeled "Riser", the name of the pipeline could be
replaced by the following syntaxes:
@Character*: where Character refers to an asterisk (*), will match any equipment name
starting by the character or group of characters specified.
The OpenServer string will then become: GAP.MOD[{PROD}].EQUIP[{@*}].Label
@Letter?: will match any equipment name with a maximum of two characters starting by
the letter specified
1990-2011 Petroleum Experts Limited

39

OpenServer

The OpenServer string will then become: GAP.MOD[{PROD}].EQUIP[{@Letter?}].


Label
@Digit#: will match any equipment name with a maximum of two characters starting by
the digit specified
The OpenServer string will then become: GAP.MOD[{PROD}].EQUIP[{@Digit#}].Label
@AlphaCharacter!: will match any equipment name with a maximum of two characters
starting by the alpha character specified
The OpenServer string will then become: GAP.MOD[{PROD}].EQUIP
[{@AlphaCharacter!}].Label
Examples:
If the GAP model considered has 5 wells with the following labels: W1, W2, W3, Well4
and Well5 and the following OpenServer string is used:
DoGet("GAP.MOD[{PROD}].EQUIP[{@W?}].Label") then the following elements will
be returned: W1|W2|W3
For instance, if the GAP model considered has 5 wells with the following labels: W1,
W2, W3, Well4 and Well5 and the following OpenServer string is used:
DoGet("GAP.MOD[{PROD}].EQUIP[{@W*}].Label") then the following elements will
be returned: W1|W2|W3|Well4|Well5

4.1.7 Variables at Top Level


Variable Name
Description
EnableNetworkVali Works with a DoSet structure, as illustrated below:
dation
DoSet "GAP.EnableNetworkValidation", 0
This variable can be set to either 0 or 1.
In the case it is setup to 0, the validation process of GAP will be
deactivated.
In the case it is setup to 1, the validation process of GAP is
activated. This is the default setup.
The purpose of this variable is to enable speeding up OpenServer
routines by avoiding the validation process of the GAP network.
This is to be used with caution as for instance if the validation
process is deactivated and one of the nodes is masked, the
elements upstream of the masked node will not be considered in
the calculation but will not be masked either. This can lead to
erroneous answers when using OpenServer routines that check
the status of some of the nodes in the network.

OpenServer User's Manual

GAP and the OpenServer

40

FNA

Contains the floating point value used by GAP to indicate the


variable value is undefined.
Example: when a DoGet function returns FNA, the variable
targeted by the DoGet function is not defined.
FNAT
A test value which should be used to test whether a variable is
defined or not.
Example: a variable is defined if the variable value < FNAT
LASTCMDRET
Contains the returned value of last command.
LASTERROR
Contains the error code of the last error.
MOD[i]
Defines the GAP model to be considered.
If the GAP model loaded is a single file, use MOD[0].
If the GAP model loaded has associated injection systems, one
can use MOD[{PROD}] or MOD[0] for the production system, MOD
[{WINJ}] or MOD[1] for the water injection system, and MOD[{GINJ}]
or MOD[2] for the gas injection system.
PREDCURDATE OBSOLETE:
Contains current prediction step date when running a prediction.
This variable contains the date at the start of the timestep, before
any calculations have been done.
This variable is kept for backward compatibility only and should
therefore not be used in any new scripts.
PREDCURSTEPD Contains the step date at the end of the current prediction step,
ATE
after the calculation has been done.
It therefore corresponds to the date of the beginning of the next
time-step.
eg. A = DOGET (GAP.PREDCURSTEPDATE)
PREDPREVSTEP Contains the step date at the beginning of the current prediction
DATE
step, before any calculation is done.
It is the equivalent of the PREDCURDATE variable used in
previous versions.
PREDCURSTEPN Contains the current prediction time-step number.
O
PREDSTEPLENG Contains current prediction step duration when running a
TH
prediction.
eg. b = DOGET (GAP.PREDSTEPLENGTH)
OpenServerUseKe Switches on and off the use of literal constants (see Literal
ywords
Constants paragraph above).
The values characterizing this variable are defined as follows:
0 use numerical indexes
1 use literal constant (default value)
Example: the
DoSet("GAP.OpenServerUseKeywords"), 0
command will switch off the use of literal constants and keep only
the use of numerical indexes.

1990-2011 Petroleum Experts Limited

41

OpenServer

Alternatively, this OpenServer variable can be set when the


program
starts
by
creating
and
setting
the
KEY_CURRENT_USER\Software\Petroleum
Experts\GAP\
OpenServer\UseKeywords dword value to 0 or 1.
OpenServerCaseS Makes GAP OpenServer statement case sensitive for
ensitive
OpenServer tag labels i.e. for labels between { }.
The values returned for this variable are defined as follow:
0 not case sensitive (default value)
1 case sensitive
Alternatively, this OpenServer variable can be set when the
program
starts
by
creating
and
setting
the
KEY_CURRENT_USER\Software\Petroleum
Experts\GAP\
OpenServer\CaseSensitive dword value to 0 or 1.

4.1.8 Variables at MOD Level


All of the data contained in the currently loaded GAP model (or models, if associated
injection systems are present) is accessed through the MOD variable. This variable
requires an index i.e., MOD[0], MOD[1], MOD[2] or MOD[3] to select the particular
model.
The use of literal constants is highly recommended (see Literal_Constants). This
means that the model method can be changed to a gas injection system using the
following string, rather than having to use a numeric index:
DoSet ("GAP.MOD[{PROD}].SysType"), "GasInjection"
Since GAP can have four models, i.e., a production model and three associated
injection models, the fields of the variables at MOD level will be divided in three
categories:
- Model Options
- Solver and Prediction Setup
- System Constraints Setup
- Model Equipment List

4.1.8.1 Model Options


Variable Name
ActualLayout.
UseIPRdP

OpenServer User's Manual

Description
Contains the IPR dP shift status in the Actual/Production Validation
section.
The values characterising this variable are defined as follows:
0 - No IPR dP shift is taken into account
1- The IPR dP shift facility is activated.

GAP and the OpenServer

ASSOCFLAG

BGCORR

BOCORR

COMPMODE *

CORRNAME[i] *

Currency
CurrShort
DefaultGasLiftFlui
dID
DefaultTaxRegim
eID
DefaultWatInjFluid
ID
EmulsionCorrecti
onList[i].Label
EmulsionCorrecti

42

Describes the type of GAP model considered.


The values characterising this variable are defined as follows:
0 - No associated models
1 - Associated water injection model
2 - Associated gas injection model
3 - Associated water and gas injection models
Example: the GAP.MOD[0].ASSOCFLAG string will link to the
index characterising the type of field model considered.
Contains the gas process correction factor. Can be used to
reconcile surface rates as calculated by GAP Black Oil process
versus surface rates as calculated by some other process.
Contains the oil process correction factor. Can be used to reconcile
surface rates as calculated by GAPs Black Oil process versus
surface rates as calculated by some other process.
Contains the system settings regarding fluid composition.
This variable can be characterised as follows:
NONE The system does not take into account any fluid
composition, at the exception of H2S, CO2 and N2
impurities.
TRACKING The system is set to track the fluid composition
at each system node.
FULL The system is a fully compositional system.
BOLumpDelump - The system is set to track the fluid
composition at each system node and can be set to use a
lumped composition or full composition.
Black oil
correlations are used for all pressure loss calculations.
Array [40] of correlation names.
Enables to determine the flow correlation associated with each
correlation index.
Example:
the
DoGet(GAP.MOD[{PROD}].CORRNAME[1])
command will return the Beggs and Brill flow correlation name.
It is highly recommended to use literal constants to set and retrieve
multiphase flow correlation data.
Refers to the currency used for revenue calculations.
Refers to the label os the currency used for revenue calculations.
Contains the FluidList index of the default fluid used for gas lifting
purposes.
Contains the Tax Regime list index of the default tax regime setup
used for optimisation calculations.
Contains the FluidList index of the default fluid used for water
injection purposes.
Contains the label of the emulsion correction model considered.
The index refers to the row index of the emulsion model considered
in the emulsion correction list.
Contains the value of the first match parameter used in the emulsion

1990-2011 Petroleum Experts Limited

43

OpenServer

onList[i].
MatchParam[0]
EmulsionCorrecti
onList[i].
MatchParam[1]
EmulsionCorrecti
onList[i].
MatchParam[2]
EmulsionCorrecti
onList[i].
MatchParam[3]
EmulsionCorrecti
onList[i].
MatchParam[4]
EmulsionCorrecti
onList[i].WctMax1
EmulsionCorrecti
onList[i].WctMax2
ExtraMultiplier

viscosity model.
Contains the value of the second match parameter used in the
emulsion viscosity model.
Contains the value of the third match parameter used in the
emulsion viscosity model.
Contains the value of the fourth match parameter used in the
emulsion viscosity model.
Contains the value of the fifth match parameter used in the emulsion
viscosity model.

Contains the value of the maximum left water cut used to match the
emulsion viscosity model.
Contains the value of the maximum rigth water cut used to match the
emulsion viscosity model.
Contains the multiplier used to convert from the default currency (i.e.
US Dollars) to the currency chosen for revenue calculations.
FILENAME
Contains the file name of the model and its corresponding path.
FlashOptions.EoS Contains the type of equation of state model used to characterise
*
the fluids in the model.
Two equation of state models are available using the following literal
constants:
PR Peng Robinson
SRK Soave Redlich Kwong
FlashOptions.
Contains the type of optimisation mode used to characterize the
OPTMODE *
fluid.
Three optimisation mode are available using the following literal
constants:
LOW Low optimisation mode
MEDIUM Medium optimisation mode
OFF No optimisation mode
FlashOptions.
Refers to the type of separator calculation used in the model.
SEPCALCMODE Three type of separator calculations are available, using the
*
following literal constants:
NOSEPTRAIN The model will not be using a specific
separator train
SEPTRAIN The model will be using a specific separator
train
KVALUES The model will be using K values
FlashOptions.
Refers to the set of separator pressures used when the model
SEPPRES[i]
selected uses a specific separator train.
Up to ten values of separator pressures can be entered, using the

OpenServer User's Manual

GAP and the OpenServer

44

index following the main string name.


FlashOptions.
Refers to the set of separator temperatures used when the model
SEPTEMP[i]
selected uses a specific separator train.
Up to ten values of separator temperatures can be entered, using
the index following the main string name.
FlashOptions.
Refers to the use of volume shift for fluid characterization purposes.
VOLUMESHIFTM Two status are available using the following numerical constants:
ODE
0 The fluid has not been characterized using volume shift
1 The fluid has been characterized using volume shift
FluidList[i].CGR Refers to the CGR of the ith fluid of the fluid list.
FluidList[i].
GasGravity
FluidList[i].GOR

Refers to the gas gravity of the ith fluid of the fluid list.

Refers to the GOR of the ith fluid of the fluid list.


FluidList[i].Label Contains the label of the injection fluid considered.
The index refers to the row index of the fluid considered in the fluid
list.
FluidList[i].
Refers to the oil gravity of the ith fluid of the fluid list.
OilGravity
FluidList[i].
Refers to the CO2 content of the ith fluid of the fluid list.
PctCO2
FluidList[i].
Refers to the H2S content of the ith fluid of the fluid list.
PctH2S
FluidList[i].PctN2 Refers to the N2 content of the ith fluid of the fluid list.
FluidList[i].Type * Contains the type of fluid considered.
Four type of fluids are available using the following literal constants:
OIL
GAS
WATER
OTHER
FluidList[i].Watsal Refers to the water salinity of the ith fluid of the fluid list.
FluidList[i].WCT
FluidList[i].WGR

Refers to the water cut of the ith fluid of the fluid list.
Refers to the WGR of the ith fluid of the fluid list.

GasRevenueMod Refers to the type of gas revenue considered for production


e*
optimisation purposes.
Two types of gas revenue can be taken into account using the
following literal constants:
VOLUME
GROSSHEATINGVALUE
GINJNAME
Contains the file name of the associated gas injection system.
ISDIRTY
Enables to determine if the model has been modified since its last
saved version.
The values characterising this variable are defined as follows:

1990-2011 Petroleum Experts Limited

45

OpenServer

0 - The model has not been modified since its last version.
1 - The model has been modified since its last version.
OptMethod
Contains the type of optimisation method used in the model.
The numerical indexes characterising this variable are defined as
follows:
0 - Production
1 - Revenue
2 - Oil Rate Only
3 - Gas Rate Only
4 - Water Rate Only
Predict
Contains the prediction method used in the model.
The values characterising this variable are defined as follows:
(previously
0 - Only the pressure drops are calculated in the system
ISPANDT)
pipelines
1 - Both pressure drops and temperature are calculated in
the system pipelines
PredMode *
Contains the status of the model in terms of prediction:
OFF - The prediction mode of GAP is not activated.
ON - The prediction mode of GAP is activated.
SYSLOG
Contains the text comments linked to the system. These comments
will be displayed in GAP in the Options / System Summary
screen.
SYSTITLE
Contains the system title. This title will be displayed in GAP in the
Options / System Summary screen.
SYSTYPE *
Contains the type of system considered.
Three type of systems are listed using the following literal constants:
- Production
- WaterInjection
- GasInjection
- GasLIftInjection
Example: DoSet ("GAP.MOD[{PROD}].SysType"), "gasliftinjection"
The above DoSet function would set the method to be able to
construct a gas lift injection network, etc.
TaxRegimeList[i]. Refers to the cost of diluent in the ith tax regime of the tax regime
CostDiluent
list.
TaxRegimeList[i]. Refers to the cost of injected gas in the ith tax regime of the tax
CostInjGas
regime list.
TaxRegimeList[i]. Refers to the cost of power in the ith tax regime of the tax regime list.
CostPower
TaxRegimeList[i]. Refers to the cost of power fluid in the ith tax regime of the tax
CostPowerFluid regime list.
TaxRegimeList[i]. Refers to the cost of water processing in the ith tax regime of the tax
CostWater
regime list.

OpenServer User's Manual

GAP and the OpenServer

46

TaxRegimeList[i]. Contains the name of the tax regime considered.


Name
The index refers to the row index of the tax regime considered in the
tax regime list.
TaxRegimeList[i]. Refers to the gas price in the ith tax regime of the tax regime list.
RevenueGas
TaxRegimeList[i]. Refers to the oil price in the ith tax regime of the tax regime list.
RevenueOil
WINJNAME
Contains the filename of the associated water injection system.

4.1.8.1.1 Solver Setup and Calculation Log


Variable Name
GASAV [i]

NumSensitivity
(previously NALLOCED)

SolverCalculatePotential

SolverOptimiseMode

Description
Array [10] of gaslift injection gas available
amounts.
Enables to set up to 10 different amounts of gas
lift injection gas available in the system when
using the Solve Network calculation.
Example:the
DoSet(GAP.MOD[{PROD}].
GASAV[0]), 1 command will fix the first value of
gas lift injection gas available in the system to 1
MMSCF/d.
Returns the number of values of separator
pressures or gas lift gas available allocated and
used in the model as sensitivity variables.
If there is no gas lifted wells in the model, it will
return the number of separator pressure
sensitivities considered.
If there is gas lift wells in the system, it will return
the number of gas lift gas injection rates
sensitivities considered.
Enables to select whether to calculate or not the
model potential when solving the network.
The values associated to this variable are the
following:
0 - The model potential is not calculated
1 - The model potential is calculated
Enables to select whether the solver calculation to
perform is to be optimised or not.
The values associated to this variable are the
following:
OptOff - The solver will be run without
optimisation
OptAllCnst - The solver run will be
optimised and will
respect all the model
1990-2011 Petroleum Experts Limited

47

OpenServer

constraints

SolverStatus

SolverStatusText

SolverStatusList[i] variables

OptPotCnst - The solver run will be


optimised and will
respect only the
potential constraints
Returns the status of the last solver run.
This values characterising this variable are as
follows:
0 - the last solver run did not experience
any error
#0 - the last solver run did experience an
error.
Returns a text string describing the last solver run
error.

SolverStatusList[i].LastError

All these OpenServer variables refer to solver


status and results.
The index i refers to the index of the sensitivity
case considered. The values of this index range
from 0 to 9, depending on the number of
sensitivity cases considered.
These OpenServer variables are not available
using the Ctrl + Rigth Click option.
Returns the number of sensitivity cases used
during the solver run.
Returns the CPU time used by the solver to run
the case considered. Expressed in seconds.
Returns the total time used by the solver to run the
case considered. Expressed in milliseconds.
Returns the last error associated with the ith

SolverStatusList[i].
MaxMassBalanceDiff

sensitivity case of the solver.


Returns the maximum mass balance difference
associated with the ith sensitivity case of the

SolverStatusList.count
SolverStatusList[i].CPUTime
SolverStatusList[i].ElapsedTime

SolverStatusList[i].
MaxPressureBalanceDiff
SolverStatusList[i].NumIteration

solver.
Returns

the

maximum

pressure balance
difference associated with the ith sensitivity case
of the solver.
Returns the number of iterations associated with
the ith sensitivity case of the solver.

SolverStatusList[i].OptNumIteration Returns the number of optimisation iterations


associated with the ith sensitivity case of the
solver optimiser.
SolverStatusList[i].OptBestGuess
Returns the optimiser best guess associated with
the ith sensitivity case of the solver.
OpenServer User's Manual

GAP and the OpenServer

SolverStatusList[i].Status

SolverStatusList[i].StatusText
SolverStatusList[i].
ViolatedConstraint.count
SolverStatusList[i].
ViolatedConstraint[j].EquipType

48

Returns the status of the last solver run for the ith
solver sensitivity.
The values characterising this variable are as
follows:
0 - the last solver run did not experience any
error
#0 - the last solver run did experience an
error.
Returns a text string describing the last solver run
error for the ith solver sensitivity case.
Returns the amount of constraints violated during
the ith Solver run.
Returns the type of equipment to which the jth
violated constraint message of the ith Solver run

refers to.
SolverStatusList[i].
Returns the ID of the system equipment to which
ViolatedConstraint[j].EquipUniqueID the jth violated constraint message of the ith
Solver run refers to.
SolverStatusList[i].
Returns the label of the system equipment to
ViolatedConstraint[j].EquipLabel
which the jth violated constraint message of the ith
Solver run refers to.
SolverStatusList[i].
ViolatedConstraint[j].Binding

SolverStatusList[i].
ViolatedConstraint[j].CalcValue

Returns the binding status of the jth violated


constraint message of the ith Solver run.
Returns 0 if the constraint is not binding and 1 if
the constraint is binding.
Returns the calculated value of the jth violated
constraint message of the ith Solver run.

SolverStatusList[i].
ViolatedConstraint[j].CnstValue

Returns the constraint value of the jth violated


constraint message of the ith Solver run.

SolverStatusList[i].
ViolatedConstraint[j].CnstDesc

Returns the description of the type of the jth


constraint (e.g. Max Water Rate) violated in the ith

SolverStatusList[i].
ViolatedConstraint[j].msg

Solver run.
Returns the text message of the solver log related
to the jth violated constraint message of the ith
Solver run.

4.1.8.1.2 Prediction Setup


Variable Name

Description
1990-2011 Petroleum Experts Limited

49

OpenServer

DCQSCHEDULE[i].date

DCQSCHEDULE[i].date.
DATESTR
DCQSCHEDULE[i].date.
DATETIMESTR
DCQSCHEDULE[i].date.
TIMESTR
DCQSCHEDULE[i].val
DCQSCHEDULE[i].
useswing

PredCalculatePotential

PREDINFO.PERIOD

PREDINFO.START

PREDINFO.START.
DATESTR
PREDINFO.START.
DATETIMESTR
PREDINFO.START.
TIMESTR
PREDINFO.END

OpenServer User's Manual

Contains the ith date of the DCQ schedule in a numerical


constant format.
This date is expressed in days and time and the reference
used is the 01/01/1900 00:00:00 (i.e. correspond to day
1).
Contains the ith date of the DCQ schedule in a day/month/
year format.
Contains the ith date of the DCQ schedule in a day/month/
year hrs/min/sec format.
Contains the ith time of the DCQ schedule in a hrs/min/sec
format.
Contains the value of the DCQ schedule at the ith date.
Enables to select whether swing factors have to be used in
the DCQ driven production prediction or not.
The values associated to this variable are the following:
0 Swing factors are not used
1 Swing factors are used
Enables to select whether to calculate or not the model
potential during the prediction.
The values associated to this variable are the following:
0 - The model potential is not calculated
1 - The model potential is calculated
Contains the length of the prediction period in days.
Example: the DoSet(GAP.MOD[0].PREDINFO.PERIOD),
1000 command will set a prediction period of 1000 days
starting from the prediction start date specified.
Contains the prediction starting date in a numerical
constant format.
This date is expressed in days and time and the reference
used is the 01/01/1900 00:00:00 (i.e. correspond to day
1).
Example:the
DoSet(GAP.MOD[{PROD}].PREDINFO.
START.DATESTR),36525 command sets the prediction
starting date to the 01/01/2000 00:00:00.
Contains the prediction starting date in a day/month/year
format.
Contains the prediction starting date in a day/month/year
hrs/min/sec format.
Contains the prediction starting date in a day/month/year
hrs/min/sec format.
Contains the prediction ending date in a numerical date
format.
This date is expressed in days and the reference used is

GAP and the OpenServer

50

the 01/01/1900 (i.e. correspond to day 1).


PREDINFO.STEPUNIT * Contains the prediction timestep length unit.
Four units are used using the following literal constants,
followed by their corresponding numerical constants:
- DAYS (0)
- WEEKS (1)
- MONTHS (2)
- YEARS (3)
PREDINFO.END.
Contains the prediction ending date in a day/month/year
DATESTR
format.
PREDINFO.END.
Contains the prediction ending date in a day/month/year
DATETIMESTR
hrs/min/sec format.
PREDINFO.END.TIMESTR Contains the prediction ending date in a day/month/year
hrs/min/sec format.
PredictionOptimiseMode Enables to select whether the prediction calculation to
perform is to be optimised or not.
The values associated to this variable are the following:
OptOff - The prediction will be run without optimisation.
OptAllCnst - The prediction run will be optimised and will
respect all the model constraints.
OptPotCnst - The prediction run will be optimised and will
respect only the potential constraints.
PREDRESTART *
Enables to select whether the production prediction to run
is based on a previous run or not.
The literal constants associated to this string are as
follows:
NO
YES
Example: DoSet "GAP.MOD[{PROD}].
PREDRESTART", "yes"
PREDINFORESTART.END Contains the prediction restart end date in a numerical
date format.
Example:
DoSet
"Gap.MOD
[{PROD}].
PREDINFORESTART.Start", CStr(DateValue("DATE"))
PREDINFORESTART.
Contains the length of the prediction restart period in days.
PERIOD
PREDINFORESTART.
Contains the prediction restart date in a numerical date
START
format.
PREDINFORESTART.
Contains the prediction restart timestep length.
STEP
PREDINFORESTART.
Contains the prediction restart timestep length unit.
STEPUNIT
GAP.PREDRESTART
Performs the restart prediction calculation
NOTE: To perform a restart prediction, replace GAP.
PREDINIT with GAP.PREDRESTART
1990-2011 Petroleum Experts Limited

51

OpenServer

Example:
NumSteps
PREDRESTART()")

DoGAPFunc("GAP.

PredTimeStep[i] variables The following OpenServer variables refer to solver and


optimiser status and results during a prediction run.
The index i refers to the prediction step index or date (in
between curly brackets) considered.
The first timestep is always referred as using the index 0.
NOTE: These variables are accessible after prediction run
has accomplished, therefore the name or number of
prediction runs should also be specified in the tag string.
Example: To obtain variable for ith time step of Last
Prediction Run following command can be used:
DoGet("GAP.MOD[{PROD}].PREDRES[{Last Prediction
Run}].PredTimeStep[i].variable")
PredTimeStep[i].
Returns the status of the last solver run associated with the
SolverStatus.Status
i+1th prediction time-step.

PredTimeStep[i].
SolverStatus.StatusText
PredTimeStep[i].
SolverStatus.LastError
PredTimeStep[i].
SolverStatus.
MaxFlowBalanceDiff
PredTimeStep[i].
SolverStatus.
MaxPressureBalanceDiff
PredTimeStep[i].
SolverStatus.NumIteration
PredTimeStep[i].
SolverStatus.
OptNumIteration
PredTimeStep[i].
SolverStatus.
OptBestGuess

The values characterising this variable are as follows:


0 - the last solver run did not experience any error
#0 - the last solver run did experience an error.
Returns a text string describing the last solver run error
associated with the i+1th prediction time-step.
Returns the last error associated with the i+1th prediction
time-step.
Returns the maximum flow balance difference associated
with the i+1th prediction time-step.
Returns the maximum pressure balance
associated with the i+1th prediction timestep.

difference

Returns the number of iterations associated with the i+1th


prediction time-step..
Returns the number of optimisation iterations associated
with the i+1th prediction time-step..
Returns the optimiser best guess associated with the i+1th
prediction time-step.

For more information on macro code structure to perform a prediction, please see
Basic_Code_Structure.

OpenServer User's Manual

GAP and the OpenServer

52

4.1.8.2 Model Equipment List


As described previously, OpenServer strings at the MOD level enable to define the
overall model and calculation procedures setup.
In order to access the parameters related to one specific element of the model i.e., a
well, reservoir, etc., it will be necessary to specify the element using an element tag at
the MOD level.
The MOD variable contains the node lists, i.e. the lists of wells, tanks etc., that are
defined in the GAP model. Each list contains nodes of the same type, such as TANK,
WELL, PIPE and so on. The EQUIP list contains all the elements defined in the GAP
model regardless of their type
The name of the list taken into account as well as either the numerical index (i.e. TANK
[3]) or the element label of the element considered (i.e. TANK[{T1}]) needs to be added
to the MOD section of the string to be able to access the element. This will enable to
pass from the MOD level to the NODE level of the OpenServer string.
The element lists used in GAP are defined as follows:
Variable
Name
EQUIP[i]

Description

The list of equipment nodes.


Can be accessed by index ie [3] or label ie [{w1}]
Example: The string GAP.MOD[0].EQUIP[{w1}] will enable to access
the well w1 in the model
TANK[i]
The list of tank nodes.
WELL[i]
The list of well nodes.
PUMP[i]
The list of pump nodes.
COMP[i]
The list of compressor nodes.
PIPE[i]
The list of pipe nodes.
INFLOW[i]
The list of inflow nodes.
GROUP[i]
The list of group nodes.
JOINT[i]
The list of joint nodes.
SEP[i]
The list of separator, water injection manifold or gas injection manifold
nodes.
SOURCE[i]
The list of source nodes.
SINK[i]
The list of sink nodes.
VALVE[i]
The list of check or gate valve nodes.
INLSEP[i]
The list of inline separator nodes.
INLINJ[i]
The list of inline injection nodes.
INLCHK[i]
The list of inline choke nodes.
INLGEN[i]
The list of inline programmable nodes.
EquipAddDel EquipAddDel[] takes a string index describing the node type such as
[x]
"WELL", "JOINT", ... or "EQUIP". The elements of this array are
incremented each time a node of the corresponding type is added or
1990-2011 Petroleum Experts Limited

53

OpenServer

deleted from the model.


Example: EquipAddDel["EQUIP"] is incremented each time any node
is added or deleted from the model.
Some scripts are caching the number of nodes of a given type and
their respective labels in memory to speed up the execution of the
script. By checking of the values of this array, a script will be able to
detect if nodes have been added to or deleted from the model since the
information was last cached.

4.1.9 Variables at Node Level


The node lists used at the MOD level enables to specify a certain element of the model.
At the Node level, the following keywords are used to access the different node
variables.
The Scheduling and Constrainst OpenServer access strings will be described as
separate sections (Scheduling andConstraints_and_Potential_Calculations).

4.1.9.1 General fields found in nodes of any type


Variable
Name
COMMENT
COUNT

Description
Refers to the comment field of the node.

Contains the number of nodes of the same type present in the GAP
model.
ISBYPASSED Contains the status of the node relative to node bypass as set by the
user.
Read-Only variable.
If the value returned is:
- 0: the node is not bypassed
- 1: the node is bypassed
ISDISABLED Contains the status of the node relative to node disabling as set by the
user.
Read-Only variable.
If the value returned is:
- 0: the node is not disabled
- 1: the node is disabled
ISMASKED
Contains the status of the node relative to node masking as set by the
user (i.e. if a node is not masked by the user but greyed-out by the
software: ISMASKED will return 0 and MASKFLAG will be # 0).
If the value returned is:
- 0: the node is not masked
OpenServer User's Manual

GAP and the OpenServer

LABEL
MASKFLAG

NAME
PREDRES[i].
var

SolverResults
[i].var

TYPE

54

- 1: the node is masked


Contains the short tag allocated to the node.
This is the label which can be used to index the node from the list.
Contains the activation status of the node.
If the value returned is:
- 0: the node is included in the system.
- #0: the node is not included in the system.
This is a READ ONLY variable.
To change the status of the item, use the ENABLE(), DISABLE(),
MASK(), UNMASK() functions (see EQUIPi.MASK_()).
MASKFLAG Should not be used except when showing a non-zero
value.
Example: To access the mask flag of a node with label n1, one would
use the string GAP.MOD[0].EQUIP[{n1}].MASKFLAG.
If the node was a well, we could also use the string GAP.MOD[0].
WELL[{n1}].MASKFLAG to access this value, and so on for different
node types in the system.
NOTE: Mask Flag status can be captured for any element directly via
the element SUMMARY screen using a right-click mouse action in
the Mask dialogue box.
Contains the long tag allocated to the node.
Contains the prediction results for the node.
- The index refers to the time-step considered and it can be
described using time-step number (i.e. [3]) or the time-step
date (i.e. [{01/01/2000}])
- var is the column internal name and refers to the node
variable considered.
Example: The string
GAP.MOD[0].WELL[{W1}].PREDRES[{01/01/2000}].Qoil will enable
to access the predicted oil rate of the well W1 at 01/01/2000.
Contains the allocation results for the node.
The index is the solver run number and refers to the ith gas lift injection
gas quantity if considering a gas lift system or to the ith separator
pressure if not.
var is the column internal name and refers to the node variable
considered.
Example: The string DoGet(GAP.MOD[0].WELL[{W1}].
SolverResults[0].Qoil) command will enable to access the oil rate
allocated by the solver to the well W1 for the first separator pressure
value considered.
Contains the type of node considered when referring to the overall
EQUIP list.
This is a READ ONLY variable.
The keyword values are: WELL, PIPE, TANK, SEP, PUMP, COMP,
JOINT, SOURCE, SINK, VALVE, INLSEP, INLCHK, INLINJ, INLGEN,
GROUP, INFLOW.
1990-2011 Petroleum Experts Limited

55

OpenServer

TYPENUM
UniqueID

EndA

EndB

Example: The GAP.MOD[0].EQUIP[1].TYPE string will enable to


specify the type of the second node of the overall equipment list. If it is
a well, it will return WELL for instance.
Contains a number referring to the type of node considered when
considering the overall EQUIP list.
Contains an READ-ONLY identifier which will be unique for each node
and will never change, whatever modifications are done to the system.
The value of this unique ID can be used similarly to the node index
number to define the node in any OpenServer string.
This tag is applied to inline elements, pumps and compressors (all
elements that are placed in between two joints). This allows to
determine the name of the joint upstream the element itself.
Example: GAP.Mod[0].Pump[0].EndA will give the name of the joint
upstream the pump
This tag is applied to inline elements, pumps and compressors (all
elements that are placed in between two joints). This allows to
determine the name of the joint downstream the element itself

4.1.9.2 Fields specific to tanks


All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].TANK[j]
Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section) and the index j refers to the name or numerical index
of the element considered (i.e. refers to the Model Equipement List, see
Model_Equipment_List).
Variable Name
FILE

Description
Contains the name and path of the MBAL data file associated
to the tank.
MAINSUBTANK.File When considering a multiple tank model, this will return the path
of the MBAL file corresponding to this tank model.
MBINUMTANKSINFIL This will return the number of tanks included in the model
E
considered.
It will return 1 for a single tank model and a value higher than 1
for a multiple tank model.
Model
Contains the type of tank model used to model the reservoir.
The values returned can be:
- 0: Material Balance model
- 1: Decline Curves
NUMPROD
Number of production data points entered (decline curve tanks).
PRODDATA[i][j]
Refers to the production data array [20][2] (decline curve tanks).
OpenServer User's Manual

GAP and the OpenServer

56

The following numerical indexes are used:


- i: Refers to the input row considered
- j: Refers to the input parameter considered (0 for
reservoir pressure, 1 for cumulative production)
TANKID
Contains the name of the MBAL tank.
TANKTYPE *
Refers to the type of tank considered.
The keyword values used are: OIL, GAS, CONDENSATE
TCURGASPROD
Contains the current cumulative gas production (decline curve
tank).
TCUROILPROD
Contains the current cumulative oil production (decline curve
tank).
TCURRESPRED
Returns the Current Pressure for the tank based on the current
Oil/Gas Production. (Decline Curve Tanks)
TINJGASFIX
Refers to the fixed gas injection rate associated to the reservoir.
TINJGWR
Contains the injected Gas to Water ratio used to maintain a
reservoir target pressure.
TINJWATFIX
Refers to the fixed water injection rate associated to the
reservoir.
TMAXGAS
Contains the maximum gas injection constraint (apply to tank in
injection system).
TMAXLIQ
Contains the maximum liquid injection constraint (apply to tank
in injection system).
TRECYCGAS
Contains the required fraction of gas recycling.
TRECYCGASPMFIX Contains the amount of sales gas to subtract from production
before recycling.
TRECYCWAT
Contains the required fraction of water recycling.
TTARGPRES
Contains the target pressure associated with the tank.
TVOIDREPGAS
Contains the fraction of gas voidage replacement required.
TVOIDREPWAT
Contains the fraction of water voidage replacement required.
SubTankNumber
Refers to the Index of the tank in the MBAL data file (apply to
multiple tank models).
PRODHISTORYSTAR Start of production history for the tank
T.DATESTR
PRODHISTORYEND. End of production history for the tank
DATESTR
Example: To access the MBAL tank ID of a node with label t1, one could use the
command DoGet(GAP.MOD[0].TANK[{t1}].TANKID) or equivalently DoGet(GAP.
MOD[0].EQUIP[{t1}].MBALNUM).
Remark: These OpenServer variables are also available for both groups preceded by
the following OpenServer string structure: GAP.MOD[i].GROUP[j] and group members
preceded by the following OpenServer string structure: GAP.MOD[i].GROUP[j].
MEMBER[k].

1990-2011 Petroleum Experts Limited

57

OpenServer

4.1.9.3 Fields Specific to Wells


The following codes may be used to get the information about the Relative Permeability
Curves for Fractional Flow information when the option is set to USE REL PERM 1 or
USE REL PERM 2.
i : 1 to 2

the value of i in the below mentioned strings varies from 1


to 2. i = 1 denotes the data for REL PERM 1 and i=2
denotes the data for REL PERM 2.
FRACFLOWi.RESSAT.Krw Residual Saturation for water
FRACFLOWi.ENDPOINT. End Point Relative Permeability for Water
Krw
FRACFLOWi.EXPON.Krw Corey Exponent for Water
FRACFLOWi.RESSAT.Kro Residual Saturation for Oil
FRACFLOWi.ENDPOINT. End Point Relative Permeability for Oil
Kro
FRACFLOWi.EXPON.Kro Corey Exponent for Oil
FRACFLOWi.RESSAT.Krg Residual Saturation for Gas
FRACFLOWi.ENDPOINT. End Point Relative Permeability for Gas
Krg
FRACFLOWi.EXPON.Krg Corey Exponent for Gas
for example the following code may be used to extract the Residual Saturation of Water
for USE REL PERM 1 option that is defined for IPR Layer 0 for Well W1 to cell (10,2)
Cells(10, 2) = DoGet("GAP.MOD[{PROD}].WELL[{W1}].IPR[0].FRACFLOW1.
RESSAT.Krw")
The following codes may be used to get the information about the Relative Permeability
Curves for Fractional Flow information when the option is set to FROM TABLE 1 or
FROM TABLE 2.
i : 1 to 2

the value of i in the below mentioned strings varies from 1


to 2. i = 1 denotes the data for TABLE 1 and i=2 denotes
the data for TABLE 2.
j : 0 to 99
the value of j in the below mentioned strings varies from 0
to 99 to represent the data point number
FRACFLOWi.FFTABLE[j]. Time
TIME
FRACFLOWi.FFTABLE[j]. Water Cut
WATCUT
FRACFLOWi.FFTABLE[j]. GOR
GOR

OpenServer User's Manual

GAP and the OpenServer

58

FRACFLOWi.FFTABLE[j]. Pressure
PRESS
FRACFLOWi.FFTABLE[j]. Cumulative Production
CUMOIL
for example the following code may be used to extract the Water Cut for data point
number 1 set in TABLE 1 option that is defined for IPR Layer 0 for Well W1 to cell (10,3)
Cells(10, 3) = Doget("GAP.MOD[{PROD}].WELL[{Well1}].IPR[0].FRACFLOW1.
FFTABLE[0].WATCUT")
4.1.9.3.1 Fields specific to all well models
All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].WELL[j]
Where the index i refers to the type of model considered at the MOD level i.e., MOD[i]
section and the index j refers to the name or numerical index of the element
considered i.e., EQUIP[i] section.
Variable Name
File
PowerFluidMode *

TypeWell *

Description
Well Summary Section
Contains the name and path of the PROSPER file associated
with the well considered.
Contains the type of power fluid system used (i.e. Oil Producer
well with diluent injection).
The following keywords are used:
- ClosedLoop
- Commingled
Contains the type of well considered.
The following keywords are used:
- CondensateProducer
- GasInjector
- GasProducer
- OilProducerDILUENT
- OilProducerESP
- OilProducerGL
- OilProducerHSP
- OilProducerJETPUMP
- OilProducerNoLift
- OilProducerPCP
- WaterInjector
- WaterProducer

1990-2011 Petroleum Experts Limited

59

OpenServer

WellModel

RateType *

DOWNTIME

AlqControl *

AlqValue

AlqValueMax

AlqValueMin

DPControl *

OpenServer User's Manual

Contains the type of well model used.


The following numerical indexes are used:
- 0: VLP/IPR Intersection
- 1: Performance Curve
- 2: PC interpolation
- 3: Outflow Only VLP
- 4: Outflow Only PROSPER
Sets the rate type of well model used.
The following numerical indexes are used:
- 0: Use Volumes
- 1: Use Mass
Downtime Section
Contains the downtime value associated with the well
considered.
dP Control Section
Contains the status of the artificial lift control parameter.
The following keywords are used:
- CALCULATED: The artificial lift system is controlled
by the optimiser.
- FIXEDVALUE: The artificial lift system is not
controlled by the optimiser.
Contains the value of the artificial lift parameter used or
calculated from allocation result.
Depending of the type of artificial lift consider, this parameter
will refer to:
- Power Fluid Rate (Diluent Injection Well, HSP Lifted
Well, Jet Pump Lifted Well)
- ESP Frequency (ESP Lifted Well)
- Pump Speed (PCP Lifted Well)
Contains the maximum value the artifial lift parameter can take
when controlled by the optimiser.
The type of artificial lift parameters considered are listed in the
AlqValue row.
! Does not include gas lifted systems (see MAXQINJ).
Contains the minimum value the artifial lift parameter can take
when controlled by the optimiser.
The type of artificial lift parameters considered are listed in the
AlqValue row.
! Does not work in gas lifted system (see MINQINJ).
Contains the status of the wellhead choke control.
The following keywords are used:
- CALCULATED: The wellhead choke (i.e. and
therefore the corresponding pressure drop) is

GAP and the OpenServer

DPControlValue

InjectedFluidLabel
MAXQINJ
MeasuredAlq
MINQINJ
PowerFluidMode*

60

controlled by the GAP optimiser accordingly to the


constraints set on the model.
- FIXEDVALUE: A fixed dP is applied at the wellhead.
- NONE: The wellhead choke cannot be controlled by
the optimiser.
Contains the value of the wellhead choke generated pressure
drop or the value of the chosen fixed pressure drop at the
wellhead.
Contains the label of the injection fluid considered.
Contains the maximum gas lift gas available.
Contains the amount of gas lift gas injected in the system.
Contains the minimum gas lift gas available.
Refers to the type of power fluid circulation mode used.
The following keywords are used:
- Commingled
- ClosedLoop

4.1.9.3.2 Fields specific to wells modelled using VLP/IPR intersection


Variable Name
VLP/IPR
Intersection Model
CurEditLayer
IPR[i]

IPR[i].BrkGasCon
IPR[i].BrkGasSat
IPR[i].BrkPerfTop
IPR[i].BrkPerfBot
IPR[i].BrkWatCon
IPR[i].BrkWatSat
IPR[i].C
IPR[i].CGR
IPR[i].
CORRRELPERM

IPR[i].DarcyCoeff

Description
IPR Section
Contains the numerical index of the layer considered.
Will return 0 for the first layer, 1 for the second layer and so on.
Contains the array of the IPR record.
If located before a specific parameter, this string refers to the
value of this specific parameter for the ith IPR description
considered.
Example: The DoGet(GAP.MOD[0].Well[{Well 1}].IPR[0].
ResPres) command will return the reservoir pressure
associated with the oth layer of the well 1.
Contains the Gas Oil Contact depth at breakthrough
Contains the Gas Saturation at breakthrough
Contains the top depth of the perforated interval
Contains the bottom depth of the perforated interval
Contains the Water Oil Contact depth at breakthrough
Contains the Water Saturation at breakthrough
Contains the C factor value used for gas wells IPRs
Contains the CGR of the layer fluid
Contains the status of the shift relative permeabilities to
breakthrough facility.
The following numerical indexes are used:
- 0: The option is not activated
- 1: The option is activated
Contains the Darcy coefficient value for gas wells IPRs
1990-2011 Petroleum Experts Limited

61

OpenServer

IPR[i].DISABLE()

Used together with a DoCmd structure, will disable the ith layer
of the well. See IPR[i].MASK()
IPR[i].ENABLE()
Used together with a DoCmd structure, will enable the ith layer
of the well
IPR[i].GasGravity
Contains the gas specific gravity for the layer fluid
IPR[i].GOR
Contains the current GOR of the layer fluid
IPR[i].IPRType *
Contains the type of IPR model used to characterize the inflow
performance of the well.
The following keywords are used:
- Lookup: A P vs. rate table is used to define the well
IPR.
- PI: A Productivity index is used to define the well IPR
(oil wells only).
- Cn: A C and n relationship is used to define the well
IPR (gas wells only).
- Forcheimer: A Forcheimer relationship is used to
define the well IPR (gas wells only).
- Forcheimer Pseudo Pressure (gas wells only)
IPR[i].ISLAYERVALID Check the validity of the IPR dataset.
The following numerical indexes are used:
- 0: The IPR dataset considered is not valid.
- 1: The IPR dataset considered is valid
IPR[i].Label
Contains the label of IPR considered
IPR[i].LayerType *
Contains the type of layer considered.
The following keywords are used:
- CONDENSATE
- GAS
- OIL
IPR[i].MASK()
Used together with a DoCmd structure, will mask the ith layer of
the well.
Example: If used as such, the DoCmd(GAP.MOD[0].Well[{Well
1}].IPR[0].MASK()) command will mask the 0th layer production
until otherwise specified by the end user or the scheduling
IPR[i].MASKFLAG() Contains the status of layer considered.
The following numerical indexes are used:
- 0: The IPR considered is included in the system.
- #0: The IPR considered is not included in the system
IPR[i].MGasRate[j]
Contains an array (i.e. 20 values maximum) of gas rates used
for IPR matching
IPR[i].MGOR
Contains the layer test GOR (with PI correction for mobility
activated and Vogel correction for GOR options activated)
IPR[i].MLiqRate[j]
Contains an array (i.e. 20 values maximum) of oil rates used for
IPR matching
IPR[i].MNUMPOINTS Contains the number of IPR match point used
IPR[i].MPB
Contains the layer test bubble point pressure
IPR[i].MPRES[j]
Contains an array (i.e. 20 values maximum) of pressures used
OpenServer User's Manual

GAP and the OpenServer

62

for IPR matching


Contains the layer test pressure (with PI correction for mobility
activated)
IPR[i].MWCT
Contains the layer test water cut (with PI correction for mobility
activated)
IPR[i].MWGR
Contains the layer test WGR (with PI correction for mobility
activated)
IPR[i].N
Contains the N value used for gas wells IPRs
IPR[i].NonDarcyCoeff Contains the non-Darcy coefficient used for gas IPRs
IPR[i].OffsetPressure Contains the value of the IPR offset pressure if any
IPR[i].OilGravity
Contains the oil specific gravity for the layer fluid
IPR[i].PctCO2
Contains the CO2 mole percentage for the layer fluid
IPR[i].PctH2S
Contains the H2S mole percentage for the layer fluid
IPR[i].PctN2
Contains the N2 mole percentage for the layer fluid
IPR[i].PERMCORRN Contains the value of the permeability compaction correction
exponent
IPR[i].PI
Contains the Productivity Index value of the layer considered
IPR[i].PICorrRelPerm Contains the status of the PI correction for mobility. The
following numerical indexes are used:
- 0: The PI correction for mobility is not activated.
- 1: The PI correction for mobility is activated.
IPR[i].PRODDATA[i][j] Contains an array of production data values. Used only when
the MBAL tank is modeled using decline curve.
The following numerical indexes are used:
- i: Refers to the input row considered.
- j: Refers to the parameters considered (i.e 0 for
cumulative production, 1 for GOR / CGR and 2 for
Water Cut / WGR)
IPR[i].
Refers to the type of interpolation used in the model when using
ProdDataInterpolation a decline curve MBAL tank.
Mode*
The following keywords are used:
- CumProd: Interpolate on Cumulative Production
- ResPres: Interpolate on Reservoir Pressure
IPR[i].RELPERM1.
Contains the gas relative permeability exponent value described
EXGAS
in the Rel Perm1 relative permeability dataset.
Remark: In all similar variables described below, if RELPERM2
is used, then it will refer to the Rel Perm 2 relative permeability
dataset.
Remark2: In previous versions, the string RELPERM.EXGAS
was used. In terms of backward compatibility, this type of string
will refer to the Rel Perm 1 relative permeability dataset
IPR[i].RELPERM1.
Contains the oil relative permeability exponent value described
EXOIL
in the Rel Perm1 relative permeability dataset
IPR[i].RELPERM1.
Contains the water relative permeability exponent value
EXWAT
described in the Rel Perm1 relative permeability dataset
IPR[i].RELPERM1.
Contains the gas residual saturation value described in the Rel
IPR[i].MResPres

1990-2011 Petroleum Experts Limited

63

OpenServer

SGR
IPR[i].RELPERM1.
SOR
IPR[i].RELPERM1.
SWC
IPR[i].RELPERM1.
XKGE
IPR[i].RELPERM1.
XKOE
IPR[i].RELPERM1.
XKWE
IPR[i].RelPermType1

Perm1 relative permeability dataset


Contains the oil residual saturation value described in the Rel
Perm1 relative permeability dataset
Contains the water residual saturation value described in the Rel
Perm1 relative permeability dataset
Contains the relative permeability to gas endpoint described in
the Rel Perm1 relative permeability dataset
Contains the relative permeability to oil endpoint described in
the Rel Perm1 relative permeability dataset
Contains the relative permeability to water endpoint described
in the Rel Perm1 relative permeability dataset
Refers to the set of relative permeabilities used in the layer
considered.
The following numerical indexes are used:
- 0: From Tank Model
- 1: From RelPerm1 set of relative permeabilities.
- 2: From RelPerm2 set of relative permeabilities
IPR[i].RelPermType2 Refers to the set of relative permeabilities used in the layer
considered for mobility correction.
The following numerical indexes are used:
- 0: From Tank Model
- 1: From RelPerm1 set of relative permeabilities
- 2: From RelPerm2 set of relative permeabilities
IPR[i].ResPres
Contains the current Reservoir Pressure of the layer considered
IPR[i].ResTemp
Contains the Reservoir Temperature of the layer considered
IPR[i].Tank
Enables to determine the tank connected to the layer
considered.
Example: If used as such, the DoGet(GAP.MOD[0].Well[{Well
1}].IPR[0].Tank) command will return a 8 number digit which is
an internal index for the node considered.
If a .Label is added at the end of the string (i.e. GAP.MOD[0].
Well[{Well 1}].IPR[0].Tank.Label), it will return the label of the
tank considered
IPR[i].TCURPROD
Contains the current reservoir cumulative production when using
a decline curve MBAL model
IPR[i].
Contains the current reservoir cumulative gas production when
TCURGASPROD
using a decline curve MBAL model
IPR[i].UNMASK()
Used together with a DoCmd structure, will unmask the ith layer
of the well
IPR[i].
Contains the status of the use offset pressure option.
UseOffsetPressure
The following numerical indexes are used:
- 0: The offset IPR pressure option is not activated.
- 1: The offset IPR pressure option is activated
IPR[i].
Relates to the impurities dataset (i.e. Mole percentages of H2S,
UseTankImpurities
CO2, H2S and water salinity) considered.
The following numerical indexes are used:
OpenServer User's Manual

GAP and the OpenServer

64

0: The impurities dataset used is the one defined in


the IPR section.
- 1: The impurities dataset used is the one defined in
the tank PVT
IPR[i].VogelCorrectionContains the status of the Vogel Correction for GOR option.
The following numerical indexes are used:
- 0: The Vogel correction option is activated.
- 1: The Vogel correction option is not activated
IPR[i].WaterCut
Contains the current water cut of the layer considered
IPR[i].WaterSalinity Contains the water salinity of the layer considered
IPR[i].WGR
Contains the WGR of the layer fluid
IPR[i].XFLOWIIPI
Contains the layer crossflow injectivity index
VLP Section
AllowLeftVLPIPRInters Contains the status of the the type of VLP intersection.
ection
The following indexes are used:
- 0: Left Hand side VLP/IPR intersection is not
considered
- 1: Left Hand side VLP/IPR intersection is considered
ForceVLPIPRIntersect Contains the status of the the type of intersection considered.
ion
The following indexes are used:
- 0: Left Hand side VLP/IPR intersection is not
considered
- 1: Left Hand side VLP/IPR intersection is forced
SafeVLPIPRIntersecti Contains the status of the the type of intersection considered.
on
The following indexes are used:
- 0: The safe VLP/IPR intersection routine is not activated
- 1: The safe VLP/IPR intersection routine is activated
TurnOffIfUnstable
Contains the status of the the type of intersection considered.
The following indexes are used:
- 0: The Turn off well if unstable VLP/IPR intersection
routine is not activated
- 1: The Turn off well if unstable VLP/IPR intersection
routine is activated adn the well will be switched off if a negative
VLP slope is detected intersecting the IPR
VLPFile
Contains the name and path of the VLP file used to describe the
outflow performance of the well
CMNUMPOINTS
CVALID

IPR[i].TConeData.
Anisotropy

Coning Section
Contains the number of coning match points considered
Contains the status of the coning input data set.
The following numerical indexes are used:
- 0: The dataset required for coning calculation is not
valid
- 1: The dataset required for coning calculation is valid
Contains the reservoir vertical anisotropy value

1990-2011 Petroleum Experts Limited

65

OpenServer

IPR[i].TConeData.
EXP
IPR[i].TConeData.F2
IPR[i].TConeData.F3
IPR[i].TConeData.
GOC
IPR[i].TConeData.
MatchQL[i]
IPR[i].TConeData.
MatchGOR[i]
IPR[i].TConeData.
TestGOC
IPR[i].TConeData.
TestPres
IPR[i].TConeData.
TestWC
IPR[i].TConeData.
Permeability
TConeData.
LayerEnabled

Contains the value of the coning model exponent


Contains the value of the coning model F2 parameter
Contains the value of the coning model F3 parameter
Contains the depth of the tank GOC
Contains the Liquid Rates corresponding to the ith test
measurement used in the coning calculation
Contains the GOR corresponding to the ith test measurement
used in the coning calculation
Contains the depth of the GOC at the test prevailing date
Contains the reservoir pressure at the test prevailing date
Contains the water cut at the test prevailing date
Contains the reservoir permeability value
Contains the status of the coning calculation in the layer
considered.
The following numerical indexes are used:
- 0: The coning calculation is not activated.
- 1: The coning calculation is activated

Example: To access the file name of the VLP File associated with a well labelled w1,
one could use the string GAP.MOD[0].WELL[{w1}].VLPFILE, or, equivalently, GAP.
MOD[0].EQUIP[{w1}].VLPFILE.
4.1.9.3.3 Fields specific to wells modeled using Performance Curves / Interpolated
Performance Curves
Variable Name
Performance
Curve Model
GenType

Description

Well Summary Section


Refers to the origin of the PC considered.
The following numerical indexes are used:
- 0: The PC are generated from PROSPER
- 1: The PC are generated from a VLP / IPR model

From
PROSPER
IType

OpenServer User's Manual

PC Data Section
Refers to the parameter used to describe the amount of gas
considered for each PC dataset.

GAP and the OpenServer

66

The following numerical indexes are used:


- 0: Gas Lift Gas Injection Rate
- 1: Gas Liquid Ratio
MANIPRES[i] Contains the manifold pressure at which the ith set of PC data refers
to.
PCDATA[i][j][k] Contains the different parameters of the PC dataset.
The first index [i] refers to the dataset row and is only valid if more than
one dataset has been entered at one specific manifold pressure, as it
can be the case with gas lifted wells for instance.
The second index [j] refers to the parameter considered. The following
numerical indexes are used:
- 0: Either Oil Rate or Liquid Rate depending of the PType
choice.
- 1: Water Cut
- 2: GOR
- 3: Flowing Bottom Hole Pressure
- 4: Oil Gravity or Condensate Gravity
- 5: Gas Gravity
- 6: Gas Lift Gas Injected or Gas Liquid Ratio depending of
the IType choice.
- 7: Temperature
- 8: H2S mol. percentage
- 9: CO2 mol. percentage
- 10: N2 mol. percentage
- 11: Gas Rate
- 12: Water to Gas Ratio
- 13: Water Salinity
- 14: Condensate to Gas Ratio

PType

The third index [k] refers to the dataset considered. Up to 5 PC


datasets taken at 5 different manifold pressures can be entered for
naturally flowing wells and 3 for gas lifted wells.
Refers to the type of rate considered when describing an oil producer
PC data:
The following numerical indexes are used:
- 0: Liquid Rates
- 1: Oil Rates

From VLP/IPR
Coning Section
Similar to the VLP/IPR Well model
IPR Section
Similar to the VLP/IPR Well model
PC Data Section
1990-2011 Petroleum Experts Limited

67

OpenServer

Similar to the From PROSPER PC Well model


VLP Section
Similar to the VLP/IPR Well model
4.1.9.3.4 Fields specific to Stand-Alone Inflows
All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].INFLOW[j]
Where the index i refers to the type of model i.e., refers to the Variables at MOD
level, MOD[i] section) and the index j refers to the name or numerical index of the
element.
Variable Name
Stand Alone
Inflow Model
Inflow Model

IsInjector
IsProducer

RateType

Description

Well Summary Section


Refers to the type of inflow model used.
The following numerical indexes are used:
- 0: GAP Internal Model
Refers to the type of inflow considered: Injector
Refers to the type of inflow considered: Producer
Coning Section
Similar to the VLP/IPR Well model
Downtime Section
Similar to the VLP/IPR Well model
IPR Section
Similar to the VLP/IPR Well model
Sets the rate type of the inflow model used.
The following numerical indexes are used:
- 0: Use Volumes
- 1: Use Mass

4.1.9.3.5 Fields specific to Stand-Alone Outflows


All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].WELL[j]

OpenServer User's Manual

GAP and the OpenServer

68

Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section) and the index j refers to the name or numerical index
of the element considered (i.e. refers to the Model Equipement List, EQUIP[i]
section).
Variable Name
Description
Stand Alone
Ouflow Model
Outflow VLP Model
Well Summary Section
Similar to the VLP/IPR Well model
VLP Section
Similar to the VLP/IPR Well model
Outflow PROSPER
Model

RateType

PROSPER Data Section


See PROSPER_Online_Models
Sets the rate type of well model used.
The following numerical indexes are used:
- 0: Use Volumes
- 1: Use Mass

4.1.9.3.6 Equipment Control Section


(i.e. Previously Actual and Production Validation sections)

Variable Name

Description
Equipment Control Section
DPControlMeasured Contains the measured value (i.e. test value) of the well control
parameter (i.e. pressure drop through the wellhead choke or gas
lift gas injection rate for instance).
DPControlValue
Contains the current value (i.e. used by the solver during nonoptimised runs) of the well control parameter (i.e. pressure drop
through the wellhead choke or gas lift gas injection rate for
instance).
DPControlOptimised Contains the value of the well control parameter (i.e. pressure
drop through the wellhead choke or gas lift gas injection rate for
instance) obtained after an optimised run.

EstimatedCGR
EstimatedFBHP

Model Validation Section


Contains the estimated CGR.
Contains the estimated flowing bottom hole pressure.
1990-2011 Petroleum Experts Limited

69

OpenServer

EstimatedGOR

EstimatedLiqRate

EstimatedWC
EstimatedWGR
IPRPresOffset
LiqRateError
MeasuredAlq

MeasuredCGR
MeasuredGOR

MeasuredPres
MeasuredRate
MeasuredResP
MeasuredWC
MeasuredWGR

Contains the estimated GOR.


Depending on the type of well considered this keyword will refer
to:
- Total GOR (For oil wells)
- Separator GOR (For retrograde condensate wells)
Contains the estimated rate.
Depending on the type of well considered and the type of rate
selected, this keyword will refer to:
- Oil Rate (For oil wells)
- Liquid Rate (For oil wells)
- Water Rate (For water wells)
- Gas Rate (For gas and retrograde condensate wells)
Contains the estimated WC.
Contains the estimated WGR.
Contains the IPR pressure offset (i.e. IPR pressure shift) used in
the well considered.
Contains the difference between estimated and measured rate.
The rate it is described in the EstimatedLiqRate keyword.
Contains the artificial lift associated variable value.
Depending on the type of well considered this keyword will refer
to:
- ESP Frequency (For ESP lifted wells)
- Gas Lift Gas Injection Rate (For gas lifted wells)
- Power Fluid Rate (For HSP / Jet Pump lifted wells)
- Diluent Injection Rate (For Diluent Injected wells)
- Motor RPM (For PCP lifted wells).
Contains the measured CGR.
Contains the measured GOR.
The variable it refers to is described in the EstimatedGOR
keyword.
Contains the measured manifold pressure.
Contains the measured rate.
The rate it refers is described in the EstimatedLiqRate keyword.
Contains the measured reservoir pressure.
Contains the measured water cut.
Contains the measured WGR.

4.1.9.3.7 PROSPER Online Models


When using the PROSPER Online option of GAP, the PROSPER variables available
through OpenServer within PROSPER will also be available from GAP.
The strings used for these variables are similar to the strings used within PROSPER,
replacing the PROSPER prefix by a GAP.MOD[i].EQUIP[j].PrpData prefix.

OpenServer User's Manual

GAP and the OpenServer

70

The general string structure for accessing PROSPER Online variables through
GAP OpenServer will therefore be the following:
GAP.MOD[i].EQUIP[j].PrpData.k
Where the index i refers to the type of model considered (i.e. refers to the Variables at
MOD level, MOD[i] section), the index j refers to the name or numerical index of the
element considered (i.e. refers to the Model Equipement List, EQUIP[i] section) and the
index k refers to the PROSPER OpenServer string associated with the parameter
considered.
Example: To access the solution GOR input within the PROSPER Online section of a
well labeled Well1, the following string can be used:
GAP.MOD[0].WELL[{Well1}].PrpData.PVT.Input.Solgor
As described previously, this string is exactly similar to the one that is used to refer to
the solution GOR in a PROSPER model i.e., PROSPER.PVT.Input.Solgor, except that
the PROSPER prefix has been replaced by the GAP prefix.

4.1.9.4 Fields specific to pipelines


All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].PIPE[j]
Where the index i refers to the type of model considered such as production,
injection, etc., and the index j refers to the name or numerical index of the element
considered.

4.1.9.4.1 Pipeline Model Selection


Variable Name
PipeModel

Description
Refers to the type of pipeline model used.
Determined using the following values:
- 0: GAP Internal Correlations
- 1: Lift Curves
- 2: PROSPER online

4.1.9.4.2 GAP Internal Correlation Pipeline Models


Variable Name

Description
1990-2011 Petroleum Experts Limited

71

OpenServer

CPG
CPO
CPW
HTCSUR
TMPSUR

Desc[j].Type[j]

Desc[j].DEPTH[j]
Desc[j].ID[j]
Desc[j].INSUL[j]
Desc[j].KValue
Desc[j].LENGTH[j]
Desc[j].OD[j]
Desc[j].Roughness[j]
Desc[j].Thickness[j]
Desc[j].TVD[j]
PipeDescInputFormat

Pipeline Environment Description


Contains the pipe Gas Heat capacity.
Contains the pipe Oil Heat capacity.
Contains the pipe Water Heat capacity.
Contains the pipe Overall Heat Transfer Coefficient.
Contains the Surface Temperature.
Pipeline Data Description
Contains the Pipe section j type code.
The following codes are used:
- 1: Line Pipe
- 2: Choke
- 3: Coated
- 4: Flexible
- 5: Fitting
- 6: User
Contains the Pipe section j depth (Enthalpy balance only).
Contains the Pipe section j ID.
Contains the Pipe section j insulation type code (Enthalpy
balance only).
Contains the K value associated to the pipe section (User
Pipe Type only)
Contains the Pipe section j length.
Contains the Pipe section j OD (Enthalpy balance only).
Contains the Pipe section j roughness.
Contains the Pipe section j thickness (Enthalpy balance only).
Contains the Pipe section j True Vertical Depth.
Defines the format of the pipeline depth.
The following codes are used:
0: TVD
1: Elevation Change
SYNTAX: DoSet GAP.MOD[{PROD}].
PipeDescInputFormat, 0

EmptyPipe

OpenServer User's Manual

NOTE: The command changes pipeline description for ALL


pipelines in the network.
The Elevation Change option is implemented for reporting
purposes and pipeline depth in GAP file is stored in TVD
format. Hence, the values input into pipeline description table
through OpenServer code should always be in TVD format.
Enables to determine the pipeline status.
The following values can be returned:
- 0: The pipe is a pipe linking two joints and having
pipeline data associated.

GAP and the OpenServer

72

ENDA

ENDB
PIPERATEMULT
PIPESTEPCH
PseudoPipe

1: The pipe is empty (i.e. either it is linking a joint


and an element and is therefore a pseudo-pipe,
either it is linking two joints but has no
corresponding pipeline data entered).
Enables to determine the node connected to the inlet end of
the pipe.
Example: If used as such, the DoGet(GAP.MOD[0].Pipe[1].
ENDA) command will return a 8 number digit which is an
internal index for the node considered.
If a .Label is added at the end of the string (i.e. GAP.MOD[0].
Pipe[1].ENDA.Label), it will return the label of the considered
node.
Enables to determine the node connected to the outlet end of
the pipe.
Contains the Pipeline rate multiplier value.
Contains the Maximum Step Length used by the correlations.
Enables to determine the pipeline status.
The following values can be returned:
- 0: The pipe is a normal pipe (i.e. it is linking two
joints)
- 1: The pipe is a pseudopipe (i.e. it is linking a joint
and an element such as a well for instance, and
has no data associated)

Correlations and Matching Procedure


PIPECORR *
Contains the type of flow correlation used for pressure drop
calculations in the pipeline
PIPE.Matching.AVALS[i] Contains the matching parameters related to the correlation
[j]
selected.
The first index refers to the flow correlation selected (i.e. 1 will
indicate that the matching parameters returned corresponds
to the Beggs and Brill flow correlation).
The second index refers to the matching parameters itself:
- 0: The matching parameter considered is the
gravity multiplier for the selected correlation.
- 1: The matching parameter considered is the
friction multiplier for the selected correlation.
- 2: Standard Deviation.
Pipe.Matching.DATA[i]. Contains the status of a specific set of measured data used
Disabled
to match the flow correlation.
The index relates to the set of data considered.
The following values can be returned:
- 0: The dataset considered is enabled
- 1: The dataset considered is disabled
Pipe.Matching.DATA[i]. Contains the value of the pipe measured data used to match
1990-2011 Petroleum Experts Limited

73

OpenServer

var

RateType

SubType

FlowType

MAXCFACTOR
MAXPRESSURE
MAXVELOCITY

OpenServer User's Manual

the flow correlation.


The index relates to the set of data selected. Up to 10 sets of
measured data can be entered for the same pipeline section.
The var section relates to the variable to consider. The
following variable names are used when proceeding to a
pipeline matching calculation:
- InPres: Upstream pressure
- OutPres: Downstream pressure
- InTemp: Upstream temperature
- Qliq: Liquid rate
- Qoil: Oil rate
- Qgas: Gas rate (gas and condensate systems
only)
- Qginj: Gas lift gas injection rate
- WCT: Water Cut
- GOR: Gas Oil Ratio
- OilGravity: Oil gravity
- GasGravity: Gas gravity
- CGR: Condensate to Gas ratio (gas and
condensate systems only)
- WGR: Water to Gas ratio (gas and condensate
systems only)
Contains the type of rate used to input the measured data.
The following numerical indexes are used:
- 0: Liquid Rate
- 1: Oil Rate
Contains the type of pipeline used for matching purposes.
The following numerical indexes are used:
- 0: Oil
- 1: Oil + Gas Lift Gas
- 3: Dry Gas
- 4: Retrograde Condensate
- 5: Water
- ANNULAR
- TUBING
Pipeline Constraints Setup
Contains the maximum C factor constraint applied on the
pipe.
Contains the maximum pressure constraint applied on the
pipe.
Contains the maximum velocity constraint applied on the
pipe.

GAP and the OpenServer

74

4.1.9.4.3 GAP Lift Curves Pipeline Models


GAP
UnderModel

Description
Contains the sub-model used when using the GAP Lift curve
modelling facilities for pipelines.
The different sub-models are described using the following
numerical indexes:
- 0: External
- 1: GAP Internal Correlations
- 2: PROSPER Online
- 3: PROSPER file

External Model
VLPFile

Lift Curves
Contains the name and path of the file used to describe the
pipeline lift performance curves.
Pipeline Constraints Setup
Similar to the GAP internal correlations pipeline model.

GAP Internal
Correlations
Lift Curves
VLPFile
Contains the name and path of the file used to describe the
pipeline lift performance curves.
GenData.SensVarValue Refers to the sensitivity variables used in order to generate
[i][j]
the pipeline lift curves.
The first index refers to the parameter considered.
The following numerical indexes are used:
- 0: Liquid Rate
- 1: Upstream Pressure
- 2: GOR (oil systems) or CGR (gas systems)
- 3: Water Cut (oil systems) or WGR (gas systems)
- 4: Inj.GLR (gas lifted systems)
The second index refers to the row number of the sensitivity
variables considered. Up to 20 values can be used for the
rates, up to 10 for the other parameters.
GenData.Temp
Contains the fluid temperature in the pipe section
considered.
GenData.OilGravity
Contains the oil gravity in the pipe section considered.
GenData.GasGravity
Contains the gas gravity in the pipe section considered.
GenData.WaterSalinity Contains the water salinity in the pipe section considered.
GenData.PctH2S
Contains the fluid H2S mole percentage in the pipe section
considered.
1990-2011 Petroleum Experts Limited

75

OpenServer

GenData.PctCO2
GenData.PctN2

Contains the fluid CO2 mole percentage in the pipe section


considered.
Contains the fluid N2 mole percentage in the pipe section
considered.
Pipeline Environment Description
Pipeline Data Description
Correlations and Matching Procedure
Pipeline Constraints Setup
Similar to the GAP internal correlations pipeline model.

PROSPER Online
Lift Curves
Similar to the GAP Lift Curves / External Model.
PROSPER Data
Refer to the section 5.2.7.7.7 of the present manual.
Pipeline Constraints Setup
Similar to the GAP Internal Correlations Model.
PROSPER File
File

PROSPER File
Contains the name and path of the PROSPER file used to
describe the pipeline section.
Lift Curves
Similar to the GAP Lift Curves / GAP Internal Correlations
Model
Pipeline Constraints Setup
Similar to the GAP Internal Correlations Model.

4.1.9.4.4 GAP PROSPER Online Pipeline Models


Variable Name

Description
PROSPER Data
See PROSPER_Online_Models
Pipeline Constraints Setup
Similar to the GAP Internal Correlations Model.

OpenServer User's Manual

GAP and the OpenServer

76

Example: To access the overall heat transfer coefficient of a pipeline modeled with
GAP Internal Correlations with label p1, one could use the string GAP.MOD[0].PIPE
[{p1}].HTCSUR.
4.1.9.5 Fields specific to joints
All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].JOINT [j]
Where the index i refers to the type of model considered at the MOD level i.e., MOD[i]
and the index j refers to the name or numerical index of the element considered i.e.,
EQUIP[i] section.
Variable
Name
MAXPCO2
MAXPH2S
MAXPN2
MAXQGAS
MAXQLIQ
MAXQOIL
MAXQWAT
MAXSOG
MINQGAS
MINQLIQ
ABMAXPWF

Description
Contains the maximum mole percentage of CO2 constraint applied on
the joint.
Contains the maximum mole percentage of H2S constraint applied on
the joint.
Contains the maximum mole percentage of N2 constraint applied on
the joint.
Contains the maximum gas rate constraint applied on the joint.
Contains the maximum liquid rate constraint applied on the joint.
Contains the maximum oil rate constraint applied on the joint.
Contains the maximum water rate constraint applied on the joint.
Contains the maximum oil specific gravity constraint applied on the
joint.
Contains the minimum gas rate constraint applied on the joint.
Contains the minimum liquid rate constraint applied on the joint.
Contains the maximum flowing pressure constraint applied on the
node.

Example: To access the maximum gas rate constraint applied on the node N1, one
could use the string GAP.MOD[0].JOINT[{N1}].MAXQGAS.

4.1.9.6 Fields specific to pump/compressor nodes


All the following variables will need to be preceded by the following OpenServer string
structure:

1990-2011 Petroleum Experts Limited

77

OpenServer

GAP.MOD[i].PUMP[j] for a pump


GAP.MOD[i].COMP[j] for a compressor
Where the index i refers to the type of model considered at the MOD level i.e., MOD[i]
section and the index j refers to the name or numerical index of the element
considered i.e., EQUIP[i] section.

4.1.9.6.1 Fields Common to Pumps and Compressors


Variable Name
ACTSPEED

CalcData[i][j]

DESSPEED

DPControl *

MAXSPEED
MDRateType

MINSPEED
NumStage
OPTSPEED

OpenServer User's Manual

Description
Contains the Actual speed (or frequency) of the pump/compressor
for use with affinity laws or if speed/frequency is a sensitivity
variable.
Enables to specify the data used to calculate the pump / compressor
performance using the Input | Calculate Performance screen.
The i index enables to specify which row is selected, the j index
enables to specify which column is selected.
See the MDRateType variable below to know how to specify the
data entry format.
Contains the Design speed (or frequency) of the pump/compressor
for use with affinity laws or if speed/frequency is a sensitivity
variable.
Refers to the type pressure control used to drive the pump/
compressor.
The following status are available:
- FIXED VALUE: the pressure drop through the pump/
compressor is fixed by the user.
- CALCULATED: the pressure drop through the pump/
compressor can be modified by the GAP optimiser to
obtain the optimum performance of the system.
Contains the pump/compressor maximum speed limit.
Enables to specify in which format the data for the Input | Calculate
Performance screen is specified.
The following options are available:
- 0: Liquid Rate, WCT, GOR
- 1: Oil Rate, WCT, GOR
- 2: Gas Rate, WGR, CGR
- 3: Oil, Water and Gas rates
- 4: Water rate
Contains the pump/compressor minimum speed limit.
Contains the number of stages considered for the pump/
compressor.
Returns the pump/compressor optimum calculated speed.

GAP and the OpenServer

StageData[i].
UseSep

StageData[i].
SepData[j]

UseAff

INJTEMP

78

Contains the status of the internal separation for the pump/


compressor.
The index refers to the stage considered:
- 0: Before compression process
- 1: After compression process
The following indexes are describing the separation status:
- 0: No Internal Separation
- 1: Existing Internal Separation capacity
Contains the fraction of fluid removed by the internal separation
process if any.
The index refers to the stage considered:
- 0: Before compression process
- 1: After compression process
The following indexes are describing the fluid phases considered:
- 0: Percentage of Water removed.
- 1: Percentage of Oil removed.
- 2: Percentage of Gas removed.
Contains the use affinity laws facility status.
The following numerical indexes are used:
- 0: Do not use affinity laws.
- 1: Use affinity laws to scale the element performance for
speed/frequency.
Contains the injection (inlet) temperature - only for injection systems.

4.1.9.6.2 Fields Specific to Compressors


Variable Name
SubType *

ACTSPEED

DELTAP
PEff
PolyEff
PPower

Description
Refers to the type of compressor model used.
The three types of compressor models available are:
- PerfCurve: Performance Curve Model
- FixedPower: Fixed Power Model
- FixedDp: Fixed Pressure Drop Model
- Reciprocating
Contains the Actual speed (or frequency) of the pump/
compressor for use with affinity laws or if speed/frequency is a
sensitivity variable.
Contains the value of the pressure drop across the compressor
(Fixed Pressure Drop Model).
Contains the compressor overall efficiency (Fixed Power
Model).
Contains the compressor polytropic efficiency.
Contains the value of the horsepower by stage developed by the
compressor (Fixed Power Model).
1990-2011 Petroleum Experts Limited

79

OpenServer

StageData[i].
UseCool

Refers to the status of the cooling process for the compressor.


The index refers to the stage considered:
- 0: Before compression process
- 1: After compression process
The following indexes are describing the separation status:
- 0: No Cooling
- 1: A Cooling process exists
Contains the description of the cooling process if any.
The index refers to the stage considered:
- 0: Before compression process
- 1: After compression process
The following indexes are describing the fluid phases
considered:
- 0: Cooler Temperature.
- 1: Cooler Efficiency.
Contains the use polytropic head facility status.
The following numerical indexes are used:
- 0: Do not use the polytropic head facility. Assumes the
head in the performance data used is based on an
isentropic cycle.
- 1: Do use the polytropic head facility. Assumes the
head in the performance data used is based on a
polytropic cycle.

StageData[i].
CoolData[j]

UsePoly

Example: To access the design speed of a node with label c1, one could use the string
GAP.MOD[0].COMP[{c1}].DESSPEED.

4.1.9.7 Fields specific to separator / injection manifold nodes


All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].SEP[j]
Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section) and the index j refers to the name or numerical index
of the element considered (i.e. refers to the Model Equipement List, EQUIP[i]
section).
Variable
Name
SubType *

OpenServer User's Manual

Description
Contains the type of separation node considered:
The following keywords are used:
- GASINJMAN: Gas Injection Manifold

GAP and the OpenServer

InjFluidLabel

SolverPres[j]

Temperature

80

- PRODSEP: Production Separator


- WATINJMAN: Water Injection Manifold
Contains the fluid label that refers to the type of fluid used for injection
purposes. The properties of these fluids can be found under the
FluidListSection string.
Contains an array of pressures to be used in allocation calculations. Up
to 10 pressure values can be entered.
If the system is gaslifted, only one pressure value can be assigned to
the separator, and therefore only [0] is used.
Contains the temperature of the injected fluid.

Example: To set the manifold pressure used for the Solve Network calculation to 200
psig for instance, the following command will be used: DoSet(GAP.MOD[0].SEP
[{Sep1}].SolverPres[0]),200

4.1.10 Composition Records


4.1.10.1Compositional Model Setup
The type of compositional model and associated calculations can be setup in the
Options / System Options / Method section.
The COMPMODE string can be used directly at the MOD level to setup directly these
options via OpenServer.
When either the Compositional Tracking, Fully Compositional or Black Oil Lumping
Delumping Calculation options are selected, the EOS model used in GAP needs to be
setup, as well as emulsion models if needed (see Model_Options).

4.1.10.2Fluid Composition Setup - Wells


The fluid composition will be defined in the wells using a composition table including up
to 30 components and their characteristics.
The following strings can be used at the IPR level to define the fluid composition for
each well and eventually each layer in multilayer wells.
Defining the composition will follow a similar procedure should the model use
Compositional Tracking, Fully Compositional or Black Oil Lumping Delumping
Calculation.
All the following variables will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].WELL[j].IPR[k].Composition
Where the index i refers to the type of model considered (i.e. refers to the Variables
1990-2011 Petroleum Experts Limited

81

OpenServer

at MOD level, MOD[i] section), the index j refers to the name or numerical index of the
well considered (i.e. refers to the Model Equipement List, EQUIP[i] section) and the
index k refers to the layer considered in case of multilayer wells.
In case the composition considered does not refer to a well fluid composition but to a
specific fluid from the GAP fluid list, the OpenServer strings associated to this fluid list
are defined in the section 3.2.6.1, the following string will then been used:
GAP.MOD[i].FluidList[j].Composition
Variable
Name

Description

In every variable described below, the indes [i] refers to the row of
the composition table considered. Each component described in
the fluid composition table will have a specific table row assigned
using the NAME string described below.
BICOEFF[i][j] Refers to the binary interaction coefficients used.
The first index refers to the composition table row index of the first
component considered.
The second index refers to the composition table row index of the
second component considered.
MOLEPCT[i] Array [30] of mole percentages.
MW[i]
Array [30] of molecular weights.
NAME[i]
Array [30] of component names.
Valid values for this variable could be for instance:
- N2
- CO2
- NC4
- PS-1 ; PS-2 ; PS-3 for the pseudo-components considered.
NUMCOMP Contains the total number of components used to describe the fluid
composition in the well layer considered.
OMEGA[i]
Array [30] of accentric factors (i.e. factors).
OMEGAA[i] Array [30] of A factors.
OMEGAB[i] Array [30] of B factors.
PARACHOR Array [30] of parachors.
[i]
PCRIT[i]
Array [30] of critical pressures.
SPGRAV[i]
Array [30] of specific gravities.
TBOIL[i]
Array [30] of boiling points.
TCRIT[i]
Array [30] of critical temperatures.
VCRIT[i]
Array [30] of critical volume.
VSHFT[i]
Array [30] of volume shifts.
Example: To access the mole percentage of the first component of the input
OpenServer User's Manual

GAP and the OpenServer

82

composition for the first layer of a well labeled w1, the string would be GAP.MOD[0].
WELL[{w1}].IPR[0].Composition.MOLEPCT[0].

4.1.10.3Fluid Composition Results


Whether the compositional tracking, fully compositional or black oil lumping delumping
calculation option is chosen, the fluid composition will be defined in every system node
using a composition table similar to the one used to define the fluid composition and
described previously.
The strings used to obtain these results are similar to the one described above, at the
exception that the type of calculation considered should be specified in the OpenServer
string as described below.
To obtain the results from the Solver Calculation, the following type of string
can be used:
GAP.MOD[i].EQUIP[j].SolverResults[k].Composition.NAME[l]
Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section), the index j refers to the name or numerical index of the
node considered (i.e. refers to the Model Equipement List, EQUIP[i] section) and the
index k refers to the solver sensitivity considered.
The index l refers to the row index or the component name of the component
considered.
To obtain the results from the Prediction Calculation, the following type of
string can be used:
GAP.MOD[i].EQUIP[j]. PREDRES[{01/01/2000}].Composition.NAME[k]
Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section), the index j refers to the name or numerical index of the
node considered (i.e. refers to the Model Equipement List, EQUIP[i] section) and the
index k refers to the row index of the component considered.
Example: To access the mole percentage of the first component of the solver result
composition for a node labeled N1, the string to use would be GAP.MOD[0].NODE
[{N1}].SolverResults[0].Composition.MOLEPCT[0].
The above string is exactly the same when using the Black Oil Lumping Delumping
compositional calculation option.

4.1.11 Enabling / Disabling Options


This section provides various OpenServer Commands for Enabling or Disabling various elements in GAP.

1990-2011 Petroleum Experts Limited

83

OpenServer

Function Name

Description

DoCmd GAP.MOD[{PROD}].
SetDisableSystemValidation()
DoCmd GAP.MOD[{PROD}].
ClearDisableSystemValidation()
DoGet GAP.MOD[{PROD}].
IsDisableSystemValidation

Will Disable the System Validation flag (under


Options tab of GAP)

DoCmd GAP.MOD[{PROD}].
SetDisableAutomaticMasking()
DoCmd GAP.MOD[{PROD}].
ClearDisableAutomaticMasking()
DoGet GAP.MOD[{PROD}].
IsDisableAutomaticMasking

Will Disable the Automatic Masking flag (under


Options tab of GAP)

DoCmd GAP.MOD[{PROD}].
SetDisableLabelValidation()
DoCmd GAP.MOD[{PROD}].
ClearDisableLabelValidation()
DoGet GAP.MOD[{PROD}].
IsDisableLabelValidation

Will Disable the Label Validation flag (under Options


tab of GAP)

DoCmd GAP.MOD[{PROD}].
SetDisablePrpGapWellTypeValidation()
DoCmd GAP.MOD[{PROD}].
ClearDisablePrpGapWellTypeValidation
()
DoGet GAP.MOD[{PROD}].
IsDisablePrpGapWellTypeValidation

Will Disable the PROSPER Well Type Validation flag


(under Options tab of GAP)

DoCmd GAP.MOD[{PROD}].
SetDisablePredScript()
DoCmd GAP.MOD[{PROD}].
ClearDisablePredScript()
DoGet GAP.MOD[{PROD}].
IsDisableDisablePredScript

Will Disable the Disable Prediction Script flag (under


Predictions tab of GAP)

DoCmd GAP.MOD[{PROD}].
SetEnablePredScriptDoubleQuotes()
DoCmd GAP.MOD[{PROD}].
ClearEnablePredScriptDoubleQuotes()
DoGet GAP.MOD[{PROD}].
IsEnablePredScriptDoubleQuotes

Will Disable the Prediction Script double quotes flag


(under Predictions tab of GAP)

OpenServer User's Manual

Will Enable the System Validation flag (under


Options tab of GAP)
Will allow checking whether the System Validation
flag is enabled or disabled.

Will Enable the Automatic Masking flag (under


Options tab of GAP)
Will allow checking whether the Automatic Masking
flag is enabled or disabled.

Will Enable the Label Validation flag (under Options


tab of GAP)
Will allow checking whether the Label Validation flag
is enabled or disabled.

Will Enable the PROSPER Well Type Validation flag


(under Options tab of GAP)
Will allow checking whether the PROSPER Well
Type Validation flag is enabled or disabled.

Will Enable the Disable Prediction Script flag (under


Predictions tab of GAP)
Will allow checking whether the Disable Prediction
Script flag is enabled or disabled.

Will Enable the Prediction Script double quotes flag


(under Predictions tab of GAP)
Will allow checking whether the Prediction Script
double quotes flag is enabled or disabled.

GAP and the OpenServer

84

4.1.12 Scheduling
The user can set the schedule of any model element for the prediction run.
All the schedule events will need to be preceded by the following OpenServer string
structure:
GAP.MOD[i].EQUIP[j].SCHEDULE[k]
If the schedule event refers to the entire system, i.e., production network or associated
injection network for instance, the following OpenServer string structure can be used:
GAP.MOD[i].SCHEDULE[k]
Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section), the index j refers to the name or numerical index of the
network element considered (i.e. refers to the Model Equipement List, EQUIP[i]
section) and the index k refers to the row of the schedule event considered in the
schedule event list..
For each record in the schedule, the following fields are considered:
- Date
- Event type
- Constraint type (or OpenServer variable)
- Constraint value

4.1.12.1Schedule Count
The total number of schedule rows assigned to an element can be derived using the
following string:
GAP.MOD[i].EQUIP[j].SCHEDULE.COUNT

4.1.12.2Date
The variable string for the date in the ith model, jth equipment and kth record in the
schedule is the following:
GAP.MOD[i].EQUIP[j].SCHEDULE[k].DATE
The above string refers to the date of the scheduled event as a number, and not as a
day/month/year format date.

1990-2011 Petroleum Experts Limited

85

OpenServer

To refer to the date as a day/month/year format, the following string can be used:
GAP.MOD[i].EQUIP[j].SCHEDULE[k].DATE.DATESTR

4.1.12.3Event type
The variable string for the event type in the ith model and jth record in the schedule is:
GAP.MOD[i].EQUIP[j].SCHEDULE[k].TYPE
This variable is a read only variable.
The existing types of event and their availability, depends of the type of element
considered.
A list of associated keywords are described below:
Event Type
Bypass
Change constraints
Change Diameter
Change Downtime
Change Fixed Rate
Fixed rate (Gas)
Fixed rate (Gas) - off
Fixed rate (Wat)
Fixed rate (Wat) - off
Gas recycling
Gas recycling - off
Gas recycling (Prd Amount)
Gas recycling (Prd Amount) - off
Mask
Pressure target
Pressure target - off
Start well
Stop well
Stop well, no X-flow
Unbypass
Unmask
Voidage Replacement (Gas)
Voidage Replacement (Gas) - off
Voidage Replacement (Wat)
Voidage Replacement (Wat) - off

OpenServer User's Manual

Associated Keyword
BYPASS_ON
CONSTRAINT_CHANGE
CHK_SIZECHNG
DOWNTIME_CHANGE
RATE_CHANGE
TANK_FIXGAS
TANK_OFF_FIXGAS
TANK_FIXWAT
TANK_OFF_FIXWAT
TANK_RECYCGAS_PC
TANK_OFF_RECYCGAS_PC
TANK_RECYCGAS_FIX
TANK_OFF_RECYCGAS_FIX
MASK
TANK_TARGPRES
TANK_OFF_TARGPRES
WELL_ON
WELL_OFF
WELL_OFF_NO_CROSS
BYPASS_OFF
UNMASK
TANK_VOIDGAS
TANK_OFF_VOIDGAS
TANK_VOIDWAT
TANK_OFF_VOIDWAT

GAP and the OpenServer

Water recycling
Water recycling - off

86

TANK_RECYCWAT_PC
TANK_OFF_RECYCWAT_PC

4.1.12.4Constraint Type
When the type of event considered refers to the modification of a model constraint, the
constraint to modify needs to be specified.
The string referring to the type of constraint in the ith model and kth record in the
schedule is:
GAP.MOD[i]. EQUIP[j].SCHEDULE[k].LPAR[0]
See Constraint_Level_and_Type for further description of constraint names.

4.1.12.5Constraint Value
When the event type considered refers to the setup of a model parameter value or the
modification of one of the model constraints, the following string will be used:
GAP.MOD[i]. EQUIP[j].SCHEDULE[k].CVAL[0]
When retrieving a value of a scheduled element, the previous string will return both value
and the unit in which it is expressed.
Example: To setup the maximum liquid constraint to 5000STB/d on the 01/01/2005 in
a well labeled W1, the following set of strings will be used:
DoSet GAP.MOD[0]. EQUIP[{W1}].SCHEDULE[0].DATE.DATESTR,
01/01/2005
DoSet GAP.MOD[0]. EQUIP[{W1}].SCHEDULE[0].LPAR[0], MAXQLIQ
DoSet GAP.MOD[0]. EQUIP[{W1}].SCHEDULE[0].CVAL[0], 5000

4.1.12.6Schedule Reset
The existing GAP schedule can be reset, either at the production system level,
associated injection system level or at the element level using the following strings:
At system level: GAP.MOD[i].SCHEDULE.RESET
At equipment level: GAP.MOD[i].EQUIP[j].SCHEDULE.RESET
Note that these should be used with a Doset for example:

1990-2011 Petroleum Experts Limited

87

OpenServer

At system level: Doset (GAP.MOD[{PROD}].SCHEDULE.RESET), 1


At Equipment level: Doset (GAP.MOD[{PROD}].EQUIP[{Separator}].SCHEDULE.
RESET), 1
4.1.12.7Apply Schedule To
The OpenServer commands to access the "Apply Schedule To" section are :
DoCmd ("Gap.APPLYSCHEDULETO({20/04/2012})")
DoCmd ("GAP.CLEARAPPLIEDSCHEDULE()")

4.1.13 Constraints
4.1.13.1Constraint Level and Type
The following listed constraints are available within GAP.
The availability of these constraints on the system element considered such as a well,
joint, separator, etc., will depend of the nature of the element.
The string defining the constraint type should always be preceded by a prefix describing
the system level and element on which this constraint should be applied:
- MOD Level Constraints (i.e. System Constraints) :
The constraint name should be preceded in the OpenServer string by a
GAP.MOD[{PROD}] prefix.
Example: To set the value of the maximum gas rate constraint applied to the system to
1000MMSCF/d, the following string could be used:
DoSet (GAP.MOD[0].MAXQGAS),1000
-

NODE Level Constraints :


The constraint name should be preceded in the OpenServer string by a
GAP.MOD[{PROD}].NODETYPE prefix.

Example: To set the value of the maximum gas rate constraint applied to the well
WELL 1 to 100MMSCF/d, the following string could be used:
DoSet (GAP.MOD[0].WELL[{WELL 1}].MAXQGAS),100
The well abandonment constraints can be set for each well layer
independently using the following structure:
GAP.MOD[0].WELL[{WELL 1}].IPR[i].ABMAXGOR
The constraint list is as follows:
OpenServer User's Manual

GAP and the OpenServer

Variable Name
ABMAXGOR
ABMAXWC
ABMAXWGR
ABMINGAS
ABMINLIQ

AlqValueMax

AlqValueMin

ESPFreqMax
ESPFreqMin
MAXCFACTOR
MAXDRWDWN
MAXGINJ
MAXGROSSHEATING
MAXPCO2
MAXPH2S
MAXPN2
MAXPOW
MAXPOWERFLUID
MAXPRESSURE
MAXPWF
MAXQGAS
MAXQLIQ
MAXQOIL
MAXQTOTGAS
MAXQWAT

88

Description
Well Abandonment Constraints Type
Contains the well maximum GOR before abandonment
Contains the well maximum WC before abandonment
Contains the well maximum WGR before abandonment
Contains the well minimum gas rate before abandonment
Contains the well minimum liquid rate before
abandonment
General Constraints Type
Contains the maximum well artificial lift parameter:
- For ESP lifted wells: refers to the ESP
frequency
- For PCP lifted wells: refers to the pump speed
- For HSP lifted wells: refers to the power fluid
rate
- For Jet Pump lifted wells: refers to the power
fluid rate
- For Diluent Injection wells: refers to the diluent
injection rate
Contains the minimum well artificial lift parameter (see
above)
Contains the maximum ESP frequency
Contains the minimum ESP frequency
Contains the maximum C factor (pipeline only)
Contains the well maximum applied drawdown
Contains the maximum gas injection rate
Contains the maximum gross heating value
Contains the maximum mole percentage of CO2
Contains the maximum mole percentage of H2S
Contains the maximum mole percentage of N2
Contains the maximum power
Contains the maximum power fluid rate, at separator or
node level only.
Contains the line maximum pressure (pipeline only)
Contains the maximum flowing bottom hole pressure
Contains the maximum gas rate
Contains the maximum liquid rate
Contains the maximum oil rate
Contains the maximum total gas rate
Contains the maximum water rate

1990-2011 Petroleum Experts Limited

89

OpenServer

MAXSOG
Contains the maximum gas specific gravity
MAXSPECGROSSHEATIN Contains the maximum specific gross heating value
G
MAXVELOCITY
Contains the maximum fluid velocity (pipeline only)
MINGINJ
MINGINJNC
MINPWF
MINQGAS
MINQLIQ

Contains the minimum gas injection rate


Contains the minimum no-close gas injection rate
Contains the minimum flowing bottom hole pressure
Contains the minimum gas rate
Contains the minimum liquid rate

MotPowMax
MotPowMin

Contains the maximum motor power


Contains the minimum motor power

OPTWEIGTH
PCPSpeedMax
PCPSpeedMin
PumpRateConstraint[i][j]

Contains the well optimisation weigth


Contains the maximum PCP speed
Contains the minimum PCP speed
Contains an array of minimum and maximum pump rate
as a factor of the pump control parameter.
Valid for ESP lifted, PCP lifted, HSP lifted and Jet Pump
lifted wells only.
The following numerical indexes are used:
- i: Defines the colum index
0: Refers to the Pump contol parameter
column. (See the AlqValueMax constraint for pump
control parameter list)
1: Refers to the Minimum Pump Rate Column
2: Refers to the Maximum Pump Rate Column
- j: Defines the row index (j values from 0 to 19,
20 columns maximum)
Contains the well shut in priority factor

SHUTINPRI

4.1.13.2Binding Constraints
Some of the constraints described above can be setup to be either binding or unbinding
constraints.
To access the binding section of each constraint, the constraint original OS string
should be followed by the BINDING keyword.
The following numerical indexes are used to define the status of the constraint regarding
to the binding option:
0 : the constraint is set to non-binding
1 : the constraint is set to binding

OpenServer User's Manual

GAP and the OpenServer

90

Example: To access the binding status of the well WELL 1 maximum liquid constraint,
the following string can be used:
DoGet (GAP.MOD[0].WELL[{WELL 1}].MAXQLIQBINDING)

4.1.13.3Constraints and Potential Calculations


By definition, the potential calculation enables to calculate the system potential, i.e.,
calculating the system production without taking into account any imposed constraints.
However, it is possible to tune the potential status of each constraint to maintain a
binding status during the potential calculation.
To access the potential section of each constraint, the constraint original OS string
should be followed by the POTENTIAL keyword, except for the specific constraints
listed below.
The following numerical indexes are used to define the status of the constraint regarding
to the potential calculation:
0 : the constraint is not kept active during the potential calculation
1 : the constraint is kept active during the potential calculation
By default, GAP will keep the constraints that cannot physically be neglected, such as
the separator handling capacities for instance.
Example: To keep the liquid constraint of the well WELL 1 active during the potential
calculation, the following string can be used:
DoSet (GAP.MOD[0].WELL[{WELL 1}].MAXQLIQPOTENTIAL),1
Variable Name
ABMAXPWFPOTENTIAL
MAXGLPOTENTIAL
MINGLNCPOTENTIAL
MINGLPOTENTIAL
MXDRWDWNPOTENTIAL

OtherConstraintPotential[i]

Description
Contains the maximum flowing bottom hole pressure
constraint potential status
Contains the maximum gas injection constraint
potential status
Contains the minimum no close gas injection
constraint potential status
Contains the minimum gas injection constraint
potential status
Contains the maximum drawdown constraint potential
status
Contains the potential status of the following
constraints, depending of the i index value:
- 0: Maximum pump control parameter
- 1: Minimum pump control parameter

1990-2011 Petroleum Experts Limited

91

OpenServer

(See the AlqValueMax constraint for pump control


parameter list)
- 2: Minimum motor power
- 3: Maximum motor power

4.1.14 Obtaining the Results


4.1.14.1Solver Results
All the Solver results can be obtained for each node and element in the network using
the following string:
GAP.MOD[i].EQUIP[j].SolverResults[k].l
Where the index i refers to the type of model considered (i.e. refers to the Variables
at MOD level, MOD[i] section), the index j refers to the name or numerical index of the
network element considered (i.e. refers to the Model Equipement List, EQUIP[i]
section) and the index k refers to the index of the Solve Network sensitivity case
considered.
l refers to the model parameter considered.
The following keywords are used:
Parameter Keyword
CO2
H2S
N2

Description
Mol percentage of CO2 in the fluid considered
Mol percentage of H2S in the fluid considered
Mol percentage of N2 in the fluid considered

CGR
Drawdown
FBHP
GOR
GrossHeatingValue
HCMassRate
HCMoleRate
NetHeatingValue
PControlResult
Pres
Qgas
Qliq
Qoil
Qwat
ResPres

Produced CGR
Well drawdown
Well flowing bottom hole pressure
Produced GOR
Gross heating value of the fluid stream considered
Hydrocarbon mass rate produced
Hydrocarbon molar rate produced
Net heating value of the fluid stream produced
Optimum pressure drop calculated
Pressure at the system node considered
Produced gas rate
Produced liquid rate
Produced oil rate
Produced water rate
Reservoir pressure

OpenServer User's Manual

GAP and the OpenServer

SGG
SpecGrossHeatingValue
SpecNetHeatingValue
SOG
Temp
TotMassRate
WCT
WGR
WSAL

92

Specific gas gravity produced


Specific gross heating value of the fluid considered
Specific net heating value of the fluid stream considered
Specific oil gravity produced
Flowing temperature at the system node considered
Total mass rate produced
Produced water cut
Produced water to gas ratio
Water salinity produced

Pipeline and Well Status


Flags
IsBottleNecked
IsReversedFlow
IsUnstable

IsChokedByOptimiser
IsUnstable

Pipeline Status Flags


Returns 0 if the pipe is not bottlenecking, 1 if it is.
Returns 0 if the pipe is not in reverse flow, 1 if it is.
Returns 0 if the pipe is in stable flow, 1 if it is not.
Well Status Flags
Returns 0 if the well is not choked by the optimiser, 1 if it
is.
Returns 0 if the well is in stable flow, 1 if it is not.

If the element considered is a well, the following string can be used to access the solver
results for a specific layer:
GAP.MOD[i].WELL[j].IPR[k].SolverResults[l].m
Example: To retrieve the oil rate produced at the node labeled Manifold, the following
string can be used:
GAP.MOD[0].EQUIP[{Manifold}].SolverResults[0].Qoil
In case the compositional tracking or full composition calculation options are used, the
composition related solver results can be obtained as defined in
Fluid_Composition_Results.

4.1.14.2Prediction Results
All the Production Prediction results can be obtained for each node / element in
the network using the following string:
GAP.MOD[i].EQUIP[j].PREDRES[k].l
Where the index i refers to the type of model considered (i.e. refers to the Variables
1990-2011 Petroleum Experts Limited

93

OpenServer

at MOD level, MOD[i] section), the index j refers to the name or numerical index of the
network element considered (i.e. refers to the Model Equipment List, EQUIP[i]
section) and the index k refers to the date of the prediction time-step considered.
l refers to the model parameter considered.
The integer k in the above mentioned command will vary from 0 to one less than the
number of prediction results. The command to check the number of prediction results is
GAP.MOD[i].EQUIP[j].PREDRES.DATES.COUNT
Similar keywords to the one used for the Solver results are used for prediction results,
except for the following parameters:
Parameter Keyword
AVGGASRATE
AVGLIQRATE
AVGOILRATE
AVGWATRATE
DATES[i]

Description
Average gas rate produced
Average liquid rate produced
Average oil rate produced
Average water rate produced
Refers to the date of the ith prediction time-step.

DATES[i].DATESTR

Will refer to the date using an integer format.


Refers to the date of the ith prediction time-step.

DATES[i].
DATETIMESTR

Will refer to the date using a day/month/year format.


Refers to the date of the ith prediction time-step.

DATES[i].TIMESTR

Will refer to the date using a day/month/year hrs/min/


sec format.
Refers to the date of the ith prediction time-step.

DOWNTIME
GASRATE
LIQRATE
OILRATE
PWF
REVENUE
WATRATE

Will refer to the date using a day/month/year hrs/min/


sec format.
Well downtime
Instantaneous gas rate
Instantaneous liquid rate
Instantaneous oil rate
Bottom hole flowing pressure
Revenue generated up to the node considered
Instantaneous water rate

If the element considered is a well, the following string can be used to access the solver
results for a specific layer:
GAP.MOD[i].WELL[j].LAYERPREDRES[k][l].m
Where the index i refers to the type of model considered (i.e. refers to the Variables at
MOD level, MOD[i] section), the index j refers to the name or numerical index of the
OpenServer User's Manual

GAP and the OpenServer

94

well considered (i.e. refers to the Model Equipment List, EQUIP[i] section), the index k
refers to the layer considered (i.e. it can either be the layer numerical index or the
layer name expressed between {}) and the index l refers to the prediction time-step
considered.
The index m refers to the model parameter considered. The keywords used here are
similar to those used for the Production Prediction results.
Example: To retrieve the average oil rate produced by the layer labeled Oil of the well
labeled Well1 on the 01/01/2000, the following string can be used:
GAP.MOD[0].WELL[{Well1}].LAYERPREDRES[{Oil}][{01/01/2000}].AVGOILRATE

4.1.14.3Total System Results


The Solve Network total system results can be obtained directly from the MOD
level using the following string structure:
GAP.MOD[i].SystemTotal[j].k
Where the index i refers to the type of model considered (i.e. refers to the Variables at
MOD level, MOD[i] section), the index j refers to solver sensitivity case considered and
the index k refers to the model parameter considered. The keywords used for the model
parameters are similar to the one described for the Solve Network results.

4.1.14.4Snapshot Results
The following table summarizes the OpenServer commands to re-load snapshot data:
OpenServer string
GAP.PREDSNAPSHOT.TIME.COUNT
GAP.PREDSNAPSHOT.LOAD
(snapshot_number)
GAP.PREDSNAPSHOT.LOAD
(snapshot_date)
GAP.PREDSNAPSHOT.UNLOAD()

Description
Returns the number of snapshots saved
during prediction run
Loads the snapshot that corresponds to the
specified number starting from 0
Loads the snapshot that corresponds to the
specified date
Unloads the snapshot and return to the initial
system settings

Please see Section 2.8.6 of the GAP User Guide for information on how to save
prediction snapshot data.

1990-2011 Petroleum Experts Limited

95

OpenServer

4.1.15 SubFlowSheets
GAP offers the possibility of organizing the system into different flow sheets, this option
is useful when organizing large models.
It is possible to use the OpenServer functionality to retrieve and modify variables being
located in the flow sheets.
The following syntax can be used to access the number of wells located in the flow sheet
with the index i:
GAP.MOD[{PROD}].FLOWSHEET[i].WELL.COUNT
The following syntax can be used to access the label of the well j located in the flow
sheet i:
GAP.MOD[{PROD}].FLOWSHEET[i].WELL[j].LABEL
Adding the FLOWSHEET[index] or FLOWSHEET[{name of the flow sheet}] structure to
the OpenServer string identifies which flow sheet the given variable is located
The above is valid for any variable and any equipment element.

4.2

GAP OpenServer Functions


This section describes the functions available to the OpenServer from GAP.
All functions in GAP have the form: function_name (function_arguments)
Even if a function does not require any arguments, the brackets are still required.
The recommended way to execute these functions from Visual Basic is to use the
DoGAPFunc subroutine as shown below.
This subroutine works properly with any GAP function, and correctly deals with the case
where a function takes an appreciable amount of time to execute. Some functions may
return a value.
The GAP functions can be applied at four different levels:
- Functions applicable at the Network or Top level
The function action will be applied to the entire GAP network considered i.e.,
the production, gas and water injection systems.
In the DoGAPFunc subroutine, the function name and arguments will be
preceded by a GAP prefix.
Example: The function PREDINIT() in GAP is a network level function and performs
prediction initialization and returns the number of time-steps to be performed during the

OpenServer User's Manual

GAP and the OpenServer

96

prediction.
The code to call this in Visual Basic would be:
NSTEPS = DoGAPFunc( GAP.PREDINIT() )
Upon execution, NSTEPS would be set to the number of prediction time-steps.
NSTEPS must also be declared in the macro as an Integer.
-

Functions applicable at the Model level


The function action will be applied to one of the models included in the GAP
network considered i.e., the production, gas and water injection systems. In
the DoGAPFunc subroutine, the function name and arguments will be
preceded by a GAP.MOD[i] prefix, where the i index relates to the GAP
model considered and is either expressed using the model numerical index
or using the model label between the braces{}.

Functions applicable at the Node level


The function action will be applied to one of the node of one of the models
included in the GAP network considered i.e., the production, gas and water
injection systems. In the DoGAPFunc subroutine, the function name and
arguments will be preceded by a GAP.MOD[i].EQUIP[j] prefix, where the i
index relates to the GAP model considered and the j index refers to the node
considered.

Functions applicable at the IPR level


The function action will be applied to one of the well IPR in the GAP network
considered. In the DoGAPFunc subroutine, the function name and
arguments will be preceded by a GAP.MOD[i].EQUIP[j].IPR[k] prefix, where
the i index relates to the GAP model considered, the j index refers to the node
considered and the k index refers to the layer considered.

Sample Macros:
Please also review the prediction set-up sample code in the provided "GAP Prediction
Template.xls" located in: C:/Program Files/Petroleum Experts/IPM 7/Samples/
OpenServer/Template/.
Please also review the GAP OpenServer examples. The files are in the form of *.GAR
files (archived GAP files). To open a GAR file, from the main menu of GAP select File |
Archive | Extract. Included in the GAR file is the macro that is used to run the
predictions and the code structure can be used as a reference to develop custom
macros, and to be modified to suit individual needs.

4.2.1 GAP OpenServer Functions Overview


The following table summarized the GAP OpenServer functions available, the
arguments associated and their main purpose.
1990-2011 Petroleum Experts Limited

97

OpenServer

Remark: Non compulsory function arguments will be individualized using a blue font
colour.
Function Name
Network Level Functions
CALCCOMPDP (comp)

Description

Calculates the outlet conditions of the


compressor given the inlet conditions.
CALCPIPEDP (pipe)
Calculates the dP in the pipe given the
upstream flowing conditions.
CALCPUMPDP (pump)
Calculates the outlet conditions of the pump
given the inlet conditions.
COPYITEM (EquipDest,EquipSrc)
Copies data from a source node to a
destination node.
DELITEM (equip)
Deletes a specified node from the system.
ISMEMBEROFGROUP(group)
Enables to check if the node considered is
member of a specific group.
LINKITEMS (equip1, equip2, linklabel)
Creates a link between two specified nodes.
NEWFILE ()
Clears any currently loaded GAP file.
NEWITEM (type, label, iposcode, equip, Creates a new node in the system specified.
model)
OPENFILE (filename)
Opens the GAP file specified.
PCCALC (equip, PcCurve)
Allows access to well modelled using PC
curve option.
PCGMAX (equip, PcCurve)
Calculates the maximum gas lift gas for a
particular performance curve at a specified
manifold pressure.
PCGSOLV (equip, PcCurve)
Calculates the gas lift gas required to meet a
particular target value for a particular
performance curve at a specified manifold
pressure.
PCPSOLV (equip, PcCurve)
Calculates the manifold pressure required to
meet a particular target value for a particular
performance curve.
PREDDOSTEP (optimise, potential)
Performs a production prediction time-step.
PREDDOSOLVER (timestepsize,
Performs a solve network in prediction
optimise, potential, model)
mode.
PREDEND (dorest, optimise, potential) Stops a production prediction calculation.
PREDINIT (ignore internal timesteps,
Performs production prediction initialisation.
ignore internal scheduling)
PURGEALLRESULTS (model)
Deletes all the solver and prediction results
of the GAP model considered.
PURGEPREDLOG (model)
Deletes the prediction calculation log.

OpenServer User's Manual

GAP and the OpenServer

PURGEPREDRESULTS (model)
PURGEPREDSNAPSHOT (model)
PURGESOLVERLOG (model)
PURGESOLVERRESULTS (model)
REFITPC (well)

RESETSOLVERINPUTS ()

SAVEFILE (filename)
SHUTDOWN (save)
SOLVENETWORK (optimise, model,
potential)
START ()
STARTASYNC ()
GENIPRLAYER

TRANSFERPROSPERIPR (well,
layernumber, PVTMethod)

UNLINKITEMS (equip1, equip2)


VALIDATE (solverorpred)
VLPIMPORT (equip, filename)
VLPIPRINTERSECT (well)
VLPIPRPCGEN (well, autowhp)
WELLCALC(well)

Specific Snapshot Commands


PREDSNAPSHOT.TIME.COUNT

98

Deletes all the prediction results of the GAP


model considered.
Deletes the prediction snapshots.
Deletes the solve network calculation log
Deletes all the solve network results of the
GAP model considered.
Calculates a set of performance curve for the
specified well based on the PC curve input
data.
Resets any previously entered solve network
input data (i.e. separator pressure, injection
manifold pressure, gas lift gas available).
Saves the currently loaded GAP modle to the
file specified.
Closes GAP.
Perfoms a solver calculation within GAP.
See Start and Shutdown section
See Start and Shutdown section
Specifies the target IPR layer in a multilayer
IPR model
Example: GAP.MOD[i].WELL[j].
GENIPRLAYER to n-1 where 'n' is the layer
number corresponding to the layer the IPR
will be generated
Transfers the IPR from PROSPER to the well
node
Example: GAP.MOD[i].WELL[j].
TRANSFERPROSPERIPR
Deletes the link between the two node
specified.
Validates all the network input dataset.
Imports the specified VLP file into the
corresponding node.
Calculates the VLP/IPR intersection for the
well specified.
Generates performance curve data from the
VLP/IPR data.
Calculates the well performance given
specific flowing conditions. Used to validate
the model performance.

Returns the number of snapshots saved


1990-2011 Petroleum Experts Limited

99

OpenServer

PREDSNAPSHOT.TIME
[snapshot_number]

PREDSNAPSHOT.TIME
[snapshot_number].DateStr

PREDSNAPSHOT.TIME[number1 :
number2]

PREDSNAPSHOT.TIME[number1 :
number2].DateStr

PREDSNAPSHOT.LOAD
(snapshot_number)

OpenServer User's Manual

during prediction run.


EXAMPLE
DoGet ("GAP.PREDSNAPSHOT.TIME.
COUNT")
Returns date for snapshot of the specified
number (if exist). The date is returned in
general format i.e. in days since
01/01/1990.
EXAMPLE
DoGet ("GAP.PREDSNAPSHOT.TIME
[X]")
If snapshot number X corresponds to
01/01/2010 the value of 40179 will be
returned.
Returns date for snapshot of the specified
number (if exist). The date is returned as a
string in DD/MM/YYYY format.
EXAMPLE
DoGet ("GAP.PREDSNAPSHOT.TIME
[X].DateStr")
If snapshot number X corresponds to
01/01/2010 the string "01/01/2010" will be
returned.
Returns dates for all the snapshots in the
specified number interval in the format of the
string separated by "|" symbol. Dates are
returned in general format.
EXAMPLE
DoGet ("GAP.PREDSNAPSHOT.TIME
[0:3]")
If snapshots 0-3 corresponds to dates
01/01/2010, 01/02/2010, 01/03/2010,
01/04/2010 the following string will be
returned "40179|40210|40238|40269".
Returns dates for all the snapshots in the
specified number interval in the format of the
string separated by "|" symbol. Dates are
returned in DD/MM/YYYY format. For
snapshots 0-3 in this case the following
string will be returned "01/01/2010|
01/02/2010|01/03/2010|01/04/2010"
Loads the snapshot that corresponds to the
specified number (if exist) onto the screen.
EXAMPLE
DoCmd ("GAP.PREDSNAPSHOT.
LOAD(X)")

GAP and the OpenServer

PREDSNAPSHOT.LOAD
(snapshot_date)

PREDSNAPSHOT.LOAD("Original")

PREDSNAPSHOT.UNLOAD()

100

Loads the snapshot that corresponds to the


specified date (if exist) onto the screen. The
date should be specified in DD/MM/YYYY
format in curly brackets.
EXAMPLE
DoCmd ("GAP.PREDSNAPSHOT.
LOAD({01/01/2010})")
Unloads prediction snapshot and returns
original system settings that were specified
before the predictions run.
EXAMPLE
DoCmd ("GAP.PREDSNAPSHOT.
LOAD("Original")")
Unloads prediction snapshot and returns
original system settings that were specified
before the predictions run.
EXAMPLE
DoCmd ("GAP.PREDSNAPSHOT.
UNLOAD()")

Model Level Functions


MOD[i].CopyControls(from, to, SkipFNAs Copy any column of the equipment control
)
screen into another column of this screen.
MOD[i].ResetControls(column)
Resets any column of the equipment control
screen.
MOD[i].RESETSCHEDULE (type,
Resets any scheduling associated with the
equiptype)
element specified.
MOD[i]..VALIDATE (solverorpred)
Validates the specified model input dataset.
Node Level Functions
GROUP[i].ADDMEMBER (equip)
GROUP[i].REMOVEALLMEMBERS ()
GROUP[i].REMOVEMEMBER (equip)
EQUIP[i].ADDTOGROUP (group)
EQUIP[i].BYPASS ()
EQUIP[i].DISABLE ()
EQUIP[i].ENABLE ()
EQUIP[i].IsMemberOfGroup (group)
EQUIP[i].MASK ()

Adds the equipment specified to the group


considered
Removes all the members from the group
considered.
Removes the equipment specified from the
group considered
Adds the node considered to the group
specified.
Bypasses the node considered.
Disables the node considered.
Enables the node considered.
Checks if the equipment considered is a
member of the group specified.
Masks the node considered.

1990-2011 Petroleum Experts Limited

101

OpenServer

EQUIP[i].
Deletes all the existing group memberships.
REMOVEALLGROUPMEMBERSHIPS ()
EQUIP[i].REMOVEFROMGROUP
Removes the node considered from the
(group)
group specified.
EQUIP[i].UNBYPASS ()
Unbypasses the node considered.
EQUIP[i].UNMASK ()
Unmasks the node considered.
EQUIP[i].VALIDATE ()
Validates the node considered.
TANK[i].CalcDCTankCurPres(CurProd) Calculates the Current Pressure for the tank
based on the Current Production specified.
This is for Decline Curve Tanks only.
Pipe Environment Parameters
Pipeline Correlation Matching
Calculation (DoCmd)
GAP.MOD[{PROD}].PIPE[0].DOMATCH Matches the available pipeline test to
()
selected correlations

IPR Level Functions


IPR[i].CONINGMATCH ()
IPR[i].DISABLE ()
IPR[i].ENABLE ()
IPR[i].IPRMATCH ()
IPR[i].MASK ()
IPR[i].UNMASK ()
IPR[i].VALIDATE ()

Matches the available coning data in the


selected IPR.
Disables the selected IPR.
Enables the selected IPR.
Matches the available IPR dataset.
Masks the specified IPR.
Unmasks the specified IPR.
Validates the ipr considered.

Remark : All the arguments referring to a system node or element and referred
as tag in the following descriptions will be expressed using the following syntax:
MOD[i].EQUIP[j]
Where the index i refers to the index or label (between {}) of the model considered and
the index j refers to the index or label (between {}) of the well considered.
Remark 2: Some of the functions include calculation processes that require the input of
associated variables. The variables associated with the functions can be setup using
the classic DoSet syntax.
These calculation processes will as well output results through output associated
variables. The value of these can be retrieved using a classic DoGet syntax.
DoSet GAP.MOD[i].EQUIP[j].k, value

OpenServer User's Manual

GAP and the OpenServer

102

DoGet GAP.MOD[i].EQUIP[j].k
Where the index i refers to the index or label (between {}) of the model considered, the
index j refers to the index or label (between {}) of the node considered and the index k
refers to the GAP function associated variable considered.
The value refers to the value of this associated variable.

4.2.2 CALCCOMPDP (comp) / CALCPUMPDP (pump)


ARGUMENTS
comp / pump Refers to the compressor / pump tag.
DESCRIPTION and FUNCTION RETURN
This function calculates the outlet conditions of the pump given the inlet
conditions specified in a set of global variables, as described below.
If the calculation succeeds, the function returns 0.
If it fails, the function returns a negative number.
ASSOCIATED VARIABLES
Input Data
Variable
CPDH2S
CPDCO2
CPDN2

Description
Mole percentage of H2S.
Mole percentage of CO2.
Mole percentage of N2.

CPDGG
CPDINPRES
CPDINTEMP
CPDOG
CPDQGAS
CPDQOIL
CPDQWAT
CPDWSAL

Gas gravity.
Inlet pressure.
Inlet temperature.
Oil gravity.
Inlet gas rate expressed at standard conditions.
Inlet oil rate expressed at standard conditions.
Inlet water rate expressed at standard conditions.
Water Salinity.

Output Data
Variable
CPDEFF
CPDFLUIDPWR
CPDGFRC
CPDHEAD

Description
Compressor / Pump Efficiency.
Power to fluid.
Gas fraction (pumps).
Compressor / Pump head.
1990-2011 Petroleum Experts Limited

103

OpenServer

CPDINGRATE
CPDINLRATE
CPDLFRC
CPDOUTPRES
CPDOUTTEMP
CPDPOWREQ

Inlet rate (compressors).


Average throughput rate (pumps).
Liquid fraction (compressors).
Outlet pressure.
Outlet temperature.
Total power required.

Intermediate Stage Data


Stage results are given in an array described below.
In GAP, a stage consists of a cooler (compressors only), a separator and finally
the pump or compressor unit. Cooling and separation can be set up after the final
pump or compressor unit, and the results of these are found in the CPDSTGRES
[n] array, where n is the number of stages
Variable
CPDSTGRES[0][j]
CPDSTGRES[1][j]
CPDSTGRES[2][j]
CPDSTGRES[3][j]
CPDSTGRES[4][j]
CPDSTGRES[5][j]
CPDSTGRES[6][j]
CPDSTGRES[7][j]
CPDSTGRES[8][j]
CPDSTGRES[9][j]
CPDSTGRES[10][j]
CPDSTGRES[11][j]
CPDSTGRES[12][j]
CPDSTGRES[13][j]

4.2.3 CALCPIPEDP(pipe)
ARGUMENTS
Pipe Refers to the pipe tag.

OpenServer User's Manual

Description
Pressure at inlet of stage j.
Temperature at inlet of stage j.
Temperature at outlet of cooler stage j
(compressor).
Oil rate at inlet of stage j.
Gas rate at inlet of stage j.
Water rate at inlet of stage j.
Average throughput rate (pumps), Inlet throughput
rate (compressors).
Head generated by stage j.
Power required by stage j.
Efficiency of stage j.
Gas fraction (pumps) Liquid fraction
(compressors).
Oil rate after separation for stage j.
Gas rate after separation for stage j.
Water rate after separation for stage j.

GAP and the OpenServer

104

DESCRIPTION and FUNCTION RETURN


This function calculates the pressure drop in the pipe given the upstream
conditions specified in a set of global variables described below.
If the calculation succeeds, the function returns 0. If it fails, the function returns a
negative number.
ASSOCIATED VARIABLES
Input Data
Variable
PIPH2S
PIPCO2
PIPN2

Description
Mole percentage of H2S.
Mole percentage of CO2.
Mole percentage of N2.

PIPGG
PIPGOR
PIPGIN
PIPOG
PIPP1
PIPQL
PIPT1
PIPWC
PIPWSAL

Gas gravity.
GOR.
Injected gas rate.
Oil gravity.
Upstream pressure.
Liquid rate expressed at standard conditions.
Upstream temperature.
Water cut.
Water salinity.

Output Data
Variable
PIPP2
PIPT2

Description
Calculated downstream pressure.
Calculated downstream temperature.

The associated variables require a syntax as shown in the following examples:


cells(1,1) = DoGet ("GAP.PIPH2S(MOD[i].PIPE[j])")
DoSet ("GAP.PIPGOR(MOD[0].PIPE[{P1}])"), cells (2,1)
where the index i refers to the index or label (between {}) of the model considered, the index j refers to
the index or label (between {}) of the equipment considered.

1990-2011 Petroleum Experts Limited

105

OpenServer

4.2.4 COPYITEM( EquipDest, EquipSrc )


ARGUMENTS
EquipDest Refers to the tag of the destination node
EquipSrc Refers to the tag of the source node
DESCRIPTION and FUNCTION RETURN
This function copies data from a source node to a destination node. This is only allowed
between nodes of the same type.
The function, if successful, returns the index of EquipDest in the EQUIP list.
The function can only be used if the destination equipment already exists in the network.
To create a new equipment, the 'NEWITEM' command must be used (see section
5.2.9).
EXAMPLE
An example of its use in a system with a well labeled w1, the contents of which we wish
to copy to a well labeled newwell, would be:
CPYIND = DoGAPFunc(GAP.COPYITEM(MOD[0].WELL
[{newwell}], MOD[0].WELL[{w1}]))

4.2.5 DELITEM (node)


ARGUMENTS
node Refers to the tag of the node to be deleted
DESCRIPTION
This function deletes the specified node from the system.
EXAMPLE
An example of its use in a system with a well labelled w1 would be
DoGAPFunc GAP.DELITEM(MOD[0].WELL[{w1}])

4.2.6 ISMEMBEROFGROUP(Group)
ARGUMENTS
Group - Refers to the OpenServer string defining the group considered.
DESCRIPTION
This function enables to check if a specific element of the GAP network belongs to the
group considered.
OpenServer User's Manual

GAP and the OpenServer

106

The function will return 0 if the element consider does not belong to the group
considered, and 1 if the element considered belongs to the group considered.
EXAMPLE
The example below will enable to check whether the well W1 belongs to the group
Group1:
DoCmd ("GAP.MOD[{PROD}].WELL[{W1}].ISMEMBEROFGROUP(MOD
[{PROD}].GROUP[{Group1}])

4.2.7 LINKITEMS ( equip1, equip2, linklabel )


ARGUMENTS
equip1 Refers to the tag of the first node considered
equip 2 Refers to the tag of the second node considered
linklabel (optional) Refers to the label associated to the link created (if applicable).
Needs to be specified in between quotes.
DESCRIPTION
This function links two items within a GAP model.
If the two items are a joint and another joint, or a joint and a separator, then a pipe node
will be created in order to link them, and in these cases the optional label linklabel, if
supplied, will be used as the pipe label.
EXAMPLE
For instance, the following command will create a link between the joint J1 and the
separator Sep1DoCmd ("GAP.LINKITEMS(MOD[0].JOINT[{J1}],MOD[0].SEP[{Sep1}])")

4.2.8 NEWFILE( )
ARGUMENTS
None
DESCRIPTION
This function clears any currently loaded GAP model.
Care should be taken with this function, since no check is made of whether the currently
loaded model has changed and requires saving.
EXAMPLE
DoGAPFunc ("GAP.NEWFILE()")

4.2.9 NEWITEM( type, label, iposcode, equip, model )


ARGUMENTS
type A string specifying the type of node to be created.
1990-2011 Petroleum Experts Limited

107

OpenServer

The string will be one of "WELL", "PIPE", "TANK", "SEP", "PUMP", "COMP", "JOINT",
"SOURCE", "SINK", "VALVE", "INLSEP", "INLCHK", "INLINJ", "INLGEN", "GROUP",
"INFLOW".
label A string giving the label of the new node. The string should be specified in
between quotes.
iposcode (optional) A string giving the direction a node will be displaced relative to
the reference node.
The string will be one of RIGHT, LEFT, ABOVE or BELOW.
The default value is set to RIGHT.
equip (optional) The tag of a node in the system to use as the reference node.
The reference node is used to calculate the position of the new node.
The default value is set to NULL.
model (optional) The tag of the system in which the new item is to be created.
The default value is set to MOD[0].
DESCRIPTION
This function creates a new node in the system specified. Nodes will always be
positioned such that they do not intersect each other.
EXAMPLE
To create a new well labeled Well1 in the currently loaded production system located
at the right of the Separator node, the following syntax could be used
DoGAPFunc GAP.NEWITEM (""WELL"", ""Well1"", ""RIGHT"", MOD[0].
EQUIP[{Separator}])

4.2.9.1 Working with Flowsheets


The followig instructions can be used to create and define a Flowsheet in GAP using
OpenServer:
To create an element in a Flowsheet, in general:
DoCmd GAP.NEWITEM( type, label, [iPosCode=RIGHT], [node=NULL],
[model=MOD[0]], [flowsheet=MOD[0].FLOWSHEET[{xxx}]] )
type can be:
EQUIP
WELL
PIPE
TANK
OpenServer User's Manual

GAP and the OpenServer

108

SEP
PUMP
COMP
JOINT
SOURCE
SINK
VALVE
INLSEP
INLCHK
INLINJ
INLGEN
COMPLETION
GROUP
INFLOW
FLOWSHEET
Flowsheet Example:
Create a Flowsheet in the main GAP model:
DoCmd GAP.NEWITEM( "FLOWSHEET", "FlowS1", RIGHT, NULL, MOD[0])
Create a joint in the flowsheet:
DoCmd GAP.NEWITEM( "JOINT", "Port1", RIGHT, MOD[0].FLOWSHEET
[{FlowS1}], MOD[0], MOD[0].FLOWSHEET[{FlowS1}])
To define a joint as a flowsheet port:
DoCmd GAP.MOD[{PROD}].JOINT[{Port1}].SetFlowsheetPort()
To turn a port back to a normal joint:
DoCmd GAP.MOD[{PROD}].JOINT[{Port1}].ClearFlowsheetPort()
The following flag can be used to determine whther a joint is a flowsheet port:
DoGet GAP.MOD[{PROD}].JOINT[{Port1}].IsFlowsheetPort()

4.2.10 OPENFILE( filename )


ARGUMENTS
filename Refers to the fully qualified (i.e. path included) file name to open.
DESCRIPTION
This function opens the GAP file specified. It should be used with caution since the file
will replace the currently loaded file, whether or not the currently loaded file needs
saving.
EXAMPLE
To open a GAP file labelled Simple.GAP and located in the folder Simple_Model in
the C: drive, the following syntax can be used
1990-2011 Petroleum Experts Limited

109

OpenServer

DoGAPFunc (GAP.OPENFILE ("C:/Simple_Model/Simple.GAP"))


Alternatively, an Excel spreadsheet located file can be opened using the following
syntax:
DoCmd ("GAP.OPENFILE(""" + Range("a4") + """)")

4.2.11 PCCALC (equip, PcCurve)


ARGUMENTS
equip Refers to the tag of the node considered, other than a tank node.
PcCurve Specifies which type of performance curve is to be used.
Can be specified using one of the following keywords:
"QOIL", "QGAS", "QLIQ", "OG", "GG", "FBHP", "TEMP", "H2S", "CO2", "N2",
"WSAL", "GIBACK", OPTFUN.
DESCRIPTION and FUNCTION RETURN
GAP builds performance curves for nodes in the system.
This function allows access to these curves. The input conditions are set up in
global variables described in the following section, then the function is called to
calculate the answer.
The function returns 0 if the calculation has been successful, and a negative
number if not.
Input Data
Variable
PCCGASINJ
PCCMANIPRES

Description
In a gas lifted system, specifies the gas injected.
The manifold pressure.

Output Data

Variable
PCCANS
PCCDANSDG

Description
The calculated quantity.
In a gas lifted system, the derivative of the calculated
quantity with respect to gas injected.

The Input and Output Data parameters are global variables, and hence do not
require the equipment to be identified when using these variables. An Example for
this is given below.
EXAMPLE
An example of its use with a gas lifted well labeled w1 would be

OpenServer User's Manual

GAP and the OpenServer

110

REM Set up the input variables in the well considered

DoSet GAP.PCCMANIPRES , 500


DoSet GAP.PCCGASINJ , 1
REM Perform the calculation

DoGAPFunc GAP.PCCALC(MOD[0].WELL[{w1}],QLIQ)
REM Obtain the output values

ANS = DoGet(GAP.PCCANS)
DER = DoGet(GAP.PCCDANSDG)

4.2.12 PCGMAX (equip, PcCurve)


ARGUMENTS
equip Refers to the tag of the node considered, other than a tank node.
PcCurve Specifies which type of performance curve is to be used.
Can be specified using one of the following keywords:
"QOIL", "QGAS", "QLIQ", "OG", "GG", "FBHP", "TEMP", "H2S", "CO2", "N2",
"WSAL", "GIBACK", OPTFUN.
DESCRIPTION and FUNCTION RETURN
This function is used in a gaslifted system to calculate the maximum gaslift for a
particular performance curve at a specified manifold pressure.
The input conditions are set up in global variables (see below), then the function is
called to calculate the answer.
The function returns 0 if successful, and a negative number if not.
Input Data

Variable
PCOPTMANIPRES

Description
The manifold pressure.

Output Data

Variable
PCOPTGINJ
PCOPTVAL

Description
The calculated optimum gas injection.
The calculated quantity at optimum gas injection.

The Input and Output Data parameters are global variables, and hence do not
require the equipment to be identified when using these variables. An Example for
this is given for the PCCALC command.

4.2.13 PCGSOLV (equip, PcCurve)


ARGUMENTS
equip Refers to the tag of the node considered, other than a tank node.
PcCurve Specifies which type of performance curve is to be used.
1990-2011 Petroleum Experts Limited

111

OpenServer

Can be specified using one of the following keywords:


"QOIL", "QGAS", "QLIQ", "OG", "GG", "FBHP", "TEMP", "H2S", "CO2", "N2", "WSAL",
"GIBACK", OPTFUN.
DESCRIPTION and FUNCTION RETURN
This function is used in a gas lifted system to calculate the gas lift required to meet a
target value for a particular performance curve at a specified manifold pressure.
The input conditions are set up in global variables (see below), then the function is
called to calculate the answer.
The function returns 0 if successful, and a negative number if not.
ASSOCIATED VARIABLES
Input Data

Variable
PCSOLVMANIPRES
PCSOLVTARGVAL

Description
The manifold pressure.
The target quantity.

Output Data

Variable
PCSOLVGASINJ

Description
The calculated gas injection required. The value in
this variable on input is used as a starting value.

The Input and Output Data parameters are global variables, and hence do not
require the equipment to be identified when using these variables. An Example for
this is given for the PCCALC command.

4.2.14 PCPSOLV (equip, PcCurve)


ARGUMENTS
equip Refers to the tag of the node considered, other than a tank node.
PcCurve Specifies which type of performance curve is to be used.
Can be specified using one of the following keywords:
"QOIL", "QGAS", "QLIQ", "OG", "GG", "FBHP", "TEMP", "H2S", "CO2", "N2",
"WSAL", "GIBACK", OPTFUN.
DESCRIPTION and FUNCTION RETURN
This function is used to calculate the manifold pressure required to meet a target
value for a particular performance curve (in gaslifted systems, at a specified gas
injection).
The input conditions are set up in global variables (see below), then the function is
called to calculate the answer.
OpenServer User's Manual

GAP and the OpenServer

112

The function returns 0 if successful, and a negative number if not.


Input Data

Variable
PCSOLVGASINJ
PCSOLVTARGVAL

Description
The gas injection. In a non gaslifted node, this
value is ignored.
The target quantity.

Output Data

Variable
PCSOLVMANIPRES

Description
The calculated manifold pressure. On input, the value
in this variable is used as a starting value.

The Input and Output Data parameters are global variables, and hence do not
require the equipment to be identified when using these variables. An Example for
this is given for the PCCALC command.

4.2.15 PREDDOSTEP (optimise, potential)


ARGUMENTS
optimise (optional) Refers to the status of the optimiser when the prediction timestep
is performed.
The following options are available:
-1 GAP uses the optimisation mode and potential calculation settings saved in
the file
0 No Optimisation
1 Optimise and Honour Constraints
2 Optimise, No constraints
The default value is set to optimise and honour constraints.
potential (optional) Refers to the status of the network potential calculation.
The following options are available:
0 No potential calculation
1 Potential calculation
The default value is set to no potential calculation.
DESCRIPTION
This function, together with PREDINIT() and PREDEND(), allows step by step
predictions to be performed.
PREDINIT() performs all the setup required for a prediction run, i.e. the MBAL tanks are
loaded, the well models are initialized, etc. and PREDEND() is called to end the
prediction run. For details regarding these functions, see their associated sections.
PREDDOSTEP() is called once for each timestep in the prediction run.
The function performs two main tasks.
1990-2011 Petroleum Experts Limited

113

OpenServer

Firstly, it totals up the production and injection volumes from the previous timestep and
uses these to calculate the tank pressures for the current time-step.
Secondly, it calculates the network performance using a solve network calculation along
with the current tank pressures and flowing conditions. It then obtain the production rates
for the wells included in the system.
It then calculates the ideal injection required, based on voidage replacement conditions,
etc. If associated injection systems are present, these ideal injection requirements are
used as constraints, and the injection systems are built and allocated to obtain the
actual injection volumes.
When each PREDDOSTEP() call is finished, GAP is left in a state where it can respond
to any set of OpenServer commands. This allows a large amount of flexibility, since
virtually any action can be performed at each timestep. This can range from customized
scheduling through to running GAP in conjunction with a facilities simulator at each
timestep.
EXAMPLE
The following example performs the prediction set up in the GAP file, and on the timestep 01/03/1980 alters the PI of the first layer of well w1 to 15. At the end of the
prediction run it saves the GAP file.
REM Set up prediction
NSTEPS = DoGAPFunc GAP.PREDINIT()
For I = 1 To NSTEPS
REM Do production prediction step
RVAL = DoGAPFunc GAP.PREDDOSTEP()
REM Check return code should be 1 if step OK
If (RVAL <> 1) Then
Exit For
End If
If ( DoGet ("GAP.PREDCURDATE.DATESTR") =
"01/03/1980") Then
DoSet "GAP.MOD[0].WELL[{w1}].IPR[0].PI", 15
End If
Next
DoGAPFunc GAP.PREDEND()
DoGAPFunc GAP.SAVEFILE( C:\SAMPLES\PREDRUN1.GAP )

4.2.16 PREDDOSOLVER (timestepsize, optimise, potential, model)


ARGUMENTS
Timestepsize Should always be set to 0
OpenServer User's Manual

GAP and the OpenServer

114

optimise (optional) Refers to the status of the optimiser when the prediction timestep
is performed.
The following options are available:
-1 GAP uses the optimisation mode and potential calculation settings saved in
the file
0 No Optimisation
1 Optimise and Honour Constraints
2 Optimise, No constraints
The default value is set to optimise and honour constraints.
potential (optional) Refers to the status of the network potential calculation.
The following options are available:
0 No potential calculation
1 Potential calculation
The default value is set to no potential calculation.
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The default considers the production system.
DESCRIPTION
This function performs a solve network calculation in predictive mode without moving
forward of one prediction step.
It enables to run solve network sensitivities at a specific point during the prediction.

4.2.17 PREDEND(dorest, optimise, potential)


ARGUMENTS
dorest (optional) Refers to the time-step at which the prediction run ends.
The following options are available:
0 The prediction forecast is ended as soon as the the function is called.
1 The prediction forecast is ended at the end of the defined prediction
schedule.
The default value is set to 1.
optimise (optional) Refers to the status of the optimiser when the prediction time-step
is performed.
The following options are available:
-1 GAP uses the optimisation mode and potential calculation settings saved in
the file
0 No Optimisation
1 Optimise and Honour Constraints
2 Optimise, No constraints
The default value is set to optimise and honour constraints.
potential (optional) Refers to the status of the network potential calculation.
1990-2011 Petroleum Experts Limited

115

OpenServer

The following options are available:


0 No potential calculation
1 Potential calculation
The default value is set to no potential calculation.
DESCRIPTION
This functions ends the prediction run.
See discussion of PREDDOSTEP(), in the previous section.

4.2.18 PREDINIT (ignore internal timestep, ignore internal scheduling)


ARGUMENTS
ignore internal timestep (optional) Enables to specify whether the GAP internal
timesteps are ignored or not (i.e. mainly used when the GAP / RESOLVE coupling is
used).
The following values are possible:

0 Do not ignore internal timesteps


1 Ignore internal timesteps
The default value is set to 0.
Ignore internal scheduling (optional) - Enables to specify whether the GAP internal scheduling
events are ignored or not (i.e. mainly used when the GAP / RESOLVE coupling is used).
The following values are possible:

0 Do not ignore internal scheduling events


1 Ignore internal scheduling events
The default value is set to 0.

DESCRIPTION
This functions establishes all the setup required for a prediction run, i.e. the MBAL tanks
are loaded, the well models are initialized, etc.
This process leads to the calculation of the number of timestep required in the
prediction run.
Example:
NumSteps = DoGAPFunc("GAP.PREDINIT()") 'Initialises the GAP
Prediction and returns the total number of prediction steps
NOTE
Using of the command will initialize the prediction and define the number of steps
required to perform the prediction. The number of step is defined according to
Prediction Start, Prediction End and Step Size.

OpenServer User's Manual

GAP and the OpenServer

116

The prediction is run through the loop on a step by step basis. In this case GAP is driven
by external application and completes the full number of prediction steps; the System
Abandonment Constraints will be ignored.
The full prediction run will be accomplished even if macro exits the loop and executes
the GAP.PREDEND() command.

4.2.19 PURGEALLRESULTS (model)


ARGUMENTS
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The model considered by default is the production system.
DESCRIPTION
This function purges all results saved in the model currently considered.

4.2.20 PURGEPREDLOG (model)


ARGUMENTS
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The model considered by default is the production system.
DESCRIPTION
This function purges the prediction log of the model currently considered.

4.2.21 PURGEPREDRESULTS (model)


ARGUMENTS
model (optional) Refers to the tag of the model considered (i.e. production / water
1990-2011 Petroleum Experts Limited

117

OpenServer

injection / gas injection).


The model considerered by default is the production system.
DESCRIPTION
This function purges the prediction results saved in the model currently considered.

4.2.22 PURGEPREDSNAPSHOT (model)


ARGUMENTS
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The model considered by default is the production system.
DESCRIPTION
This function purges the prediction snapshots saved in the model currently considered.

4.2.23 PURGESOLVERLOG (model)


ARGUMENTS
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The model considered by default is the production system.
DESCRIPTION
This function purges the solver log of the model currently considered.

4.2.24 PURGESOLVERRESULTS (model)


ARGUMENTS
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The model considered by default is the production system.
DESCRIPTION
This function purges the solver results saved in the model currently considered.

4.2.25 REFITPC(well)
ARGUMENTS
OpenServer User's Manual

GAP and the OpenServer

118

well Refers to the tag of the well considered in the currently loaded model.
DESCRIPTION
This function calculates a set of performance curves for the well based on the input
performance curve data.
For example, the syntax if we would like to do a refit on a well with the name "well 2"
would be:
DoCmd("GAP.REFITPC(GAP.MOD[{PROD}].WELL[{WELL 2}])")

4.2.26 RESETSOLVERINPUTS ()
ARGUMENTS
None
DESCRIPTION
This function resets any previously entered solver inout data (i.e. separator pressure,
injection manifold pressure, gas lift gas available).

4.2.27 SAVEFILE( filename )


ARGUMENTS
filename Refers to the fully qualified (i.e. path included) file name to open.
DESCRIPTION
This function saves the currently loaded GAP model to the file specified.
It should be used with caution since the file will overwrite a file of the same name if it
exists.
EXAMPLE
To save a GAP file labelled Simple.GAP and located in the folder Simple_Model in
the C: drive, the following syntax can be used
DoGAPFunc GAP.SAVEFILE (""C:/Simple_Model/Simple.GAP"")

4.2.28 SHUTDOWN (save)


ARGUMENTS
save Enables to specify whether the file needs to be saved before closing down GAP
1990-2011 Petroleum Experts Limited

119

OpenServer

or not.
The following values are possible:

0 Do not save the GAP file


1 Automatically save the GAP file if it has been modified.
The default value is 1.
DESCRIPTION
This function closes down GAP.

4.2.29 SOLVENETWORK()
ARGUMENTS
optimise (optional) Refers to the status of the solver when the calculation is
performed.
The following options are available:
-1 GAP uses the optimisation mode and potential calculation settings saved in
the file
0 No Optimisation
1 Optimise and Honour Constraints
2 Optimise, No constraints
The default value is set to optimise and honour constraints.
model (optional) Refers to the tag of the model considered (i.e. production / water
injection / gas injection).
The default considers the production system.
potential (optional) Refers to the status of the network potential calculation.
The following options are available:
0 No potential calculation
1 Potential calculation
The default value is set to no potential calculation.
DESCRIPTION
This function performs a solver calculation within GAP.
EXAMPLE
This example assumes a naturally flowing system with two separators labeled s1 and
s2 is loaded in GAP
REM Reset any previously set allocate pressures.
DoGAPFunc GAP.RESETALLOCINPUTS()
REM Set separators to desired allocate pressures.
DoSet GAP.MOD[0].SEP[{s1}].SOLVERPRES[0], 200
DoSet GAP.MOD[0].SEP[{s2}].SOLVERPRES[0], 300
REM Set up constraints
OpenServer User's Manual

GAP and the OpenServer

120

DoSet GAP.MOD[0].MAXGAS, 50
DoSet GAP.MOD[0].SEP[{s1}].MAXQWAT, 12000
REM Perform Allocation
DoGAPFunc GAP.SOLVENETWORK(1, MOD[0])
REM Get results
QOILS1 = DoGet(GAP.MOD[0].SEP[{s1}].SOLVERRESULTS[0].
Qoil)
QWATS2 = DoGet(GAP.MOD[0].SEP[{s2}].SOLVERRESULTS[0].
Qwat)

4.2.30 TRANSFERPROSPERIPR (well, layernumber, PVTMethod)


ARGUMENTS
well Refers to the tag of the well or inflow node considered.
layernumber (optional) For multilayered wells, the number of the well layer to update.
The valid values for this argument range from 0 to n-1.
The default is set to 0 first layer.
PVTMethod (optional) Refers to the set of PVT data used during the IPR transfer.
The following options are available:
0 Follow PROSPER File
1 Black Oil
2 Compositional
The default value of this flag is set to 0.
DESCRIPTION
This function transfers the IPR from PROSPER for the well node.
This is equivalent to the Transfer Well IPR from PROSPER menu option
EXAMPLE
The following syntax can be used to transfer to the GAP system the PROSPER defined
IPR of the well labeled Well1
DoGAPFunc GAP.TRANSFERPROSPERIPR (MOD[0].WELL[{W1}])

4.2.31 UNLINKITEMS (equip1, equip2)


ARGUMENTS
equip1 Refers to the tag of the first node considered.
equip2 (optional) Refers to the tag of the first node considered.
DESCRIPTION
This function deletes the link between the first node and second node (if one exists). If
only the first node is specified, then the link between that node and its parent node is
deleted.
1990-2011 Petroleum Experts Limited

121

OpenServer

EXAMPLE
To break the link between a well W1 and a joint J1, the following code can be used.
DoGAPFunc ("GAP.UNLINKITEMS (MOD[0].JOINT[{J1}],MOD[0].WELL
[{W1}])")

4.2.32 VALIDATE (solverorpred)


ARGUMENTS

solverorpred (optional) Enables to specify which input data needs to be validated.


The following options are available:
0 The input data needed for solver calculation is validated.
1 The input data needed for prediction calculations is validated.
2 The input data needed for both solver and prediction calculation is validated.
The default value used is 2.
DESCRIPTION

This functions validates all the input data needed for both solver and prediction
calculations, at network level.
The function returns 0 if all the model considered are valid, and a value # 0 if it is not the
case.

4.2.33 VLPIMPORT (equip, filename)


ARGUMENTS
equip Refers to the tag of the node considered. Here the type of node considered
could be wells, outflows, pump or compressors.
Filename Refers to the the fully qualified (i.e. path included) TPD file name to open.
DESCRIPTION and FUNCTION RETURN
This function imports the specified file into the node, which should be a well or a pump
node.
If successful, it returns 1. If the function fails, it returns 0.
EXAMPLE
The following syntax can be used to import the lift curves .TPD file in the well labeled
W1 from the location C:\TEST
DoGAPFunc GAP.VLPIMPORT (MOD[0].WELL[{W1}], ""C:\TEST\Well1.tpd"")

OpenServer User's Manual

GAP and the OpenServer

122

4.2.34 VLPIPRPCGEN (well, autowhp)


ARGUMENTS
well Refers to the tag of the well considered.
autowhp (optional) A flag to indicate whether to use automatic wellhead pressure
selection (0 dont use, 1 use,).
The default is 1 use.
DESCRIPTION
This function generates performance curve data from the VLP and IPR data in the well
node.
The automatic wellhead pressure selection option does not apply to gaslifted wells.
For example the following code may be used to calculate the Performance Curve for
Well labelled "W2" where the Manifold Pressures used are defined by the user.
For i = 0 To 19
DoSet ("GAP.MOD[{PROD}].WELL[{W2}].MANIPRES[" + CStr(i) + "]"), Cells(36 + i, 4)
Next i
DoGAPFunc ("GAP.VLPIPRPCGEN(MOD[0].WELL[{W2}],0)")
For i = 0 To
Cells(36+i,
Cells(36+i,
Cells(36+i,
Next i

19
6) = DoGet("GAP.MOD[{PROD}].WELL[{W2}].PCDATA[0][0]["+ CStr(i)+"]")
7) = DoGet("GAP.MOD[{PROD}].WELL[{W2}].PCDATA[0][1]["+ CStr(i)+"]")
8) = DoGet("GAP.MOD[{PROD}].WELL[{W2}].PCDATA[0][2]["+ CStr(i)+"]")

4.2.35 WELLCALC (well)


ARGUMENTS
well Refers to the well tag in the currently loaded model.
The structure used to define this argument will be as follow: MOD[i].WELL[j]
Where the index i refers to the index or label of the model considered and the
index j refers to the index or label (i.e. between {}) of the well considered.
DESCRIPTION
This function performs the same calculation than the GAP Model Validation screen.
The WELLCALC(well) command performs the same task as the PACALC(well)
command and the ACTUALCALC(well) command. Thus all these three commands will
perform the VLP/IPR validation in the GAP model.
the following example shows the use of the WELLCALC(well) option.
ASSOCIATED VARIABLES
The function operates on the Model Validation variables in the well.
EXAMPLE
An example of its use with a gaslifted well labelled w1 would be
1990-2011 Petroleum Experts Limited

123

OpenServer

DoSet
DoSet
DoSet
DoSet
DoSet

"(GAP.MOD[0].WELL[{W1}].MeasuredLiqRate"), 1000
"(GAP.MOD[0].WELL[{W1}].MeasuredAlq"), 2.1
"(GAP.MOD[0].WELL[{W1}].MeasuredPres"), 200
"(GAP.MOD[0].WELL[{W1}].MeasuredGOR"), 650
"(GAP.MOD[0].WELL[{W1}].MeasuredWC"), 42

DoGAPFunc "(GAP.WELLCALC(MOD[0].WELL[{W1}])")
QLIQEST = DoGet("(GAP.MOD[0].WELL[{W1}].EstimatedLiqRate"))
QGOREST = DoGet("(GAP.MOD[0].WELL[{W1}].EstimatedGOR"))
QWCEST = DoGet("(GAP.MOD[0].WELL[{W1}].EstimatedWC"))

The syntax for the PACALC and the ACTUALCALC commands is as shown in the following lines.
DoCmd ("GAP.WELLCALC(MOD[{PROD}].WELL[{W1}])")
DoCmd ("GAP.PACALC(MOD[{PROD}].WELL[{W1}])")
DoCmd ("GAP.ACTUALCALC(MOD[{PROD}].WELL[{W1}])")

4.2.36 MOD[i].CopyControls (from, to, SkipFNAs)


ARGUMENTS
From Enables to specify which column is considered as the source column.
The following keywords are used:
MEASURED Refers to the measured data column
ACTUAL Refers to the column containing the current data used
by the solver
ESTIMATED Refers to the column estimated after an optimized
solver run.
MINIMUM Refers to the minimum value column.
MAXIMUM Refers to the maximum value column.
To Enables to specify in which column the source column is to be copied. The same
keywords that the from argument keywords are used.
SkipFNAs (optional) Enables to avoid copying the empty zones. In order to use this
function, an argument value of 1 should be introduced.
DESCRIPTION
This function copies a chosen column of the Equipment control screen into a specified
column in the same screen.
An example will be to copy the Optimised column in the Actual column after a
satisfactory optimised solver run for instance to use the optimised values obtained as
default values for the next runs.

OpenServer User's Manual

GAP and the OpenServer

124

4.2.37 MOD[i].ResetControls (column)


ARGUMENTS

column Enables to specify which column is to be deleted.


The following keywords are used:
MEASURED Refers to the measured data column
ACTUAL Refers to the column containing the current data used
by the solver
ESTIMATED Refers to the column estimated after an optimized
solver run.
MINIMUM Refers to the minimum value column.
MAXIMUM Refers to the maximum value column.
DESCRIPTION

This function resets to zero the values of a specific column in the Equipment control
screen.

4.2.38 MOD[i].RESETSCHEDULE (type, equiptype)


ARGUMENTS

type (optional) Refers to the type of scheduled element to reset.


The following keywords are used:
EVENT Refers to all the schedule events (i.e. change constraints, start and
stop wells, etc)
DCQ Refers to all the DCQ scheduling events
equiptype (optional) Refers to the type of equipment (i.e. WELL, JOINT, etc) in
which the scheduling needs to be reset.
If the optional keywords are not used, the entire network schedule will be reset.
DESCRIPTION

This function resets any scheduling data associated with the network elements
specified.

4.2.39 MOD[i].VALIDATE (solverorpred)


ARGUMENTS

solverorpred (optional) Enables to specify which input data needs to be validated.


The following options are available:
0 The input data needed for solver calculation is validated.
1 The input data needed for prediction calculations is validated.
2 The input data needed for both solver and prediction calculation is validated.
The default value used is 2.
DESCRIPTION
1990-2011 Petroleum Experts Limited

125

OpenServer

This functions validates all the input data needed for both solver and prediction
calculations, at model level.
The function returns 0 if all the model considered are valid, and a value # 0 if it is not the
case.

4.2.40 GROUPS
Command
GROUP[i].ADDMEMBER (equip)
GROUP[i].REMOVEALLMEMBERS ()

GROUP[i].REMOVEMEMBER (equip)
EQUIP[i].ADDTOGROUP (group)

Description
"equip" refers to the tag of the equipment
and the function adds the node specified to
the given group
This function removes all the members from
the given group
Use this command to remove a given piece
of equipment from the group where: "equip"
refers to the tag of the given piece of
equipment that will be removed
This function adds the node considered to
the given group

Variables
Description
GAP.MOD.[{PROD}].GROUP[{GROUP1}]. Counts the number of connected elements
to a given group
member.count
Returns the label of a given member where
GAP.MOD.[{PROD}].GROUP[{GROUP1}]. 'i' corresponds to the given member index
returned using the"GAP.MOD.[{PROD}].
member[i].label
GROUP[{GROUP1}].member.count" string
GAP.MOD.[{PROD}].GROUP[{GROUP1}]. Returns the "type" of equipment for the
given group member index 'i'
member[i].type
GAP.MOD.[{PROD}].GROUP[{GROUP1}]. Returns the sequential index of the piece of
equipment when it was added to the given
member[i].Index
GAP model
Returns the label of the equipment based
GAP.MOD.[{PROD}].EQUIP[i].label
on the specified model index (i) value

OpenServer User's Manual

GAP and the OpenServer

126

4.2.41 EQUIP[i].ADDTOGROUP (group)


ARGUMENTS

equip Refers to the tag of the group considered.


DESCRIPTION

This functions adds the node considered to the group specified.

4.2.42 EQUIP[i].BYPASS ()
ARGUMENTS

None.
DESCRIPTION

This function bypasses the node considered.


Example:
To bypass a compressor called Compr1, the following command can be used:
DoGAPFunc ("GAP.MOD[{PROD}].COMP[{Compr1}].bypass()")

4.2.43 EQUIP[i].DISABLE ()
ARGUMENTS
None
DESCRIPTION

This function disables the node considered.


See node.ENABLE for enabling nodes.
EXAMPLE

If the well w1 is to be disabled, the function call will be:


DoGAPFunc GAP.MOD[0].WELL[{w1}].DISABLE()

4.2.44 EQUIP[i].ENABLE ()
ARGUMENTS

None
DESCRIPTION

This function enables the node considered.


See node.DISABLE for disabling nodes.
EXAMPLE

If well w1 is to be enabled, the function call is:


DoGAPFunc GAP.MOD[0].WELL[{w1}].ENABLE()
1990-2011 Petroleum Experts Limited

127

OpenServer

4.2.45 EQUIP[i].IsMemberOfGroup(group)
ARGUMENTS

Group Refers to the tag of the group considered.


(e.g. GAP.MOD[{PROD}].GROUP[{Group1}] for instance).
DESCRIPTION

This function checks if the equipment considered is included in the group specified.
ASSOCIATED VARIABLES

The function returns the following variables:


- 0 if the equipment considered does not belong to the group specified.
- 1 if the equipment considered does belong to the group specified.

4.2.46 EQUIP[i].MASK ()
ARGUMENTS

None
DESCRIPTION

This function masks the node considered.


See node.UNMASK for unmasking nodes.
EXAMPLES

If well w1 is to be masked, the function call is:


DoGAPFunc GAP.MOD[0].WELL[{w1}].MASK()

4.2.47 EQUIP[i].REMOVEALLGROUPMEMBERSHIPS ()
ARGUMENTS
None
DESCRIPTION

This function removes all the exiting group links of the considered node.

4.2.48 EQUIP[i].REMOVEFROMGROUP (group)


ARGUMENTS

group Refers to the tag of the group considered.


DESCRIPTION

This functions removes the node considered of the group specified.

OpenServer User's Manual

GAP and the OpenServer

128

4.2.49 EQUIP[i].UNBYPASS ()
ARGUMENTS

None.
DESCRIPTION

This functions un-bypasses the node considered.


See node.BYPASS for bypassing nodes.

4.2.50 EQUIP[i].UNMASK ()
ARGUMENTS

None
DESCRIPTION

This function unmasks the node considered.


See node.MASK for masking nodes.
EXAMPLE

If well w1 is to be unmasked, the function call is:


DoGAPFunc GAP.MOD[0].WELL[{w1}].UNMASK()

4.2.51 EQUIP[i].VALIDATE (solverorpred)


ARGUMENTS

solverorpred (optional) Enables to specify which input data needs to be validated.


The following options are available:
0 The input data needed for solver calculation is validated.
1 The input data needed for prediction calculations is validated.
2 The input data needed for both solver and prediction calculation is validated.
The default value used is 2.
DESCRIPTION

This functions validates all the input data needed for both solver and prediction
calculations, at node level.
The function returns 0 if the model considered is valid, and a value # 0 if it is not the
case.

4.2.52 TANK[i].CalcDCTankCurPres(CurProd)
Calculates the Current Pressure for the tank based on the Current Production specified.
This is for Decline Curve Tanks only. The CURPROD must be replaced by the value of
the Current Production for which the calculations need to be performed.

1990-2011 Petroleum Experts Limited

129

OpenServer

for eg:
DoCmd ("GAP.MOD[{PROD}].TANK[{T1}].CalcDCTankCurPres(1.22501)")
This command will perform the calculation for the calculation for the Current Reservoir
Pressure based upon the value of the Current Production specified in the string. in the
above example the calculation is being performed to determine the pressure when the
cumulative production is 1.22501 units.
This command can be used in combination with DoGet("GAP.MOD[{PROD}].TANK
[{T1}].TCURRESPRED") to obtain the Current Pressure.

4.2.53 PIPE[i].DOMATCH ()
ARGUMENTS

None
DESCRIPTION

This function matches the available pipeline test data.

4.2.54 IPR[i].CONINGMATCH ()
ARGUMENTS
None
DESCRIPTION
This function matches the available coning data in the selected IPR.

4.2.55 IPR[i].DISABLE ()
ARGUMENTS
None
DESCRIPTION
This function disables the ipr considered.
See ipr.ENABLE for enabling nodes.
EXAMPLE
To disable the Layer 1 of well W1 the following code can be used.
DoCmd ("GAP.MOD[0].WELL[{W1}].IPR[0].DISABLE()")
OpenServer User's Manual

GAP and the OpenServer

130

4.2.56 IPR[i].ENABLE ()
ARGUMENTS
None
DESCRIPTION
This function enables the ipr considered.
See ipr.DISABLE for disabling nodes.
EXAMPLE
To disable the Layer 2 of well W1 the following code can be used.
DoCmd ("GAP.MOD[0].WELL[{W1}].IPR[1].ENABLE()")

4.2.57 IPR[i].IPRMATCH ()
ARGUMENTS
None
DESCRIPTION
This function matches the available ipr dataset.

4.2.58 IPR[i].MASK ()
ARGUMENTS
None
DESCRIPTION
This function masks the ipr considered.

1990-2011 Petroleum Experts Limited

131

OpenServer

4.2.59 IPR[i].UNMASK ()
ARGUMENTS
None
DESCRIPTION
This function unmasks the ipr considered.

4.2.60 IPR[i].VALIDATE (solverorpred)


ARGUMENTS
solverorpred (optional) Enables to specify which input data needs to be validated.
The following options are available:
0 The input data needed for solver calculation is validated.
1 The input data needed for prediction calculations is validated.
2 The input data needed for both solver and prediction calculation is validated.
The default value used is 2.
DESCRIPTION
This functions validates all the input data needed for both solver and prediction
calculations, at ipr level.
The function returns 0 if the ipr considered is valid, and a value # 0 if it is not the case.

4.3

GAP Internal Script


It is possible to control GAP models externally using Visula Basic applications. An
internal GAP scripting procedure is also available.
The script actions can be included at diverse levels within the prediction process.
The workflow below illustrates the succession of actions that GAP follows during a
prediction process, and illustrates at which stage the different sections of the GAP
internal scripting are taken into account.
Build systems ()
For (each system)
Script.DoPredProlog (system)
Run tank history simulation to start of prediction ()
For (each prediction timestep)
{

OpenServer User's Manual

GAP and the OpenServer

132

do
{
redo = false
For (each system)
Script.DoPredStepProlog (system)
Apply schedule for the current timestep ()
Refresh IPRs from tank ()
Apply abandonment constraints ()
Refit performance curves (for PC wells only)
For (each system)
{
Script.DoPredStepSolverProlog (system)
Solve Network ()
Script.DoPredStepSolverEpilog (system)
If (system = production) then Set injection rate constraints of
injection systems ()
}
For (each system)
Script.DoPredStepEpilog (system)
} while (redo = true)
Run tank model timestep ()
Save prediction step results ()
If (requested) Save prediction step snapshot ()
}
For (each system)
Script.DoPredEpilog (system)
Destroy systems ()
For more information using GAP script, please see Section 12 of the GAP User
Guide.

1990-2011 Petroleum Experts Limited

Chapter

MBAL and the OpenServer

134

MBAL and the OpenServer


This section describes MBAL's OpenServer options.
As will all the IPM suite of tools, the easiest way to capture any input and output field
OpenServer tag is using the Ctrl + Right-Click keyboard and mouse workflow.
For reference, all available variables are listed in the Variable Text String section of the
guide. A tool description is also provided, however, it is recommended to use the
above Ctrl + Right-Click keyboard and mouse action to capture the requried input (or
output) variable OpenServer tag.
It is important to note that it is not possible to capture the OpenServer tag for a
calculation button using the Ctrl + Right-Click keyboard and mouse workflow. A list of
all corresponding DoCmd functions are listed in the Command section of the guide.
Use of the DoSet and DoGet functions for variables which can take a value from a predefined list e.g. oil, water or gas will also be discussed and Unit handling using the
DoSet and DoGet calls.

5.1

Finding a Variable Text String


MBAL (and all IPM tools) has a very quick and easy method for finding the text string for
a particular variable.
First start the MBAL program. Open the sample file OIL.MBI. Open the tank dialog by
selecting Input Tank Data.
Suppose the objective is to find the OpenServer variable string for the porosity. This
can be achieved using the Ctrl + Right-Click keyboard and mouse workflow in the
porosity input.
Completing the above workflow should display a dialog box similar to that shown below:

1990-2011 Petroleum Experts Limited

135

OpenServer

This dialog displays the text string for the porosity variable. This can be used in the
GetValue and SetValue functions. The Copy button can be used to copy the text string
to the clipboard so it can then be pasted into the VBA macro or batch file.

5.2

Date Handling within MBAL


By default, the dates in MBAL uses date in DD/MM/YYYY format.
As soon as a TIME OpenServer keyword is used, it will refer to that type of numerical
format.
NOTE: When the date is retrieved from MBAL into the Excel spreadsheet using TIME
keyword, Excel uses its internal conversion to translate the date. This some times lead
to erroneous date representation in Excel; more specifically day and month numbers
can be flipped (MM/DD/YYYY would be seen in Excel). To avoid this CDate() VBA
command can be used for date conversion prior to passing the data to Excel.

5.3

Commands
This section describes the possible calculations and other functions that can be called
in MBAL using the DoCmd function. The following are a list of those functions and the
text strings used to call them.
Any commands beginning with MBAL.MB can only be used if the material balance tool
is selected, where the 'MB' portion of the string indicates the material balance tool is
being used.

OpenServer User's Manual

MBAL and the OpenServer

136

5.3.1 General
MBAL.ChangeTool=MB Change to the material balance tool
MBAL.ChangeTool=MC Change to the Monte Carlo tool
MBAL.ChangeTool=DC Change to the decline curve tool
MBAL.ChangeTool=1D Change to the 1D tool
MBAL.ChangeTool=ML Change to the multi-layer tool
MBAL.ChangeTool=TG Change to the tight gas model
MBAL.OpenFile
Open an MBAL file
Example: DoCmd ("MBAL.OpenFile(C:\Test\Oil.MBI") for a
macro based file path
DoCmd ("MBAL.OPENFILE=" + Range("a3")) for a
spreadsheet based file path, and:
DoCmd ("MBAL.OPENFILE(""" + Range("a3") + """)") for a
spreadsheet based file path
MBAL.SaveFile
Saves an MBAL file
MBAL.NewFile
Resets all the input data and is equivalent to the menu item
File New

5.3.2 Material Balance Commands


MBAL.MB.RunPrediction
Runs a material balance prediction
MBAL.MB.RunSimulation
Runs a material balance history simulation
MBAL.MB.SavePred=<New stream name>
MBAL.MB.SavePred(PredCopy1)
Both commands copy the current prediction stream to the specified stream name e.g.:MBAL.MB.SavePred=No breakthrus
Note that because the = character is used in the command, it can not be used in the
stream name itself.
MBAL.MB.SaveHist=<New stream name>
MBAL.MB.SaveHist(HistCopy1)
Both commands copy the current history simulation stream to the specified stream
name e.g:MBAL.MB.SavePred=First Match
Note that because the = character is used in the command, it can not be used in the
stream name itself.
MBAL.MB.IMPORTTPD(<well text string>,<TPD file name>)
Imports the specified TPD file into the specified well e.g.: 1990-2011 Petroleum Experts Limited

137

OpenServer

MBAL.MB.IMPORTTPD(MBAL.MB.PREDWELL[0],C:\OIL1.TPD)
MBAL.MB.IMPORTMBV(<well text string>,<MBV file name>)
Imports the specified MBV file into the specified well e.g.:MBAL.MB.IMPORTMBV(MBAL.MB.PREDWELL[0],C:\OIL1.MBV)
MBAL.MB.ALLOCTANKPRESSRATE(<tank text string>)
Calculates the tank production history pressure and rate from the entered well
production history. Equivalent to using the Calc button on the tank production history
input dialog. e.g.:MBAL.MB.ALLOCTANKPRESSRATE(MBAL.MB.TANK[1])
MBAL.MB.ALLOCTANKRATEONLY(<tank text string>)
Calculates the tank production history rate only from the entered well production history.
Equivalent to using the Calc Rate button on the tank production history input dialog. e.
g.:MBAL.MB.ALLOCTANKRATEONLY(MBAL.MB.TANK[1])
MBAL.MB.RESETREGRESSTANKHIST(<tank text string>)
Resets the inputs to the history matching regression for the specified tank. It will reset
the start values for each regression parameter to the current stored value. This is
equivalent to clicking the Reset button in the regression input dialog. e.g.:MBAL.MB.RESETREGRESSTANKHIST(MBAL.MB.TANK[{TankLabel}])
MBAL.MB.REGRESSTANKHIST(<tank text string>)
Performs the history matching regression for the for the specified tank. e.g.:MBAL.MB.REGRESSTANKHIST(MBAL.MB.TANK[1])
There are several commands that can be used to build models from scratch. Their use
is demonstrated in the sample spreadsheet BUILD MODEL.XLS.
MBAL.MB.VALIDATE
It is possible to create new tanks, wells etc using the Open Server. It is also possible to
populate the tank, well etc with the various items of data. However normally the object
will be marked as invalid (shown as red on the MBAL interface) until the user enters the
appropriate dialog. This functions will autmatically validate all the objects in the material
balance tool without having to enter each of the dialogs.
MBAL.MB.LINKITEMS(<object 1 text string>, <object 2 text string>)
This command will link the two specified objects. Depending on the type of objects
being connected, the command may also create intermediate objects e.g. if two tanks
and connected then a transmissibility will also be created. An example command is:MBAL.MB.LINKITEMS(MBAL.MB.TANK[1],MBAL.MB.PREDWELL[2])
MBAL.MB.BREAKLINK(<object 1 text string>, <object 2 text string>)
This command will break the link between two specified objects. An example command
OpenServer User's Manual

MBAL and the OpenServer

138

is:MBAL.MB.BREAKLINK(MBAL.MB.TANK[1],MBAL.MB.LEAK[2])
See also the section below on Material_Balance_Step-by-Step_Prediction

5.3.3 Monte Carlo


MBAL.MC.Calculate
Runs a Monte-Carlo calculation.

5.3.4 1D Model
MBAL.1D.RunSimulation :
Runs a 1D model simulation.

5.3.5 Decline Curve


MBAL.DC.RunPrediction
Runs a decline curve simulation.

5.3.6 Multi-Layer
MBAL.ML.Calculate
Runs a multi-layer calculation.
MBAL.ML.Validate
Performs a validation for the data entered.
Other variables to enter the data can be accessed by using the CTRL + Right Click
Option.

5.3.7 Production Allocation


MBAL.PA.RUNALLOCATION
Runs a allocation calculation.
MBAL.PA.SavePred=<New stream name>
MBAL.PA.SavePred(AllocCopy1)
Both commands copy the current prediction stream to the specified stream name e.g.:MBAL.PA.SavePred=Case 1
Note that because the = character is used in the command, it can not be used in the
stream name itself.

1990-2011 Petroleum Experts Limited

139

OpenServer

See also the section below on Production Allocation Step-by-Step Prediction.

5.3.8 Tight Gas


MBAL.TG.RunPrediction
Runs a tight gas prediction

5.3.9 PVT
All the PVT commands can be used for any tool that has a PVT description i.e., MB,
MC, etc. The commands below are shown for the material balance tool. The strings can
be used for the MC or ML, etc., tools by simply replacing the MB with the corresponding
tool name designation i.e., MC, etc.
MBAL.MB.PVT.INPUT.CALCULATE
Performs a PVT calculation of fluid properties.
MBAL.MB.PVT.INPUT.MATCHCURRENT
Performs a PVT match calculation on the current correlation only.
MBAL.MB.PVT.INPUT.MATCHALL
Performs a PVT match calculation on all the correlations.
MBAL.MB.PVT.INPUT.MATCHCURRENT(OIL)
Performs a PVT match calculation on the current correlation only for the oil part of
a generalised material balance dataset.
MBAL.MB.PVT.INPUT.MATCHCURRENT(CON)
Performs a PVT match calculation on the current correlation only for the
condensate part of a generalised material balance dataset.
MBAL.MB.PVT.INPUT.MATCHALL(OIL)
Performs a PVT match calculation on all the correlations for the oil part of a
generalised material balance dataset.
MBAL.MB.PVT.INPUT.MATCHALL(CON)
Performs a PVT match calculation on all the correlations for the condensate part
of a generalised material balance dataset.

OpenServer User's Manual

MBAL and the OpenServer

140

MBAL.MB.PVT.INPUT.IMPORT(<PVT file name>)


Imports a PVT file into the PVT dataset if general material balance fluid option
not used. An example command is:MBAL.MB.PVT.INPUT[1].IMPORT(C:\DOCS\OILWELL.PVT)
MBAL.MB.PVT.INPUT.IMPORT(OIL,<PVT file name>)
Imports a PVT file into the oil part of the PVT dataset if general material balance fluid
option used.
MBAL.MB.PVT.INPUT.IMPORT(CON,<PVT file name>)
Imports a PVT file into the gas/condensate part of the PVT dataset if general material
balance fluid option used.

All of the PVT commands act on a PVT dataset. In the case of MC and ML and MB with
single tank there is only ever one dataset. But for multi-tank MB we can have more than
one dataset. In this case the above commands can be modified to perform the
command on different datasets e.g.
MBAL.MB.PVT.INPUT[1].CALCULATE will calculate the index 1 dataset and
MBAL.MB.PVT.INPUT[{LOWER}].CALCULATE will calculate the dataset called
LOWER.

5.4

OpenServer Code Examples


Enter topic text here.

5.4.1 DoGet, DoSet and DoCmd Example


The following OpenServer code example will open an existing MBAL file located in the
IPM samples directory, set the OOIP to a new value, perform the prediction and extract
the date and oil rate results.
The OpenServer strings were captured using the Ctrl + Right-Click previously
mentioned keyboard and mouse workflow.
The code will be written in the OpenServer template Excel file located in: C:/Program
Files/Petroleum Experts/IPM 7/Samples/OpenServer/Template/OpenServer
Template.xls.
NOTE: MBAL must already be opened since the code does not specifically initialise
an instance of MBAL.
Sub Macro() 'Macro name
1990-2011 Petroleum Experts Limited

141

OpenServer

Dim PredFinished As Integer, iRow As Integer, iCount As Integer 'Declare variables


Connect

'Establishes the link between Excel and MBAL

DoCmd ("MBAL.OPENFILE(C:\Program Files\Petroleum Experts\IPM 7\Samples\


MBAL\Reference Examples\oil.mbi)") 'Opens the MBAL file stated in the file path
DoSet ("MBAL.MB[0].TANK[{Tank-1}].OOIP"), 220 'Sets the tank OOIP value to
220MMstb. Alternatively, a cell reference could be
given to pass a value directly from Excel to MBAL
DoCmd ("mbal.tg.runprediction") 'Runs the prediction
i = 0 'i = 0 is required to capture the first prediction date i.e., MBAL first index = 0
iCount = DoGet("MBAL.MB[0].TRES[{Prediction}][{Prediction}].COUNT") 'counts the
number of prediction steps so 'i' tracks the prediction and eliminates the need to have
prior knowledge of the number of prediction steps
Do 'do loop
Cells(5 + i, 3) = DoGet("MBAL.MB[0].TRES[{Prediction}][{Prediction}][" & CStr(i) &
"].TIME") 'Retrieves the date each step
Cells(5 + i, 4) = DoGet("MBAL.MB[0].TRES[{Prediction}][{Prediction}][" & CStr(i) &
"].OILRATE") 'Retrieves oil rate each step
i=i+1
Loop While (i < iCount) 'Performs the loop to extract the results while the prediction
advances
Set Server = Nothing 'Disconnects the Excel communication
MsgBox "Macro completed"
End Sub

5.4.2 List Variables


Consider a variable that is normally selected in the user interface using a combo box,
list box, tick box or radio buttons rather than typing in a number.
The variable can only take a value from a pre-defined list e.g. oil, water, gas,
condensate.
If it is desired to change the value of this type of variable using DoSet, a predefined text
string must be passed as the Value argument.
For example, if the fluid type is to be changed to either "OIL", "GAS", "CON" or WAT.
OpenServer User's Manual

MBAL and the OpenServer

142

The list of possible values are listed for each variable below or can be found using the
CTRL-Right Click technique described above.
The following example illustrates the use of the DoSet function:
Dim Server As Object
Dim Value As String
Dim PorVar As String
Sub DoOpenServer
Set Server = CreateObject("PX32.OpenServer.1")
Value = CON
PorVar = MBAL.MB.TANK[{S-TANK}].TYPE
SetValue(PorVar,Value)
Set Server = Nothing
End Sub
Similarly, the DoGet function will return the text string corresponding to the given
variable.

5.4.3 Material Balance Step-by-Step Prediction


This section describes how the OpenServer can be used to run a material balance
prediction step by step. This allows certain parts of the model to be changed during a
prediction, if necessary in response to various calculated variables.
The simplest client code in VBA to preform a step by step prediction will look like:Server.DoCommand(MBAL.MB.STARTPRED)
Do
Server.DoCommand(MBAL.MB.NEXTSTEPPRED)
PredFinished
=
Server.GetValue("MBAL.MB.
PREDFINISHED")
CurrentTime
=
Server.GetValue("MBAL.MB.
CURRENTPREDTIME ")
Loop While (PredFinished = False )
Server.DoCommand(MBAL.MB.ENDPRED)
The STARTPRED command will initialize the prediction.
Then call the
NEXTSTEPPRED command a number of times to do the next prediction step. Each
time the function is called, the latest value of the internal variable MBAL.MB.
PREDFINISHED will indicate if the prediction is finished.
The internal variable specified by MBAL.MB.CURRENTPREDTIME indicates how far
the prediction has progressed. Once the prediction has finished, call the ENDPRED
command to terminate the prediction.
It is possible to change some of the input data to the prediction between calls of the
1990-2011 Petroleum Experts Limited

143

OpenServer

NEXTSTEPPRED command. But be aware that it is only possible to change a sub-set


of the input data. In general we have endeavored to allow users to change data which is
likely to be altered in the real world situations. As an obvious case, we can not change
the OOIP of a tank in the middle of the prediction. However it is certainly possible that a
well is worked over during its life so it should be possible to change the PI. The data
which can not be changed includes:
All PVT input data
Most tank data except relative permeability curves
The data which can be changed includes:Tank relative permeability curves
Prediction production and constraints
Most prediction well data
Well schedule
If in doubt, the simplest solution is to try changing the data and check if it effects the
results.
Note also that any changes to data will only have any effect on the remaining part of the
prediction. This is also true of time based input data such as the drilling schedule. For
example, if a prediction was performed to 2020 and then a new well added starting in
2010, it will have no effect on the prediction results up to 2020.
At any point in the prediction, it is possible to calculate the performance of the wells in
the drilling schedule at the current tank conditions. Before calling the command
NEXTSTEPPRED, the MBAL.MB.CALCWELLS command may be called any
number of times. The results from this calculation are stored in the last row of the well
results.
WARNING:
The rates in the well results are instantaneous rates for one well. This means that if it is
desired to examine field rates, then they must be calculated using the number of wells in
the drilling schedule. Additionally, any imposed downtimes and well start and end times
must also be considered if it is desired to calculate cumulative rates from the well
results.
If the well schedule is changed during a prediction, do NOT delete rows in the table. If it
is desired to stop the entry in the well schedule contributing to the prediction then
change the end date or set the downtime factor to 100%.
A number of examples have been included with the installed samples. These show
details of the above features and show how some simple extensions to the standard
material balance prediction can be implemented. See the following section for a list of
these examples.

OpenServer User's Manual

MBAL and the OpenServer

144

5.4.4 Production Allocation Step-by-Step Prediction


This section describes how OpenServer can be used to run a step-by-step production
allocation. Performing the allocation using a step-by-step approach enables certain
parts of the model to the changed during the prediction.
The simplest client code in VBA to preform a step by step prediction will look like:
Server.DoCommand(MBAL.PA.STARTALLOC)
Do
Server.DoCommand(MBAL.PA.NEXTSTEPALLOC)
AllocFinished
=
Server.GetValue("MBAL.PA.
ALLOCFINISHED")
CurrentTime
=
Server.GetValue("MBAL.PA.
CURRENTALLOCTIME")
Loop While (AllocFinished = False )
Server.DoCommand(MBAL.PA.ENDALLOC)
The STARTALLOC command will initialize the prediction. Then call the
NEXTSTEPALLOC command a number of times to do the next allocation step. Each
time the function is called, retrieve the latest value of the internal variable MBAL.PA.
ALLOCFINISHED which will indicate if the prediction is finished.
The internal variable specified by MBAL.PA.CURRENTALLOCTIME indicates how
far the prediction has progressed. Once the prediction has finished, call the
ENDALLOC command to terminate the prediction.
It is possible to change some of the input data to the allocation between calls of the
NEXTSTEPALLOC command. But be aware that it is only possible to change a subset of the input data. In general we have endeavored to allow users to change data
which is likely to be altered in the real world situations. As an obvious case, we can not
change the oil gravity in the middle of the allocation. However it is certainly possible that
a well is worked over during its life so it should be possible to change the PI. The data
which can not be changed includes:All PVT input data
Most tank data except relative permeability curves
The data which can be changed includes:Tank relative permeability curves
Most well data
If in doubt, the simplest solution is to try changing the data and check if it effects the
results.
Note also that any changes to the data will only have any effect on the remaining part of

1990-2011 Petroleum Experts Limited

145

OpenServer

the allocation. This is also true of time based input data such as the layer production
schedule. For example, if an allocation was performed to 2020 and then a new layer is
added at 2010, the new layer will have no impact on the allocation results up to 2020.
A number of examples have been included with the installed samples and show details
of the above features and show how to implement simple extensions to the standard
production allocation.

5.5

Direct Access OPENSERVER

5.5.1 Overview
A material balance model is made up of several objects. These include tanks, wells and
inflows. There are also some control data such as manifold pressure, time steps etc.
The production prediction method in MBAL uses these objects plus the control data to
perform its calculations using the same set of smaller calculations.
For each prediction time step, and for each well the following parameters are
considered:
- Calculate the GOR, WCT, CGR, WGR for each layer given the current
saturations and relative permeabilities.
- Calculate the PVT for each layer
- Calculate the well performance given production constraints and common
manifold pressure
- Remove the well production from the appropriate tanks
- Calculate the pressure at the end of the time step
The MBAL prediction covers most situations commonly addressed by engineers.
However there are situations where a user may wish to run the prediction in a different
manner. For example they may be a requirement to have different manifold pressures.
Alternatively, it may be desired to use customized well performance calculations to
calculate well rates and still use MBAL to calculate the inflows GOR, WCT, etc.
In these situations it is now possible to write customized predictions since direct access
to the objects and low-level calculations has been provided. Macros can be written that
create the objects and call the low-level calculations in whatever form the user requires
to perform a specific type of prediction. The macro can also provide the control data
used to define manifold pressure, time steps etc.
Since we are working at a much lower level in the calculations, the commands given to
access to the temporary calculation variables as well as the input variables can be read
and change the cumulative rates in the tanks as well as being able to change the
relative permeabilities.

OpenServer User's Manual

MBAL and the OpenServer

146

There are two levels of functions: The lower level functions provide the highest level of
flexibility and the higher level functions collect a number of lower level functions into a
single function to perform a common task.
High and low level functions can be called together in the same macro. So the higher
level functions can be used for the majority of the prediction macro and low level
functions can be called if any specialist behaviour is required.
Unlike the other uses of OpenServer, these functions do not operate on the data shown
in the MBAL interface. One still needs to run MBAL to use the functions, and the data
loaded by these function are not visible anywhere in the interface. Any data loaded in
MBAL whilst running a macro using these functions is unaffected by the macro.
We supply two example macros which are described in detail in the following sections
and recommend reviewing the code structures prior to writing a custom macro.

5.5.2 Summary
All commands and data tags used for the Direct Access OpenServer all start with
MBAL.RL.
The low-level commands work slightly differently from the standard OpenServer
commands. The commands are split into a number of sections with different sub-tags
for each command. and include:
GETDATA
RESCALC
WELLDATA
IPRVLPCALC
RELPERMIPR
RELPERMTANK

general data
tank data and calculations
well/IPR data and calculations
IPR/VLP intersection calculations
relative permeability curves for layers/IPRs
relative permeability curves for tanks

Many of the commands need large amounts of data to be passed to MBAL. For
example the WELLDATA command, used to read all the IPR data, needs to pass more
than 10 variables. To pass this data, there is a data block associated with each
command. One of the items in the data block is a command ID which determines
which command is to be called. The data block can be accessed using the normal
DoGet and DoSet commands.
For example, consider the situation where we wish to update a tank with new cumulative
rates. The first step is to read the current conditions and to do this we set the command
ID and tank number in the data block associated with the RESCALC command and
then call the command to read the data into the data block as per the following:
iCommand = 8 ' Get tank data command

1990-2011 Petroleum Experts Limited

147

OpenServer

DoSet "MBAL.RL.SMBRESDATA.COMMANDID",
iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM", iTankNo
DoCmd "MBAL.RL.RESCALC"
All the tank data will be in the SMBRESDATA data block and now the cumulative rates
in the data block can be changed. To write the data back to the tank, we now load the
Write Tank Data command ID into the data block and call the RESCALC command as
per the following:
iCommand = 9 ' Set tank data command
DoSet "MBAL.RL.SMBRESDATA.COMMANDID",
iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM", iTankNo
DoSet "MBAL.RL.SMBRESDATA.CUMGAS", CUMGAS
DoSet "MBAL.RL.SMBRESDATA.CUMOIL", CUMOIL
DoSet "MBAL.RL.SMBRESDATA.CUMWAT", CUMWAT
DoCmd "MBAL.RL.RESCALC"
Note that are many other data items belonging to the tank which are retrieved and set by
the two DoCmd calls in the SMBRESDATA data block. If we are doing a Get and Set
a pair as above, we only need to set the items we want to change as the other values in
the data block will still be the same as from the read command.

5.5.3 High Level Example


The following example illustrates usage of the required functions to use to develop a
Direct Access OpenServer macro starting with high level functions:
This example is a VBA macro in an Excel spreadsheet called DA1.XLS is installed with
the program in the samples directory.
The purpose of the macro is to run a prediction similar to the standard macro except
that it uses different manifold pressures for each well.
The first command MBAL.RL.ALLREST should be called at the start of all macros as
it deletes any objects that might not have been cleaned up when running a previous
macro.
DoCmd "MBAL.RL.ALLRESET"
The next step is to create and initialize the data objects i.e., tanks, wells, layers and the
connections between them. In most cases, the simplest way to do this is to read the
objects from an existing *.MBI file. Low level functions do exist, which allow the objects
OpenServer User's Manual

MBAL and the OpenServer

148

to be created without reference to a *. MBI file, and the MBAL interface is obviously the
most convenient way to set up the objects.
The MBAL.RL.INITIALISE function will read the objects from the *.MBI file specified in
the command tag and create objects matching those in the file and connect them
together as in the given *.MBI file. All the objects are now initialized and ready for
calculations to be performed. MBAL will then run the history simulation up to the time
specified in the ENDHISTORY data item, and if a value of -1 is used then MBAL will
automatically run the history to the end of the production history in the tanks.
The USESUBSTEP data item must be set to indicate if sub-steps should be used in
the history simulation, and if the value is set to zero, MBAL will only calculate at the
times specified in the production history. Alternatively, if the value is set to one, then
MBAL will also calculate sub-steps between the entered times.
After the INITIALISE function, we read and store the handle that MBAL gave to the file
we just read in a VBA variable. This is needed in various commands used later in the
macro.
Range("F12") = "Opening file and initialising the model"
DoSet "MBAL.RL.SMBDATA.USESUBSTEPS", 0
dEndHistory = -1
DoSet "MBAL.RL.SMBDATA.ENDHISTORY", dEndHistory
DoCmd "MBAL.RL.INITIALISE(""" + Range("B12") + """)"
iMBIHandle = DoGet("MBAL.RL.SMBDATA.HANDLE")
In the last command we asked MBAL to run the history simulation to the end of the tanks
production history, but we do not know what that time was and therefore where to start
the prediction. So the next code fragment gets the data of the 1st tank in the
corresponding *.MBI file - the CUMTIM variable from the data block will indicate the
start of the prediction. We can simply use the 1st tank as the value that will be the same
for all of the tanks. We have to set the *.MBI file handle stored above, and the
command ID=8 to get the tank data. Also, set the tank number to zero to indicate that
we want the data from the 1st tank. After calling the RESCALC function, store the
CUMTIM variable in the dEndHistory VBA variable.
DoSet "MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
iCommand = 8 ' Get tank data command
DoSet "MBAL.RL.SMBRESDATA.COMMANDID", iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM", 0
DoCmd "MBAL.RL.RESCALC"
dEndHistory = DoGet("MBAL.RL.SMBRESDATA.CUMTIM")
1990-2011 Petroleum Experts Limited

149

OpenServer

The macro defined the WellName() VBA variable at the top of the macro which lists the
names of the wells in the MBI file.
WellName(0) = "OilWell"
WellName(1) = "GasLift"
WellName(2) = "WatInj"
WellName(3) = "GasWell"
The next section of the code finds the well model handle of the corresponding well
object in MBAL for each of the wells in the VBA WellName() variable. It saves the well
model handles in the VBA variable iWellModel() in the same order as the WellName()
variable. If the macro is to do any special manipulation of wells such as using a
particular WHP for WELLA-3, etc., then the calling macro has to know the handle of
each well.
The first stage is to get the number of wells loaded in MBAL and set the Command
ID=4 to get the number of well models. After calling the WELLDATA command, we can
then get the number of well models from the INTDATA variable in the data block.
The next step is to loop round each well model in MBAL and find the name of each well.
When we find the matching name, we store the well handle. To find the name, we load
the stored MBI file handle in the MBIHANDLE variable, and use the command ID=10 to
get the well model name and the HANDLE variable with the MBI well model handle.
After the WELLDATA command the WELLNAME variable contains the name.
DoSet "MBAL.RL.SMBWELLDATA.COMMANDID", 4 ' Get well
model count
DoCmd "MBAL.RL.WELLDATA"
iNumWellModels = DoGet("MBAL.RL.SMBWELLDATA.INTDATA")
For i = 0 To iNumWells - 1
For j = 0 To iNumWellModels - 1
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.COMMANDID", 10 ' Get
well name of model
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", j
DoCmd "MBAL.RL.WELLDATA"
If (WellName(i) = DoGet("MBAL.RL.SMBWELLDATA.
WELLNAME")) Then
iWellModel(i) = j
End If
Next j
Next i
By default, the well model is created assuming there is one instance of the well model.
OpenServer User's Manual

MBAL and the OpenServer

150

This next fragment shows how to model more than one well being drilled of the same
type:
- Load the MBI handle as usual
- Load 2nd well model handle in the HANDLE variable as we wish to modify the
Gas Lift well
- Load the number of wells to drill in NUMWELL
- Load 1 in the variable IPRNUM (this indicates that the command is not
specific to a particular layer)
The following code example illustrates the above:
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(1)
DoSet "MBAL.RL.SMBWELLDATA.NUMWELL", 2
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 13 ' Set number of wells
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
The next sub-section shows how to set a downtime factor for the 1st well, the Oil Well. A
downtime of zero means that the well is always producing, where a downtime of 1.0
means that the well is never producing. The method is much the same as for setting the
number of wells.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(0)
DoSet "MBAL.RL.SMBWELLDATA.DOWNTIME", 0.2
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 12 ' Set downtime command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
This next section shows how to set a start and end time for a well model. This code
fragment also shows an important point concerning the use of times. In the Direct
Access OpenServer, times are in internal units which are the number of days since
1900. Obviously these are not very convenient units, and if calendar dates i.e.,
01/01/1994 aare being used a command to convert calendar dates to internal times
(and back again) is provided. To do this set the DATE variable to the calendar date
required, then call the DATETOTIME command. The answer can then be retrieved
from the TIME variable.
To do the reverse calculation use the command
TIMETODATE.
We first convert the two calendar dates required to internal times, and then set the
STARTTIME and ENDTIME variables to these two internal time values. We set the
HANDLE to the well model handle for the third well (Gas Well) and finally set the
Command ID=14 to set the start and end times.
1990-2011 Petroleum Experts Limited

151

OpenServer

DoSet "MBAL.RL.DATE", "31/01/1990"


DoCmd "MBAL.RL.DATETOTIME"
dStartTime = DoGet("MBAL.RL.TIME")
DoSet "MBAL.RL.DATE", "02/03/1990"
DoCmd "MBAL.RL.DATETOTIME"
dEndTime = DoGet("MBAL.RL.TIME")
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(3)
DoSet "MBAL.RL.SMBWELLDATA.STARTTIME", dStartTime
DoSet "MBAL.RL.SMBWELLDATA.ENDTIME", dEndTime
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 14 ' Set start and end time command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
We have now completed the initialization and are ready to go into the prediction loop.
The rest of the source code listings are within the main prediction loop which does a
time step for each time through the loop.
The first fragment from within the loop is used to update the layers to the current tank
conditions. The UPDATELAYERS command only needs the well model handle. The
command will loop through each layer in the specifed well model and for each layer it
will update the PVT properties from the tank calculated at the current pressure. It then
calculates the WCT, GOR, CGR, and WGR for each layer from the relative
permeabilities and breakthroughs.
NOTE: This command must be called, or the initial tank conditions will always
be used! No command ID is needed.
For iWellNo = 0 To iNumWellModels - 1
DoSet "MBAL.RL.SMBWELLDATA.HANDLE",
(iWellNo)
DoCmd "MBAL.RL.UPDATELAYERS"
Next iWellNo

iWellModel

The next section is used to calculate the performance of the wells using the IPR/VLP
intersection calculation. In this macro we apply a different FWHP for each well. Much of
this part of the macro is repeated for each well so only a relevant fragment for the gas lift
well is shown.
The first step is to set the well model handle. The next variable to set (TOL) is used to
control if intersections are allowed on the negative slope section of the lift curve. The
normal situation is where they are not allowed in which case use 0.0. If negative VLP
intersections are allowed, the value will be set to a large value i.e., a value of -1e10 will
allow any size of negative slope solution.
OpenServer User's Manual

MBAL and the OpenServer

152

We then set the extrapolation flag. This specifies whether the lift curves should be
extrapolated beyond the upper and lower values of the sensitivity variables. In general,
the lift curves should be calculated over all the expected ranges of sensitivity variables.
However limited extrapolation will broaden the range of the lift curves.
NOTE: VLP extrapolation is undesirable as unpredictable behaviour may
occur. It is always recommended to regenerate the VLP if lift curve
extrapolation has been reported in the well results Status column.
The next step is setting the sensitivity variables for the lift curves, and the required
variables will depend on the well type and include:
GLRINJ
FREQ
WHP

Gas lift injected for gas lift wells


Frequency for ESPs
Well head pressure

The next step is to call the command IPRVLPCALC. No command ID is needed.


The results of the calculation are the total rate, GOR, WCT etc., which can be retrieved
from the data block.
Note that the total rate is liquid rate for oil or water wells and gas rate for gas or
condensate wells.
DoSet
"MBAL.RL.SMBIPRVLPCALC.HANDLE",
iWellModel
(iWellNo)
DoSet "MBAL.RL.SMBIPRVLPCALC.TOL", 0#
DoSet "MBAL.RL.SMBIPRVLPCALC.EXTRAP", 1#
If (iWellNo = 1) Then
GLRInj = 240#
DoSet "MBAL.RL.SMBIPRVLPCALC.GLRINJ", GLRInj
DoSet "MBAL.RL.SMBIPRVLPCALC.WHP", fWHP(iWellNo)
DoCmd "MBAL.RL.IPRVLPCALC"
iErrorCode = DoGet("MBAL.RL.SMBERRORDATA.CODE")
Range("F" + CStr(17 + iStep)) = fWHP(iWellNo)
Range("G" + CStr(17 + iStep)) = GLRInj
If (iErrorCode = 120) Then
Range("H" + CStr(17 + iStep)) = NoSolutionStr
Range("I" + CStr(17 + iStep)) = NoSolutionStr
Range("J" + CStr(17 + iStep)) = NoSolutionStr
Else
Range("H" + CStr(17 + iStep)) = DoGet("MBAL.RL.
SMBIPRVLPCALC.QTOT")
Range("I" + CStr(17 + iStep)) = DoGet("MBAL.RL.
SMBIPRVLPCALC.GOR")
1990-2011 Petroleum Experts Limited

153

OpenServer

Range("J" + CStr(17 + iStep)) = DoGet("MBAL.RL.


SMBIPRVLPCALC.WC")
End If
Else
This fragment also shows the use of special error codes. The commands already use
the standard OpenServer error handling, such as asking for data for a tank handle that
does not exist. However, there are also some less serious errors that should not halt the
macro but that may require special processing. An example of this is if no solution point
could be found for an IPRVLPCALC command. These error codes are stored in the
SMBERRORDATA data block as shown above.
The next step is to calculate the individual layer rates and FBHP pressure for the total
rate found by the IPRVLPCALC command. This is done for each well with the following
code:DoSet
DoSet
DoSet
DoCmd

"MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
"MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(iWellNo)
"MBAL.RL.SMBWELLDATA.QTOT", Qtot
"MBAL.RL.CALCLAYERRATES"

The next code fragment shows how the fluid properties can be queried for the well given
the different rates and properties of each layer.
Load the IPRNUM variable with 1 that will indicate the well properties will be queried.
If IPRNUM is set to a particular layer, then the command retrieves the values for that
layer only.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 22 ' Read IPR data command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
API = DoGet("MBAL.RL.SMBWELLDATA.OILAPI")
SOLGOR = DoGet("MBAL.RL.SMBWELLDATA.SOLGOR")
GRVGAS = DoGet("MBAL.RL.SMBWELLDATA.GRVGAS")
WATSAL = DoGet("MBAL.RL.SMBWELLDATA.WATSAL")
At the end of the initialization process we set various attributes of the wells to mimic a
well schedule. For example, we set a start and end time for the Gas Well, a downtime
factor for the Oil Well and the number of gas lift wells was set to two. The next command
is used to factor the well and layer rates to take these into account.
Set the well model as usual and the IPRNUM to 1 to indicate all layers should be
OpenServer User's Manual

MBAL and the OpenServer

154

factored. If start and end times have been used on the well, then also set the
STEPSTARTTIME and STEPENDTIME variables with the times of the start and end
of the step. If well multipliers, downtime factors or start and end times have not been set
then there is no need to call this command.
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.STEPSTARTTIME", CUMTIM DELTIM
DoSet "MBAL.RL.SMBWELLDATA.STEPENDTIME", CUMTIM
iCommand = 36 ' Correct rates for well schedule command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
Now that we have the correct layer rates we must calculate how much oil, water and gas
is taken out of each tank for this time step. Load the well handle and the DELTIM
variable with the length of the time step. MBAL will loop through each layer in the well
and update the attached tank with the layer rate*DELTIM. Remember that MBAL knows
which layer is attached to which tank.
DoSet
DoSet
DoSet
DoCmd

"MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
"MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(iWellNo)
"MBAL.RL.SMBWELLDATA.DELTIM", DELTIM
"MBAL.RL.CUMLAYERRATES"

The final command for each time step is to perform the material balance for all the tanks
in the MBI file. This will calculate the new tank conditions at the end of the time step,
including pressure and saturations.
We now need to set the MBI handle, and if more than one MBI file is loaded, then this
command must be called more than once. Set the CUMTIM variable to the time at the
end of the time step. Set the USESUBSTEP flag to one if it is desired to split the step
into a number of sub-steps, otherwise leave the value at zero.
DoSet
DoSet
DoSet
DoCmd

"MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
"MBAL.RL.SMBRESDATA.CUMTIM", CUMTIM
"MBAL.RL.SMBRESDATA.USESUBSTEP", 0
"MBAL.RL.DOSTEP"

There are two commands that are called just before completing the macro. The first
command saves the tank conditions in an MBR file. This file can be read by MBAL.
The second is called to delete all the data created in the macro, ready for another
prediction to be performed.
DoCmd "MBAL.RL.SAVEFILE(""" + Range("B13") + """)"
1990-2011 Petroleum Experts Limited

155

OpenServer

DoCmd "MBAL.RL.ALLRESET"

5.5.4 Low Level Example


We now look at an example with the low level functions. This example is a VBA macro
in an Excel spreadsheet. The file is called DA2.XLS, and is installed with the program
in the samples directory.
The purpose of the macro is to run a prediction similar to the standard macro except
that it uses different manifold pressures for each well.
Some of the parts of the code are the same as the high level example. However, the
explanation is repeated for clarity.
The first command MBAL.RL.ALLREST should be called at the start of all macros. As
the name suggests, it deletes any objects that might not have been cleaned up when
running a previous macro.
DoCmd "MBAL.RL.ALLRESET"
We now load an MBI file. This will read the tanks from the MBAL file and create
corresponding tank models for each tank in the file, and also reads the wells and layers
from the file but it does NOT create the corresponding well and layer models which is
done later in the macro.
NOTE: We store the MBI file handle created by the OPENFILE command.
DoCmd "MBAL.RL.OPENFILE=" + Range("B12")
iMBIHandle = DoGet("MBAL.RL.SMBDATA.HANDLE")
The next section reads the number of tanks read from the file. Load the MBI file handle
and command ID=11. The number of tanks is returned in the INTDATA variable. Now
loop round the tanks and get the name of the tank. Load the tank index and the
command ID=5. The name is returned in the STRING variable.
DoSet "MBAL.RL.SMBDATA.HANDLE", iMBIHandle
iCommand = 11 ' Get number of tanks command
DoSet "MBAL.RL.SMBDATA.COMMAND", iCommand
DoCmd "MBAL.RL.GETDATA"
iNumTanks = DoGet("MBAL.RL.SMBDATA.INTDATA")
For i = 0 To iNumTanks - 1
DoSet "MBAL.RL.SMBDATA.TANKNUM", i
iCommand = 5 ' Get tank name command
DoSet "MBAL.RL.SMBDATA.COMMAND", iCommand
DoCmd "MBAL.RL.GETDATA"

OpenServer User's Manual

MBAL and the OpenServer

156

szTankNames(i) = DoGet("MBAL.RL.SMBDATA.STRING")
Next I
We now have to initialize the tanks to the end of the production history, however, each
tank may have production history data up to different dates. In this case we have
decided to run the simulation up to the earliest end of history data of all the tanks. So
we next query the end of the tank history and use the earliest date. As with the tank
names, load the tank index and the command ID=8. The end of the history for the tank
is returned in DOUBLEDATA.
Range("F12") = "Initialising tanks to end of history"
dEndHistory = 1E+20
For i = 0 To iNumTanks - 1
DoSet "MBAL.RL.SMBDATA.HANDLE", iMBIHandle
iCommand = 8 ' Get end of tank history command
DoSet "MBAL.RL.SMBDATA.COMMAND", iCommand
DoSet "MBAL.RL.SMBDATA.TANKNUM", i
DoCmd "MBAL.RL.GETDATA"
dTemp = DoGet("MBAL.RL.SMBDATA.DOUBLEDATA")
If dTemp < dEndHistory Then
dEndHistory = dTemp
End If
Next I
Now that we have the date to run the history to, we can initialize the tanks which is done
in two steps. The command ID=0 will initialize the model and the command ID=1 will run
the history simulation to the specified date. We load the USESUBSTEP flag to
indicate if the simulation should only calculate at the entered production history points or
if it should also use sub-steps between the entered points.
DoSet "MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
DoSet "MBAL.RL.SMBRESDATA.USESUBSTEP", 0
iCommand = 0 ' Reset prediction command
DoSet "MBAL.RL.SMBRESDATA.COMMAND", iCommand
DoCmd "MBAL.RL.RESCALC"
DoSet "MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
iCommand = 1 ' Initialise prediction to end of history
DoSet "MBAL.RL.SMBRESDATA.COMMAND", iCommand
DoSet "MBAL.RL.SMBRESDATA.CUMTIM", dEndHistory
DoCmd "MBAL.RL.RESCALC"
The next stage in the initialization is to create the well models. It is possible to create
well models from scratch, however, it is significantly easier to create the well models
from wells read in directly from the MBAL file which is the method illustrated in the
macro.

1990-2011 Petroleum Experts Limited

157

OpenServer

There are no commands to find the number of wells in the MBI file. Instead we use an
iteration method where we loop through the indices for the MBI file wells until we get an
error code indicating that we have read all the wells. The principal for layers within each
well is the same, after successfully reading a well or layer, we create an equivalent well
or layer model.
The first step is to set the MBI file handle and tank number.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
iTankNo = 0
DoSet "MBAL.RL.SMBWELLDATA.TANKNUM", iTankNo
iWellNo = 0
iWellFound = 1
iNumWellModels = 0
Now start looping through the wells read in the MBI file handle. The loop will stop when
there are no more wells to read.
Set the HANDLE variable to the next well in the MBI file to read. The well index starts at
zero and is incremented by one at the end of the loop. Also, set the IPRNUM to zero to
read the first layer in the well. If the well index does not exist in the file the command will
return an error code of 214. For this case, set the flag to stop the loop, otherwise no
well and layer data is read into the SMBWELLDATA data block.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellNo
iIPRNo = 0
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
iCommand = 9 ' Get well data command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
iErrorCode = DoGet("MBAL.RL.SMBERRORDATA.CODE")
If (iErrorCode = 214) Then ' Well not found
iWellFound = 0
Else
At the top of the macro, we defined a VBA variable WellNames() in which the name of
the wells were stored which we expect to find in the MBI file.
The next fragment checks which well we have just read from MBAL by comparing with
the WELLNAME variable which has just been read.
WellName = DoGet("MBAL.RL.SMBWELLDATA.WELLNAME")
For i = 0 To iNumWells - 1
If (WellNames(i) = WellName) Then
iWellIndex = i
OpenServer User's Manual

MBAL and the OpenServer

158

End If
Next I
We now create a well model from the data read from the MBI file. Load the command
ID=1. The other data required in the SMBWELLDATA data block will have been setup
by the last call to the get well data command. After creating the well model, we read
back the handle of the well model and store it in the iWellModel() VBA variable.
iCommand = 1 ' Create a well command
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
iWellModel(iWellIndex) = DoGet("MBAL.RL.
SMBWELLDATA.HANDLE")
iNumWellModels = iNumWellModels + 1
The next stage is to create the layers for this well. We use the same principal of reading
through the layer indices until we get an error message warning that no more layers are
left.
iIprFound = 1
iIPRNo = 0
Do
Call the command to read the well from the MBI file again. This time we are interested
in the layer data so we set the IPRNUM to read the next layer (starting at layer zero).
DoSet

"MBAL.RL.SMBWELLDATA.MBIHANDLE",

iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellNo
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
iCommand = 9 ' Get well data command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND",
iCommand
DoCmd "MBAL.RL.WELLDATA"
Check if a layer was found. If we have got to the end of the layer list we get an error
code=216. Otherwise the command will have successfully loaded the next layer data
into the SMBWELLDATA data block.
iErrorCode = DoGet("MBAL.RL.SMBERRORDATA.CODE")
If (iErrorCode = 216) Then ' IPR not found
iIprFound = 0
Else

1990-2011 Petroleum Experts Limited

159

OpenServer

Before creating the layer model, we have to find the index of the tank to which the layer
is connected. Now the last command will return the name of the connected tank in the
TANKNAME variable. Just after reading the tanks from the MBI file we read and stored
the names of the tank in the szTankNames VBA variable for each tank index. So by
searching through the szTankNames list we can find the index of the connected tank.
szTankName

DoGet("MBAL.RL.SMBWELLDATA.

TANKNAME")
For i = 0 To iNumTanks - 1
If (szTankName = szTankNames(i)) Then
DoSet "MBAL.RL.SMBWELLDATA.TANKNUM",
i
End If
Next I
Finally we call the command to create an IPR/layer model and connect it to the well
model. The data used to initialize the IPR model is taken from the SMBWELLDATA
data block. This is the same data that was loaded with the layer data by the last
command, so we are simply transferring it from the layer in the MBI file to the layer
model just created.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE",
iWellModel(iWellIndex)
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM",
iIPRNo
iCommand = 35 ' Add an IPR command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND",
iCommand
DoCmd "MBAL.RL.WELLDATA"
End If
iIPRNo = iIPRNo + 1
Loop While (iIprFound)
End If
iWellNo = iWellNo + 1
Loop While (iWellFound)
We have now created the tank, well and layer/IPR models that mirror the objects in the
MBI file.
By default, the well model is created assuming there is one instance of the well model.
This next fragment shows how it is possible to model more than one well being drilled
of the same type. Load the MBI handle as usual. Load 2nd well model handle in the
HANDLE variable as we wish to modify the Gas Lift well. Load the number of wells to
drill in NUMWELL. Load 1 in the variable IPRNUM, as this indicates that the
command is not specific to a particular layer.
OpenServer User's Manual

MBAL and the OpenServer

160

DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle


DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(1)
DoSet "MBAL.RL.SMBWELLDATA.NUMWELL", 2
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 13 ' Set number of wells
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
The next sub-section shows how to set a downtime factor for the 1st well, the Oil Well. A
downtime of zero means that the well is always producing. A downtime of 1.0 means
that the well is never producing, and the method is much the same as for setting the
number of wells.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(0)
DoSet "MBAL.RL.SMBWELLDATA.DOWNTIME", 0.2
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 12 ' Set downtime command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
This next section shows how to set a start and end time for a well model. This code
fragment also shows an important point concerning the use of times. In the Direct
Access OpenServer, times are in internal units which are the number of days since
1900. Obviously these are not very convenient units, and if calendar dates e.g.
01/01/1994 are being used, we provide a command to convert calendar dates to
internal times (and back again). To do this set the DATE variable to the calender date
required, then call the DATETOTIME command. The answer can then be retrieved from
the TIME variable. To do the reverse calculation ,use the command TIMETODATE.
We first convert the two calendar dates required to internal times, and then set the
STARTTIME and ENDTIME variables to these two internal time values. We set the
HANDLE to the well model handle for the third well (Gas Well), and finally set the
Command ID=14 to set the start and end times.
DoSet "MBAL.RL.DATE", "31/01/1990"
DoCmd "MBAL.RL.DATETOTIME"
dStartTime = DoGet("MBAL.RL.TIME")
DoSet "MBAL.RL.DATE", "02/03/1990"
DoCmd "MBAL.RL.DATETOTIME"
dEndTime = DoGet("MBAL.RL.TIME")
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(3)
DoSet "MBAL.RL.SMBWELLDATA.STARTTIME", dStartTime
1990-2011 Petroleum Experts Limited

161

OpenServer

DoSet "MBAL.RL.SMBWELLDATA.ENDTIME", dEndTime


DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 14 ' Set start and end time command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
We have now completed the initialization and are ready to go into the prediction loop.
The rest of the source code listings are within the main prediction loop which does a
time step for each time through the loop.
The first code fragment from within the loop is used to display the current time on the
sheet. It shows how to convert an internal time (in number of days since 1900) to a
calendar date, note that it will use the current international date settings on the
PC.
DoSet "MBAL.RL.TIME", CUMTIM
DoCmd "MBAL.RL.TIMETODATE"
Range("B" + CStr(16 + iStep)) = DoGet("MBAL.RL.
DATE")
The first main task in the prediction step is to initialize the layers to the current tank
conditions. First, update the PVT properties with those calculated in the tanks at the
current pressure. Then calculate the breakthroughs i.e., GOR, WCT, CGR, and WGR,
etc., using the current fluid properties and saturations.
We can update the PVT properties with a single command for each well. Load the MBI
file handle, the well model index and set the layer number to 1 to indicate all layers
should be recalculated. If a specific layer number is specified, then only that layer is
calculated.
iIPRNo = -1
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel
(iWellNo)
iCommand = 23 ' Update PVT from tank command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
In this example we calculate the GOR, etc., layer by layer. This is partly as
demonstration, but also because we wish to read the pressure of each layer. We again
use the technique of iterating through the layers until we get an error message that no
more layers are available. First set up the IPR number to the next layer and call the
command with command ID=6 to calculate the breakthroughs. If the layer/IPR index is
not valid, an error code=216 will be reported.
OpenServer User's Manual

MBAL and the OpenServer

162

iIPRNo = 0
iIprFound = 1
Do
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE",
iWellModel(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
iCommand = 6 ' Calculate breakthroughs
command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND",
iCommand
DoCmd "MBAL.RL.WELLDATA"
iErrorCode = DoGet("MBAL.RL.SMBERRORDATA.
CODE")
If (iErrorCode = 216) Then ' IPR not found
iIprFound = 0
Else
As with the PVT calculations above, we could have done this in one step by using a
layer number of 1. The layer index was valid so it has calculated the breakthroughs
successfully. We next perform a layer read command which reads all the current IPR
data into the SMBWELLDATA data object. In this case, we only read back the current
connected tank pressure and display it on the sheet.
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE",
iWellModel(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM",
iIPRNo
iCommand = 22 ' Read IPR data command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND",
iCommand
DoCmd "MBAL.RL.WELLDATA"
If (DoGet("MBAL.RL.SMBWELLDATA.
TANKNUM") = 0) Then
Range("G" + CStr(16 + iStep)) = DoGet("
MBAL.RL.SMBWELLDATA.RESPRESS")
Else
Range("H" + CStr(16 + iStep)) = DoGet("
MBAL.RL.SMBWELLDATA.RESPRESS")
End If

1990-2011 Petroleum Experts Limited

163

OpenServer

End If
iIPRNo = iIPRNo + 1
Loop While (iIprFound)
The next section is used to calculate the performance of the wells using the IPR/VLP
intersection calculation. In this macro we apply a different FWHP for each well. Much of
this part of the macro is repeated for each well so only a relevant fragment for the gas lift
well is shown.
The first step is to set the well model handle. The next variable to set (TOL) is used to
control if intersections are allowed on the negative slope section of the lift curve. The
normal situation is where they are not allowed in which case use 0.0. To allow large
negative lift curve intersections, apply a large negative value. To allow any size of
negative slope, use a value of -1e10.
The next step is setting the sensitivity variables for the lift curves and will depend on the
type of well being specified, such as:
GLRINJ
FREQ
WHP

Gas lift injected for gas lift wells


Frequency for ESPs
Well head pressure

The next step is to call the command IPRVLPCALC. No command ID is needed. The
results of the calculation are the total rate, GOR, WCT, etc., which can be retrieved from
the data block. Note that the total rate is liquid rate for oil or water wells and gas rate for
gas or condensate wells. If an error code=120 is returned then no solution was found.
DoSet
"MBAL.RL.SMBIPRVLPCALC.HANDLE",
iWellModel
(iWellNo)
DoSet "MBAL.RL.SMBIPRVLPCALC.TOL", 0#
If (iWellNo = 1) Then
GLRInj = 240#
DoSet "MBAL.RL.SMBIPRVLPCALC.GLRINJ", GLRInj
DoSet "MBAL.RL.SMBIPRVLPCALC.WHP", fWHP(iWellNo)
DoCmd "MBAL.RL.IPRVLPCALC"
iErrorCode = DoGet("MBAL.RL.SMBERRORDATA.CODE")
Range("F" + CStr(17 + iStep)) = fWHP(iWellNo)
Range("G" + CStr(17 + iStep)) = GLRInj
If (iErrorCode = 120) Then
Range("H" + CStr(17 + iStep)) = NoSolutionStr
Range("I" + CStr(17 + iStep)) = NoSolutionStr
Range("J" + CStr(17 + iStep)) = NoSolutionStr
Else
Range("H" + CStr(17 + iStep)) = DoGet("MBAL.RL.
SMBIPRVLPCALC.QTOT")
Range("I" + CStr(17 + iStep)) = DoGet("MBAL.RL.
OpenServer User's Manual

MBAL and the OpenServer

164

SMBIPRVLPCALC.GOR")
Range("J" + CStr(17 + iStep)) = DoGet("MBAL.RL.
SMBIPRVLPCALC.WC")
End If
Else
Now we transform the well rates into cumulative rates taken out of each tank. This is
done for each well in turn.
First we calculate the FBHP for the well using the following steps:
- Set the well model index and MBI file handle as usual
- Set the IPR number to 1 as the calculation is for the well rather than an
individual layer
- Set the command ID=27 to calculate the FBHP
- After the command is called, we can retrieve the calculated FBHP from the
FBHP variable in the SMBWELLDATA data block.
iIPRNo = -1
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel(iWellNo)
iCommand = 27 ' Calculate FBHP command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoSet "MBAL.RL.SMBWELLDATA.QTOT", Qtot
DoCmd "MBAL.RL.WELLDATA"
FBHP = DoGet("MBAL.RL.SMBWELLDATA.FBHP")
Now we have the bottom hole pressure, we can calculate the corresponding individual
layer rates. This command can be performed on individual layers if desired, however in
this macro, we calculate all the layers at once by setting the IPR number to 1.
The input FBHP is taken from the FBHP variable in the SMBWELLDATA data block.
For this macro, this variable was set up by the last command shown above so we do
not actually need to set it up again, however, it is shown again for clarity. The individual
phase rates are calculated by this command given the total rate and the GOR, WCT,
etc.
iIPRNo = -1
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
DoSet "MBAL.RL.SMBWELLDATA.FBHP", FBHP
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel
(iWellNo)
iCommand = 26 ' Calculate rates from FBHP
command
1990-2011 Petroleum Experts Limited

165

OpenServer

DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand


DoCmd "MBAL.RL.WELLDATA"
At the end of the initialization process we set various attributes of the wells to mimic a
well schedule. For example, we set a start and end time for the Gas Well, a downtime
factor for the Oil Well and the number of gas lift wells was set to two. The next
commands are used to factor the well and layer rates to take these into account.
Set the well model as usual and the IPRNUM to 1 to indicate all layers should be
factored. If start and end times have been imposed on the well, the STEPSTARTTIME
and STEPENDTIME variables with the times of the start and end of the step must also
be set. If well multipliers, downtime factors or start and end times for a well have not
bee set there is no need to call this command.
iIPRNo = -1
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel
(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.STEPSTARTTIME",
CUMTIM - DELTIM
DoSet "MBAL.RL.SMBWELLDATA.STEPENDTIME", CUMTIM
iCommand = 36 ' Correct rates for well schedule
command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
At this point, we show how to read the PVT data for the total well fluid given the different
rates and fluid properties in each layer. As done previously, we set the MBI file handle
and the well model index. Since we want the well fluid properties, we set the IPR
number to 1.
If fluid properties for an individual layer are required then set a particular index in the IPR
number. There is no special command to get the fluid properties as the standard read
IPR data command will calculate and return the fluid properties for the well. After calling
the read IPR, the required values are loaded in the SMBWELLDATA data block. See
the following section (Datablock Variable Names) for a list of all the fluid properties that
can be read.
DoSet

"MBAL.RL.SMBWELLDATA.MBIHANDLE",

iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel
(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", -1
iCommand = 22 ' Read IPR data command
OpenServer User's Manual

MBAL and the OpenServer

166

DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand


DoCmd "MBAL.RL.WELLDATA"
API = DoGet("MBAL.RL.SMBWELLDATA.OILAPI")
SOLGOR = DoGet("MBAL.RL.SMBWELLDATA.SOLGOR")
GRVGAS = DoGet("MBAL.RL.SMBWELLDATA.GRVGAS")
WATSAL = DoGet("MBAL.RL.SMBWELLDATA.WATSAL")
The next step is to read the calculated rates from the layers and use them to update the
total cumulative rates removed from the tank at the end of the time step. This will then
allow us to calculate the pressure at the end of the step. As done previously, we use the
technique of reading each layer in turn until we get an error message that there are no
more layers.
iIPRNo = 0
iIprFound = 1
Do
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE",
iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE",
iWellModel(iWellNo)
DoSet "MBAL.RL.SMBWELLDATA.IPRNUM", iIPRNo
iCommand = 22 ' Read IPR data command
DoSet "MBAL.RL.SMBWELLDATA.COMMAND",
iCommand
DoCmd "MBAL.RL.WELLDATA"
iErrorCode = DoGet("MBAL.RL.SMBERRORDATA.
CODE")
If (iErrorCode = 216) Then ' IPR not found
iIprFound = 0
Else
The SMBWELLDATA block should now have the rates read from the layer. Note that
the rates are in the units of STB/day and scf/day for oil/water and gas respectively. If
any correction was made for downtimes, number of wells and start and end times then
these effects will be factored into these rates. We also query the tank index of the tank
to which the layer is connected and the handle of the MBI file that the connected tank
belongs. If all the tanks are in one MBI file (as recommended), then this handle will
always be zero.
Qtot = DoGet("MBAL.RL.SMBWELLDATA.
QTOT")
Qo = DoGet("MBAL.RL.SMBWELLDATA.QO")
Qg = DoGet("MBAL.RL.SMBWELLDATA.QG")
Qw = DoGet("MBAL.RL.SMBWELLDATA.QW")
iTankNo = DoGet("MBAL.RL.SMBWELLDATA.
1990-2011 Petroleum Experts Limited

167

OpenServer

TANKNUM")
iMBIHandleOfTank = DoGet("MBAL.RL.
SMBWELLDATA.MBIHANDLE")
We now want to update the cumulative rate in the tanks. The first step is to read the
data currently in the connected tank, then set the tank number and MBI file handle from
the last step and the command ID=8 to read the tank data. Note that we use the
SMBRESDATA data block for tank commands.
iCommand = 8 ' Get tank prediction data
command
DoSet "MBAL.RL.SMBRESDATA.COMMANDID",
iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM",
iTankNo
DoSet "MBAL.RL.SMBRESDATA.HANDLE",
iMBIHandleOfTank
DoCmd "MBAL.RL.RESCALC"
Now we read back the current cumulative rates for each phase (plus injected phases).
These are the cumulative rates to the beginning of the time step including any
production history. Calculate the delta cumulative rates for this time step. Note that the
cumulative rates are in units of MMSTB or MMscf, hence the division by 1.0e6 and then
add them to the current cumulative rates to give the cumulative rates to the end of the
time step.
It is important to check for injectors at this point as the well rates are passed
back as Qw regardless if it is a producer or injector.
CUMOIL = DoGet("MBAL.RL.SMBRESDATA.
CUMOIL")
CUMGAS = DoGet("MBAL.RL.SMBRESDATA.
CUMGAS")
CUMWAT = DoGet("MBAL.RL.SMBRESDATA.
CUMWAT")
CUMGASINJ = DoGet("MBAL.RL.SMBRESDATA.
CUMGIN")
CUMWATINJ = DoGet("MBAL.RL.SMBRESDATA.
CUMWIN")
If (iWellNo = 2) Then
CUMWATINJ = CUMWATINJ + DELTIM * (Qw
/ 1000000#)
Else
CUMOIL = CUMOIL + DELTIM * (Qo /
1000000#)

OpenServer User's Manual

MBAL and the OpenServer

168

CUMGAS = CUMGAS + DELTIM * (Qg /


1000000#)
CUMWAT = CUMWAT + DELTIM * (Qw /
1000000#)
End If
Finally, set the new cumulative rates back into the tank. There are other data items
written back to the tank which we do not update, however, they will have been set by the
read tank command above.
DoSet

"MBAL.RL.SMBRESDATA.HANDLE",

iMBIHandleOfTank
iCommand = 9 ' Set tank prediction data
command
DoSet "MBAL.RL.SMBRESDATA.COMMANDID",
iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM",
iTankNo
DoSet "MBAL.RL.SMBRESDATA.CUMGIN",
CUMGASINJ
DoSet "MBAL.RL.SMBRESDATA.CUMWIN",
CUMWATINJ
DoSet "MBAL.RL.SMBRESDATA.CUMGAS",
CUMGAS
DoSet "MBAL.RL.SMBRESDATA.CUMOIL",
CUMOIL
DoSet "MBAL.RL.SMBRESDATA.CUMWAT",
CUMWAT
DoCmd "MBAL.RL.RESCALC
End If
iIPRNo = iIPRNo + 1
Loop While (iIprFound)
We have now transferred the required data from the wells to the tanks and are now
ready to perform the material balance calculations to find the pressure and saturations
at the end of the time step.
The first step is to setup the calculation control variables for each tank. We must read
the data from the tank, modify the required data in the SMBRESDATA data block and
then write it back and set the CUMTIM variable to the end of the time step. The
USESUBSTEP variable indicates if substeps should be used over the time step and
this will increase accuracy, particularly if large aquifers are used.
Set the MODE to zero which should always be used for material balance, then set the
PRESSURE variable to 1.0e38 to indicate that the pressure at the start of the step

1990-2011 Petroleum Experts Limited

169

OpenServer

should be taken from the end of the last step and should always be used. Finally, set the
injected gas gravity flag to 1 to indicate that the injection gas gravity should be taken
from the tank PVT model.
For i = 0 To iNumTanks - 1
' First do a read data
DoSet "MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
iCommand = 8 ' Set tank prediction data command
DoSet "MBAL.RL.SMBRESDATA.COMMAND", iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM", i
DoCmd "MBAL.RL.RESCALC"
DoSet "MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
iCommand = 9 ' Set tank prediction data command
DoSet "MBAL.RL.SMBRESDATA.COMMANDID", iCommand
DoSet "MBAL.RL.SMBRESDATA.TANKNUM", i
DoSet "MBAL.RL.SMBRESDATA.CUMTIM", CUMTIM
DoSet "MBAL.RL.SMBRESDATA.USESUBSTEP", 0
DoSet "MBAL.RL.SMBRESDATA.MODE", 0
DoSet "MBAL.RL.SMBRESDATA.PRESSURE", 1E+38 '
Use the value already stored
DoSet "MBAL.RL.SMBRESDATA.INJGASGRAV", -1#
'
indicates not used
DoCmd "MBAL.RL.RESCALC"
Next I
Now we can calculate the actual material balance. The commands for this works on all
the tanks in the MBI file at once as we need to solve all tanks simultaneously to
understand if there is any communication between the tanks. Load the MBI file handle
and set the command ID=2 to perform the material balance. Then call the RESCALC
command again with command ID=4 which is used to confirm that we wish to keep the
results from this step as we are not going to repeat the step.
DoSet "MBAL.RL.SMBRESDATA.HANDLE", iMBIHandle
iCommand = 2 ' Set tank compute command
DoSet "MBAL.RL.SMBRESDATA.COMMAND", iCommand
DoSet "MBAL.RL.SMBRESDATA.USESUBSTEP", 0
DoCmd "MBAL.RL.RESCALC"
iCommand = 4 ' Set keep results command
DoSet "MBAL.RL.SMBRESDATA.COMMAND", iCommand
DoCmd "MBAL.RL.RESCALC"
This completes all the code within a prediction time step. Before finishing the macro,
we save the tank results in a file and then clean up the data.
The following line saves the tank results over time in an MBR file which can be read in
OpenServer User's Manual

MBAL and the OpenServer

170

MBAL. This is the same file as is written by GAP.

DoCmd "MBAL.RL.SAVEFILE=" + Range("B13")


Finally clean up the data that we created in the macro. First delete the well models and
their associated layer models, this does not delete the tanks. We then use the RESET
command with the MBI file handle appended to the command tag.
For iWellNo = 0 To iNumWellModels - 1
DoSet "MBAL.RL.SMBWELLDATA.MBIHANDLE", iMBIHandle
DoSet "MBAL.RL.SMBWELLDATA.HANDLE", iWellModel
(iWellNo)
iCommand = 0 ' Destroy the well model
DoSet "MBAL.RL.SMBWELLDATA.COMMAND", iCommand
DoCmd "MBAL.RL.WELLDATA"
Next iWellNo
DoCmd "MBAL.RL.RESET=" + CStr(iMBIHandle)

5.5.5 Datablock Variable Names


This section lists all the variables used in the data blocks.
SMBDATA
HANDLE
INTDATA
DOUBLEDATA
HANDLE2
TANKNUM
COMMANDID
STRING
ENDHISTORY
USESUBSTEPS

- MBI file handle


- meaning dependant on command
- meaning dependant on command
- meaning dependant on command
- tank number
- command ID of function
- meaning dependant on command
- Time to shich to run the history simulation
- flag to indicate if sub-steps should be used for history simulation/prediction

SMBWELLDATA
DOWNTIME
NUMWELL
STARTTIME
ENDTIME
STEPSTARTTIME
STEPENDTIME
QW
QO
QG
QTOT
HANDLE
COMMANDID
MBIHANDLE
IPRNUM
TANKNUM

- Well down time


- Number of wells
- Start time
- End time
- Start of time step
-End of time step
- Water rate
- Oil rate
- Gas rate
- total rate (liquid for oil/water wells and gas for gas/condensate wells)
- Handle of the well model
- Command ID
- Handle of the MBI file
- Layer number (use 1 to signify total well properties)
- Connected tank index
1990-2011 Petroleum Experts Limited

171

OpenServer

WELLTYPE
INJECTOR
WELLNAME
TANKNAME
WATERCUT
GOR
CGR
USERELPERM
IPRTYPE
0
20
21
22
PI(0)
DARCY
NONDARCY
C
N
PERFTOP
PERFBOTTOM
IPRDPSHIFT
PERMCORR
F2
F3
EXPONENT
CROSSFLOWII
USECONING
RESTEMP
RESPRESS
FBHP
SOLGOR
RS
OILAPI
GRVGAS
WATSAL
GRVOIL
PB
FACTOZ
GASCGR
PCH2S
PCCO2
PCN2
PDEWIS
GASVIS
OILVIS
WATVIS
FVFGAS
FVFOIL
FVFWAT
GASDEN
OILDEN
WATDEN

OpenServer User's Manual

- Well type
- Injector flag
- Well name
- Connected tank name
- Water cut
- Produced GOR
- Produced CGR
- Use relative permeability flag
- IPR type
- Straight line PI
- Forcheimer
- C&N
- Forcheimer [pseudo]
- Productivity index
-Darcy coefficient from Forcheimer
- Non-Darcy coefficient from Forcheimer
- C coeff from C&N
- n coeff from C&N
- Depth of top of perforations
- Depth of bottom of perforations
- IPR dP Shift
- Permeability correction
- F2 gas coning tuning factor
- F3 gas coning tuning factor
- Exponent gas coning tuning factor
- Cross flow injectivity index
- Use coning flag
- Reservoir temperature
- Reservoir pressure
- Flowing bottom hole pressure
- Initial Rs
- Current solution GOR
-Oil API
- Gas gravity
- Water salinity
- Oil gravity
- Bubble point
-Z Factor
- CGR from gas PVT model
- H2S impurity
- CO2 impurity
- N2 impurity
- Dew point
- Gas viscosity
- Oil viscosity
- Water viscosity
- Bg
- Bo
- Bw
- Gas density
- Oil density
- Water density

MBAL and the OpenServer

SMBRESDATA
HANDLE
COMMANDID
USESUBSTEP
CUMTIM
CUMAQU
CUMCAP
CUMGAS
CUMGIN
CUMOIL
CUMWAT
CUMWIN
CUMWIX
PERM
ANISOTROPY
PRESSURE
FLUID
SOLGOR
RS OILAPI
GRVGAS
WATSAL
GRVOIL
PB
FACTOZ
GASCGR
PCH2S
PCCO2
PCN2
PDEWIS
GASVIS
OILVIS
WATVIS
FVFGAS
FVFOIL
FVFWAT
GASDEN
OILDEN
WATDEN
SATGAS
SATOIL
SATWAT

172

- MBI file handle


- Command ID
- Flag to indicate if calculation step size should be used
- Time simulation/prediction has been run to
- Cumulative aquifer well production
- Cumulative gas cap production
- Cumulative gas production
- Cumulative gas injection
- Cumulative oil production
- Cumulative water production
- Cumulative water injection
- Cumulative water influx from aquifer
- Permeability (for gas coning only)
- Anisotropy (for gas coning only)
- pressure
- Fluid type
- Initial Rs
Current solution GOR
- Oil API
- Gas gravity
- Water salinity
- Oil gravity
- Bubble point
- Z Factor
- CGR from gas PVT model
- H2S impurity
- CO2 impurity
- N2 impurity
- Dew point
- Gas viscosity
- Oil viscosity
- Water viscosity
- Bg
- Bo
- Bw
- Gas density
- Oil density
- Water density
- gas saturation
- oil saturation
- water saturation

SMBIPRVLPCALC
HANDLE - Well handle
TOL
- Defines how large a negative slope of the lift curve is allowed in solutions
WHP
- Well head pressure
GLRINJ
- Gas lift to liquid ratio
FREQ
- ESP frequency
QTOT
- Total rate (liquid for oil/water, gas for gas/condensate)
GOR
- Produced GOR
CGR
- Produced CGR
WC
- Produced Wc
1990-2011 Petroleum Experts Limited

173

OpenServer

WGR

5.6

- Produced WGR

Variable Text Strings


In most cases, the simplest way to find a variable text string is to use the quick method
of CTRL-Right mouse click as described above. However for reference purposes this
section lists all the variable text strings.
ALL variable text strings in the MBAL program start with MBAL The next part of the
text string defines the section of the program to which the variable belongs. This will
make the first part of the text string:
MBAL.1D 1D model
MBAL.MC Monte Carlo
MBAL.DC Decline curve
MBAL.PVT PVT or composition input
MBAL.MB Material Balance
MBAL.ML Multilayer Model
MBAL.TG Tight Gas Model
The rest of the string depends on the exact variable. The following lists the sub-names
to add for each variable. The variables are listed grouped into each of the above
sections.
Within each group, the variables are ordered into function groups e.g. tanks, constraints
etc.
There is a separate section for relative permeabilities as they are used by more than
one tool.
Each sub-name is indented from its parent. So as an example, the string for the tank
porosity from the following list will be:
MB
TANK
PRESSURE
POROSITY
would be MBAL.MB.TANK.POROSITY.

5.6.1 1D Model
1D
COMPANY
FIELD
LOCATION
PLATFORM
OpenServer User's Manual

:
:
:
:

Company Name
Field Name
Location
Platform

MBAL and the OpenServer

174

ANALYST
: Analyst
INJFLUID
: Injected fluid one of {GAS,WATER}
WATINJ
: Water injection rate
GASINJ
: Gas injection rate
WATFVF
: Water FVF
GASFVF
: Gas FVF
OILFVF
: Oil FVF
WATDEN
: Water density
GASDEN
: Gas density
OILDEN
: Oil density
LENGTH
: Length
WIDTH
: Width
THICKNESS
: Thickness
STARTINJ
: Time of start of injection
CONTACT
: Oil/Gas water contact
CUTOFFWC
: Water cut cut-off
CUTOFFGOR : GOR cut-off
POR
: Porosity
CONWAT
: Connate water
CUTOFFWC
: Water cut cut-off
CUTOFFGOR : GOR cut-off
NUMCELLS
: Number of cells
RELPERM
: Relative permeability curves
See rel perm section below
RESULT[i]
: Results table
TIME
: Time
Etc.

5.6.2 Monte Carlo


MC
COMPANY
FIELD
LOCATION
PLATFORM
ANALYST
TEMP
PRESS
NUMCASES
STEPS
METHOD
DIST[I]

: Company Name string


: Field Name string
: Location string
: Platform string
: Analyst string
: Reservoir temperature
: Reservoir pressure
: Number of cases
: Histogramme Steps
: Method one of { BULK, AREA }
: Distributions note that indices cannot be used for this collection, data
must be placed within quotes e.g. MC.DIST[{POR}].TYPE
TYPE
: One of { FIXED, UNIFORM, TRIANGLE, NORMAL, LOGNORMAL }
MIN
: Minimum
MAX
: Maximum
MODE
: Mode
AVE
: Average
STDDEV
: Standard deviation
OIP
: Summary of results for oil
MEAN
: Mean reward

1990-2011 Petroleum Experts Limited

175

OpenServer

STDDEV
: Standard deviation
90PROB
: 90% probabillity
50PROB
: 50% probabillity
10PROB
: 10% probabillity
GIP
: Summary of results for gas
MEAN
: Mean reward
STDDEV
: Standard deviation
90PROB
: 90% probabillity
50PROB
: 50% probabillity
10PROB
: 10% probabillity
RESULT[i] : Results
OIP
: Oil in place
Etc.

5.6.3 Decline Curve


DC
COMPANY
FIELD
LOCATION
PLATFORM
ANALYST
ABANRATE
PREDSTART
PREDEND
MODE
FLUID_TYPE
RESULT[I][J]
WELL[I]
NAME
DESCRIPT
SELECTED
PRODSTART
ABANRATE
EXPONENT
DECLINE
PRODHIST[I]
TIME
:
RATE
:
DECRATES[I]
TIME
INIT_RATE
DECLINE

: Company Name string


: Field Name string
: Location string
: Platform string
: Analyst string
: Abandonment Rate
: Prediction Start
: Prediction End
: One of { BY_TANK, BY_WELL } string
: One of { OIL, GAS, COND } string
: I index is the stream number or the stream name (i.e. *consol* or well
name) could be used. Second index J is the record in the table.
: Well
: Well Name - string
: Description string
: One of { YES, NO } string
: Production Start
: Abandonment Rate
: Exponent
: Decline type one of { HYPERBOLIC, HARMONIC, EXPONENTIAL }
string
: Production history
time
oil or gas rate depending on fluid type
: Decline Rates
: time
: Initial rate - oil or gas rate depending on fluid type
: Rate decline

5.6.4 Multi-Layer Tool


ML
COMPANY
FIELD
OpenServer User's Manual

: Company Name string


: Field Name string

MBAL and the OpenServer

176

LOCATION
: Location string
PLATFORM
: Platform string
ANALYST
: Analyst string
INJFLUID
: One of { GAS, WATER } string
CALCTYPE
: One of { Buckley, Stiles, Commun, Simple } string
PRESSURE
: Pressure
TEMPERATURE
: Temperature
DIPANGLE
: Dip Angle
WIDTH
: Width
WATERRATE
: Water Rate
GASRATE
: Gas Rate
CUTOFFWC
: Cut-off Water Rate
CUTOFFGOR
: Cut-off GOR
CONWATER
: Connate Water
LAYER[I]
: Input Layers
THICK
: Thickness
POR
: Porosity
PERM
: Permeability
GASBRKSAT
: Gas breakthrough saturation
WATBRKSAT
: Water breakthrough saturation
RELPERM
: Relative permeability curves
See rel perm section below
RES[][][]
: Calculation results see end of section (*) for more information
TIME
: Time
Etc.
RES[].MATCHED : Matched layer see end of section (**) for more information
THICK
: Thickness
POR
: Porosity
PERM
: Permeability
GASBRKSAT
: Gas breakthrough saturation
WATBRKSAT
: Water breakthrough saturation
RELPERM
: Relative permeability curves
See rel perm section below

* RES is the sub-string used for the calculation results. This is the data that can be
viewed in the Calculation-Run Calculation dialog or the Production Prediction-Run
Prediction dialog.
There are three indices to be used with RES.
The first index defines the stream. There are always four streams by default which
correspond to each of the four calculation types. Index 0 is the Buckley Leveret stream,
index 1 is the Stiles stream, index 2 is the communicating stream and index 3 is the
simple stream. Other indices will refer to any saved streams. Stream names can be
used instead of the index e.g. RES[{STILES}][0][0]. and the name can be sued for any
saved streams.
The second index defines the sheet within the stream. The first stream is the
consolidated results for the whole reservoir. The next N sheets contain results for each
of the N layers. The layer description can also be used instead of the index e.g. RES
[{STILES}][{LAYER 1}][0].
1990-2011 Petroleum Experts Limited

177

OpenServer

The third index defines the row in the sheet (where each row is for a different time).
** RES[].MATCHED is the layer calculated for each folder. The RELPERM is the
relative permeability curve calculated by the Fw/Fg matching process. The index
defines the stream as for the first index of the RES[][][] sub-string above. For example
the thickness of the calculated Stiles stream is RES[{STILES}].THICK.

5.6.5 PVT
PVT
INPUT[I]
: Input PVT Definition
VARPVT
: Variable PVT one of { YES, NO }
DATUMDEPTH
: Datum depth
DATUMPRESS
: Datum pressure
DATUMTEMP
: Datum temperature
TEMPGRAD
: Temperature gradient
The following will be under INPUT for a simple PVT model or LAYER[] if a variable PVT
model. If using Generalised Material Balance then the oil, gas and water models will be
preceeded by OIL, GAS and WATER respectively.
SOLGOR
: Solution GOR
PBCORR
: Pb, Rs, Bo correlation one of { GLASO, STANDING,
LASATER, VAZBEGGS, PETROSKY }
UOCORR
: Uo correlation - one of { BEAL, BEGGS, PETROSKY }
UGCORR
: Ug correlation one of { LEE, CARR }
SEP
: Separator type one of { SINGLE, TWO }
USETABLES
: Use tables one of { YES, NO }
USEMATCH
: Use match one of { YES, NO }
SOLGOR
: Solution GOR
OILGRAV
: Oil gravity
GASGRAV
: Gas gravity
WATSAL
: Water salinity
H2S
: Mole percent H2S
CO2
: Mole percent CO2
N2
: Mole percent N2
TESTPRES
: Test separator pressure
TESTTEMP
: Test separator temperature
TESTGOR
: Test separator GOR
TESTGGRAV
: Test separator gas gravity
TANKGOR
: Tank separator GOR
TANKGGRAV
: Tank separator gas gravity
CGR
: CGR
DEWPOINT
: Dew point at reservoir temperature
RESTEMP
: Reservoir temperature
RESPRESS
: Reservoir pressure
DEPTH
: Depth
OILCOMP
: Oil composition
NUMCOMP : Number of components
USEVOLSHIFTS
: Use volume shifts - one of { YES, NO }
COMPONENT[i]
FRACTION
: Mole fraction
CRITTEMP
: Critical temperature
OpenServer User's Manual

MBAL and the OpenServer

178

CRITPRESS
: Critical pressure
CRITVOL
: Critical volume
OMEGA
: Omega
MOLEWT
: Molecular weight
SPECGRAV
: Specific gravity
VOLSHIFT
: Volume shift
NAME : Component name
BICOEFF[i][j]
: Binary coefficient
SEPARATOR[i]
PRESS : Pressure
TEMP : Temperature
TABLE[j][i]
: Table data indices are table and row note that the temp/bubble
point per table is actually stored for each row of the table but will have the same value
for all rows that can be simply accessed from row 0.
TEMP
: Temperature
Etc
MATCHTABLE[i][j]
: Same as TABLE[I][j] above
TEMP
: Temperature
Etc
MATCHON
: Whether a variable is to be matched or not
OILFVF
: Oil FVF
Etc
PARM : Match parameters
GLASOBP1
: Glaso bubble point parameter 1
GLASOBP2
: Glaso bubble point parameter 2
GLASOGOR1
: Glaso GOR parameter 1
GLASOGOR2
: Glaso GOR parameter 2
GLASOFVF1
: Glaso Oil FVF parameter 1
GLASOFVF2
: Glaso Oil FVF parameter 2
STANDBP1
: Standing bubble point parameter 1
STANDBP2
: Standing bubble point parameter 2
STANDGOR1
: Standing GOR parameter 1
STANDGOR2
: Standing GOR parameter 2
STANDFVF1
: Standing Oil FVF parameter 1
STANDFVF2
: Standing Oil FVF parameter 2
LASBP1
: Lasater bubble point parameter 1
LASBP2
: Lasater bubble point parameter 2
LASGOR1
: Lasater GOR parameter 1
LASGOR2
: Lasater GOR parameter 2
LASFVF1
: Lasater Oil FVF parameter 1
LASFVF2
: Lasater Oil FVF parameter 2
VABGBP1
: Vazquez-Beggs bubble point parameter 1
VABGBP2
: Vazquez-Beggs bubble point parameter 2
VABGGOR1
: Vazquez-Beggs GOR parameter 1
VABGGOR2
: Vazquez-Beggs GOR parameter 2
VABGFVF1
: Vazquez-Beggs Oil FVF parameter 1
VABGFVF2
: Vazquez-Beggs Oil FVF parameter 2
PETRBP1
: Petrosky bubble point parameter 1
PETRBP2
: Petrosky bubble point parameter 2
PETRGOR1
: Petrosky GOR parameter 1
PETRGOR2
: Petrosky GOR parameter 2
PETRFVF1
: Petrosky Oil FVF parameter 1
PETRFVF2
: Petrosky Oil FVF parameter 2
1990-2011 Petroleum Experts Limited

179

OpenServer

BEALOILV1
BEALOILV2
BEGGOILV1
BEGGOILV2
PETROILV1
PETROILV2
CARRGASV1
CARRGASV2
LEEGASV1
LEEGASV1
ZFACT1
ZFACT2
ZFACT3
GASFVF1
GASFVF2
DEWPOINT1
DEWPOINT2
CGR1
CGR2
CGR3

:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:

Beal Oil viscosity parameter 1


Beal Oil viscosity parameter 2
Beggs Oil viscosity parameter 1
Beggs Oil viscosity parameter 2
Petrosky Oil viscosity parameter 1
Petrosky Oil viscosity parameter 2
Carr gas viscosity parameter 1
Carr gas viscosity parameter 2
Lee gas viscosity parameter 1
Lee gas viscosity parameter 2
Z factor parameter 1
Z factor parameter 2
Z factor parameter 3
Gas FVF parameter 1
Gas FVF parameter 2
Dew point parameter 1
Dew point parameter 2
CGR parameter 1
CGR parameter 2
CGR parameter 3

5.6.6 Material Balance


MB
COMPANY
FIELD
LOCATION
PLATFORM
ANALYST
FLUID
MODEL
HISTBY
COMPTRACK
HISTWELL[I]
NAME
TYPE
DISABLED
PERFTOP
PERFBOTTOM
PRODHIST{I]
TIME
PRESS
CUMOIL
CUMGAS
CUMWAT
CUMGASINJ
CUMWATINJ
CUMGOR
RECOFF
TANK[I]
MONCON

OpenServer User's Manual

: Company Name
: Field Name
: Location
: Platform
: Analyst
: One of {OIL,GAS,CON}
: One of {SIMPLE,MULTI,VARPVT}
: One of {TANK,WELL}
: One of {YES,NO}
: History wells
: Name
: One of { ANY, CONPROD, ESPPROD, GASCAP, GASINJ,
GASLIFT, GASPROD, OILPROD, WATINJ, WATPROD }
: 0=well enabled, 1=well disabled
: Perforation Top
: Perforation Bottom
: Production history
: Time
: Pressure
: Cumulative oil production
: Cumulative gas production
: Cumulative water production
: Cumulative gas injection
: Cumulative water injection
: Cumulative GOR
: 0 if record enabled, 1 if the record is disabled
: Tanks
: Monitor contacts - one of {YES,NO}

MBAL and the OpenServer

GASCAPPROD
TOTSAT
GASSTORAGE
NAME
TYPE
TEMP
PRESS
POROSITY
OOIP
OGIP
OWIP
INITGASCAP
GASSTOREPV
WATCOMPRESS
ROCKCOMPRESS
PRODSTART
AQUIFTYPE

SYSTEM
RESTHICK
RESRADIUS
CONWATER
RESWIDTH
ANISOTROPY
PERMEABILITY
AQUIF
RD
ANGLE
PERM
VOLUME
DIFFUSIV
TD
MODEL
ROCKFROM
COMPRESS[I]
PRESS
CF
PORVOL[I]
PV
DEP
PRODUSEGOR
PRODHIST{I]
TIME
PRESS
CUMOIL
CUMGAS
CUMWAT
CUMGASINJ

180

: Gas Cap production - one of {YES,NO}


: Total Saturations - one of {YES,NO}
: Gas storage - one of {YES,NO}
: Name
: Type one of {OIL,GAS,CON,WATER}
: Temperature
: Initial Pressure
: Porosity
: Original oil in place
: Original gas in place
: Original water in place
: Initial gas cap
: Gas storage pore volume
: Water Compressibility (3.4e38 for Use Correlations)
: Rock Compressibility
: Start of production
: Type one of { NONE, SMALLPOT, SCHILTHUIS,
HURSTSIMPL, HURSTODEH, HURSTDAKE, VOGT,
FETKOSTEADY, FETKOUNSTEADY, HURSTMODIF ,
CARTERTRACY }
: Type one of { RADIAL, LINEAR,
BOTTOMDRIVE }
: Reservoir thickness
: Reservoir radius
: Connate water saturation
: Reservoir width
: Anisotropy
: Permeability
: Aquifer
: Outer/Inner radius ratio
: Encroachement Angle
: Aquifer Permeability
: Aquifer volume
: Aquifer diffusivity
: TD constant
: Type one of { CONSTPRESS, SEALBOUND, INFINITE}
string
: Rock compressibility one of {CORREL, TABLE,
USERINPUT }
: Rock compressibility table
: Pressure
: Rock compressibility
: Pore volume vs depth table
: Pore volume
: Depth
: Use GOR for production data
: Production history collection
: Time
: Pressure
: Cumulative oil production
: Cumulative gas production
: Cumulative water production
: Cumulative gas injection
1990-2011 Petroleum Experts Limited

181

OpenServer

CUMWATINJ
CUMGOR
RECOFF
RELPERM

: Cumulative water injection


: Cumulative GOR
: 0 if record enabled, 1 if the record is disabled
: Relative permeability curves
See rel perm section below
LEAK[I]
: Leaks
NAME
: Name
TRANS
: Transmissibility
TCORR
: Tranmissibility-Permeability correction
THRESHTYPE
: Type one of {NONE,EQUAL,UNEQUAL}
THRESHVALUE
: Pressure threshold value
USE_PROD
: Type one of {YES,NO}
USEOWN
: Use own rel perms one of {YES,NO}
RELPERM
: Relative permeability curves
See rel perm section below
CONSTRAINTS
: Constraints
SWBREAK
: Sw breakthru
SGBREAK
: Sg breakthru
SOBREAK
: So breakthru
WDEPBREAK
: Water depth breakthru
GDEPBREAK
: Gas depth breakthru
WATBREAKTYPE
: Water breakthru type - one of {SAT,DEPTH}
GASBREAKTYPE
: Gas breakthru type one of {SAT,DEPTH}
RELPERMCORR
: Rel perm correction one of {YES,NO}
PRODHIST{I]
: Production history collection
TIME
: Time
PRESS
: Pressure
DELPRESS
: Delta Pressure
CUMOIL
: Cumulative oil production
CUMGAS
: Cumulative gas production
CUMWAT
: Cumulative water production
RECOFF
: 0 if record enabled, 1 if the record is disabled
HISTINP
NOESTIM
STEPTYPE
USERSTEP
STDDEV

: Production history setup


: Ignore estimated pressure points one of {YES, NO}
: History step size type - one of {AUTO, USER}
: User defined history step size
: Standard Deviation for History Matching Regression. ex
DoGet("MBAL.MB[0].HISTINP.STDDEV")

PREDINP : Prediction inputs


This first set of inputs correspond to the data entered in the prediction setup dialog.
CALCTYPE
: Prediction type - one of {RES_PRESS, MANPRESS, PROD,
DCQ}
START
: Prediction start type - one of {STARTPROD, ENDHIST,
USER}
USERSTART
: User defined prediction start time
END
: Prediction end type - one of {AUTO, ENDHIST, USER}
USEREND
: User defined prediction end time
STEPTYPE
: One of {AUTO,USER}
USERSTEP
: User defined prediction step size
WATINJ
: With water injection - one of {YES,NO}
GASINJ
: With gas injection - one of {YES,NO}
OpenServer User's Manual

MBAL and the OpenServer

182

GASLIFT
: With gas lift injection - one of {YES,NO}
GASREC
: With gas recycling - one of {YES,NO}
WATREC
: With water recycling - one of {YES,NO}
AQUPROD
: With aquifer production - one of {YES,NO}
GASCAP
: With gas cap production - one of {YES,NO}
WATVOID
: With voidage replacement with water - one of {YES,NO}
GASVOID
: With voidage replacement with gas - one of {YES,NO}
RELPERM
: Use relative permeabilities - one of {YES,NO}
CALCPOT
: Calculate field potential - one of {YES,NO}
USEDCQ
: Use DCQ and swing factor - one of {YES,NO}
The next set correspond to the reporting schedule dialog
REPSTEPTYPE
: Reporting frequency type - One of {AUTO, USER, LIST}
REPSTEPVALUE
: Reporting user step size
REPSTEPSTYLE
: unit for user step - one of {DAY, WEEK, MONTH, YEAR}
KEEPHIST
: Keep history - one of {YES,NO}
USERREPSTEP[I]
: User date list
TIME
: Time
The next set correspond to the DCQ swing factor dialog
SWINGS[I]
TIME
SWINGFACT

: Swing factors
: Time
: Swing factor

The next set correspond to the DCQ schedule dialog


DCQ[I]
: DCQ
TIME
MAXSWINGFACT

: Time
: Swing factor

The next set correspond to the well schedule dialog


DRILL[I]
: Drilling schedule
STARTTIME
: Start time
ENDTIME
: End time
WELLDEF
: Well definition
DTFACT
: Down time factor
NUMWELLS
: Number of wells
CONSTRAINT[I]
: Prediction production and constraints
TIME
: Times
MANPRESS
: Manifold pressure
MINGASRATE
: Minimum gas rate
MAXGASRATE
: Maximum gas rate
MAXWATRATE
: Maximum water rate
MAXLIQRATE
: Maximum liquid rate
GASINJMANPRESS
: Gas injection manifold pressure
MININJGAS
: Minimum injection gas rate
MAXINJGAS
: Maximum injection gas rate
INJGASGRAV
: Injection gas gravity
MOLEH2S
: Mole % H2S
MOLECO2
: Mole % CO2
MOLEN2
: Mole % N2
1990-2011 Petroleum Experts Limited

183

OpenServer

WATSALIN
WATRECY
WATRECYCUTOFF
AQUWATMANPRESS
MINAQUWATRATE
MAXAQUWATRATE
MINOILRATE
MAXOILRATE
GASVOIDREPL
WATVOIDREPL
WATINJMANPRESS
MININJWATRATE
MAXINJWATRATE
MAX_GASLIFT
GASRECYL
GASRECCUTOFF
PREDWELL[I]
NAME
TYPE

:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:

Water salinity
Water recycling
Water recycling cutoff
Aquifer production manifold pressure
Minimum aquifer water rate
Maximum aquifer water rate
Minimum oil rate
Maximum oil rate
Gas voidage replacement
Water voidage replacement
Water injection manifold pressure
Minimum injection water rate
Maximum injection water rate
Maximum gas lift rate
Gas recycling
Gas recycling cutoff

: Prediction wells
: Name
: One of { ANY, CONPROD, ESPPROD, GASCAP, GASINJ,
GASLIFT, GASPROD, OILPROD, WATINJ, WATPROD }
DISABLED
: 0=well enabled, 1=well disabled
MINFBHP
: Minimum flowing bottom hole pressure
MAXFBHP
: Maximum flowing bottom hole pressure
MINFWHP
: Minimum flowing well head pressure
MAXFWHP
: Maximum flowing well head pressure
GASLIFTGLR
: Gas lift optimum GLR
OPTFREQ
: Operating frequency
CONSTFBHP
: Constant flowing bottom hole pressure for constant FBHP outflow
performance type.
PERFORMTYPE
: Well performance type : one of { CFBHP, LIFTCURV, SMITH,
WITLEY }
TPC
EXTRAPOLATE : Extrapolation flag : one of { YES, NO }
CONSTRAINTS : abandonments
WATDEPABAN
: Water depth abandonment
WORABAN
: WOR water abandonment
GASDEPABAN
: Gas depth abandonment
GORABAN
: GOR Abandonment
MINRATE
: Minimum rate
MAXRATE
: Maximum rate
WATABANTYPE
: Water abandonment type - one of {WOR, WGR,
WATCUT, DEPTH}
GASABANTYPE
: Gas abandonment type one of {GOR,CGR,DEPTH}
ABANRECOV
: Allow recovery after abandonment one of {YES,NO}
IPR[I]
TYPE
: Inflow performance type one of {CN, FORCH,
PSEUDOFORCH, STRLINE_VOGEL}
PI
: Productivity index
CROSSPI
: Crossflow Injectivity index
DARCY
: Darcy
CROSSDARCY
: Crossflow Injectivity Darcy
NONDARCY
: Non-Darcy

OpenServer User's Manual

MBAL and the OpenServer

184

PERMCORR
: Permeability correction
CVALUE
:C
CROSSCVALUE
: Crossflow Injectivity C
NVALUE
:n
PERF_TOP
: Top of perforations
PERF_BOTTOM
: Bottom of perforations
IPR_SHIFT
: IPR dP Shift
USE_RELPERMS : Use relative permeability flag
TESTRESPRESS : Test reservoir pressure
TESTWATCUT
: Test water cut
USEOWN_RELPERMS : Use own rel perms flag one of {YES,NO}
RELPERM Relative permeability curves
See rel perm section below
USEGASCONING : Gas coning flag one of (YES,NO}
GASCONEMATCH : Gas coning match data
F2
: F2 tuning parameter
F3
: F3 tuning parameter
EXPONENT
: Exponent tuning parameter
GOC
: Gas-oil contact
TESTDATA
: Test points
PROD_GOR
: Producing GOR
LIQRATE
: Liquid rate
CONSTRAINTS : abandonments and breakthroughs
SWBREAK
: Sw breakthru
SGBREAK
: Sg breakthru
SOBREAK
: So breakthru
WATDEPABAN
: Water depth abandonment
WORABAN
: WOR water abandonment
GASDEPABAN
: Gas depth abandonment
GORABAN
: GOR Abandonment
DPMAXDD
: Maximum draw-down in dP
PERCMAXDD
: Maximum draw-down in percent
UNITMAXDD
: Maximum drawdown unit
WDEPBREAK
: Water depth breakthru
GDEPBREAK
: Gas depth breakthru
WATBREAKTYPE : Water breakthru type - one of {SAT,DEPTH}
WATABANTYPE
: Water abandonment type - one of {WOR,WGR,WATCUT,
DEPTH}
GASBREAKTYPE : Gas breakthru type one of {SAT,DEPTH}
GASABANTYPE
: Gas abandonment type one of {GOR,CGR,DEPTH}
RELPERMCORR
: Rel perm correction one of {YES,NO}
ABANRECOV
: Allow recovery after abandonment one of {YES,NO}
TRES[][][]
: Tank results see end of section (*) for more information
TIME
: Time
Etc.
WRES[][][]
: Well results see end of section (**) for more information
TIME
: Time
Etc.

* TRES is the sub-string used for the tank (and leak) results. This is the data that can
be viewed in the History Matching-Run Simulation dialog or the Production Prediction-

1990-2011 Petroleum Experts Limited

185

OpenServer

Run Prediction dialog.


There are three indices to be used with TRES:
The first index defines the stream, where:
- Index 0 is the production history stream
- Index 1 is the history simulation stream
- Index 2 is the production prediction stream
Other indices will refer to any saved streams.
The second index defines the sheet within the stream:
For single tank cases there will only ever be one sheet which refers to the one and only
tank, so always use 0. For multi-tank cases, the first sheet will always be the
consolidated results for all tanks i.e. the sum of all tanks. The next N sheets contain
results for each of the N tanks. The next M sheets contain results for each of the M
leaks.
The third index defines the row in the sheet, where each row is for a different time.
**WRES is the sub-string used for the well results. This is the data that can be viewed in
the Production Prediction-Well Results dialog.
There are three indices to be used with WRES:
The first index defines the well.
The second index defines the sheet within the stream.
For a well that has a single layer (i.e. connection to a tank) there will only ever be one
sheet which refers to the one and only layer, so always use 0. For multi-layer well, the
first sheet will be the results for the well. The next N sheets contain results for each of
the N layers.
The third index defines the row in the sheet, where each row is for a different time.

5.6.7 Production Allocation


Most of the production allocation data is the same as the data for the material balance
tool. Therefore the variable names are mostly the same as the material balance tool.
The additional variables used by the production allocation tool are listed below:
PA
ALLOCINP.
USERSTEP
STEPTYPE

OpenServer User's Manual

: User defined allocation step size


: Allocation step size type one of {AUTO, USER}

MBAL and the OpenServer

186

5.6.8 Tight Gas


Most of the tight gas data is the same as the data for the material balance tool.
Therefore the variable names are mostly the same as the material balance tool. The
additional variables used by the tight gas model are listed below:
WELL
: History wells
NAME
: Name
TYPE
: BoundedRadial
DARCY
: Darcy skin
NONDARCY
: Non Darcy skin
INITPRESS
: Initial Pressure
INITTEMP
: Initial Temperature
DRAINRADIUS
: Drainage Area Radius
RESTHICK
: Layer Thickness
PRODSTART
: Start of production
Production History
TIME
FBHP
CUMGAS

: Time
: Flowing bottom hole pressure
: Cumulative gas produced

Run Prediction
ENDHIST
STARTPROD
USER

: Start the prediction at the end of the production history


: Start the prediction at the start of the production history
: Start the prediction from a user defined value

Prediction End
AUTO
ENDHIST
USER

: Prediction end determined by MBAL


: Prediction will end at the last production history time
: Prediction will end determined by the User

Prediction Step Size


AUTO
USER

: Determined by the program


: User defined prediction step size

5.6.9 Relative Permeability Curves


RELPERM
PERM
: Permeability
DIPANGLE : Dip angle
WATSWEEP
: Water sweep efficiency
GASSWEEP
: Gas sweep efficiency
FROM
: Type one of {TABLES,COREY}
MODIFIED : Type one of {NO,STONE1,STONE2}
The next section is used for rel perms tables
WATER[i] : Water rel perm table
SW
: Water saturation

1990-2011 Petroleum Experts Limited

187

OpenServer

KRW
: Water rel perm
OIL[i]
: Oil rel perm table
SO
: Oil saturation
KRO
: Oil rel perm
KROG
: Oil to gas rel perm
KROW
: Oil to water rel perm
GAS[i]
: Gas rel perm table
SG
: Gas saturation
KRG
: Gas rel perm
The next section is used for corey functions
RESSAT
: Residual saturation
KRW
: water
KRO
: oil
KROW
: oil to water
KROG
: oil to gas
KRG
: gas
ENDPOINT
: End point
KRW
: water
KRO
: oil
KROW
: oil to water
KROG
: oil to gas
KRG
: gas
EXPON
: Exponent
KRW
: water
KRO
: oil
KROW
: oil to water
KROG
: oil to gas
KRG
: gas

OpenServer User's Manual

Chapter

189

OpenServer

PROSPER and the OpenServer


Overview
The aim of this section is to provide a reference for the OpenServer variable names
corresponding to the data variable names encountered in PROSPER and also the open
functions used to execute commands. Where there are multiple instances of a given
variable, e.g. in a table, the range of rows in the table is given as i = m:n where i is an
indexing variable and m and n are the lower and upper limits of the range. The range
expression is placed above the documentation of the block of variables to which it
applies. In some cases, the range upper limit is itself a variable, such as the multilateral
well data and the method of finding this is also shown. Other refinements are multiple
dimensionalities of tables (a table within a table) and the ability to access multilateral
network items by their label rather than an index whose value is not available to the user
in the Windows interface.
At the end of this chapter there is a section with some code fragments written for VBA in
conjunction with an Excel spreadsheet. Note that only the DoGet functionality is
illustrated here since the DoSet function is trivially implemented by swapping the DoGet
and DoSet sub-routine calls.
The PROSPER data is divided into four sections:
PVT

PVT data

SIN

INPUT data

ANL

Calculation INPUT data

OUT

Calculation RESULTS

Each section will be accessed thus:


PROSPER.PVT
PROSPER.SIN
PROSPER.ANL
PROSPER.OUT

6.1

General Comments
In PROSPER there are some commands (like extracting units or counting rows of data)
which are general, irrespective of the section they are used in. The following sections
are describing how these can be used.

OpenServer User's Manual

PROSPER and the OpenServer

190

6.1.1 Getting the strings through Ctrl+Right Click


Although a listing of all the OpenServer commands are available in the sections that
follow, an easy way of extracting these is by simultaneously using the Ctrl and Right
Click keyboard and mouse action on the desired variable.

For example, by placing the mouse cursor on top of the Solution GOR box in the PVT
screen and selecting Ctrl + Right Click, the screen with the Access String for this
variable will appear. The String can then be copied on the clipboard for use in the
macro.

6.1.2 List of variables in PROSPER file (NEW!!!)


PROSPER Version 9.0 includes a new feature which allows the user to see all the
OpenServer variables available in any particular file. Accessing these lists is done from
the Wizard option:

1990-2011 Petroleum Experts Limited

191

OpenServer

In this screen, a particular wizard macro can be selected or a new one created:

OpenServer User's Manual

PROSPER and the OpenServer

192

In the screen where the Wizard Macro can be written, the user has access to a menu
with all the commands available in the file as shown below:

The Variables button gives access to all the variables available in this particular file:

1990-2011 Petroleum Experts Limited

193

OpenServer

Also, the on-line help system that can be accessed directly from the main PROSPER
screen contains a majority of the currently available OpenServer commands, variables
and functions. The utility also includes a search feature, providing quick access to the
desired OpenServer string.

OpenServer User's Manual

PROSPER and the OpenServer

194

1990-2011 Petroleum Experts Limited

195

OpenServer

6.1.3 Evaluate OpenServer Statement Section (NEW!!!!)


The Evaluate OpenServer Statement enables the user to analyse the effect of one
specific OpenServer operation and get an estimation of the value of one parameter of
the model, set a specific value to one parameter of the model or launch a calculation
through a calculation command.
This section can be accessed through the File | Evaluate OpenServer Statement
section in the PROSPER main menu bar.

OpenServer User's Manual

PROSPER and the OpenServer

196

A particular string can be entered by hand or copied from the clipboard. Then, the
Evaluate button will do the requested operation of:
- DoGet (i.e. obtain the current value of the variable considered)
- DoSet (i.e. set the value of the variable considered)
- DoCommand (i.e. execute a GAP calculation for instance).
The Commands, Variables and Functions buttons enable to access the list of the
commands, variables and functions accessible through PROSPER OpenServer.

6.1.4 Setting the Units and Validation Limits


The units section in PROSPER can be controlled by the OpenServer and units can be
set at a Global Level (corresponding to the Unit Systems shown in the list):

1990-2011 Petroleum Experts Limited

197

OpenServer

For example the following command will set the Unit System to Norwegian SI:
DoCmd "PROSPER.SETUNITSYS(""Norwegian S.I."")"
On the other hand, if the intent is to extract the unit name of a particular variable in the
program, then the UNITNAME extension can be used at the end of the root defining the
variable. For example, if one would like to extract the unit in the program associated
with the Solution GOR entry box in the PVT section, then the following command will
return the unit name:
AA = DoGet("PROSPER.PVT.Input.Solgor.Unitname")
The same goes for all variables. As another example, the top node pressure entry in the
system calculation will return its unit name with the following line:
AA = DoGet (PROSPER.ANL.SYS.Pres.Unitname)
Notes:
1. The Unitname commands will return strings, so please make sure the variables (like
AA above) are defined correctly.
2. The units of single variables can only be extracted, not set (DoGet will work on the
OpenServer User's Manual

PROSPER and the OpenServer

198

examples above but DoSet will not).


It is also possible to use OpenServer to change Validation Limits; this can be done by
adding .UNITMIN and .UNITMAX statement to corresponding tag string.
For example the following command can be used to change minimum Pressure limit
DoSet ("PROSPER.SIN.IPR.Single.Pres.UNITMIN"), value
One element to consider is that when changing the limits through OpenServer is that tag
strings for different parameters can access the same limit in the Unit section.
For instance, two following tag strings will both access the lower pressure limit in the
Units section
PROSPER.SIN.IPR.Single.Pres.UNITMIN
PROSPER.ANL.SYS.Pres.UNITMIN

6.1.5 Counting number of entry data points or calculated results


When writing Macros for use with the OpenServer, one of the practical requirements is
to know how many rows of data have been calculated when executing a calculation (like
a gradient calculation for instance):

1990-2011 Petroleum Experts Limited

199

OpenServer

There are several commands that allow the user to extract the number of results and
many are listed in the description of roots available for every section. However the .
Count or .Num commands can generally be used at the end of a string to extract number
of rows.
For example, the number of rows in a gradient calculation can be extracted by counting
the number of pressures (or any other variable) calculated (since there is one number
for every row):
NumCalcs = DoGet("PROSPER.Out.Tcc.Results[10].Pres.Count")
In the PVT Calculator screen, the number of rows can be extracted using:
NumCalcs = DoGet("PROSPER.PVT.Calc.Results.Count")
Note: The .Count is not designed to work for every screen in the program, and
alternative commands are given in the relevant sections, such as the .NUM-1 for
example.

6.2

Options Summary Data


This is the data associated with the options screen in PROSPER:

OpenServer User's Manual

PROSPER and the OpenServer

200

PROSPER.SIN.SUM.FLUID

Fluid Type (Oil / Gas / Condensate)


For example, the command line:
DoSet "PROSPER.SIN.SUM.Fluid", 2
will select the Retrograde Condensate Model. 0 and 1
will select Oil and Gas methods respectively.

PROSPER.SIN.SUM.
PVTMODEL

PVT Model (Black Oil /EOS)


For example, the command line:
DoSet " PROSPER.SIN.SUM.PVTMODEL ", 0
will select the Black Oil Model. 2 will set the PVT Model
to EOS (1 does not exist).

PROSPER.SIN.SUM.
EOSMODEL

Equation of State Model (by default set to Internal


should only be changed when an external EOS model is
available and required.)

PROSPER.SIN.SUM.
SEPARATOR

Separator option

PROSPER.SIN.SUM.EMULSION

Emulsion option (DoSet, 1 and 0 will switch this option on


or off)

PROSPER.SIN.SUM.HYDRATE

Hydrates Warning option (Same logic as above)

PROSPER.SIN.SUM.
FLOWTYPE

Flow Type (Tubing/Annular/Both Use


DoSet PROSPER.SIN.SUM.FLOWTYPE, 0, 1, 2 for
required option respectively)

PROSPER.SIN.SUM.WELLTYPE

Well Type (Producer/Injector/Water Injector selected by


doing a DoSet and setting the value to 0, 1 or 2
respectively)

PROSPER.SIN.SUM.
LIFTMETHOD

Lift Method. Setting the value to:


0 - None
1 - Gas Lift
2 - ESP
3 - Hydraulic drive downhole pump
4 - Progressive cavity pump
5 - Coil tubing gas lift
6 - Diluent injection
7 - Jet pump
8 - Multiphase pump
9 - Sucker rod pump
10 - Gas lift (intermittent)

PROSPER.SIN.SUM.LIFTTYPE[i]

Lift Type chosen per Lift Method

1990-2011 Petroleum Experts Limited

201

OpenServer

For Example, the line:


DoSet "PROSPER.SIN.SUM.LIFTTYPE[1]", 2
Will set the Gas Lifted Option to Safety Equipment.
Here [i] is the index of the lift method as above and 2 is
the option associated with it.
PROSPER.SIN.SUM.PREDICT

Prediction Flag
Setting this to 0, 1 and 2 will enable the Pressure Only,
Pressure and Temperature(Offshore) and Pressure
and Temperature(On Land) modes respectively.

PROSPER.SIN.SUM.
TEMPMODEL

Temperature Model
Setting this to 0, 1 and 2 will enable the Rough
Approximation, Enthaply Balance and Improved
Approximation methods respectively.

PROSPER.SIN.SUM.RANGE

Calculation Range (Full System/Pipeline Only)

PROSPER.SIN.SUM.OUTPUT

Calculation Output Display Option

PROSPER.SIN.SUM.
COMPLETION

Completion Type (Cased Hole / Open Hole)

PROSPER.SIN.SUM.
GRAVELPACK

Gravel Pack. Setting the value to:


0 - None
1 - Gravel pack
2 - Pre-packed screen
3 - Wire wrapped screen
4 - Slotted liner

PROSPER.SIN.SUM.
INFLOWTYPE

Inflow Type ( Single Branch / Multi-Lateral )

PROSPER.SIN.SUM.
GASCONING

Gas Coning Flag

PROSPER.SIN.SUM.COMPANY
PROSPER.SIN.SUM.FIELD
PROSPER.SIN.SUM.LOCATION
PROSPER.SIN.SUM.WELL
PROSPER.SIN.SUM.PLATFORM
PROSPER.SIN.SUM.ANALYST
PROSPER.SIN.SUM.DATE

OpenServer User's Manual

In order to export in date format (either dd/mm/yyyy or mm/dd/yyyy


depending on local settings) this must be converted into a date

PROSPER and the OpenServer

202

string. i.e.
CDate(DoGet("PROSPER.SIN.SUM.DATE"))
PROSPER.SIN.SUM.
COMMENTS

6.3

PVT Data Section


The PVT data is accessed using the root name PROSPER.PVT and is split up into
several sections as listed below.
INPUT

Input data associated with Black Oil models

CORREL

Correlation Matching Parameters

MATCH

Match Data

TABLE

Look up Table data

CALC

Calculation Results

EOS

Data associated with Equation of State Model

DLL

Data associated with user dll models

EMULS

Emulsion data

VISC

Viscosity data

HYD

Hydrates Formation Table

Each section will be accessed using the initial string:


PROSPER.PVT.INPUT
PROSPER.PVT.CORREL
PROSPER.PVT.MATCH
PROSPER.PVT.TABLE
PROSPER.PVT.CALC
PROSPER.PVT.EOS
PROSPER.PVT.DLL
PROSPER.PVT.EMULS
PROSPER.PVT.VISC
PROSPER.PVT.HYD

6.3.1 INPUT - Input Data


These are input data items for the Black Oil models:

1990-2011 Petroleum Experts Limited

203

OpenServer

PROSPER.PVT.INPUT.PBCORR

Pb, Rs, Bo Correlation


For example,the string:
DoSet PROSPER.PVT.Input.PBcorr, 1
will set the correlation to Standing. Similarly,
setting the value to:
0 will set Glaso
2 will set Lasater
3 will set Vazquez-Beggs
4 will set Petrosky
5 will set Al Marhoun

PROSPER.PVT.INPUT.UOCORR

Oil Viscosity Correlation


0 will set Beal
1 will set Beggs
2 will set Petrosky
3 will set Egbogah et al (heavy oil)
4 will set Bergman-Sutton

PROSPER.PVT.INPUT.UGCORR

Gas Viscosity Correlation


0 will set Lee
1 will set Carr

PROSPER.PVT.INPUT.SOLGOR

Solution GOR

PROSPER.PVT.INPUT.API

Oil Gravity

PROSPER.PVT.INPUT.GRVGAS

Gas Gravity

OpenServer User's Manual

PROSPER and the OpenServer

204

PROSPER.PVT.INPUT.WATSAL

Water Salinity

PROSPER.PVT.INPUT.PSEP

Separator Pressure

PROSPER.PVT.INPUT.TSEP

Serarator Temperature

PROSPER.PVT.INPUT.GORSEP

Separator GOR

PROSPER.PVT.INPUT.GRVSEP

Separator Gravity

PROSPER.PVT.INPUT.GORTNK

Tank GOR

PROSPER.PVT.INPUT.GRVTNK

Tank Gravity

PROSPER.PVT.INPUT.CGR

Condensate to Gas Ratio

PROSPER.PVT.INPUT.WGR

Water to Gas Ratio

PROSPER.PVT.INPUT.H2S

Mole Percent H2S

PROSPER.PVT.INPUT.CO2

Mole Percent CO2

PROSPER.PVT.INPUT.N2

Mole Percent N2

PROSPER.PVT.INPUT.DEWPNT

Saturation Pressure at Reservoir Temperature


(for Black Oil Condensate Model)

PROSPER.PVT.INPUT.TRES

Reservoir Temperature

PROSPER.PVT.INPUT.PRES

Reservoir Pressure

6.3.2 MATCH - PVT Match Data


This is the data used for matching to Black Oil Correlations.
PROSPER.PVT.MATCH.TABLE

Current Table Number. For example, the following


line:
DoSet "PROSPER.PVT.MATCH.TABLE", 2
will activate the 3rd table of the 50 tables
available in the match data section.

PROSPER.PVT.MATCH.DATA.
COUNT

Returns the number of tables that have data


included.

PROSPER.PVT.MATCH.DATA[i].
COUNT

Returns the number of pressure values that are


entered for the table number i,

PROSPER.PVT.MATCH.OK[0:3]

Returns if there exists any data defined for PVT


Match data section. the integer represents the
type of fluid representing:
0 = Oil
1 = Gas
2 = not used
1990-2011 Petroleum Experts Limited

205

OpenServer

3 = Condensate.
if there exists any data in the PVT match data
section, then the command will return a 1 or else
0.
PROSPER.PVT.MATCH.TEMP

Max Number of Temperatures

PROSPER.PVT.MATCH.PRES

Max Number of Pressures

PROSPER.PVT.MATCH.VARS

Max Number of Variables

i = 0 : temp
j = 0 : pres
k = 0 : vars
k= 0
k= 1
k= 2
k= 3
k= 4
k= 5
k= 6
k= 7
k= 8
k= 9
k = 10
k = 11
k = 12
k = 13

Temperature
Pressure
Bubble Point
Dew Point
Oil FVF
Oil Viscosity
Oil Density
Gas FVF
Gas Viscosity
Gas Density
Z Factor
Gas Oil Ratio
Produced CGR
Liquid Dropout

PROSPER.PVT.MATCH.DATA[i][j]
[k]

Match Data

6.3.3 TABLE - Setting data to the PVT Lookup Tables


PROSPER.PVT.TABLE.USE

Use Tables Flag (0=No 1=Yes)

PROSPER.PVT.TABLE.TABLE

Current Table Number

PROSPER.PVT.TABLE.TEMP

Number of Temperatures

PROSPER.PVT.TABLE.PRES

Number of Pressures

PROSPER.PVT.TABLE.VARS

Number of Variables

PROSPER.PVT.TABLE.MAXTEMP

Max Number of Temperatures

PROSPER.PVT.TABLE.MAXPRES

Max Number of Pressures

PROSPER.PVT.TABLE.MAXVARS

Max Number of Variables

i = 0 to temp
OpenServer User's Manual

PROSPER and the OpenServer

206

j = 0 to pres
k = 0 to vars
k= 0
k= 1
k= 2
k= 3
k= 4
k= 5
k= 6
k= 7
k= 8
k= 9
k=10
k=11
k=12
k=13
k=14
k=15
k=16

Temperature
Pressure
Bubble Point
Dew Point
Oil FVF
Oil Viscosity
Oil Density
Gas FVF
Gas Viscosity
Gas Density
Z Factor
Gas Oil Ratio
Produced CGR
Liquid Dropout
Water Fvf
Water Viscosity
Water Compressibility

PROSPER.PVT.TABLE.DATA[i][j][k]

Table Look Up Data

Entering data into these tables follows the same logic as entering the PVT Match Data.
This was described in the previous section. The variable i refers to the table that is
defined by a unique temperature, the value j refers to the row, defined by a pressure,
and the value of k refers to the entry column, defined by the variable it corresponds to.

6.3.4 CORREL Correlation Matching Parameters


These are the matching parameters applied to Black Oil properties after the match
calculation has been performed.
6.3.4.1 Black Oil - Oil
i = 0:4
0 = Glaso
1 = Standing
2 = Lasater
3 = Vazquez-Beggs
4 = Petrosky et al
PROSPER.PVT.CORREL.OILBUBPNT[i].
NUM-1

Pb Number of available match point


entries in the Match Data screen. This
will return 10 (as there are 10 rows of
match data in every table).

1990-2011 Petroleum Experts Limited

207

OpenServer

j=0:NUM-1
PROSPER.PVT.CORREL.OILBUBPNT[i].F[j]

Pb ith Match parameter


For example, the line:
DoGet("PROSPER.PVT.CORREL.
OILBUBPNT[0].F[1]") will return the
Parameter 2 of Glaso Correlation when
matched to the bubble point number
entered in the Match Data table.

PROSPER.PVT.CORREL.OILBUBPNT[i].STD Pb Correlation standard deviation


PROSPER.PVT.CORREL.OILSOLGOR[i].
NUM-1

Rs Number of match data entries. Just


like the command relating to the bubble
point , this will return the number 10.

j=0:NUM-1
PROSPER.PVT.CORREL.OILSOLGOR[i].F[j]

Rs ith Match parameter

PROSPER.PVT.CORREL.OILSOLGOR[i].
STD

Rs Correlation standard deviation

PROSPER.PVT.CORREL.OILOILFVF[i].NUM- Bo Number of match data entries. Just


like the command relating to the bubble
1
point , this will return the number 10.
j=0:NUM-1
PROSPER.PVT.CORREL.OILOILFVF[i].F[j]

Bo ith Match parameter

PROSPER.PVT.CORREL.OILOILFVF[i].STD

Bo Correlation standard deviation

i = 0:2
0 = Beggs et al
1 = Beal et al
2 = Petrosky
PROSPER.PVT.CORREL.OILOILVIS[i].NUM- Uo Number of match data entries. Just
like the command relating to the bubble
1
point , this will return the number 10.
j=0:NUM-1
PROSPER.PVT.CORREL.OILOILVIS[i].F[j]

Uo ith Match parameter

PROSPER.PVT.CORREL.OILOILVIS[i].STD

Uo Correlation standard deviation

OpenServer User's Manual

PROSPER and the OpenServer

208

6.3.4.2 Black Oil - Gas


i = 0:1
0 = Lee et al
1 = Carr et al
PROSPER.PVT.CORREL.GASGASVIS[i].
NUM-1

Ug Number of match parameters

j=0:NUM-1
PROSPER.PVT.CORREL.GASGASVIS[i].F[j]

Ug ith Match parameter

PROSPER.PVT.CORREL.GASGASVIS[i].STD Ug Correlation standard deviation


PROSPER.PVT.CORREL.GASZFACT.NUM-1

Z Factor
parameters

Number

of

match

j=0:NUM-1
PROSPER.PVT.CORREL.GASZFACT[I].F[j]

Z Factor ith Match parameter

PROSPER.PVT.CORREL.GASZFACT[I].STD

Z Factor
deviation

Correlation

standard

PROSPER.PVT.CORREL.GASGASFVF.NUM- Bg Number of match parameters


1
j=0:NUM-1
PROSPER.PVT.CORREL.GASGASFVF[i].F[j]

Bg ith Match parameter

PROSPER.PVT.CORREL.GASGASFVF[i].STD Bg Correlation standard deviation

6.3.4.3 Black Oil - Retrograde Condensate

i = 0 and 1 where :
0 refers to the Lee et al correlation, and
1 refers to the Carr et al correlation
PROSPER.PVT.CORREL.CONGASVIS[i].
NUM-1

Ug Number of match parameters

j=0:NUM-1
PROSPER.PVT.CORREL.CONGASVIS[i].F[j]

Ug ith Match parameter

1990-2011 Petroleum Experts Limited

209

OpenServer

PROSPER.PVT.CORREL.CONGASVIS[i].
STD

Ug Correlation standard deviation

PROSPER.PVT.CORREL.CONZFACT.NUM-1 Z Factor Number of match parameters


j=0:NUM-1
PROSPER.PVT.CORREL.CONZFACT.F[j]

Z Factor ith Match parameter

PROSPER.PVT.CORREL.CONZFACT.STD

Z
Factor
deviation

PROSPER.PVT.CORREL.CONGASFVF.
NUM-1

Bg Number of match parameters

Correlation

standard

j=0:NUM-1
PROSPER.PVT.CORREL.CONGASFVF.F[j]

Bg ith Match parameter

PROSPER.PVT.CORREL.CONGASFVF.STD Bg Correlation standard deviation


PROSPER.PVT.CORREL.CONDEWPNT.
NUM-1

Dew Point
parameters

Number

of

match

j=0:NUM-1
PROSPER.PVT.CORREL.CONDEWPNT.F[j]

Dew Point ith Match parameter

PROSPER.PVT.CORREL.CONDEWPNT.
STD

Dew Point
deviation

PROSPER.PVT.CORREL.CONCGR.NUM-1

Produced CGR Number of match


parameters

Correlation

standard

j=0:NUM-1
PROSPER.PVT.CORREL.CONCGR.F[j]

Produced CGR ith Match parameter

PROSPER.PVT.CORREL.CONCGR.STD

Produced CGR Correlation standard


deviation

6.3.5 CALC - Calculation Results


These are the results generated by the PVT Calculation option.
PROSPER.PVT.CALC.MODE

Calculation Mode (0=range 1=entered)

PROSPER.PVT.CALC.TEMPSTEP

Number of
(RANGE)

OpenServer User's Manual

Temperature

Steps

PROSPER and the OpenServer

210

PROSPER.PVT.CALC.PRESSTEP

Number of Pressure Steps (RANGE)

PROSPER.PVT.CALC.TEMPMIN

Minimum Temperature (RANGE)

PROSPER.PVT.CALC.TEMPMAX

Maximum Temperature (RANGE)

PROSPER.PVT.CALC.PRESMIN

Minimum Pressure (RANGE)

PROSPER.PVT.CALC.PRESMAX

Maximum Pressure (RANGE)

i = 0:10
PROSPER..PVT.CALC.PRESUSER[i]

Pressure Values (USER ENTERED)

PROSPER..PVT.CALC.TEMPUSER[i]

Temperature
ENTERED)

PROSPER.PVT.CALC.NUMPRES

Number of Pressure values

PROSPER.PVT.CALC.NUMTEMP

Number of Temperature values

PROSPER.PVT.CALC.RESULTS.COUNT

Number of Results

PROSPER.PVT.CALC.XVAR

X Variable for plot

PROSPER.PVT.CALC.YVAR

Y Variable for plot

Values

(USER

I = 0 : PROSPER.PVT.CALC.RESULTS.
COUNT-1
PROSPER.PVT.CALC.RESULTS[I].
TEMPINDEX

Temperature Index

PROSPER.PVT.CALC.RESULTS[I].
PRESINDEX

Pressure Index

PROSPER.PVT.CALC.RESULTS[I].TEMP

Temperature

PROSPER.PVT.CALC.RESULTS[I].PRES

Pressure

PROSPER.PVT.CALC.RESULTS[I].BUBPNT

Bubble Point

PROSPER.PVT.CALC.RESULTS[I].DEWPNT Dew Point


PROSPER.PVT.CALC.RESULTS[I].OILFVF

Oil FVF

PROSPER.PVT.CALC.RESULTS[I].OILVIS

Oil Viscosity

PROSPER.PVT.CALC.RESULTS[I].OILDEN

Oil Density

PROSPER.PVT.CALC.RESULTS[I].GASFVF

Gas FVF

1990-2011 Petroleum Experts Limited

211

OpenServer

PROSPER.PVT.CALC.RESULTS[I].GASVIS

Gas Viscosity

PROSPER.PVT.CALC.RESULTS[I].GASDEN Gas Density


PROSPER.PVT.CALC.RESULTS[I].
ZFACTOR

Gas Z Factor

PROSPER.PVT.CALC.RESULTS[I].GOR

Gas Oil Ratio

PROSPER.PVT.CALC.RESULTS[I].
PRODCGR

Produced CGR

PROSPER.PVT.CALC.RESULTS[I].LIQDRP

Liquid Dropout

PROSPER.PVT.CALC.RESULTS[I].WATFVF Water FVF


PROSPER.PVT.CALC.RESULTS[I].WATDEN Water Density
PROSPER.PVT.CALC.RESULTS[I].WATVIS

Water Viscosity

PROSPER.PVT.CALC.RESULTS[I].OILCMP

Oil Compressibility

PROSPER.PVT.CALC.RESULTS[I].WATCMP Water Compressibility

6.3.6 EOS - Equation of State Data


This is the data associated with the Equation of State Model
PROSPER.PVT.EOS.EOS.NUMCOMP

Number of Components

PROSPER.PVT.EOS.EOS.VSFLAG

Use Volume Shift flag

i = 0 : PROSPER.PVT.EOS.EOS.NUMCOMP-1
PROSPER.PVT.EOS.EOS.COMP[i]

Mole Percent

PROSPER.PVT.EOS.EOS.TCRIT[i]

Critical Temperature

PROSPER.PVT.EOS.EOS.PCRIT[i]

Critical Pressure

PROSPER.PVT.EOS.EOS.VCRIT[i]

Critical Volume

PROSPER.PVT.EOS.EOS.OMEGA[i]

Acentric Factor

PROSPER.PVT.EOS.EOS.MOLEWT[i]

Molecular Weight

PROSPER.PVT.EOS.EOS.SPGRAV[i]

Specific Gravity

PROSPER.PVT.EOS.EOS.VOLSHIFT

Volume Shift

i = 0 : PROSPER.PVT.EOS.EOS.NUMCOMP-1
j = 0 : PROSPER.PVT.EOS.EOS.NUMCOMP-1
PROSPER.PVT.EOS.EOS.BICOEFFS[i][j]
i=0:4

OpenServer User's Manual

Binary Interaction Coefficients

PROSPER and the OpenServer

212

PROSPER.PVT.EOS.EOS.PSEP[i]

Separator Pressure

PROSPER.PVT.EOS.EOS.TSEP[i]

Separator Temperature

PROSPER.PVT.EOS.PHASE

Phase Indicator

PROSPER.PVT.EOS.CALCNUM

Number of Calculated points

PROSPER.PVT.EOS.CALPRES

Number of Calculated Pressures

PROSPER.PVT.EOS.CALTEMP

Number of Calculated Temperatures

PROSPER.PVT.EOS.PEPHASE

Phase Indicator (Phase Envelope)

PROSPER.PVT.EOS.PECALC

Phase Envelope Done indicator

PROSPER.PVT.EOS.PERESULT

Number of Points in Phase Envelope

I=0 Calculated I=1 Generated


PROSPER.PVT.EOS.TEMPSTEP[I]

Number of Temperature steps

PROSPER.PVT.EOS.PRESSTEP[I]

Number of Pressure Steps

PROSPER.PVT.EOS.TEMPMIN[I]

Minimum Temperature

PROSPER.PVT.EOS.TEMPMAX[I]

Maximum Temperature

PROSPER.PVT.EOS.PRESMIN[I]

Minimum Pressure

PROSPER.PVT.EOS.PRESMAX[I]

Maximum Pressure

PROSPER.PVT.EOS.TCRIT

Phase
Envelope
Temperature

PROSPER.PVT.EOS.PCRIT

Phase Envelope Critical Pressure

PROSPER.PVT.EOS.TTMAX

Phase
Temp

Envelope

Cricondentherm

PROSPER.PVT.EOS.PTMAX

Phase Envelope
Pressure

Cricondentherm

PROSPER.PVT.EOS.TPMAX

Phase Envelope Cricondenbar Temp

PROSPER.PVT.EOS.PPMAX

Phase
Envelope
Pressure

PROSPER.PVT.EOS.XVAR

Plot X axis

PROSPER.PVT.EOS.YVAR

Plot Y axis

PROSPER.PVT.EOS.CALCTYPE

Calculation Type Flag

PROSPER.PVT.EOS.GENPRES

Number of Generated Pressures

PROSPER.PVT.EOS.GENTEMP

Number of Generated Temperatures

Critical

Cricondenbar

1990-2011 Petroleum Experts Limited

213

OpenServer

PROSPER.PVT.EOS.GENNUM

Number of Generated points

PROSPER.PVT.EOS.PERESULT

Number of Phase Envelope Points

i = 0 : PROSPER.PVT.EOS.PERESULT-1
PROSPER.PVT.EOS.PETEMP[i]

Phase Envelope Temperature

PROSPER.PVT.EOS.PEPRES[i]

Phase Envelope Pressure

PROSPER.PVT.EOS.SOLGOR

Solution GOR

PROSPER.PVT.EOS.GRVGAS

Gas Gravity

PROSPER.PVT.EOS.API

Oil Gravity

PROSPER.PVT.EOS.USETABLE

Use Tables Flag

i=0 : PROSPER.PVT.EOS.CALCNUM-1
j=0 Liquid. j=1 Vapour

Calculated/Interpolated Results

PROSPER.PVT.EOS.CALCDATA[i].TEMP

Temperature

PROSPER.PVT.EOS.CALCDATA[i].PRES

Pressure

PROSPER.PVT.EOS.CALCDATA[i].SATPRES Saturation Pressure


PROSPER.PVT.EOS.CALCDATA[i].VAPFRAC Vapour Fraction
PROSPER.PVT.EOS.CALCDATA[i].COMPR[j]

Z Factor

PROSPER.PVT.EOS.CALCDATA[i].DENSITY[j] Density
PROSPER.PVT.EOS.CALCDATA[i].
VISCOSITY[j]

Viscosity

PROSPER.PVT.EOS.CALCDATA[i].FVF[j]

Formation Volume Factor

PROSPER.PVT.EOS.CALCDATA[i].
ENTHALPY[j]

Enthalpy

PROSPER.PVT.EOS.CALCDATA[i].ENTROPY Entropy
[j]
PROSPER.PVT.EOS.CALCDATA[i].CP[j]

Specific Heat Capacity (P)

PROSPER.PVT.EOS.CALCDATA[i].CV[j]

Specific Heat Capacity (V)

PROSPER.PVT.EOS.CALCDATA[i].JT[j]

Joules Thompson Coefficient

PROSPER.PVT.EOS.CALCDATA[i].IFT

Interfacial Tension

PROSPER.PVT.EOS.CALCDATA[i].SOLGOR

GOR

i=0 : PROSPER.PVT.EOS.GENNUM-1
j=0 Liquid. j=1 Vapour

Generated Results

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.PVT.EOS.GENDATA[i].TEMP

Temperature

PROSPER.PVT.EOS.GENDATA[i].PRES

Pressure

PROSPER.PVT.EOS.GENDATA[i].SATPRES

Saturation Pressure

PROSPER.PVT.EOS.GENDATA[i].VAPFRAC

Vapour Fraction

PROSPER.PVT.EOS.GENDATA[i].COMPR[j]

Z Factor

PROSPER.PVT.EOS.GENDATA[i].DENSITY[j]

Density

214

PROSPER.PVT.EOS.GENDATA[i].VISCOSITY Viscosity
[j]
Formation Volume Factor

PROSPER.PVT.EOS.GENDATA[i].FVF[j]

PROSPER.PVT.EOS.GENDATA[i].ENTHALPY Enthalpy
[j]
PROSPER.PVT.EOS.GENDATA[i].ENTROPY[j] Entropy
PROSPER.PVT.EOS.GENDATA[i].CP[j]

Specific Heat Capacity (P)

PROSPER.PVT.EOS.GENDATA[i].CV[j]

Specific Heat Capacity (V)

PROSPER.PVT.EOS.GENDATA[i].JT[j]

Joules Thompson Coefficient

PROSPER.PVT.EOS.GENDATA[i].IFT

Interfacial Tension

PROSPER.PVT.EOS.GENDATA[i].SOLGOR

GOR

6.3.7 DLL - External PVT DLL Data


PROSPER.PVT.DLL.NUMDLL

Number of External PVT DLLs Loaded

PROSPER.PVT.DLL.NUMF

Number of real numbers per DLL

PROSPER.PVT.DLL.NUMI

Number of integers per DLL

i = 0 : PROSPER.PVT.DLL.NUMDLL-1
PROSPER.PVT.DLL.DLL[i].NAME

DLL Name

i = 0 : PROSPER.PVT.DLL.NUMF-1
PROSPER.PVT.DLL.DLL[i].f[j]

Real Data

i = 0 : PROSPER.PVT.DLL.NUMI-1
PROSPER.PVT.DLL.DLL[i].I[j]

Integer Data

PROSPER.PVT.DLL.NUMEOS

Number of EOS models

i = 0 : PROSPER.PVT.DLL.NUMEOS-1
1990-2011 Petroleum Experts Limited

215

OpenServer

PROSPER.PVT.DLL.EOS[i].DLL

Associated DLL

PROSPER.PVT.DLL.EOS[i].NAME

EOS Model Name

PROSPER.PVT.DLL.EOS[i].INDEX

Index within associated DLL

6.3.8 EMULSION - Emulsion Data


PROSPER.PVT.EMULS.VISCOR

Viscosity Correction Flag

PROSPER.PVT.EMULS.OCCUR

Emulsion Occurrence Flag

i=0 Pump Data i=1 Flowline Data


PROSPER.PVT.EMULS.DATA[i].TEMP

Experimental Pressure

PROSPER.PVT.EMULS.DATA[i].PRES

Experimental Temperature

PROSPER.PVT.EMULS.DATA[i].WCL

Left Water Cut For Maximum


Viscosity

PROSPER.PVT.EMULS.DATA[i].WCR

Right Water Cut For Maximum


Viscosity

PROSPER.PVT.EMULS.DATA[i].NUM

Number of Emulsion Data Points

j = 0 : PROSPER.PVT.EMULS.DATA[i].NUM-1
PROSPER.PVT.EMULS.DATA[i].WATC[j]

Emulsion Water Cut

PROSPER.PVT.EMULS.DATA[i].VISC[j]

Emulsion Viscosity

PROSPER.PVT.EMULS.DATA[i].SD

Match Standard Deviation

j=0:4
Match Parameters

PROSPER.PVT.EMULS.DATA[i].PARM[j]
j = 0 : 100

PROSPER.PVT.EMULS.DATA[i].PLOTWATC[j] Calculated WC for plotting


PROSPER.PVT.EMULS.DATA[i].PLOTVISC[j]

Calculated Viscosity for plotting

6.3.9 VISC - Viscosity Data


This is the customised viscosity correction data.
PROSPER.PVT.VISC.NUM
i = 0 Viscosity
i = 1 Head
OpenServer User's Manual

Number of points

PROSPER and the OpenServer

216

i = 2 Capacity
i = 3 Power
i = 4 Efficiency
j = 0 : PROSPER.PVT.VISC.NUM-1
PROSPER.PVT.VISC.DATA[i][j]

Viscosity Correction Data

6.3.10 HYD - Hydrates Formation Data


This is the data from the Hydrates Formation look up table.
PROSPER.PVT.HYD.PRES.COUNT

Number of points in the table

i= 0 : PROSPER.PVT.HYD.PRES.COUNT

6.4

PROSPER.PVT.HYD.PRES[i]

Pressure

PROSPER.PVT.HYD.TEMP[i]

Temperature

INPUT Data Section


The INPUT data is accessed using the root name PROSPER.SIN and is split up into
several sections as listed below.
SUM

Options data

IPR

Inflow Performance Input Data

EQP

Equipment Input Data

GLF

GAS Lift Input Data

GLI

Intermittent Gas Lift Input Data

ESP

ESP Input Data

HSP

HSP Input Data

UNT

Units Settings Data

Each section will be accessed using the following string structure:


PROSPER.SIN.SUM
PROSPER.SIN.IPR
PROSPER.SIN.EQP
PROSPER.SIN.GLF
PROSPER.SIN.GLI
PROSPER.SIN.ESP
1990-2011 Petroleum Experts Limited

217

OpenServer

PROSPER.SIN.HSP
PROSPER.SIN.UNT

6.4.1 IPR Data

6.4.1.1 Overview
The Equipment data is accessed using the root name PROSPER.SIN>EQP and is split
up into several sections as listed below.
DEVN

Deviation Survey

TEMP

Flowing Temperature Survey

GEO

Geothermal Gradient

SURF

Surface Equipment

TURF

Surface Equipment (Enthalpy Balance)

DOWN

Downhole Equipment

TOWN

Downhole Equipment (Enthalpy Balance)

SHC

Specific Heat Capacities

ENV

Surface Environment Data

DRILL

Drilling Data

LITHO

Lithology

DB

Equipment / Rock Type databases

6.4.1.2 Single Branch Data


The single branch data has the root name PROSPER.SIN.IPR.SINGLE. The
organization of the following tables follows that of the IPR data screens i.e., the display
choices are made using buttons and tabs as well as list box selection. However, the
division does not extend to every possible model choice, as it is convenient to regard
Darcy-like models as using a sub-set of the same group of parameters.

6.4.1.2.1 Common Parameters


Some variables, e.g. well-bore radius (PROSPER.SIN.IPR.SINGLE.WBR) are

OpenServer User's Manual

PROSPER and the OpenServer

218

common to more than one group of models, as well-bore radius is used in reservoir and
mechanical skin models. A list of these parameters is shown below:

PROSPER.SIN.IPR.SINGLE.PERFDIA

Perforation diameter

PROSPER.SIN.IPR.SINGLE.SPF

Shot density

PROSPER.SIN.IPR.SINGLE.PERFEFF

Perforation efficiency

PROSPER.SIN.IPR.SINGLE.PERFINT

Perforation interval (production interval in


open hole)

PROSPER.SIN.IPR.SINGLE.WBR

Well-bore radius

PROSPER.SIN.IPR.SINGLE.SWC

Connate water saturation (residual


saturation for relative permeability screen)

6.4.1.2.2 Model Selection and PVT Screen


These parameters are explicitly or implicitly involved in the functionality of the model
selection IPR screen, which includes the selection of PVT parameters that affect all
models. The first six flags are normally set from the System Summary screen (menu
item Options), so it is recommended that they are used on a read-only basis here and
set using the PROSPER .SIN.SUM root.
The last three variables, however, are distinct from those set on the PVT screen and are
intended for local manipulation within the IPR section.

PROSPER.SIN.IPR.SINGLE.GRAVEL

Sand control flag. 0 = no gravel


pack, 1 = gravel pack

PROSPER.SIN.IPR.SINGLE.COMPLETION

Completion flag. 0 = cased


hole, 1 = open hole

PROSPER.SIN.IPR.SINGLE.FLUID

Fluid choice. 0 = oil + water, 1 =


gas, 2 = condensate

PROSPER.SIN.IPR.SINGLE.GAPFLAG

1 = PROSPER loaded by GAP, 0


= PROSPER stand alone

PROSPER.SIN.IPR.SINGLE.WELLTYPE

0 = producer, 1 = injector, 2 =
water injector

PROSPER.SIN.IPR.SINGLE.IGCONE

Coning flag for oil. 0 = no gas


coning, 1 = enabled

PROSPER.SIN.IPR.SINGLE.IPRMETHOD

Reservoir/Pwf calculation model


index. Zero-based, as ordered
in list box
1990-2011 Petroleum Experts Limited

219

OpenServer

PROSPER.SIN.IPR.SINGLE.MGSKINMETHOD

Mechanical skin model index.


Zero-based, as ordered in list
box

PROSPER.SIN.IPR.SINGLE.DPSKINMETHOD

Deviation skin model index.


Zero-based, as ordered in list
box

PROSPER.SIN.IPR.SINGLE.IRELK

Relative permeability flag. 0 =


no relperm, 1 = enabled

PROSPER.SIN.IPR.SINGLE.IPRMODEL

Ipr model name

PROSPER.SIN.IPR.SINGLE.MGSKINMODEL

Mechanical skin model name

PROSPER.SIN.IPR.SINGLE.DPSKINMODEL

Deviation skin model name

PROSPER.SIN.IPR.SINGLE.PRES

Reservoir pressure

PROSPER.SIN.IPR.SINGLE.TRES

Reservoir temperature

PROSPER.SIN.IPR.SINGLE.WC

Water cut

PROSPER.SIN.IPR.SINGLE.WGR

WGR

PROSPER.SIN.IPR.SINGLE.TOTGOR

Value of GOR for IPR input


screen

PROSPER.SIN.IPR.SINGLE.CGR

Value of CGR for IPR input


screen

PROSPER.SIN.IPR.SINGLE.GORSEP

Value of separator GOR for IPR


input screen

6.4.1.2.3 Test/PI Entered Models

PROSPER.SIN.IPR.SINGLE.PINDEX

Productivity index IPR value

PROSPER.SIN.IPR.SINGLE.PINSAV

Returns
equivalent
(undamaged) PI value from
IPR plot for Vogel, Darcy,
etc., type IPR's using DoGet
function

PROSPER.SIN.IPR.Single.TestData.count

number of data points


defined in the test data
section.

i = 0 TO 99

Value of i ranges from 0 to


99.

PROSPER.SIN.IPR.SINGLE.TESTDATA[i].P

Pressure test point

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.SIN.IPR.SINGLE.TESTDATA[i].Q

220

Rate test point

For example, the command:


DoSet "PROSPER.SIN.IPR.SINGLE.TESTDATA[0].Q", 2000
Will set the number 2000 in the rate box of the test data screen in the IPR plot shown
below:

6.4.1.2.4 MultiRate Models


i = 0:99

i varies from 0 to 99

PROSPER.SIN.IPR.SINGLE.TestData[0].Q

Test rate i (multi-rate)

PROSPER.SIN.IPR.SINGLE.TestData[0].P

Test pressure

For example, the command:


DoSet ("PROSPER.SIN.IPR.SINGLE.TestData[0].Q"), 2000
Will set the number 2000 in the rate box of the test data screen in the IPR plot shown
below:

1990-2011 Petroleum Experts Limited

221

OpenServer

EXTRACTING RESULTS CALCULATED BY PROSPER:


This section describes the OpenServer Variables to extract the variables calculated by
the Multirate models viz: 'Multirate Jones model,' 'Multirate C & n model,' 'Multirate
Forcheimer with Pseudo Pressure' models.
PROSPER.SIN.IPR.SINGLE.MRACOEF

Returns the A coefficient from the Multirate


Jones model

PROSPER.SIN.IPR.SINGLE.MRBCOEF

Returns the B coefficient from the Multirate


Jones model

PROSPER.SIN.IPR.SINGLE.MRACOEFPP Returns the A coefficient from the Multirate


Forcheimer with Pseudo Pressure model

PROSPER.SIN.IPR.SINGLE.MRBCOEFPP Returns the B coefficient from the Multirate


Forcheimer with Pseudo Pressure model

PROSPER.SIN.IPR.SINGLE.MRCVAL

Returns the coefficient C from the Multirate C &


n model

PROSPER.SIN.IPR.SINGLE.MREXPON

Returns the exponential n from the Multirate C &


n model

6.4.1.2.5 Darcy-based Models


Darcy based IPR models include models such as hydraulic fracture and horizontal IPR
models that apply a correcting skin to the Darcy calculated PI. In common with the rest
OpenServer User's Manual

PROSPER and the OpenServer

222

of the structure of the data, parameters applied specifically to gas/condensate models


are listed with ones for oil and/or all fluids.

PROSPER.SIN.IPR.SINGLE.PERMMETHOD, i

Permeability entered:
i = 0 to 1
0 - total permeability
entered
1 - gas
permeability

PROSPER.SIN.IPR.SINGLE.DFACTMETHOD, i

Non-Darcy flow factor:


i = 0 to 1
0 - Calculated
1 - Entered

PROSPER.SIN.IPR.SINGLE.RESPERM

Reservoir
permeability

PROSPER.SIN.IPR.SINGLE.THICKNESS

Reservoir height

PROSPER.SIN.IPR.SINGLE.DRAINAGE

Reservoir drainage area

PROSPER.SIN.IPR.SINGLE.DIETZ

Dietz shape factor

PROSPER.SIN.IPR.SINGLE.RELPERM

Relative
coefficient

PROSPER.SIN.IPR.SINGLE.TIME

Time

PROSPER.SIN.IPR.SINGLE.POROSITY

Reservoir porosity

PROSPER.SIN.IPR.SINGLE.FRACHEIGHT

Fracture height

PROSPER.SIN.IPR.SINGLE.FRACLENGTH

Fracture half-length/radius

PROSPER.SIN.IPR.SINGLE.FRACFCD

Fracture dimensionless
conductivity

PROSPER.SIN.IPR.SINGLE.HANS

Horizontal anisotropy

PROSPER.SIN.IPR.SINGLE.VANS

Vertical anisotropy

PROSPER.SIN.IPR.SINGLE.WELLLEN

Well length

PROSPER.SIN.IPR.SINGLE.WELLDIST

Distance of well centre to


reservoir bottom

PROSPER.SIN.IPR.SINGLE.RESLEN

Reservoir length

PROSPER.SIN.IPR.SINGLE.RESWID

Reservoir width

PROSPER.SIN.IPR.SINGLE.WELLLDST

Length distance of well to


reservoir edge

PROSPER.SIN.IPR.SINGLE.WELLWDST

Width distance of well to


reservoir edge

horizontal

permeability

1990-2011 Petroleum Experts Limited

223

OpenServer

PROSPER.SIN.IPR.SINGLE.EXPON

Back pressure exponent

PROSPER.SIN.IPR.SINGLE.DFACT

Non-Darcy flow factor

PROSPER.SIN.IPR.SINGLE.STORATIVITY

Storativity ratio - dual


porosity

PROSPER.SIN.IPR.SINGLE.INTERPOROSITY

Interporosity coefficient dual porosity

PROSPER.SIN.IPR.SINGLE.NFRACS

Number of horizontal
fractures

PROSPER.SIN.IPR.SINGLE.PINSAV

Formation PI

6.4.1.2.6 External Entry Model Parameters

i = 0:19
PROSPER.SIN.IPR.SINGLE.EXTENTRY[i].RATE

External entry rate

j = 0:4
PROSPER.SIN.IPR.SINGLE.EXTENTRY[i].PRESSURE[j]

Pressure responses

i = 0:4
PROSPER.SIN.IPR.SINGLE.SENVAR[i]

Curve IDs

PROSPER.SIN.IPR.SINGLE.SENVAL

Selected curve

PROSPER.SIN.IPR.SINGLE.IESKIN

Additional skin flag. 0 no skin to add, 1 - skin


to add

PROSPER.SIN.IPR.SINGLE.EXTLABEL

Curve label

PROSPER.SIN.IPR.SINGLE.EXTUNITS

Curve units

PROSPER.SIN.IPR.SINGLE.NCURV

Number of IPR curves

PROSPER.SIN.IPR.SINGLE.NSENSP

Number of valid rate


data points

6.4.1.2.7 Multi-layer (no friction dP loss) Table

i = 0:4

OpenServer User's Manual

PROSPER and the OpenServer

224

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
TYPE

Layer type (e.g. disabled, Darcy, multirate, PI). Zero-based

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
IGRAV

Gravel pack enable, no = 0, 1 = yes

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
PRESSURE

Layer pressure

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
HEIGHT

Layer height

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
SKIN

Layer skin

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
PERM

Layer horizontal permeability

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
DAREA

Layer area

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
DIETZ

Layer shape factor

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
WBR

Well-bore radius in layer

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
PILAY

Productivity index

PROSPER.SIN.IPR.SINGLE.MLAYER[i].
GOR

Formation GOR/CGR/separator GOR

PROSPER.SIN.IPR.SINGLE.MLAYER[i].API
Oil gravity
PROSPER.SIN.IPR.SINGLE.MLAYER[i].
GASGRAV

Gas gravity

PROSPER.SIN.IPR.SINGLE.MLAYER[i].WC
Water cut/WGR
j = 0:9
PROSPER.SIN.IPR.SINGLE.MLAYER[i].
MRATE[j].PRESSURE
PROSPER.SIN.IPR.SINGLE.MLAYER[i].
MRATE[j].RATE

Test pressure
Test rate

6.4.1.2.8 Horizontal Well with dP Friction Loss Table, Including Coning Screen

1990-2011 Petroleum Experts Limited

225

OpenServer

PROSPER.SIN.IPR.SINGLE.IHZMDL

Horizontal well model choice.


Zero-based

i = 0:19
PROSPER.SIN.IPR.SINGLE.HORIZDP[i].IZONTP

Zone type, 0 = disabled, 1 =


blank, 2 = perforated, 3 = open

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].IZONSK

Skin model. 0 = entered. 1 =


Karakas & Tariq.

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].IZONGP

Gravel pack switch. 0 = no, 1 =


yes.

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].ZONLEN

Zone length

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].ZONPRM

Zone permeability

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].ZONRAD

Zone radius

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].ZONRGH

Zone roughness

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].SKIN

Skin entered by hand

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].PERFDIA

Perforation diameter

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].SPF

Shots per foot

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].PERFLEN

Perforation length

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].DZTHICK

Damaged zone thickness

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].DZPERM

Damaged zone permeability

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].CZTHICK

Crushed zone thickness

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].DZPERM

Damaged zone permeability

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].PHASE

Shot phasing

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].GPPERM

Gravel pack permeability

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].GPLEN

Gravel pack length

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].
NDMETHOD

Non-Darcy method flag.


calculated, 1 = entered

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].PERFEFF

Perforation efficiency

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].
NONDARCY

Non-Darcy flow factor

PROSPER.SIN.IPR.SINGLE.HORIZDP[i].WBR

Well-bore radius

PROSPER.SIN.IPR.SINGLE.ICONE

Gas, water or gas + water


coning flag. Zero based.

PROSPER.SIN.IPR.SINGLE.CONERATE

Rate for coning input.

OpenServer User's Manual

0 =

PROSPER and the OpenServer

226

PROSPER.SIN.IPR.SINGLE.CONECHAPERON

Chaperon steady state critical


rate

PROSPER.SIN.IPR.SINGLE.CONEDICKEN

Dikken steady state critical rate

PROSPER.SIN.IPR.SINGLE.CONEDISTANCE

Well distance from bottom

PROSPER.SIN.IPR.SINGLE.CONETIME

Time to breakthrough

PROSPER.SIN.IPR.SINGLE.CONEBREAK

Rate used for breakthrough


calculation

6.4.1.2.9 Multi-layer with dP Friction Loss Table

i = 0:19
PROSPER.SIN.IPR.SINGLE.MLAYDP[i].TYPE

Type of layer: 0 =
disabled, 1 = blank, 2 =
perforated, 3 = open

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].MODEL

IPR model: 0 = Darcy,


1 = Multi-rate, 2 = PI

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].ISKIN

Skin model: 0 = by
hand, 1 = Karakas &
Tariq

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].IGPACK

Gravel pack: 0 = off, 1 =


on

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].MD

Measured depth to layer


end

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].TVD

Vertical depth to layer


end

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PRESSURE

Layer pressure

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].FLOWRAD

Flowing radius

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].ROUGH

Tubing roughness

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].GOR

Total GOR

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].API

Oil gravity

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].GASG

Gas gravity

1990-2011 Petroleum Experts Limited

227

OpenServer

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].WC

Water cut

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PIENTRY

Productivity index

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PERM

Reservoir permeability

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].DAREA

Drainage area

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].DIETZ

Dietz shape factor

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].WBR

Well-bore radius

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].SKIN

Skin entered by hand

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PERFDIA

Perforation diameter

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].SPF

Shots per foot

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PERFLEN

Perforation length

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].DZTHICK

Damaged
thickness

zone

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].DZPERM

Damaged
permeability

zone

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].CZTHICK

Crushed zone thickness

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].DZPERM

Damaged
permeability

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PHASE

Shot phasing

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].DEV

Deviation

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PEN

Penetration

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].VERTPERM

Vertical permeability

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].GPPERM

Gravel
permeability

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].GPLEN

Gravel pack length

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PERFINT

Perforation interval

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].PERFEFF

Perforation efficiency

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].WATSAT

Residual
saturation

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].OILSAT

Residual oil saturation

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].WATRLK

Water end-point relative


permeability

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].OILRLK

Oil end-point
permeability

OpenServer User's Manual

zone

pack

water

relative

PROSPER and the OpenServer

228

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].WATEXP

Corey
water

exponent

for

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].OILEXP

Corey exponent for oil

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].TSTWC

Water cut during test

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].ESTSW

Estimated
saturation

water

j = 0:9
PROSPER.SIN.IPR.SINGLE.MLAYDP[i].MRATE[j].
PRESSURE

Test pressure

PROSPER.SIN.IPR.SINGLE.MLAYDP[i].MRATE[j].RATE

Test rate

6.4.1.2.10 Skin Aide Model Parameters


There are nine groups of these. Firstly there are the calculation choice flags
manipulated by the drop-down list boxes on the main screen. The other eight groups
comprise the data sets for the eight different screens that can be brought up. Note that
if in the System Summary screen the cased completion and gravel pack options are
enabled then seven buttons are present on the main Skin Aide screen. The eighth
screen comes from switching the perforation model list box (PERFMOD variable)
between 0 (in situ geometry) and 1 or 2 (API perforation models).

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
FLOWMOD

Flow model. 0 = steady-state, 1 =


semi-steady state

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
SKINMOD

Skin model. 0 = linear flow, 1 =


hemispherical flow, 2 = min. dP flow

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFMOD

Perforation model. 0 = in situ


geometry, 1 = API edition 4, 2 = API
edition 5

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY1

Reservoir Thickness

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY2

Completed Interval

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY3

Distance To Top Completion

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY4

Drainage Area

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY5

Dietz Shape Factor


1990-2011 Petroleum Experts Limited

229

OpenServer

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY6

Well-bore Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GEOMETRY7

Deviation

PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO1
Horizontal Permeability
PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO2
Vertical Permeability
PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO3 Horizontal
Permeability
Geometrical Skin

for

PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO4
Porosity
PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO5
Turbulence Coefficient
PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO6
Permeability Exponent
PROSPER.SIN.IPR.SINGLE.SKINAIDE.PETRO7
Porosity Exponent
PROSPER.SIN.IPR.SINGLE.SKINAIDE.
DAMAGE1

Damaged Zone Thickness

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
DAMAGE2

Permeability

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
DAMAGE3

Porosity

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
CASING1

External Casing Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
CASING2

Casing Weight

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
CRUSHED1

Crushed Zone Thickness

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
CRUSHED2

Crushed Zone Permeability

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
CRUSHED3

Crushed Zone Porosity

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
CRUSHED4

Crushed
&
Permeability

PROSPER.SIN.IPR.SINGLE.SKINAIDE.

OpenServer User's Manual

Damaged

Zone

Crushed & Damaged Zone Porosity

PROSPER and the OpenServer

230

CRUSHED5
PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU1

Perforation Efficiency

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU2

Shot Density

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU3

Gun Phasing

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU4

Angle Between Well Vertical Plane


And Perforations

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU5

Tunnel Length

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU6

Tunnel Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU7

Cavity Entrance Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFINSITU8

Cavity Tip Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI1

Perforation Efficiency

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI2

Shot Density

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI3

Gun Phasing

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI4

Angle Between Well Vertical Plane


And Perforations

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI5

TTP : API RP43/2 Penetration Of


Perforations

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI6

EH : API RP43/1 Diameter Of


Perforations

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI7

Gun Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI8

Reservoir Uni-axial Compressive


Strength

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI9

Rock Density

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI10

Casing Elastic Limit

1990-2011 Petroleum Experts Limited

231

OpenServer

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
PERFAPI11

Reservoir Stress

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GPACK1

Screen Outside Diameter

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GPACK2

Annulus Gravel Permeability

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GPACK3

Annulus Gravel Porosity

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GPACK4

Tunnel Gravel Permeability

PROSPER.SIN.IPR.SINGLE.SKINAIDE.
GPACK5

Tunnel Gravel Porosity

6.4.1.2.11 Two-term Model Parameters


From the Forcheimer and C & n reservoir models.
PROSPER.SIN.IPR.SINGLE.NDARCY

Non-Darcy coefficient

PROSPER.SIN.IPR.SINGLE.DARCY

Darcy coefficient

PROSPER.SIN.IPR.SINGLE.CVAL

C value from 'C&n'

PROSPER.SIN.IPR.SINGLE.NVAL

Exponent (n) from 'C&n'

6.4.1.2.12 Fracture Model

PROSPER.SIN.IPR.SINGLE.THETAWF

Injected fluid temperature at bottom hole

PROSPER.SIN.IPR.SINGLE.QINJMEAN

Mean Historical Injection Rate

PROSPER.SIN.IPR.SINGLE.SIGMARES

Initial Reservoir Stress

PROSPER.SIN.IPR.SINGLE.SWEEP

Sweep Efficiency

PROSPER.SIN.IPR.SINGLE.CF

Injected Fluid Specific Heat Capacity

PROSPER.SIN.IPR.SINGLE.
XLAMDARES

Overall Reservoir Conductivity

PROSPER.SIN.IPR.SINGLE.CRES

Overall Reservoir Specific Heat Capacity

PROSPER.SIN.IPR.SINGLE.RHORES

Overall Reservoir Density

PROSPER.SIN.IPR.SINGLE.XLAMDASR Top and Bottom Surroundings Conductivity

OpenServer User's Manual

PROSPER and the OpenServer

232

PROSPER.SIN.IPR.SINGLE.CSR

Top and Bottom Surroundings Specific


Heat Capacity

PROSPER.SIN.IPR.SINGLE.RHOSR

Top and Bottom Surroundings Density

PROSPER.SIN.IPR.SINGLE.ALPHATIF

Reservoir Thermal Expansion

PROSPER.SIN.IPR.SINGLE.BETATIF

Biot's Constant

PROSPER.SIN.IPR.SINGLE.POISSON

Poisson's Ratio

PROSPER.SIN.IPR.SINGLE.YOUNGMOD Reservoir Young's Modulus


6.4.1.2.13 SPOT
Options
PROSPER.SIN. Lp correlation type:
0 - Conventional
IPR.Single.
1 - Synthetic
SPOTMain.
CORRELATIO
NTYPE
PROSPER.SIN. Calculate non-Darcy:
0 - No
IPR.Single.
1 - Yes
SPOTMain.
EXTFLOW
PROSPER.SIN. Activity:
0 - New well
IPR.Single.
1 - Workover / re-perf
SPOTMain.
ACTIVITY
PROSPER.SIN. Inflow equation:
0 - Fetkovich
IPR.Single.
1 - Vogel
SPOTMain.
IPRMODEL
PROSPER.SIN. Log data input:
0 - Non available
IPR.Single.
1 - Porosity, permeability, UCS & TWC
SPOTMain.
LOGDATAINP 2 - Porosity, permeability & UCS
3 - Porosity, permeability & TWC
UT
4 - Porosity & UCS
5 - Porosity & TWC
6 - Porosity, permeability, FDC & compressional sonic
7 - Porosity, permeability, FDC & shear sonic
8 - Porosity, FDC & compressional sonic
9 - Porosity, FDC & shear sonic
10 - Porosity
11 - Porosity & permeability
12 - Permeability, UCS & FDC
13 - Permeability, TWC & FDC

1990-2011 Petroleum Experts Limited

233

OpenServer

14 - Permeability, FDC & compressional sonic


15 - Permeability, FDC & shear sonic
16 - UCS & FDC
17 - TWC & FDC
18 - FDC & compressional sonic
19 - FDC & shear sonic
PROSPER.SIN. Perforating method:
0 - Single run
IPR.Single.
1 - Double run
SPOTMain.
PERFOPTION
S
PROSPER.SIN. Invasion method:
0 - Calculate invasion
IPR.Single.
1 - Enter mud invasion
SPOTMain.
PERFOPTION 2 - Enter discrete invasion depth
3 - No invasion
S
PROSPER.SIN. Sanding model:
0 - None
IPR.Single.
1 - QientiQ model
SPOTMain.
SANDINGMO
DEL
PROSPER.SIN. Crushed zone model:
0 - Entered
IPR.Single.
1 - QientiQ test results
SPOTMain.
CRUSHSKIN
MODEL
Crushed Zone
Inputs
PROSPER.SIN. Permeability factor
IPR.Single.
SPOTMain.
CRUSHZONE
PERMFACTO
R
PROSPER.SIN. Thickness
IPR.Single.
SPOTMain.
CRUSHZONE
THICKNESS
PROSPER.SIN. Lower completion type:
0 - Cased and perforated
IPR.Single.
SPOTMain.
LOWERCOMP
OpenServer User's Manual

PROSPER and the OpenServer

234

TYPE
PROSPER.SIN. User downhole stand-off:
0 - No
IPR.Single.
1 - Yes
SPOTMain.
USESTANDO
FF
PROSPER.SIN. Enter gun per layer:
0 - No
IPR.Single.
1- Yes
SPOTMain.
GUNPERLAY
ER
PROSPER.SIN. Use SPOT IPR extensions:
0 - No
IPR.Single.
1 - Yes
SPOTMain.
USESPOTIPR
EXTENSIONS
Layers
PROSPER.SIN. Well radius
IPR.Single.
WBR
PROSPER.SIN. Drainage radius
IPR.Single.
SPOTMain.
DRAINRADIU
S
PROSPER.SIN. Mean sea-level wrt to origin
EQP.Env.Msl
PROSPER.SIN. Seabed depth wrt to origin
EQP.Env.
Seabed
PROSPER.SIN. Top MD
IPR.Single.
SPOTMain.
LAYERS[0].
TOP
PROSPER.SIN. Bottom MD
IPR.Single.
SPOTMain.
LAYERS[0].
BOTTOM
PROSPER.SIN. Layer pressure
IPR.Single.
SPOTMain.
1990-2011 Petroleum Experts Limited

235

OpenServer

LAYERS[0].
LAYERPRES
S
PROSPER.SIN. Under balance pressure
IPR.Single.
SPOTMain.
LAYERS[0].
UNDERBALA
NCE
PROSPER.SIN. Overburden pressure gradient
IPR.Single.
SPOTMain.
LAYERS[0].
OVERBURDE
N
Gun Details
PROSPER.SIN. Shot density
IPR.Single.
SPOTMain.
LAYERS[0].
GUN.
SHOTDENSIT
YACTUAL
PROSPER.SIN. Gun phasing
IPR.Single.
SPOTMain.
LAYERS[0].
GUN.
GUNPHASIN
GACTUAL
To be added Perforating efficiency
PROSPER.
Water saturation
SIN.IPR.
Single.
SPOTMain.
LAYERS[0].
WATERSATU
RATION
Relative
Permeability
PROSPER.SIN. Oil residual saturation
IPR.Single.
OpenServer User's Manual

PROSPER and the OpenServer

236

SPOTMain.
LAYERS[0].
SRO
PROSPER.SIN. Oil end-point relative permeability
IPR.Single.
SPOTMain.
LAYERS[0].
OILENDPOIN
T
PROSPER.SIN. Oil Corey exponent
IPR.Single.
SPOTMain.
LAYERS[0].
OILEXP
PROSPER.SIN. Gas residual saturation
IPR.Single.
SPOTMain.
LAYERS[0].
SRG
PROSPER.SIN. Gas end-point relative permeability
IPR.Single.
SPOTMain.
LAYERS[0].
GASENDPOIN
T
PROSPER.SIN. Gas Corey exponent
IPR.Single.
SPOTMain.
LAYERS[0].
GASEXP
PROSPER.SIN. Water residual saturation
IPR.Single.
SPOTMain.
LAYERS[0].
SWC
PROSPER.SIN. Water end-point relative permeability
IPR.Single.
SPOTMain.
LAYERS[0].
WATENDPOI
NT
PROSPER.SIN. Water Corey exponent
IPR.Single.
SPOTMain.
1990-2011 Petroleum Experts Limited

237

OpenServer

LAYERS[0].
WATEXP
Log Data
PROSPER.SIN. i = 0 to 49
Measured depth
IPR.Single.
SPOTMain.
LOGDATA[0].
AHD
PROSPER.SIN. i = 0 to 49
Porosity
IPR.Single.
SPOTMain.
LOGDATA[0].
POROSITY
PROSPER.SIN. i = 0 to 49
Permeability
IPR.Single.
SPOTMain.
LOGDATA[0].
PERMEABILIT
Y
PROSPER.SIN. i = 0 to 49
UCS
IPR.Single.
SPOTMain.
LOGDATA[0].
UCS
PROSPER.SIN. i = 0 to 49
TWC
IPR.Single.
SPOTMain.
LOGDATA[0].
TWC
Completion
PROSPER.SIN. Type:
0 - Casing
IPR.Single.
1 - Tubing
SPOTMain.
COMPLETION
[0].TYPE
PROSPER.SIN. i = 0 to 49
Outer diameter
IPR.Single.
SPOTMain.
COMPLETION
[0].OD
PROSPER.SIN. i = 0 to 49
Weight
IPR.Single.

OpenServer User's Manual

PROSPER and the OpenServer

238

SPOTMain.
COMPLETION
[0].WEIGHT
PROSPER.SIN. i = 0 to 49
Top MD
IPR.Single.
SPOTMain.
COMPLETION
[0].TOP
PROSPER.SIN. i = 0 to 49
Bottom MD
IPR.Single.
SPOTMain.
COMPLETION
[0].BOTTOM
6.4.1.2.14 Mechanical Skin Parameters
Mechanical / Geometric Skin
PROSPER.SIN.IPR.Single.MGSkinMethod

Locke Mechanical Geometric Skin


PROSPER.SIN.IPR.Single.Spf
PROSPER.SIN.IPR.Single.PerfDia
PROSPER.SIN.IPR.Single.PerfLen
PROSPER.SIN.IPR.Single.PerfEff
PROSPER.SIN.IPR.Single.DZThickness
PROSPER.SIN.IPR.Single.DZPerm
PROSPER.SIN.IPR.Single.Phasing

0 - Enter skin by hand


1 - Locke
2 - MacLeod
3 - Karakus & Tariq
Shot density
Perforation diameter
Perforation length
Perforation efficiency
Damage zone thickness
Damage zone permeability
Shot phasing

MacLeod
PROSPER.SIN.IPR.Single.CompMethod

Input data as above, including:


0 - Underbalanced
1 - Overbalanced

Karakus & Tariq


PROSPER.SIN.IPR.Single.CZThickness
PROSPER.SIN.IPR.Single.CZPerm

As per Locke input data, including:


Crushed zone thickness
Crushed zone permeability

Calculate Using SPOT


PROSPER.SIN.IPR.Single.SPOTMain.
CORRELATIONTYPE
PROSPER.SIN.IPR.Single.SKinAide.CASING1
PROSPER.SIN.IPR.Single.SKinAide.CASING2
PROSPER.SIN.IPR.Single.SPOTMain.

0 - Conventional
1 - Synthetic
Casing O.D.
Casing weight
Casing grade:

1990-2011 Petroleum Experts Limited

239

OpenServer

CASINGGRADE

0 - J55
1 - L80
2 - P105
3 - P110
PROSPER.SIN.IPR.Single.SKinAide.PERFAPI8 Reservoir uniaxial compressive
strength
PROSPER.SIN.EQP.Env.Msl
Mean sea level wrt to origin
PROSPER.SIN.EQP.Env.Seabed
Seabed depth wrt to origin
PROSPER.SIN.IPR.Single.SPOTMain.
Depth
PERFDEPTH
PROSPER.SIN.IPR.Single.SPOTMain.
Overburden pressure gradient
OVERBURDENPRESS
PROSPER.SIN.IPR.Single.SPOTMain.
Rock type:
0 - Sandstone
ROCKTYPE
1 - Carbonate
PROSPER.SIN.IPR.Single.SPOTMain.
User downhole standoff:
0 - No
USESTANDOFF
1 - Yes

6.4.1.2.15 Deviation Skin-Specific Parameters


Note that the first four parameters on the Wong-Clifford screen come from the common
or Darcy reservoir model sections (THICKNESS, WBR, DRAINAGE and DIETZ).
Deviation and Partial Penetration Skin
Cinco / Martin-Bronz
PROSPER.SIN.IPR.Single.Deviation
PROSPER.SIN.IPR.Single.Penetration
PROSPER.SIN.IPR.Single.VertPerm

Deviation
Penetration
Vertical permeability

Cinco(2) / Martin-Bronz

As above

Wong-Clifford
PROSPER.SIN.IPR.Single.WONGTP
PROSPER.SIN.IPR.Single.WONGLP
PROSPER.SIN.IPR.Single.WONGXW

Formation vertical permeability ratio


Local vertical permeability ratio
Horizontal distance from well to
reservoir edge
PROSPER.SIN.IPR.Single.WONGTD
Vertical depth to top of reservoir
PROSPER.SIN.IPR.Single.PerfInts[0].MDSTART Perforation interval (MD) start
PROSPER.SIN.IPR.Single.PerfInts[0].MDEND
Perforation interval (MD) end
PROSPER.SIN.IPR.Single.PerfInts[0].TVDSTART Perforation interval (TVD) start
OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.SIN.IPR.Single.PerfInts[0].TVDEND

240

Perforation interval (TVD) end

6.4.1.2.16 Gravel Pack-Specific Parameters


Gravel Pack
PROSPER.SIN.IPR.SINGLE.GPPERM

Gravel pack permeability

PROSPER.SIN.IPR.SINGLE.GPLEN

Gravel pack length

Pre-Packed Screen
PROSPER.SIN.IPR.Single.SCIRAD

Screen inner radius

PROSPER.SIN.IPR.Single.SCORAD

Screen outer radius

PROSPER.SIN.IPR.Single.SCPERM

Screen permeability

PROSPER.SIN.IPR.Single.SCBETA

Screen Beta (turbulence)

PROSPER.SIN.IPR.Single.OTPERM

Outside permeability

PROSPER.SIN.IPR.Single.OTBETA

Outside (turbulence)

Wire Wrapped Screen


PROSPER.SIN.IPR.Single.SCORAD

Screen outer radius

PROSPER.SIN.IPR.Single.SCPERM

Screen permeability

PROSPER.SIN.IPR.Single.OTBETA

Outside (turbulence)

Slotted Liner
PROSPER.SIN.IPR.Single.SLOTIR

Liner inner radius

PROSPER.SIN.IPR.Single.SLOTOR

Liner outer radius

PROSPER.SIN.IPR.Single.SLOTHT

Slot height

PROSPER.SIN.IPR.Single.SLOTDN

Slot density

PROSPER.SIN.IPR.Single.SCORAD

Screen outer radius

PROSPER.SIN.IPR.Single.OTPERM

Screen outer permeability

PROSPER.SIN.IPR.Single.OTBETA

Outside (turbulence)

1990-2011 Petroleum Experts Limited

241

OpenServer

6.4.1.2.17 Relative Permeability Screen


Test data are accessed from relative permeability plot window menu (Test Data).
PROSPER.SIN.IPR.SINGLE.OILSAT

Residual oil saturation

PROSPER.SIN.IPR.SINGLE.WATRLK

Water
end-point
permeability

PROSPER.SIN.IPR.SINGLE.OILRLK

Oil end-point relative permeability

PROSPER.SIN.IPR.SINGLE.WATEXP

Corey exponent for water

PROSPER.SIN.IPR.SINGLE.OILEXP

Corey exponent for oil

PROSPER.SIN.IPR.SINGLE.TSTWC

Water cut during test

PROSPER.SIN.IPR.SINGLE.ESTSW

Estimated water saturation

relative

i = 0:9
PROSPER.SIN.IPR.SINGLE.RELPTEST[i].
TESTSW

Test water saturation

PROSPER.SIN.IPR.SINGLE.RELPTEST[i].
TESTKO

Test relative permeability of oil

PROSPER.SIN.IPR.SINGLE.RELPTEST[i].
TESTKW

Test relative permeability of water

6.4.1.2.18 Gas Coning Parameters for Oil

PROSPER.SIN.IPR.SINGLE.CONEF2

Gas Coning F2 (match parameter)

PROSPER.SIN.IPR.SINGLE.CONEF3

Gas Coning F3 (match parameter)

PROSPER.SIN.IPR.SINGLE.CONEXP

Gas
Coning
parameter)

PROSPER.SIN.IPR.SINGLE.CONEHT

Height between first and last perf.

PROSPER.SIN.IPR.SINGLE.CONEGOC

Gas Coning Distance to GOC (gas-oil


contact)

i = 0:9
PROSPER.SIN.IPR.SINGLE.CONEMATCH
OpenServer User's Manual

Cone test rate

Exponent

(match

PROSPER and the OpenServer

242

[i].RATE
PROSPER.SIN.IPR.SINGLE.CONEMATCH
[i].GOR

Cone test GOR

6.4.1.3 Multi-lateral Well Data


There are three main data structures :
1. Associated state data and physical data for each multi-lateral network. These data
have root PROSPER.SIN.IPR.MULTILAT.NETWORK. Note that a network item
can be a node i.e., a tie-point, junction, completion, reservoir or a link between
nodes. In the latter case a network item does not carry physical data unless it is
blank tubing, in which case a box for mouse-clicking and data entry is drawn in the
middle of the link. In all cases a network item carries state data e.g. validity. Two
methods of accessing the network item data are available; they can be enumerated
up to the number of network items (available as a data item), which implies access
via an index, or accessed via their label. In this section all the data items will be
listed as if accessed via their indices. Sample code for both methods is outlined in
the next section.
2. The calculation details available by choosing Analyse | Calculate | Details from the
multi-lateral main screen. In place of NETWORK these are referenced from roots,
namely: BRANCH, LAYER and SEGMENT. For BRANCH and LAYER there are a
variable number of nodes from model to model but the correspondence between the
table rows and data server arrays is one to one. In the case of the SEGMENT data
the outer loop corresponds to the branches listed in the drop-down list box, and the
inner loop to the rows in the table.
3. The visualization window data, represented by the root VIEW. These data are
generated from the network items so it is recommended that they are only read and
not altered by the data server. These data are enumerated according to type in an
outer loop (0 = reservoir, 1 = tubing segment, 2 = perforation, 3 = junction, 4 = tiepoint) and by number of each type in an inner loop. Note that the latter number is not
fixed and the correspondence between a visualization object and a network item is
many to one. For instance, a completion item can contain many tubing segments
and perforations.

6.4.1.3.1 Network items


Note that the index i below is used to index NETWORK for the rest of this sub-section
variable listings. The LABEL , TYPE and HASDATA variables can be used for
accessing data items or controlling the way the accessing is done e.g. trying to extract
any physical data from a link results in a data server error.

1990-2011 Petroleum Experts Limited

243

OpenServer

NETCOUNT = PROSPER.SIN.IPR.MULTILAT.
NETWORK.COUNT

No. of network items including


nodes and links

i = 0:NETCOUNT-1
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
LABEL
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
TYPE

Item label, blank for links


Type of item. 0 = tiepoint, 1 =
junction, 2 = completion, 3 =
reservoir, 4 = link (data carrying
link = tubing)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
NODE

Node (1) or link (0) flag

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
MASK

Item masked (1) or not (0) flag

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
SELECTED

Item selected (1) or not (0) flag

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
HASDATA

Item has data (1) or not (0) flag

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].ID

Unique ID for item (natural number)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
VALID

Item valid (1) or not (0) flag

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
POSX

x position (left-right +ve, logical


coordinates)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
POSY

y position (top-bottom +ve, logical


coordinates)

If (TYPE = 0) or (TYPE = 1) then the item is a tie-point or junction. The following physical
data items can be extracted.
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].MD

Measured depth

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].TVD

Vertical depth

If (TYPE = 2) or (TYPE = 4 and HASDATA = 1) then the item has tubing physical data i.
e. model selection, deviation survey and equipment information. The following physical
data items can be extracted.

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].HFLOW

OpenServer User's Manual

Horizontal flow correlation,


zero-based list

PROSPER and the OpenServer

244

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].VFLOW

Vertical flow correlation,


zero-based list

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].CHOKE

Choke model, 0 = ELF

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
THRESHOLD

Threshold angle on (1)/off


(0)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].FLOWTYPE Flow type - tubing (0)/


annular (1)
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].ANGLE

Threshold angle for branch

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].WBR

Well-bore radius for branch

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].DIETZ

Dietz shape factor for


branch, only valid for
completion items, not blank
tubing

DEVCOUNT = PROSPER.SIN.IPR.MULTILAT.
NETWORK[i]. DEV.COUNT

No. of deviation survey


records

j = 0:DEVCOUNT-1
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].DEV[j].MD
Measured depth
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].DEV[j].TVD
Vertical depth
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].DEV[j].
AZIMUTH

Azimuth

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].DEV[j].DISP
Cumulative displacement
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].DEV[j].
ANGLE

Deviation angle

EQCOUNT = PROSPER.SIN.IPR.MULTILAT.NETWORK
[i].EQUIP.COUNT

No. of equipment records

j = 0:EQCOUNT-1
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBTYPE

Tubing type. 1 = tubing, 2 =


choke, 3 = casing

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBDEPTH

Measured depth

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBID

Tubing inside diameter

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].

Tubing inside roughness


1990-2011 Petroleum Experts Limited

245

OpenServer

TUBROUGH
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBTOD

Tubing outside diameter

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBTOR

Tubing outside roughness

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBCID

Casing inside diameter

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBCIR

Casing inside roughness

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].EQUIP[j].
TUBMULT

Flow multiplier

If (TYPE = 2) then the item is a completion node and has perforation physical data. The
following physical data items can be extracted.
PERFCOUNT = PROSPER.SIN.IPR.MULTILAT.NETWORK
[i].PERFS.COUNT

No.
of
intervals

perforation

j = 0 : PERFCOUNT - 1
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
MDSTART

Measured depth start

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
MDEND

Measured depth end

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
TVDSTART

Vertical depth start

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
TVDEND

Vertical depth end

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].SKIN
Skin
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
NDARCY

Non-Darcy factor

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
GPSKIN

Gravel pack non-rate


dependent skin

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
GPNDARCY

Gravel pack non-Darcy


factor

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
SKINFLAG

Skin entered
calculated (1)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
NDARCYFLAG

Non-Darcy
entered

OpenServer User's Manual

(0)

(0)

or

factor
or

PROSPER and the OpenServer

246

calculated (0)
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
GPACKFLAG

Gravel
pack
skin
disabled (0), entered
(1), cased (2) or open
hole (3)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
ENABLE

Record enabled
disabled (0)

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
RESPERM

Reservoir permeability

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
PERFDIA

Perforation diameter

(1)/

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].SPF
Shot density
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
PERFLEN

Perforation length

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
PHASING

Shot phasing

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
DZTHICKNESS

Damaged
thickness

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
CZTHICKNESS

Crushed zone thickness

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
DZPERM

Damaged zone perm.

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
CZPERM

Crushed zone perm.

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
VERTPERM

Vertical permeability

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
GPPERM

Gravel
permeability

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
GPLEN

Gravel pack length

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PERFS[j].
PERFEFF

Perforation efficiency

zone

pack

If (TYPE = 3) then the item is a reservoir node and the following physical data can be
extracted.

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].FLUID

Fluid - 0 = oil, 1 = gas, 2 =


1990-2011 Petroleum Experts Limited

247

OpenServer

condensate
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].METHOD IPR model, 0 = Darcy/Petex, 1
= Hydraulic fracture
PROSPER.SIN.IPR.MULTILAT.NETWORK[i]..MODEL
Method name
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].PRES
Pressure
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].TRES
Temperature
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].API

Oil gravity

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].GRVGAS
Gas gravity
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
WATERSAL

Water salinity

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].WC

Water cut

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].GOR

Total GOR

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].WGR
WGR
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].CGR

CGR

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].GORSEP
Separator GOR
PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
RESTOPDEPTH

Top depth

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
RESVERTPERM

Vertical permeability

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
RESPERM

Horizontal permeability

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
THICKNESS

Formation height

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
DRAINAGE

Drainage area

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].TIME

Time elapsed

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
POROSITY

Total porosity

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
FRACHEIGHT

Fracture height

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
FRACLENGTH

Fracture half length

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].
FRACFCD

Fracture
conductivity

PROSPER.SIN.IPR.MULTILAT.NETWORK[i].SWC

Connate water saturation

248

dimensionless

6.4.1.3.2 Branch, Layer and Segment Details


NBRANCHES
=
BRANCH.COUNT

PROSPER.SIN.IPR.MULTILAT. No. of branches

i = 0:NBRANCHES-1
PROSPER.SIN.IPR.MULTILAT.BRANCH[i].RATE

Rate in branch

PROSPER.SIN.IPR.MULTILAT.BRANCH[i].
PRESSURE

Pwf at branch top

NLAYERS
COUNT

PROSPER.SIN.IPR.MULTILAT.LAYER.
No. of layers

i = 0:NLAYERS-1

Composite PI for layer


(including interference from
all branches)

PROSPER.SIN.IPR.MULTILAT.LAYER[i].PI

Composite skin for layer

PROSPER.SIN.IPR.MULTILAT.LAYER[i].SKIN

Layer i top

PROSPER.SIN.IPR.MULTILAT.LAYER[i].TOP

Layer i bottom

PROSPER.SIN.IPR.MULTILAT.LAYER[i].BOTTOM

No. of layers

NBRANCHES = PROSPER.SIN.IPR.MULTILAT.
SEGMENT.COUNT

No. of branches

i = 0:NBRANCHES-1
NSEGMENTS = PROSPER.SIN.IPR.MULTILAT.
SEGMENT[i].COUNT

No. of segments in branch i

j = 0:NSEGMENTS-1
PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].MDT

Segment measured depth


top

PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].MDB

Segment measured depth


bottom
1990-2011 Petroleum Experts Limited

249

OpenServer

PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].TVD
Segment vertical depth
PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].
RATEPERSEG

Segment rate

PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].
RATEPERLENGTH

Segment rate per unit length

PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].
PRESSURE

Segment pwf

PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].
CUMRATE

Segment cumulative rate

PROSPER.SIN.IPR.MULTILAT.SEGMENT[i][j].PRES

Segment reservoir pressure


(varies with finite conductivity

6.4.1.3.3 Calculation Control Data


Finally, there are some miscellaneous parameters normally accessed through the
calculation screen (Analyse|Calculate).
PROSPER.SIN.IPR.MULTILAT.CURVECALC

Curve calculation flag. 0 = 1 point, 1 =


curve

PROSPER.SIN.IPR.MULTILAT.
PRESSURECALC

Pressure/rate calculation switch. 0: p =


f(q), 1: q = f(p)

PROSPER.SIN.IPR.MULTILAT.COND

0 = infinite conductivity, 1 = finite


conductivity

PROSPER.SIN.IPR.MULTILAT.RATE

Single point rate input (for p = f(q))

PROSPER.SIN.IPR.MULTILAT.PRESSURE

Single point pressure input (for q = f(p))

PROSPER.SIN.IPR.MULTILAT.MINPRESSURE
Minimum pressure for curve calculation

PROSPER.SIN.IPR.MULTILAT.CALCPTS

No. of calculation points

6.4.1.3.4 Visualisation Data


These parameters are explicitly or implicitly involved in the functionality of the model
selection.

NTYPES
COUNT

i = 0:NTYPES-1

OpenServer User's Manual

PROSPER.SIN.IPR.MULTILAT.VIEW. No. of view object types


i = object type. 0 = reservoir, 1

PROSPER and the OpenServer

250

= tubing, 2 = completion, 3 =
junction, 4 = tie-point
NOBJECTS = PROSPER.SIN.IPR.MULTILAT.VIEW[i].
No. of objects of given type
COUNT
j = 0:NOBJECTS-1
PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].FIRST

1 signifies first view object in a


branch

PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].LAST

1 signifies last view object in a


branch

PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].ID

ID of corresponding net item.


For tubing many view objects
can be mapped to one network
item

PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].STARTPT.X Start x point in physical


coordinates
PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].STARTPT.Y
Start y point
PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].STARTPT.Z
Start z point
PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].ENDPT.X
End x point
PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].ENDPT.Y

End y point

PROSPER.SIN.IPR.MULTILAT.VIEW[i][j].ENDPT.Z

End z point

6.4.1.3.5 Multilateral Results


To access the results of the multilateral calculations, the following codes can be used.
PROSPER.SIN.IPR.Single.RTLIST[i]

Total Liquid Rate

PROSPER.SIN.IPR.Single.MRPRES[i]

Pressure

PROSPER.SIN.IPR.Single.MRPIND[i]

Total PI

PROSPER.SIN.IPR.Single.MRROIL[i]

Total Oil Rate

PROSPER.SIN.IPR.Single.MRRWAT[i]

Total Water Rate

PROSPER.SIN.IPR.Single.MRRGAS[i]

Total Gas Rate

PROSPER.SIN.IPR.SINGLE.MRQLAY[i][j]

Production rate at ith pressure


value and jth layer. (see
example below)

1990-2011 Petroleum Experts Limited

251

OpenServer

PROSPER.SIN.IPR.Single.MRTIME[i]

Time

PROSPER.SIN.IPR.Single.MRITER[i]

Number of Iterations

for e.g. if there are 20 points for which the IPR is calculated and there are 3 layers in the
model then the following code can be set up to extract the results for the production of
each layer.
For i = 0 To 19
For j = 0 To 2
Cells(2 + i, 4 + j) = DoGet ("PROSPER.SIN.IPR.SINGLE.MRQLAY[" + CStr(i) +
"][" + CStr(j) + "]")
Next j
Next i

6.4.2 Equipment Data


This is the data associated with the equipment data entry screens in PROSPER.

6.4.2.1 Overview
The Equipment data is accessed using the root name PROSPER.SIN>EQP and is split
up into several sections as listed below.
DEVN

Deviation Survey

TEMP

Flowing Temperature Survey

GEO

Geothermal Gradient

SURF

Surface Equipment

TURF

Surface Equipment (Enthalpy Balance)

DOWN

Downhole Equipment

TOWN

Downhole Equipment (Enthalpy Balance)

SHC

Specific Heat Capacities

ENV

Surface Environment Data

OpenServer User's Manual

PROSPER and the OpenServer

DRILL

Drilling Data

LITHO

Lithology

DB

Equipment / Rock Type databases

252

6.4.2.2 DEVN Deviation Survey Equipment


PROSPER.SIN.EQP.Devn.Data[0].Md

Measured depth (i = 0 to 19)

PROSPER.SIN.EQP.Devn.Data[0].Tvd

True vertical depth (i = 0 to 19)

Deviation Survey Filter Options


PROSPER.SIN.EQP.Devn.RawMSD[0]

Measured depth (i = 0 to 999)

PROSPER.SIN.EQP.Devn.RawTVD[0]

True vertical depth (i = 0 to 999)

PROSPER.EQP.DEV.FIL.FILTER

DoCmd command function to filter the


entered deviation survey data to 20points

PROSPER.EQP.DEV.FIL.TRANS

DoCmd command function to pass the


20-filtered points to the deviation survey
data section

PROSPER.SIN.EQP.DEVN.MAX

Maximum Number of Points

PROSPER.SIN.EQP.DEVN.DATA.COUNT

Current Number of Points

PROSPER.SIN.EQP.Devn.FilterAngle

Filter angle

PROSPER.SIN.EQP.Devn.FilterActual

Angle step

PROSPER.SIN.EQP.Devn.FilterMax

Maximum number
maximum)

of

points

(20-

6.4.2.3 TEMP Flowing Temperature Survey


PROSPER.SIN.EQP.TEMP.MAX

Maximum Number of Points

PROSPER.SIN.EQP.TEMP.DATA.COUNT

Current Number of Points

i = 0 : PROSPER.SIN.EQP.TEMP.DATA.COUNT-1

1990-2011 Petroleum Experts Limited

253

OpenServer

PROSPER.SIN.EQP.TEMP.DATA[i].MD

Measured Depth

PROSPER.SIN.EQP.TEMP.DATA[i].TMP

Temperature

6.4.2.4 GEO Geothermal Gradient


PROSPER.SIN.EQP.GEO.MAX

Maximum Number of Points

PROSPER.SIN.EQP.GEO.DATA.COUNT

Current Number of Points

PROSPER.SIN.EQP.GEO.HTC

Overall Heat Transfer Coefficient

PROSPER.SIN.EQP.GEO.INJ

Injected Fluid Temperature

I = 0 : PROSPER.SIN.EQP.GEO.DATA.
COUNT-1
PROSPER.SIN.EQP.GEO.DATA[I].MD

Measured Depth

PROSPER.SIN.EQP.GEO.DATA[I].TMP

Temperature

PROSPER.SIN.EQP.GEO.DATA[I].HTC

Heat Transfer Coefficient

6.4.2.5 SURF Surface Equipment


PROSPER.SIN.EQP.SURF.HTC

Overall Heat Transfer Coefficient

PROSPER.SIN.EQP.SURF.TMP

Temperature of Surrounds

PROSPER.SIN.EQP.SURF.DATA.COUNT

Number of items

i = 0 : PROSPER.SIN.EQP.SURF.DATA.
COUNT-1
PROSPER.SIN.EQP.SURF.DATA[i].LABEL

Label

PROSPER.SIN.EQP.SURF.DATA[i].TYPE

Type (i = 0 to 3)
0 - None
1 - Pipe
2 - Choke
3 - Fittings

PROSPER.SIN.EQP.SURF.DATA[i].LENGTH

Pipe Length

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.SIN.EQP.SURF.DATA[i].TVD

Pipe True vertical Depth

PROSPER.SIN.EQP.SURF.DATA[i].TEMP

Fluid Temperature

PROSPER.SIN.EQP.SURF.DATA[i].ID

Pipe Inside Diameter

PROSPER.SIN.EQP.SURF.DATA[i].ROUGH

Pipe Inside Roughness

PROSPER.SIN.EQP.SURF.DATA[i].MULT

Pipe Rate Multiplier

PROSPER.SIN.EQP.SURF.DATA[i].HTC

Heat Transfer Coefficient

254

6.4.2.6 TURF Surface Equipment (Enthalpy Balance)


PROSPER.SIN.EQP.TURF.DATA.COUNT

Number of Items

i = 0 : PROSPER.SIN.EQP.TURF.DATA.COUNT-1
PROSPER.SIN.EQP.TURF.DATA[i].LABEL

Label

PROSPER.SIN.EQP.TURF.DATA[i].TYPE

Type

PROSPER.SIN.EQP.TURF.DATA[i].LENGTH

Pipe Length

PROSPER.SIN.EQP.TURF.DATA[i].TVD

Pipe True Vertical Depth

PROSPER.SIN.EQP.TURF.DATA[i].OD

Pipe Outside Diameter

PROSPER.SIN.EQP.TURF.DATA[i].ID

Pipe Inside Diameter

PROSPER.SIN.EQP.TURF.DATA[i].MULT

Pipe Rate Multiplier

PROSPER.SIN.EQP.TURF.DATA[i].DEPTH

Pipe Burial Depth

PROSPER.SIN.EQP.TURF.DATA[i].ROUGH

Pipe Inside Roughness

PROSPER.SIN.EQP.TURF.DATA[i].INSTHICK

Total Insulation Thickness

PROSPER.SIN.EQP.TURF.DATA[i].INSCOND

Total Insulation Conductivity

PROSPER.SIN.EQP.TURF.DATA[i].INSEMM

Total Insulation Emmissivity

PROSPER.SIN.EQP.TURF.DATA[i].PIPECON

Pipe Conductivity

PROSPER.SIN.EQP.TURF.DATA[i].PIPEEMM

Pipe

PROSPER.SIN.EQP.TURF.DATA[i].INSUL.COUNT

Number of Insulation Layers

j = 0 PROSPER.SIN.EQP.TURF.DATA[I].INSUL.
COUNT-1

1990-2011 Petroleum Experts Limited

255

OpenServer

PROSPER.SIN.EQP.TURF.DATA[i].INSUL[j].TYPE

Insulation Type

PROSPER.SIN.EQP.TURF.DATA[i].INSUL[j].THICK

Insulation Thickness

6.4.2.7 DOWN Down Hole Equipment


PROSPER.SIN.EQP.DOWN.DATA.COUNT

Number of Items

i = 0 : PROSPER.SIN.EQP.DOWN.DATA.COUNT-1
PROSPER.SIN.EQP.DOWN.DATA.LABEL

Label

PROSPER.SIN.EQP.DOWN.DATA.TYPE

Type

PROSPER.SIN.EQP.DOWN.DATA.DEPTH

Measured Depth

PROSPER.SIN.EQP.DOWN.DATA.TID

Tubing Inside Diameter

PROSPER.SIN.EQP.DOWN.DATA.TIR

Tubing Inside Roughness

PROSPER.SIN.EQP.DOWN.DATA.TOD

Tubing Outside Diameter

PROSPER.SIN.EQP.DOWN.DATA.TOR

Tubing Outside Roughness

PROSPER.SIN.EQP.DOWN.DATA.CID

Casing Inside Diameter

PROSPER.SIN.EQP.DOWN.DATA.CIR

Casing Inside Roughness

PROSPER.SIN.EQP.DOWN.DATA.COD

Casing Outside Diameter

PROSPER.SIN.EQP.DOWN.DATA.COR

Casing Outside Roughness

PROSPER.SIN.EQP.DOWN.DATA.CID2

Casing#2 Inside Diameter

PROSPER.SIN.EQP.DOWN.DATA.CIR2

Casing#2 Inside Roughness

PROSPER.SIN.EQP.DOWN.DATA.MULT

Rate Multiplier

If an OpenServer macro is used to build a model from scratch, it will be important to


make sure that ALL the input variables needed in the downhole equipment are
specified via the OpenServer macro.
Effectively, if for instance the roughness is left to the default value and not specified via
the OpenServer macro, the downhole equipment section will not be validated, causing
an error when trying to perform a calculation.

OpenServer User's Manual

PROSPER and the OpenServer

256

6.4.2.8 TOWN Down Hole Equipment (Enthalpy Balance)


Number of Items

PROSPER.SIN.EQP.TOWN.DATA.COUNT
i = 0 : PROSPER.SIN.EQP.TURF.DATA.COUNT-1
PROSPER.SIN.EQP.TOWN.DATA[i].LABEL

Label

PROSPER.SIN.EQP.TOWN.DATA[i].TYPE

Type

PROSPER.SIN.EQP.TOWN.DATA[i].DEPTH

Measured Depth

PROSPER.SIN.EQP.TOWN.DATA[i].TID

Tubing Inside Diameter

PROSPER.SIN.EQP.TOWN.DATA[i].TOD

Tubing Outside Diameter

PROSPER.SIN.EQP.TOWN.DATA[i].TIR

Tubing Inside Roughness

PROSPER.SIN.EQP.TOWN.DATA[i].MULT

Pipe Rate Multiplier

PROSPER.SIN.EQP.TOWN.DATA[i].INSTHICK

Total Insulation Thickness

PROSPER.SIN.EQP.TOWN.DATA[i].INSCOND

Total Insulation Conductivity

PROSPER.SIN.EQP.TOWN.DATA[i].INSEMM

Total Insulation Emmissivity

PROSPER.SIN.EQP.TOWN.DATA[i].PIPECON

Tubing Conductivity

PROSPER.SIN.EQP.TOWN.DATA[i].PIPEEMM

Tubing Emmissivity

PROSPER.SIN.EQP.TOWN.DATA[i].INSUL.COUNT

Number of Insulation Layers

j = 0 PROSPER.SIN.EQP.TOWN.DATA[I].INSUL.
COUNT-1
PROSPER.SIN.EQP.TOWN.DATA[i].INSUL[j].TYPE

Insulation Type

PROSPER.SIN.EQP.TOWN.DATA[i].INSUL[j].THICK

Insulation Thickness

6.4.2.9 SHC Fluid Properties Average Heat Capacities


PROSPER.SIN.EQP.SHC.CPO

Average Heat Capacity (Cp) Oil

PROSPER.SIN.EQP.SHC.CPG

Average Heat Capacity (Cp) Gas

PROSPER.SIN.EQP.SHC.CPW

Average Heat Capacity (Cp) Water

1990-2011 Petroleum Experts Limited

257

OpenServer

6.4.2.10ENV Surface Environment Data (Enthalpy Balance / Rough Approx.)


PROSPER.SIN.EQP.ENV.AIRTMP

Air Temperature

PROSPER.SIN.EQP.ENV.HUMID

Humidity

PROSPER.SIN.EQP.ENV.MSL

Mean Sea Level with respect to Origin

PROSPER.SIN.EQP.ENV.GROUND

Ground Level with respect to Origin

PROSPER.SIN.EQP.ENV.SEABED

Seabed Depth with respect to Origin

PROSPER.SIN.EQP.ENV.AIRVEL

Velocity of Air

PROSPER.SIN.EQP.ENV.SEAVEL

Velocity of Sea

PROSPER.SIN.EQP.ENV.SGNUM

Number of Points in Sea Temperature


Gradient

i = 0 : PROSPER.SIN.EQP.ENV.SGNUM1
PROSPER.SIN.EQP.ENV.SGTMP[i]

Temperature

PROSPER.SIN.EQP.ENV.SGDEP[i]

Depth

6.4.2.11DRILL Drilling Data (Enthalpy Balance)


PROSPER.SIN.EQP.DRILL.DATA.COUNT

Number of items

i = 0 : PROSPER.SIN.DRILL.DATA.COUNT-1
PROSPER.SIN.EQP.DRILL.DATA[i].LABEL

Label

PROSPER.SIN.EQP.DRILL.DATA[i].
DRILLDEPTH

Drilling Depth

PROSPER.SIN.EQP.DRILL.DATA[i].
DIAMETER

Hole Diameter

PROSPER.SIN.EQP.DRILL.DATA[i].
SHOEDEPTH

Casing Shoe Depth

PROSPER.SIN.EQP.DRILL.DATA[i].

Casing Outside Diameter

OpenServer User's Manual

PROSPER and the OpenServer

258

CASINGOD
PROSPER.SIN.EQP.DRILL.DATA[i].
CASINGWT

Casing Weight

PROSPER.SIN.EQP.DRILL.DATA[i].
CEMENTTOP

Top Cement Depth

PROSPER.SIN.EQP.DRILL.DATA[i].
CASINGTOP

Casing Top Depth

PROSPER.SIN.EQP.DRILL.DATA[i].
MUDDENSITY
PROSPER.SIN.EQP.DRILL.CFLIQ

Completion Fluid Liquid Type

PROSPER.SIN.EQP.DRILL.CFLIQDEN

Completion Fluid Liquid Density

PROSPER.SIN.EQP.DRILL.CFLTEMP

No. of Completion Fluid Liquid Tables

i = 0 : PROSPER.SIN.EQP.DRILL.CFLTEMP-1
PROSPER.SIN.EQP.DRILL.CFLPRES[i]

No of Pressures per table

j = 0 : PROSPER.SIN.EQP.DRILL.CFLPRES
[i]-1
PROSPER.SIN.EQP.DRILL.CFLTAB[i][j][0]

Temperature

PROSPER.SIN.EQP.DRILL.CFLTAB[i][j][1]

Pressure

PROSPER.SIN.EQP.DRILL.CFLTAB[i][j][2]

Density

PROSPER.SIN.EQP.DRILL.CFLTAB[i][j][3]

Viscosity

PROSPER.SIN.EQP.DRILL.CFLTAB[i][j][4]

Specific Heat Capacity

PROSPER.SIN.EQP.DRILL.CFLTAB[i][j][5]

Conductivity

PROSPER.SIN.EQP.DRILL.CFGAS

Completion Fluid Gas Type

PROSPER.SIN.EQP.DRILL.CFGTEMP

No. of Completion Fluid Gas Tables

i = 0 : PROSPER.SIN.EQP.DRILL.CFGTEMP1
PROSPER.SIN.EQP.DRILL.CFGPRES[i]

No of Pressures per table

j = 0 : PROSPER.SIN.EQP.DRILL.CFGPRES
[i]-1
PROSPER.SIN.EQP.DRILL.CFGTAB[i][j][0]

Temperature

PROSPER.SIN.EQP.DRILL.CFGTAB[i][j][1]

Pressure

PROSPER.SIN.EQP.DRILL.CFGTAB[i][j][2]

Density
1990-2011 Petroleum Experts Limited

259

OpenServer

PROSPER.SIN.EQP.DRILL.CFGTAB[i][j][3]

Viscosity

PROSPER.SIN.EQP.DRILL.CFGTAB[i][j][4]

Specific Heat Capacity

PROSPER.SIN.EQP.DRILL.CFGTAB[i][j][5]

Conductivity

PROSPER.SIN.EQP.DRILL.PACKER

Packer Depth

PROSPER.SIN.EQP.DRILL.MIDPROD

Mid Production Depth

PROSPER.SIN.EQP.DRILL.LIQLEV

Annulus Liquid Level

6.4.2.12LITHO Lithology (Enthalpy Balance)


Number of Items

PROSPER.SIN.EQP.LITHO.DATA.COUNT
i = 0 : PROSPER.SIN.EQP.LITHO.DATA.COUNT-1
PROSPER.SIN.EQP.LITHO.DATA[i].FORM

Formation Type

PROSPER.SIN.EQP.LITHO.DATA[i].BOTTOM

Bottom Depth

PROSPER.SIN.EQP.LITHO.DATA[i].SHALE

Shaliness

PROSPER.SIN.EQP.LITHO.DATA[i].POROSITY

Porosity

PROSPER.SIN.EQP.LITHO.DATA[i].PERM

Permeability

PROSPER.SIN.EQP.LITHO.DATA[i].ROCK

Rock Consistency

PROSPER.SIN.EQP.LITHO.DATA[i].FLUID

In-Situ Fluid Type

PROSPER.SIN.EQP.LITHO.DATA[i].SALINITY

Salinity

6.4.2.13DB Databases (Enthalpy Balance)


PROSPER.SIN.EQP.DB.CEMCON

Cement Conductivity

PROSPER.SIN.EQP.DB.CASCON

Casing Conductivity

PROSPER.SIN.EQP.DB.PIPE.COUNT

Number of Pipe Types

i = 0 : PROSPER.SIN.EQP.DB.PIPE.COUNT-1
PROSPER.SIN.EQP.DB.PIPE[i].LABEL
OpenServer User's Manual

Label

PROSPER and the OpenServer

PROSPER.SIN.EQP.DB.PIPE[i].CON

Conductivity

PROSPER.SIN.EQP.DB.PIPE[i].EMM

Emmissivity

PROSPER.SIN.EQP.DB.INSUL.COUNT

Number of Insulation types

260

i = 0 : PROSPER.SIN.EQP.DB.INSUL.COUNT-1
PROSPER.SIN.EQP.DB.INSUL[i].LABEL

Label

PROSPER.SIN.EQP.DB.INSUL[i].CON

Conductivity

PROSPER.SIN.EQP.DB.INSUL[i].EMM

Emmisssivity

PROSPER.SIN.EQP.DB.FLUID.COUNT

Number of In-situ Fluid types

i = 0 : PROSPER.SIN.EQP.DB.FLUID.COUNT-1
PROSPER.SIN.EQP.DB.FLUID[i].LABEL

Label

PROSPER.SIN.EQP.DB.FLUID[i].DEN

Fluid Specific Gravity

PROSPER.SIN.EQP.DB.FLUID[i].CON

Fluid Conductivity

PROSPER.SIN.EQP.DB.FLUID[i].CP

Specific Heat Capacity

PROSPER.SIN.EQP.DB.ROCK.COUNT

Number of Rock Types

i = 0 : PROSPER.SIN.EQP.DB.ROCK.COUNT-1
PROSPER.SIN.EQP.DB.ROCK[i].LABEL

Name

PROSPER.SIN.EQP.DB.ROCK[i].DEN

Rock Density

PROSPER.SIN.EQP.DB.ROCK[i].CON

Rock Conductivity

PROSPER.SIN.EQP.DB.ROCK[i].CP

Specific Heat Capacity

6.4.3 Artificial Lift Data Section


The following sections show the input fields pertaining to the artificial lift data section:

1990-2011 Petroleum Experts Limited

261

OpenServer

6.4.3.1 Gas Lift (Continuous)


PROSPER.SIN.GLF.GRAVITY

Gas Lift Gas Gravity

PROSPER.SIN.GLF.H2S

Gas Lift Gas Mole Percent H2S

PROSPER.SIN.GLF.CO2

Gas Lift Gas Mole Percent CO2

PROSPER.SIN.GLF.N2

Gas Lift Gas Mole Percent N2

PROSPER.SIN.GLF.GLRINJ

GLR Injected

PROSPER.SIN.GLF.CHECKVALVE

Depth of Check Valve

PROSPER.SIN.GLF.GLRate

Injected gas rate

PROSPER.SIN.GLF.Entry

GLR / Rate?
0 - Use GLR injected
1 - Use injected gas rate

PROSPER.SIN.GLF.Method

Gas Lift Method:


0 - Fixed depth of injection
1 - Optimum depth of injection
2 - Valve depths specified

Fixed Depth of Injection


OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.SIN.GLF.ValveDepth

262

Gas lift valve depth (MD)

Optimum Depth of Injection


PROSPER.SIN.GLF.MaxDepth

maximum depth of injection

PROSPER.SIN.GLF.Casing

Casing pressure

PROSPER.SIN.GLF.dP

dP across valve

Valve Depths Specified


PROSPER.SIN.GLF.Casing

Casing pressure

PROSPER.SIN.GLF.dP

dP across valve

PROSPER.SIN.GLF.Depth[0]

i = 0 to 9
Valve position (MD)

The following OpenServer string illustrates how to set the gas lift method using the 0 to
2 indices:
DoSet ("PROSPER.SIN.GLF.Method"), 0
The above string will set the gas lift method to fixed depth of injection.
The same rules apply for all other DoSet strings that depend on an option index.
6.4.3.2 Electircal Submersible Pump
PROSPER.SIN.ESP.Depth

Pump depth (measured)

PROSPER.SIN.ESP.Frequency

Operating frequency

PROSPER.SIN.ESP.MaxPumpOD

Maximum O.D.

PROSPER.SIN.ESP.CableLength

Length of cable

PROSPER.SIN.ESP.Efficiency

Gas separator efficiency

PROSPER.SIN.ESP.Stages

Number of stages

PROSPER.SIN.ESP.Volts

Voltage at surface

PROSPER.SIN.ESP.Wear

Pump wear factor

1990-2011 Petroleum Experts Limited

263

OpenServer

6.4.3.3 Hydraulic Drive Downhole PUmp


PROSPER.SIN.HSP.PumpDepth
PROSPER.SIN.HSP.PumpMaxOD
PROSPER.SIN.HSP.TurbMaxOD
PROSPER.SIN.HSP.PumpSpeed
PROSPER.SIN.HSP.PowerPC
PROSPER.SIN.HSP.Stages
PROSPER.SIN.HSP.Wear
PROSPER.SIN.HSP.TurbStage
PROSPER.SIN.HSP.GDRflag

Pump depth
Pump maximum allowable O.D.
Turbine maximum allowable O.D.
Pump speed
Percent power fluid of reservoir fluid
Number of pump stages
Pump wear factor
Number of turbine stages
Gas de-rating model

6.4.3.4 Progressive Cavity Pump


Sucker Rod Drive
PROSPER.SIN.PCP.Input[0]
PROSPER.SIN.PCP.Input[11]
PROSPER.SIN.PCP.Input[1]
PROSPER.SIN.PCP.Input[2]
PROSPER.SIN.PCP.Input[3]
PROSPER.SIN.PCP.Input[10]

Pump depth (measured)


Pump speed
Maximum O.D.
Gas separator efficiency
Pump wear factor
Total rod length

Downhole Motor Drive


PROSPER.SIN.PCP.Input[4]
PROSPER.SIN.PCP.Input[5]

Cable length
Voltage at surface

6.4.3.5 Coil Tubing Gas Lift


Specified Injection Depth
PROSPER.SIN.GLF.COILGG
PROSPER.SIN.GLF.COILGI
PROSPER.SIN.GLF.COILH2
PROSPER.SIN.GLF.COILC2
PROSPER.SIN.GLF.COILN2
PROSPER.SIN.GLF.COILID
PROSPER.SIN.GLF.COILTK
PROSPER.SIN.GLF.COILIR
PROSPER.SIN.GLF.COILOR
PROSPER.SIN.GLF.COILDP
PROSPER.SIN.GLF.COILIP
PROSPER.SIN.GLF.COILDV
Optimum Injection Depth
OpenServer User's Manual

Gas lift gas gravity


GLR injected
Mole percent H2S
Mole percent CO2
Mole percent N2
Coil tubing I.D.
Coil tubing thickness
Coil tubing inside roughness
Coil tubing outside roughness
Coil tubing specified depth
Gas injection pressure
dP across valve

PROSPER and the OpenServer

PROSPER.SIN.GLF.COILMD

264

Coil tubing maximum depth

6.4.3.6 Jet Pump


PROSPER.SIN.JET.Input[0]
PROSPER.SIN.JET.Input[1]
PROSPER.SIN.JET.Input[8]
PROSPER.SIN.JET.Input[9]
PROSPER.SIN.JET.LossCoef[0]
PROSPER.SIN.JET.LossCoef[1]
PROSPER.SIN.JET.LossCoef[3]

Pump depth (measured)


Maximum O.D.
Surface injection rate
Surface injection pressure
Nozzle loss coefficient
Suction loss coefficient
Diffuser loss coefficient

6.4.3.7 Multiphase Pump


PROSPER.SIN.FRM.Input[0]
PROSPER.SIN.FRM.Input[1]
PROSPER.SIN.FRM.NumPumps

Power available
Pump wear factor
Pump configuration:
0 - Single pump
1 - 2Pumps in parallel
2 - 3Pumps in parallel
3 - 4Pumps in parallel
4 - 5Pumps in parallel
5 - 6Pumps in parallel

The following OpenServer string illustrates how to set the number of pumps using the 0
to 5 indices:
DoSet ("PROSPER.SIN.FRM.NumPumps"), 1
The above string will set the number of pumps in parallel to 2.
The same rules apply for all other DoSet strings that depend on an option index.
6.4.3.8 Sucker Rod Pump
PROSPER.SIN.SRP.Input[10]
PROSPER.SIN.SRP.Input[16]
PROSPER.SIN.SRP.Input[12]
PROSPER.SIN.SRP.Input[13]
PROSPER.SIN.SRP.Input[17]
PROSPER.SIN.SRP.Input[26]

Anchored tubing
0 - Yes
1 - No
Pump depth
Pump diameter
Surface stroke length
Pumping speed
Rod type

Gas Anchor

1990-2011 Petroleum Experts Limited

265

OpenServer

Gas anchor:
0 - Entered
1 - Calculated
Efficiency
Type:
0 - Cup type
1 - Packer type
2 - Poor boy
Annulus area

PROSPER.SIN.SRP.Input[75]
PROSPER.SIN.SRP.Input[77]
PROSPER.SIN.SRP.Input[76]

PROSPER.SIN.SRP.Input[78]

The following OpenServer string illustrates how to set the tubing anchor option using the
0 to 1 indices:
DoSet ("PROSPER.SIN.SRP.Input[10]"), 0
The above string will set the tubing anchor option to Yes.
The same rules apply for all other DoSet strings that depend on an option index.
6.4.3.9 Gas Lift (Intermittent)
PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[0]

6.5

Surface injection pressure


Injection depth
Gas lift gas gravity
Wellhead pressure
Valve port size
Water cut
Tubing liquid level

Calculation Input Data


The Calculation Input data is accessed using the root name PROSPER.ANL and is split
up into several sections as listed below.
INF

Inflow Performance Sensitivity Calculations

SYS or
SY4

System Calculations (3 and 4 Variables respectively)

SYM

System (Multi-variable calculation)

GRD

Gradient Calculations

TCC

Tubing Correlation Comparison

PCP

Pipeline Correlation Comparison

VMT

VLP Matching

GRD

Gradient Calculation

OpenServer User's Manual

PROSPER and the OpenServer

VL3

VLP Calculations ( 3 Variables)

VL4

VLP Calculations ( 4 Variables)

VLM

VLP (Multi-variables)

QLG

QuickLook GasLift

QLE

QuickLook ESP

QLH

QuickLook HSP

TCC

Tubing Correlation Comparison

PCP

Pipeline Correlation Comparison

GMT

Gradient Matching

VMT

VLP/IPR Matching

PMT

Pipeline Matching

GLD

GasLift Design (New)

GLD

GasLift Design (Existing)

GLA

GasLift Adjustments

GEN

Generate for GAP

WHP

WHP to BHP Calculations

CHK

Choke Performance Calculator

GDT

Gradient Test Data

PLD

Plot Details

COR

Flow Correlation Information

THR

Correlation Threshold Information

CST

Constrained System Calculations

CVT

Constrained VLP Calculations

UST

UnConstrained System Calculations

UVT

UnConstrained VLP Calculations

UGT

UnConstrained Gradient Calculations

266

Each section will be accessed thus:


PROSPER.ANL.TCC
PROSPER.ANL.PCC
PROSPER.ANL.VMT
PROSPER.ANL.GMT
1990-2011 Petroleum Experts Limited

267

OpenServer

PROSPER.ANL.PMT
PROSPER.ANL.QLG
PROSPER.ANL.QLE
PROSPER.ANL.QLH
PROSPER.ANL.CHK
PROSPER.ANL.GDT
PROSPER.ANL.INF
PROSPER.ANL.SYS
PROSPER.ANL.VL3
PROSPER.ANL.VL4
PROSPER.ANL.GRD
PROSPER.ANL.GEN
PROSPER.ANL.GLD
PROSPER.ANL.WHP
PROSPER.ANL.PLD
PROSPER.ANL.COR
PROSPER.ANL.THR
PROSPER.ANL.CST
PROSPER.ANL.CVT
PROSPER.ANL.UST
PROSPER.ANL.UVT
PROSPER.ANL.UGT
In most of the calculation screens, the different Flow Correlations can be selected
through the following index:
Flow Correlation

OpenServer Index

Duns and Ross Modified

Hagedorn and Brown

Fancher and Brown

Gray

Mukerjee - Brill

Beggs and Brill

Dukler-Flannigan

Dukler-Eaton-Flannigan

OpenServer User's Manual

PROSPER and the OpenServer

Petroleum Experts

Orkizewski

Petroleum Experts 2

10

Duns and Ross Original

11

Petroleum Experts 3

12

268

Beggs and Brill (Gas Head) 13


GRE (Modified by PE)

14

GRE (With DSM)

15

GRE (Original)

16

GRE (With AE)

17

Petroleum Experts 4

18

Hydro 3P

19

Petroleum Experts 5

20

OLGAS2P

21

OLGAS3P

22

OLGAS3PEXT

23

For example, selecting the PE2 correlation when performing a system calculation would
be done with the string:
DoSet PROSPER.ANL.SYS.Tubing, 10
When a correlation is not available, its index will return PE2.
NOTE: Correlations can also be selected using the correlation name using the
following syntax:

1990-2011 Petroleum Experts Limited

269

OpenServer

DoSet ("PROSPER.ANL.SYS.TubingLabel"), "Correlation Name"


Variable indexes in the sensitivity screens
The indexes for variables available in the sensitivity screens (such as the inflow and
system sensitivity Calculation) are:
Reservoir Pressure

1 Gas Separation Efficiency

36

Skin

2 Pump Wear Factor (ESP)

37

Productivity Index

3 Pump Depth (Measured)

38

Shot Density

4 Dissolved and Free GLR

39

Gravel Pack Permeability

6 Water Oil Ratio

40

Perforation Diameter

7 Number of Stages

41

Gravel Pack Length

8 SSSV Size

42

Time

9 Restriction Size

43

Dimensionless fracture
conductivity

Gas Lift Gas Specific


10 Gravity

44

Fracture Half Length

11 Reservoir Permeability

51

Well Length

12 Perforation Length

52

Vertical Anisotropy

13 Reservoir Temperature

53

Distance from Bottom


Boundary

14 Test Rate

54

Separator GOR

15 Test Pressure

55

Water Cut

16 Reservoir Thickness

56

Gas Oil Ratio

17 Drainage Area

57

Water to Gas Ratio

18 Dietz Shape Factor

58

Condensate to Gas Ratio

19 Wellbore Radius

59

Total GOR

20 Oil Rel Perm

60

Tubing/Pipe Diameter

21 Perforation Interval

61

Gas Lift Injection Rate

22 Reservoir Porosity

62

GLR Injected

23 Fracture Height

63

GLR Free

24 Horizontal Anisotropy

64

Free Gas Rate

25 Reservoir Length

65

Tubing Roughness

26 Reservoir Width

66

OpenServer User's Manual

PROSPER and the OpenServer

First Node Pressure

Distance from Length


27 Boundary

67

Choke Size

Distance from Width


28 Boundary

68

Casing Pressure

29 Damaged Zone Thickness

70

Compressor Discharge
Pressure

Damaged Zone
30 Permeability

71

Injection Depth

31 Crushed Zone Thickness

72

DP across Valve

Crushed Zone
32 Permeability

73

GOR Free

33 Shot Phasing

74

Production Time

34 Deviation

75

Operating Frequency

35 Penetration

76

Perforation efficiency

77 Interporosity Coefficient

144

Vertical Permeability

78 Number of Fractures

145

Non-Darcy Coefficient
(Forchheimer)

79 Number of pump stages

300

Darcy Coefficient
(Forchheimer)

80 Pump speed

301

Exponent (Back Pressure IPR)

81 Number of Turbine Stages

302

C Value (C and n IPR Model)

82 HSP Turbine Speed

303

n Value (C and n IPR Model)

% Power Fluid of
83 Reservoir Fluid

304

Connate Water Saturation

84 Pump Wear Factor (HSP)

305

D Factor (PE IPR Model)

Pump Depth (Measured)


85 (HSP)

306

Residual Water Fraction

86 Pipe Roughness

307

Residual Oil Fraction

87 PCP Pump Depth

308

Water End Point Rel perm

88 PCP Pump Speed

309

Oil End Point Rel Perm

89 PCP Pump Wear Factor

310

Water Corey Exponent

Coil Tubing Inside


90 Diameter

311

Oil Corey Exponent

91 Coil Tubing Thickness

312

270

1990-2011 Petroleum Experts Limited

271

OpenServer

Test Water Cut (Rel Perm


Correction)

92 Coil Tubing Injection Depth

313

Fracture Permeability

Coil Tubing Inside


141 Roughness

314

Compressibility

Coil Tubing Outside


142 Roughness

315

Storativity Ratio

143

Indexes relating to the Thermally Induced Fracture Model


Initial Reservoir Stress

146

Sweep Efficiency

147

Injected Fluid Specific Heat Capacity

148

Overall Reservoir Conductivity

149

Overall Reservoir Specific Heat Capacity

150

Overall Reservoir Density

151

Top and Bottom Surroundings Conductivity

152

Top and Bottom Surroundings Specific Heat


Capacity

153

Top and Bottom Surroundings Density

154

Reservoir Thermal Expansion

155

Biot's Constant

156

Poisson's Ratio

157

Reservoir Young's Modulus

158

Injected Fluid Temperature

159

Mean Historical Injection Rate

160

Indexes Relating to the SkinAide Model (In Situ Geometry Entered)


Reservoir Thickness (Normal to
Bedding Plane)

93

Completed Interval (Along Wellbore)

94

Distance to Top of completion (Along


Wellbore)

95

Drainage Area

96

OpenServer User's Manual

PROSPER and the OpenServer

Dietz Shape Factor

97

Hole Diameter

98

Deviation

99

Horizontal Permeability

100

Vertical Permeability

101

Vertical Permeability for Geometrical


Skin

102

Porosity

103

Turbulence Coefficient

104

Permeability Exponent

105

Porosity Exponent

106

Damage Zone Thickness

107

Damage Zone Permeability

108

Damage Zone Porosity

109

External Casing Diameter

110

Casing Weight

111

Crushed Zone Thickness

112

Crushed Zone Permeability

113

Crushed Zone Porosity

114

Crushed and Damage Zone


Permeability

115

Crushed and Damage Zone Porosity

116

Perforation Efficiency

117

Shot Density

118

Gun Phasing

119

Angle between Vertical Plane and


Perforations

120

Tunnel Length

121

Tunnel Diameter

122

Cavity Entrance Diameter

123

Cavity Tip Diameter

124

272

Indexes Relating to the SkinAide Model, API Test Data editions 4 and 5

1990-2011 Petroleum Experts Limited

273

OpenServer

Perforation Efficiency

125

Shot Density

126

Gun Phasing

127

Angle Between Vertical Plane and


Perforations

128

API RP43/2T Total Penetration of


Perforations

129

API RP43/1 Entrly Hole Diameter of


Perforations

130

Gun Diameter

131

Reservoir Uniaxial Compressive


Strength

132

Rock Density

133

Casing Elastic Limit

134

Reservoir Strength

135

6.5.1 INF - Inflow Sensitivity Calculations


PROSPER.ANL.INF.DONE

Calculation Done Flag

PROSPER.ANL.INF.RATEMETHOD

Rate Method:
0 - Automatic linear
1 - User specified
2 - Automatic geometric

PROSPER.ANL.INF.RATES.COUNT

Number of Rates

i = 0 : PROSPER.ANL.INF.RATES.COUNT-1

Retrieve the number of IPR


rates

PROSPER.ANL.INF.RATES[i]

Rates

PROSPER.ANL.INF.SENS.TNODE

First Node

PROSPER.ANL.INF.SENS.BNODE

Last Node

PROSPER.ANL.INF.SENS.TNODETYPE

First Node Type

PROSPER.ANL.INF.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.INF.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.INF.SENS.BNODEDEPTH

Last Node Depth

OpenServer User's Manual

PROSPER and the OpenServer

274

PROSPER.ANL.INF.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.INF.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.INF.SENS.YVAR

X Variable

PROSPER.ANL.INF.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.INF.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.INF.SENS.GENNUM

Generate Rates Number of


Values

PROSPER.ANL.INF.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.INF.SENS.REFPRES

Reference Pressure

PROSPER.ANL.INF.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.INF.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.INF.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.INF.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.INF.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.INF.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.INF.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.INF.SENS.VARS.VAL1.NUM

1st Sensitivity Variable No of


values

PROSPER.ANL.INF.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.INF.SENS.VARS.VAL2.NUM

2nd Sensitivity Variable No of


values

PROSPER.ANL.INF.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.INF.SENS.VARS.VAL3.NUM

3rd Sensitivty Variable No of


values

PROSPER.ANL.INF.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
PROSPER.ANL.INF.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.INF.SENS.VARS.GENLAST[i]

Generate Values Last Value

1990-2011 Petroleum Experts Limited

275

OpenServer

PROSPER.ANL.INF.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.INF.SENS.VARS.GENSPACE[i]

Generate Values Spacing Type

PROSPER.ANL.INF.SENS.COMB.DATA.COUNT

Number of Combination
Records

PROSPER.ANL.INF.SENS.COMB.DATA[i].TYPE

Combination Variable Type

PROSPER.ANL.INF.SENS.COMB.DATA[i].UNIT

Combination Variable Unit

PROSPER.ANL.INF.SENS.COMB.DATA[i].INDEX

Combination Variable Index

PROSPER.ANL.INF.SENS.COMB.DATA[i].RATE

Combination Variable Rate

PROSPER.ANL.INF.SENS.COMB.DATA[i].VAL.
COUNT

Combination Variable No of
Values

j = 0 : No of Values-1
PROSPER.ANL.INF.SENS.COMB.DATA[i].VAL[j]

Combination Variable Values

The above values to be used in conjunction with the strings PROSPER.ANL.INF.SENS.


VARS.VAR1, PROSPER.ANL.INF.SENS.VARS.VAR2, PROSPER.ANL.INF.SENS.
VARS.VAR3 for selecting the sensitivity variables.

6.5.2 SYS - System Sensitivity Calculations


PROSPER.ANL.SYS.PRES

First Node Pressure

PROSPER.ANL.SYS.WC

Water Cut

PROSPER.ANL.SYS.WGR

Water Gas Ratio

PROSPER.ANL.SYS.GOR

Total GOR

PROSPER.ANL.SYS.PIPE, i

Pipeline Correlation:
i = 2, 4, 5, 6, 7, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23
NOTE: i = 21 - 23 are for OLGAS
correlations and a subsequent
license will be required to select

OpenServer User's Manual

PROSPER and the OpenServer

276

them.

PROSPER.ANL.SYS.PipeLabel, "Name"

It is also possible to select


correlations using a Label call.
The following correlation labels
apply:
FancherBrown
MukerjeeBrill
BeggsandBrill
DuklerFlannigan
DuklerEatonFlannigan
BeggsandBrillGasHead
GREmodifiedbyPE
GREwithDSM
GREoriginal
GREwithAE
PetroleumExperts4
Hydro3P
PetroleumExperts5
OLGAS2P
OLGAS3P
OLGAS3PEXT

PROSPER.ANL.SYS.TUBING, i

Tubing Correlation
i = 0 to 23
NOTE: i = 21 - 23 are for OLGAS
correlations and a subsequent
license will be required to select
them.

PROSPER.ANL.SYS.TubingLabel, "Name"

It is also possible to select


correlations using a Label call.
The following correlation labels
apply:
DunsandRosModified
HagedornBrown
FancherBrown
MukerjeeBrill
BeggsandBrill
PetroleumExperts
Orkiszewski
PetroleumExperts2
DunsandRosOriginal
PetroleumExperts3
GREmodifiedbyPE

1990-2011 Petroleum Experts Limited

277

OpenServer

PetroleumExperts4
Hydro3P
PetroleumExperts5
OLGAS2P
OLGAS3P
OLGAS3PEXT
PROSPER.ANL.SYS.SOLUTIONNODE

Solution Node
i = 1 to 3
1 - Bottom node
2 - Top node
3 - Wellhead

PROSPER.ANL.SYS.RATEMETHOD, i

Rate Method
i = 0 to 2
0 - Automatic linear
1 - User specified
2 - Automatic geometric

PROSPER.ANL.SYS.SENS.GENFIRST

Generate rates first value

PROSPER.ANL.SYS.SENS.GENLAST

Generate rates last value

PROSPER.ANL.SYS.Sens.Gen.Number, i

Sets the number of user specified


rates
i = 0 to 19

PROSPER.ANL.SYS.RATES.COUNT

Number of Rates

PROSPER.ANL.SYS.Sens.Gen.Method

Sets user specified rate spacing


method:
i = 0 to 4
0 - Linear
1 - Geometric
2 - Step
3 - Simple percent
4 - Compound percent

i = 0 : PROSPER.ANL.SYS.RATES.COUNT-1
PROSPER.ANL.SYS.SENS.TNODE

First Node

PROSPER.ANL.SYS.SENS.BNODE

Last Node

PROSPER.ANL.SYS.SENS.TNODETYPE

First Node Type

PROSPER.ANL.SYS.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.SYS.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.SYS.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.SYS.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.SYS.SENS.YPVD

Y Variable PvD Plot

OpenServer User's Manual

PROSPER and the OpenServer

278

PROSPER.ANL.SYS.SENS.YVAR

X Variable

PROSPER.ANL.SYS.SENS.GENNUM

Generate Rates Number of


Values

PROSPER.ANL.SYS.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.SYS.SENS.REFPRES

Reference Pressure

PROSPER.ANL.SYS.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.SYS.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.SYS.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.SYS.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.SYS.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.SYS.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.SYS.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.SYS.SENS.VARS.VAL1.NUM

1st Sensitivty Variable No of


values

PROSPER.ANL.SYS.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.SYS.SENS.VARS.VAL2.NUM

2nd Sensitivty Variable No of


values

PROSPER.ANL.SYS.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.SYS.SENS.VARS.VAL3.NUM

3rd Sensitivity Variable No of


values

PROSPER.ANL.SYS.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
PROSPER.ANL.SYS.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.SYS.SENS.VARS.GENLAST[i]

Generate Values Last Value

PROSPER.ANL.SYS.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.SYS.SENS.VARS.GENSPACE[i]

Generate Values Spacing Type

PROSPER.ANL.SYS.SENS.COMB.DATA.COUNT Number of Combination Records


PROSPER.ANL.SYS.SENS.COMB.DATA[i].TYPE

Combination Variable Type

1990-2011 Petroleum Experts Limited

279

OpenServer

PROSPER.ANL.SYS.SENS.COMB.DATA[i].UNIT

Combination Variable Unit

PROSPER.ANL.SYS.SENS.COMB.DATA[i].INDEX Combination Variable Index


PROSPER.ANL.SYS.SENS.COMB.DATA[i].RATE

Combination Variable Rate

PROSPER.ANL.SYS.SENS.COMB.DATA[i].VAL.
COUNT

Combination Variable No of
Values

j = 0 : No of Values-1
PROSPER.ANL.SYS.SENS.COMB.DATA[i].VAL[j] Combination Variable Values
PROSPER.ANL.SYS.DONE

Calculation Done Flag

The above values to be used in conjunction with the strings PROSPER.ANL.SYS.SENS.


VARS.VAR1, PROSPER.ANL.SYS.SENS.VARS.VAR2, PROSPER.ANL.SYS.SENS.
VARS.VAR3 for selecting the sensitivity variables.

6.5.3 SYS - System Multi-Variable Calculations

PROSPER.ANL.SYM.PRES

Top Node Pressure

PROSPER.ANLSYM.WC

Water Cut

PROSPER.ANL.SYM.GOR

Total GOR

PROSPER.ANL.SYM.WGR

Water Gas Ratio

PROSPER.ANL.SYM.PIPE

Pipeline Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change the '
SYS' argument to 'SYM' in the access string

PROSPER.ANL.SYM.TUBING

Tubing Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change the '
SYS' argument to 'SYM' in the access string

PROSPER.ANL.SYM.SolutionNode

Solution node:
i = 0 to 2
0 - Bottom node
1 - Top node
2 - Wellhead

PROSPER.ANL.SYM.RATEMETHOD, i

Rate Method:
i = 0 to 2

OpenServer User's Manual

PROSPER and the OpenServer

280

0 - Automatic linear
1 - user specified
2 - Automatic geometric
PROSPER.ANL.SYM.RATES.COUNT

Number of Rates

PROSPER.ANL.SYM.RATES[i]

Rates:
i = 0 to 19
Index value retrieves the entered specified
rate

PROSPER.ANL.SYM.RateType

Rate type:
i = 0 to 3
0 - Liquid rate
1 - Oil rate
2 - Gas rate
3 - Hydrocarbon mass flow rate

PROSPER.ANL.SYM.Sens.Gen.First

Generate first user specified rates value

PROSPER.ANL.SYM.Sens.Gen.Last

Generate last user specified rates value

PROSPER.ANL.SYM.Sens.Gen.Number

Sets the number of generated rate values

PROSPER.ANL.SYM.Sens.Gen.Method, Sets user specified rate spacing method:


i = 0 to 4
i
0 - Linear
1 - Geometric
2 - Step
3 - Simple percent
4 - Compound percent
PROSPER.ANL.SYM.ILHAND

Left hand intersection:


i = 0 to 1
0 - DisAllow
1 - Force

PROSPER.ANL.SYM.Sens.SensDB.Vars Selects the multi-variable sensitivity


variable:
[0]
i = 0 to 9
PROSPER.ANL.SYM.Sens.SensDB.Vars Sets the sensitivity variable type i.e., j = 16
for WCT:
[0], j
NOTE: Use Ctrl + Right-Click to extract
the model specific j-index type value
PROSPER.ANL.SYM.Sens.SensDB.
Sens[Type Index].Vals[j]

Sets the sensitivity variable value:


j = 0 to 9

PROSPER.ANL.SYM.Sens.SensDB.
Clear

Clears all sensitivity values

1990-2011 Petroleum Experts Limited

281

OpenServer

PROSPER.ANL.SYM.DONE

Calculation Done Flag

6.5.4 GRD - Gradient Sensitivity Calculations


PROSPER.ANL.GRD.DONE

Calculation Done Flag

PROSPER.ANL.GRD.PIPE

Pipeline Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change the
'SYS' argument to 'GRD' in the access
string

PROSPER.ANL.GRD.TUBING

Tubing Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change the
'SYS' argument to 'GRD' in the access
string

PROSPER.ANL.GRD.SLUG

Slug Method
i = 0 to 1
0 - Brill
1 - RCS mechanistic

PROSPER.ANL.GRD.RATETYPE

Rate Type i = 0 to 1
0 - Liquid rates
1 - Oil rates

PROSPER.ANL.GRD.FIRSTNODE

First Node

PROSPER.ANL.GRD.LASTNODE

Last Node

PROSPER.ANL.GRD.RATE

Rate

PROSPER.ANL.GRD.PRES

First Node Pressure

PROSPER.ANL.GRD.WC

Water Cut

PROSPER.ANL.GRD.WGR

Water Gas Ratio

PROSPER.ANL.GRD.SENS.TNODE

First Node

PROSPER.ANL.GRD.SENS.BNODE

Last Node

PROSPER.ANL.GRD.SENS.TNODETYPE

First Node Type

PROSPER.ANL.GRD.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.GRD.SENS.

First Node Depth

OpenServer User's Manual

PROSPER and the OpenServer

282

TNODEDEPTH
PROSPER.ANL.GRD.SENS.
BNODEDEPTH

Last Node Depth

PROSPER.ANL.GRD.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.GRD.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.GRD.SENS.YVAR

X Variable

PROSPER.ANL.GRD.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.GRD.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.GRD.SENS.GENNUM

Generate Rates Number of Values

PROSPER.ANL.GRD.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.GRD.SENS.REFPRES

Reference Pressure

PROSPER.ANL.GRD.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.GRD.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.GRD.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.GRD.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.GRD.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.GRD.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.GRD.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.GRD.SENS.VARS.VAL1.
NUM

1st Sensitivity Variable No of values

PROSPER.ANL.GRD.SENS.VARS.VAL1[I]

1st Sensitivty Values

PROSPER.ANL.GRD.SENS.VARS.VAL2.
NUM

2nd Sensitivity Variable No of values

PROSPER.ANL.GRD.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.GRD.SENS.VARS.VAL3.
NUM

3rd Sensitivity Variable No of values

PROSPER.ANL.GRD.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
PROSPER.ANL.GRD.SENS.VARS.
GENFIRST[i]

Generate Values First Value

PROSPER.ANL.GRD.SENS.VARS.
GENLAST[i]

Generate Values Last Value

1990-2011 Petroleum Experts Limited

283

OpenServer

PROSPER.ANL.GRD.SENS.VARS.
GENNUM[i]

Generate Values Number of Values

PROSPER.ANL.GRD.SENS.VARS.
GENSPACE[i]

Generate Values Spacing Type

PROSPER.ANL.GRD.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.GRD.SENS.COMB.DATA
[i].TYPE

Combination Variable Type

PROSPER.ANL.GRD.SENS.COMB.DATA
[i].UNIT

Combination Variable Unit

PROSPER.ANL.GRD.SENS.COMB.DATA
[i].INDEX

Combination Variable Index

PROSPER.ANL.GRD.SENS.COMB.DATA
[i].RATE

Combination Variable Rate

PROSPER.ANL.GRD.SENS.COMB.DATA
[i].VAL.COUNT

Combination Variable No of Values

j = 0 : No of Values-1
PROSPER.ANL.GRD.SENS.COMB.DATA
[i].VAL[j]

Combination Variable Values

The above values are to be used in conjunction with the strings PROSPER.ANL.VL4.
SENS.VARS.VAR1, PROSPER.ANL.SYS.SENS.VARS.VAR2, PROSPER.ANL.VL4.
SENS.VARS.VAR3 for selecting the sensitivity variables.

6.5.5 VL3 - VLP Sensitivity Calculations (3 Variables)


PROSPER.ANL.VL3.DONE

Calculation Done Flag

PROSPER.ANL.VL3.PIPE

Pipeline Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change the
'SYS' argument to 'VL3' in the access
string

PROSPER.ANL.VL3.TUBING

Tubing Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change the
'SYS' argument to 'VL3' in the access
string

PROSPER.ANL.VL3.RATEMETHOD

Rate Method

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.ANL.VL3.RATETYPE

Rate Type

PROSPER.ANL.VL3.FIRSTNODE

First Node

PROSPER.ANL.VL3.LASTNODE

Last Node

PROSPER.ANL.VL3.TYPE

Lift Curve Type

PROSPER.ANL.VL3.GP

Gravel Pack Flag

PROSPER.ANL.VL3.PRES

First Node Pressure

PROSPER.ANL.VL3.WC

Water Cut

PROSPER.ANL.VL3.WGR

Water Gas Ratio

PROSPER.ANL.VL3.RATES.COUNT

Number of Rates

284

i = 0 : PROSPER.ANL.VL3.RATES.COUNT1
PROSPER.ANL.VL3.RATES[i]

Rates

PROSPER.ANL.VL3.SENS.TNODE

First Node

PROSPER.ANL.VL3.SENS.BNODE

Last Node

PROSPER.ANL.VL3.SENS.TNODETYPE

First Node Type

PROSPER.ANL.VL3.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.VL3.SENS.TNODEDEPTH First Node Depth


PROSPER.ANL.VL3.SENS.BNODEDEPTH Last Node Depth
PROSPER.ANL.VL3.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.VL3.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.VL3.SENS.YVAR

X Variable

PROSPER.ANL.VL3.Sens.Gen.First

Generate Rates First Value

PROSPER.ANL.VL3.Sens.Gen.Last

Generate Rates Last Value

PROSPER.ANL.VL3.Sens.Gen.Number

Generate Rates Number of Values

PROSPER.ANL.VL3.Sens.Gen.Method

Generate Rates Spacing Type

PROSPER.ANL.VL3.SENS.REFPRES

Reference Pressure

PROSPER.ANL.VL3.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.VL3.SENS.VARS.VAR1

1st Sensitivity Variable

1990-2011 Petroleum Experts Limited

285

OpenServer

PROSPER.ANL.VL3.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.VL3.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.VL3.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.VL3.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.VL3.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.VL3.SENS.VARS.VAL1.
NUM

1st Sensitivity Variable No of values

PROSPER.ANL.VL3.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.VL3.SENS.VARS.VAL2.
NUM

2nd Sensitivity Variable No of values

PROSPER.ANL.VL3.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.VL3.SENS.VARS.VAL3.
NUM

3rd Sensitivity Variable No of values

PROSPER.ANL.VL3.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
PROSPER.ANL.VL3.SENS.VARS.
GENFIRST[i]

Generate Values First Value

PROSPER.ANL.VL3.SENS.VARS.
GENLAST[i]

Generate Values Last Value

PROSPER.ANL.VL3.SENS.VARS.
GENNUM[i]

Generate Values Number of Values

PROSPER.ANL.VL3.SENS.VARS.
GENSPACE[i]

Generate Values Spacing Type

PROSPER.ANL.VL3.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.VL3.SENS.COMB.DATA[i]. Combination Variable Type


TYPE
PROSPER.ANL.VL3.SENS.COMB.DATA[i]. Combination Variable Unit
UNIT
PROSPER.ANL.VL3.SENS.COMB.DATA[i]. Combination Variable Index
INDEX
PROSPER.ANL.VL3.SENS.COMB.DATA[i]. Combination Variable Rate
RATE
PROSPER.ANL.VL3.SENS.COMB.DATA[i]. Combination Variable No of Values

OpenServer User's Manual

PROSPER and the OpenServer

286

VAL.COUNT
j = 0 : No of Values-1
PROSPER.ANL.VL3.SENS.COMB.DATA[i]. Combination Variable Values
VAL[j]

The above values are to be used in conjunction with the strings PROSPER.ANL.VL3.
SENS.VARS.VAR1, PROSPER.ANL.SYS.SENS.VARS.VAR2, PROSPER.ANL.VL3.
SENS.VARS.VAR3 for selecting the sensitivity variables.

6.5.6 VL4 - VLP Sensitivity Calculations (4 Variables)


PROSPER.ANL.VL4.DONE

Calculation Done Flag

PROSPER.ANL.VL4.PIPE

Pipeline Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change
the 'SYS' argument to 'VL4' in the
access string

PROSPER.ANL.VL4.TUBING

Tubing Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change
the 'SYS' argument to 'VL4' in the
access string

PROSPER.ANL.VL4.RATEMETHOD

Rate Method

PROSPER.ANL.VL4.RATETYPE

Rate Type

PROSPER.ANL.VL4.FIRSTNODE

First Node

PROSPER.ANL.VL4.LASTNODE

Last Node

PROSPER.ANL.VL4.TYPE

Lift Curve Type

PROSPER.ANL.VL4.GP

Gravel Pack Flag

PROSPER.ANL.VL4.PRES

First Node Pressure

PROSPER.ANL.VL4.WC

Water Cut

PROSPER.ANL.VL4.WGR

Water Gas Ratio

PROSPER.ANL.VL4.RATES.COUNT

Number of Rates

i = 0 : PROSPER.ANL.VL4.RATES.COUNT-1
PROSPER.ANL.VL4.RATES[i]

Rates
1990-2011 Petroleum Experts Limited

287

OpenServer

PROSPER.ANL.VL4.SENS.TNODE

First Node

PROSPER.ANL.VL4.SENS.BNODE

Last Node

PROSPER.ANL.VL4.SENS.TNODETYPE

First Node Type

PROSPER.ANL.VL4.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.VL4.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.VL4.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.VL4.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.VL4.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.VL4.SENS.YVAR

X Variable

PROSPER.ANL.VL4.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.VL4.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.VL4.SENS.GENNUM

Generate Rates Number of Values

PROSPER.ANL.VL4.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.VL4.SENS.REFPRES

Reference Pressure

PROSPER.ANL.VL4.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.VL4.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.VL4.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.VL4.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.VL4.SENS.VARS.VAR4

4th Sensitivity Variable

PROSPER.ANL.VL4.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.VL4.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.VL4.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.VL4.SENS.VARS.UNIT4

4th Sensitivity Unit

PROSPER.ANL.VL4.SENS.VARS.VAL1.
NUM

1st Sensitivity Variable No of values

PROSPER.ANL.VL4.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.VL4.SENS.VARS.VAL2.
NUM

2nd Sensitivity Variable No of values

PROSPER.ANL.VL4.SENS.VARS.VAL2[I]

2nd Sensitivity Values

OpenServer User's Manual

PROSPER and the OpenServer

288

PROSPER.ANL.VL4.SENS.VARS.VAL3.
NUM

3rd Sensitivity Variable No of values

PROSPER.ANL.VL4.SENS.VARS.VAL3[I]

3rd Sensitivity Values

PROSPER.ANL.VL4.SENS.VARS.VAL4.
NUM

4th Sensitivity Variable No of values

PROSPER.ANL.VL4.SENS.VARS.VAL4[I]

4th Sensitivity Values

i=0:4
PROSPER.ANL.VL4.SENS.VARS.
GENFIRST[i]

Generate Values First Value

PROSPER.ANL.VL4.SENS.VARS.GENLAST Generate Values Last Value


[i]
PROSPER.ANL.VL4.SENS.VARS.GENNUM Generate Values Number of Values
[i]
PROSPER.ANL.VL4.SENS.VARS.
GENSPACE[i]

Generate Values Spacing Type

PROSPER.ANL.VL4.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.VL4.SENS.COMB.DATA[i].
TYPE

Combination Variable Type

PROSPER.ANL.VL4.SENS.COMB.DATA[i].
UNIT

Combination Variable Unit

PROSPER.ANL.VL4.SENS.COMB.DATA[i].
INDEX

Combination Variable Index

PROSPER.ANL.VL4.SENS.COMB.DATA[i].
RATE

Combination Variable Rate

PROSPER.ANL.VL4.SENS.COMB.DATA[i].
VAL.COUNT

Combination Variable No of Values

j = 0 : No of Values-1
PROSPER.ANL.VL4.SENS.COMB.DATA[i].
VAL[j]

Combination Variable Values

The above values are to be used in conjunction with the strings PROSPER.ANL.VL4.
SENS.VARS.VAR1, PROSPER.ANL.SYS.SENS.VARS.VAR2, PROSPER.ANL.VL4.
SENS.VARS.VAR3 for selecting the sensitivity variables.

1990-2011 Petroleum Experts Limited

289

OpenServer

6.5.7 VLM - Multi-Variable

PROSPER.ANL.VLM.DONE

Calculation Done Flag

PROSPER.ANL.VLM.PIPE

Pipeline Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change
the 'SYS' argument to 'VLM' in the
access string

PROSPER.ANL.VLM.TUBING

Tubing Correlation (see SYS__System_Sensitivity_Calculations_1)


NOTE: It will be necessary to change
the 'SYS' argument to 'VLM' in the
access string

PROSPER.ANL.VLM.RATEMETHOD, i

Rate Method:
i = 0 to 2
0 - Automatic linear
1 - user specified
2 - Automatic geometric

PROSPER.ANL.VLM.RATES.COUNT

Number of Rates

PROSPER.ANL.VLM.RATES[i]

Rates:
i = 0 to 19
Index value retrieves the entered
specified rate

PROSPER.ANL.VLM.PRES

Top Node Pressure

PROSPER.ANL.VLM.RateType

Rate type:
i = 0 to 3
0 - Liquid rate
1 - Oil rate
2 - Gas rate
3 - Hydrocarbon mass flow rate

PROSPER.ANL.VLM.WC

Water Cut

PROSPER.ANL.VLM.WGR

Water Gas Ratio

PROSPER.ANL.VLM.SENS.GENFIRST

Sets the first user specified rate value

PROSPER.ANL.VLM.Sens.Gen.Last

Sets the last user specified rate value

PROSPER.ANL.VLM.Sens.Gen.Number, i

Sets the number of use specified


rates
i = 0 to 19

PROSPER.ANL.VLM.Sens.Gen.Method

Sets user specified rate spacing


method:

OpenServer User's Manual

PROSPER and the OpenServer

290

i = 0 to 4
0 - Linear
1 - Geometric
2 - Step
3 - Simple percent
4 - Compound percent
PROSPER.ANL.VLM.Sens.SensDB.Vars[0]

Selects the multi-variable sensitivity


variable:
i = 0 to 9

PROSPER.ANL.VLM.Sens.SensDB.Vars[0], j

Sets the sensitivity variable type


i.e., j = 16 for WCT:
NOTE: Use Ctrl + Right-Click to
extract the model specific j-index type
value

PROSPER.ANL.VLM.Sens.SensDB.Sens
[Index].Vals[j]

Sets the sensitivity variable value:


j = 0 to 9

PROSPER.ANL.VLM.Sens.SensDB.Clear

Clears all sensitivity values

example: to set the variable 1 as water cut with 10 sensitivity variables,


DoSet ("PROSPER.ANL.VLM.Sens.SensDB.Vars[0]"), 16
DoSet ("PROSPER.ANL.VLM.Sens.SensDB.Sens[6].Vals[" + CStr(i) + "]"), Cells(7, 5 + i)

6.5.8 QLG - QuickLook GasLift


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.QLG.DONE

Calculation Done Flag

[First Index] = Minimum


[Second Index] = Maximum
PROSPER.ANL.QLG.SURFACE[First][Second]
PROSPER.ANL.QLG.SURFACE[0][0]

Tubing Head Pressure

PROSPER.ANL.QLG.SURFACE[1][0]

Tubing Head Temperature

PROSPER.ANL.QLG.SURFACE[2][0]

Liquid Rate

PROSPER.ANL.QLG.SURFACE[3][0]

Water Cut

PROSPER.ANL.QLG.SURFACE[4][0]

Total Gas Rate

PROSPER.ANL.QLG.SURFACE[5][0]

Injected Gas Rate

PROSPER.ANL.QLG.SURFACE[6][0]

Casing Head Pressure

1990-2011 Petroleum Experts Limited

291

OpenServer

PROSPER.ANL.QLG.GASLIFT[0]

Orifice Diameter

PROSPER.ANL.QLG.GASLIFT[1]

Gas Injection Depth

PROSPER.ANL.QLG.FLOWING.COUNT

Number of Flowing
Measurements

i = 0 : PROSPER.ANL.QLG.FLOWING.COUNT-1
PROSPER.ANL.QLG.FLOWING[i][0]

Measured Depth

PROSPER.ANL.QLG.FLOWING[i][1]

Minimum Pressure

PROSPER.ANL.QLG.FLOWING[i][2]

Maximum Pressure

PROSPER.ANL.QLG.STATIC.COUNT

Number of Static Measurements

i = 0: PROSPER.ANL.QLG.STATIC.COUNT-1
PROSPER.ANL.QLG.STATIC[i][0]

Measured Depth

PROSPER.ANL.QLG.STATIC[i][1]

Static Pressure

PROSPER.ANL.QLG.MAND.COUNT

Number of Mandrels

i = 0: PROSPER.ANL.QLG.MAND.COUNT-1
PROSPER.ANL.QLG.MAND[i].TYPE

Valve Type

PROSPER.ANL.QLG.MAND[i].PORT

Port Size

PROSPER.ANL.QLG.MAND[i].RVAL

R Value

PROSPER.ANL.QLG.MAND[i].DOME

Dome Pressure

PROSPER.ANL.QLG.MAND[i].DEPTH

Measured Depth

6.5.9 QLE - QuickLook ESP


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.QLE.DONE

Calculation Done Flag

PROSPER.ANL.QLE.EMULSION

Emulsion Flag

PROSPER.ANL.QLE.QUICK[0]

Tubing head pressure

PROSPER.ANL.QLE.QUICK[1]

Liquid rate

PROSPER.ANL.QLE.QUICK[2]

Water cut

PROSPER.ANL.QLE.QUICK[3]

GOR

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.ANL.QLE.QUICK[4]

Static Bottom Hole Pressure

PROSPER.ANL.QLE.QUICK[5]

Pump Depth

PROSPER.ANL.QLE.QUICK[6]

Operating Frequency

PROSPER.ANL.QLE.QUICK[7]

Length Of Cable

PROSPER.ANL.QLE.QUICK[8]

Gas Separation Efficiency

PROSPER.ANL.QLE.QUICK[9]

Number Of Stages

PROSPER.ANL.QLE.QUICK[10]

Pump Wear Factor

PROSPER.ANL.QLE.SURF[0]

Current

PROSPER.ANL.QLE.SURF[1]

Surface Voltage

PROSPER.ANL.QLE.SURF[2]

Power

PROSPER.ANL.QLE.DOWN.COUNT

Number of Downhole Data Points

PROSPER.ANL.QLE.Down[i][j]

Downhole data
i = Measured Depth = 0 to 4
j = Pressure = 1

292

i .e., Pressure value entered in row 5


would be [4][1]
i = 0 : PROSPER.ANL.QLE.DOWN.COUNT-1
PROSPER.ANL.QLE.DOWN[i][0]

Measured Depth

PROSPER.ANL.QLE.DOWN[i][1]

Pressure

6.5.10 QLH - QuickLook HSP


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.QLH.DONE

Calculation Done Flag

PROSPER.ANL.QLH.EMULSION

Emulsion Flag

PROSPER.ANL.QLH.QUICK[0]

Tubing Head Pressure

PROSPER.ANL.QLH.QUICK[1]

Liquid Rate

PROSPER.ANL.QLH.QUICK[2]

Water Cut

PROSPER.ANL.QLH.QUICK[3]

Produced GOR

PROSPER.ANL.QLH.QUICK[4]

Static Bottom Hole Pressure

PROSPER.ANL.QLH.QUICK[5]

Pump Depth

PROSPER.ANL.QLH.QUICK[6]

Pump Speed

1990-2011 Petroleum Experts Limited

293

OpenServer

PROSPER.ANL.QLH.QUICK[7]

% Power Fluid Of Reservoir Fluid

PROSPER.ANL.QLH.QUICK[8]

Pump Stages

PROSPER.ANL.QLH.QUICK[9]

Pump Wear Factor

PROSPER.ANL.QLH.QUICK[10]

Turbine Stages

PROSPER.ANL.QLH.DOWN.COUNT

Number of Downhole Data Points

i = 0 : PROSPER.ANL.QLH.DOWN.COUNT1
PROSPER.ANL.QLH.DOWN[i][0]

Measured Depth

PROSPER.ANL.QLH.DOWN[i][1]

Pressure

6.5.11 TCC - Tubing Correlation Comparison


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.TCC.PRES

First Node Pressure

PROSPER.ANL.TCC.WC

Water Cut

PROSPER.ANL.TCC.RATE

Rate

PROSPER.ANL.TCC.GOR

GOR

PROSPER.ANL.TCC.GORFREE

GOR free

PROSPER.ANL.TCC.RateType

Rate type:
i = 0 to 1
0 - Liquid rates
1 - Oil rates

PROSPER.ANL.PCC.Corr, i

Pipeline Correlation selection using


Index
i = 2, 4, 5, 6, 7, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23
NOTE: The OLGAS correlations will only
be selectable if the corresponding
license is available.

Example: To set the Beggs and Brill


correlation use:
DoSet ("PROSPER.ANL.PCC.Corr"), 5

2
4
5
6
7
13
14
OpenServer User's Manual

FancherBrown
MukerjeeBrill
BeggsandBrill
DuklerFlannigan
DuklerEatonFlannigan
BeggsandBrillGasHead
GREmodifiedbyPE

PROSPER and the OpenServer

15
16
17
18
19
20
21
22
23
PROSPER.ANL.TCC.Pipelabel
Example: To set the Beggs and Brill
correlation use:

294

GREwithDSM
GREoriginal
GREwithAE
PetroleumExperts4
Hydro3P
PetroleumExperts5
OLGAS2P
OLGAS3P
OLGAS3PEXT

Pipeline correlation selection using Label


NOTE: The OLGAS correlations will only
be selectable if the corresponding
license is available.

DoSet ("PROSPER.ANL.TCC.Pipelabel"),
"beggsandbrill"

FancherBrown
MukerjeeBrill
BeggsandBrill
DuklerFlannigan
DuklerEatonFlannigan
BeggsandBrillGasHead
GREmodifiedbyPE
GREwithDSM
GREoriginal
GREwithAE
PetroleumExperts4
Hydro3P
PetroleumExperts5
OLGAS2P
OLGAS3P
OLGAS3PEXT

PROSPER.ANL.TCC.MAX

Max Number of Comparison Points

PROSPER.ANL.TCC.DONE

Calculation Done Flag

PROSPER.ANL.TCC.GLRATE

Injected Gas Lift Gas Rate

PROSPER.ANL.TCC.GLDEPTH

Gas Lift Injection Depth

PROSPER.ANL.TCC.WGR

Water Gas Ratio

PROSPER.ANL.TCC.CORR.COUNT

Number of Tubing Correlations. This


refers to the number of correlations
available and will return the number 23 if
a DoGet function is performed.
NOTE: If the OLGAS correlations are
not licensed, then the returned value

1990-2011 Petroleum Experts Limited

295

OpenServer

will be 20.
PROSPER.ANL.TCC.CORR[i]

Correlation Selected Flag (=1)


For example, the line:
DoSet "PROSPER.ANL.TCC.CORR[7]",
1
would select the Petroleum Experts 2
correlation in the screen. This has the
index 7. Setting the flag to 0:
DoSet "PROSPER.ANL.TCC.CORR[7]",
0
would unselect this correlation. NOTE:
The correlation index is in the order
they appear in the list of this
particular screen, not the list shown
in the previous page.

PROSPER.ANL.TCC.COMP.COUNT-1

Number of Comparison Points. This


refers to the number of available points in
the list of Pressure Vs Depth. A DoGet
command will return the number 10.

i= 0 : PROSPER.ANL.TCC.COMP.COUNT1
PROSPER.ANL.TCC.COMP[i].X

Pressure

PROSPER.ANL.TCC.COMP[i].Y

Measured Depth

PROSPER.ANL.TCC.COMP[i].T

True Vertical Depth

6.5.12 PCC - Pipeline Correlation Comparison


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.PCC.PRES

Manifold pressure

PROSPER.ANL.PCC.WC

Water cut

PROSPER.ANL.PCC.RATE

Rate

PROSPER.ANL.PCC.GOR

Total GOR

PROSPER.ANL.PCC.GORFREE

GOR free

PROSPER.ANL.PCC.WGR

Water gas ratio

PROSPER.ANL.PCC.GLRATE

Gas lift gas rate

PROSPER.ANL.PCC.RateType

Rate type:
i = 0 to 1

OpenServer User's Manual

PROSPER and the OpenServer

296

0 - Liquid rates
1 - Oil rates
PROSPER.ANL.PCC.MAX

Maximum Number of Comparison Points

PROSPER.ANL.PCC.DONE

Comparison Done Flag

i= 0 : PROSPER.ANL.TCC.CORR.COUNT1
PROSPER.ANL.PCC.CORR[i]
Example: To set the Beggs and Brill
correlation, use the following DoSet
command:
DoSet ("PROSPER.ANL.PCC.CORR[2]"),
1
To deselect the above correlation, use:
DoSet ("PROSPER.ANL.PCC.CORR[2]"),
0

Correlation selection using Correlation


Index (set flag = 1, un-set flag = 0)
i = 0 to 15
NOTE: OLGAS correlations can only be
selected if the corresponding licenses
are available:
0
FancherBrown
1
MukerjeeBrill
2
BeggsandBrill
3
DuklerFlannigan
4
DuklerEatonFlannigan
5
BeggsandBrillGasHead
6
GREmodifiedbyPE
7
GREwithDSM
8
GREoriginal
9
GREwithAE
10
PetroleumExperts4
11
Hydro3P
12
PetroleumExperts5
13
OLGAS2P
14
OLGAS3P
15
OLGAS3PEXT

PROSPER.ANL.PCC.CorrLabel[{Name}], i Selects the correlation using the


correlation name:
Example: To set the Beggs and Brill
i = 1 <Include correlation>
correlation, use the following DoSet
i = 0 <exclude correlation>
command:
NOTE: OLGAS correlations can only be
DoSet ("PROSPER.ANL.PCC.CorrLabel
selected if the corresponding licenses
are available:
[{BeggsandBrill}]"), 1
FancherBrown
MukerjeeBrill
BeggsandBrill
DuklerFlannigan
DuklerEatonFlannigan
BeggsandBrillGasHead
GREmodifiedbyPE
GREwithDSM
1990-2011 Petroleum Experts Limited

297

OpenServer

GREoriginal
GREwithAE
PetroleumExperts4
Hydro3P
PetroleumExperts5
OLGAS2P
OLGAS3P
OLGAS3PEXT
PROSPER.ANL.PCC.COMP.COUNT

Number of Comparison Points

i= 0 : PROSPER.ANL.TCC.COMP.COUNT1
PROSPER.ANL.PCC.COMP[i].I

Node Number

PROSPER.ANL.PCC.COMP[i].Y

Pressure

6.5.13 GMT - Gradient Matching


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.GMT.PRES

Wellhead pressure

PROSPER.ANL.GMT.WC

Water cut

PROSPER.ANL.GMT.Rate

Match rate

PROSPER.ANL.GMT.GOR

GOR

PROSPER.ANL.GMT.GORFREE

GOR free

PROSPER.ANL.GMT.RateType

Rate type
i = 0 to 1
0 - Liquid rates
1 - Oil rates

PROSPER.ANL.GMT.Match[i].X

Match data depth


i = 0 to 9

PROSPER.ANL.GMT.Match[0].Y

Match data pressure


i = 0 to 9

PROSPER.ANL.GMT.RATETYPE

Rate Type (0 Liquid 1 Oil 2 Gas)

PROSPER.ANL.GMT.MAX

Max Number of Match Points

PROSPER.ANL.GMT.DONE

Calculation Done Flag

PROSPER.ANL.GMT.RATE

Rate

PROSPER.ANL.GMT.GLRATE

Injected Gas Lift Gas Rate

OpenServer User's Manual

PROSPER and the OpenServer

298

PROSPER.ANL.GMT.GLDEPTH

Gas Lift Injection Depth

PROSPER.ANL.GMT.WGR

Water Gas Ratio

PROSPER.ANL.GMT.Corr[index], 1
or:
PROSPER.ANL.GMT.CorrLabel[{corrname}], 1

Tubing correlation selection can be


done using the correlation Index or
using the corrname
syntax
options:

Example: To set the Beggs and Brill correlation


NOTE: The OLGAS correlations
using the Index syntax option:
will only be selectable if the
corresponding license is available.
DoSet ("PROSPER.ANL.GMT.Corr[4]"), 1
Index
0 - DunsandRosModified
DoSet ("PROSPER.ANL.GMT.Corr[4]"), 0
1 - HagedornandBrown
2 - FancherBrown
Example: To set the Beggs and Brill correlation 3 - MukerjeeBrill
using the corrname syntax option:
4 - BeggsandBrill
5 - PetroleumExperts
DoSet
("PROSPER.ANL.GMT.CorrLabel 6 - Orkisewski
[{BeggsandBrill}]"), 1
7 - PetroleumExperts2
8 - DunsandRosOriginal
Change the suffix '1' to '0' to deselect the given
9 - PetroleumExperts3
correlation as shown above
10
GREmodifiedbyPetroleumExperts
11 - PetroleumExperts4
12 - Hydro3P
13 - PetroleumExperts5
14 - OLGAS2P
15 - OLGAS3P
16 - OLGAS3PEXT
To Deselect the Beggs and Brill correlation use:

PROSPER.ANL.GMT.CORR.COUNT

Number of Tubing Correlations

PROSPERR.ANL.GMT.MATCH.COUNT

Number of Match Points

i= 0 : PROSPER.ANL.GMT.MATCH.COUNT-1

6.5.14 GDT - Gradient Test Data


PROSPER.ANL.GDT.PLOT

Plot Gradient Test Data Flag

PROSPER.ANL.GDT.DATA.COUNT

Number of Test Points

i = 0 : PROSPER.ANL.GDT.DATA.COUNT1
PROSPER.ANL.GDT.DATA[i].MD

Measured Depth

1990-2011 Petroleum Experts Limited

299

OpenServer

PROSPER.ANL.GDT.DATA[i].PRES

Pressure

PROSPER.ANL.GDT.DATA[i].TEMP

Temperature

PROSPER.ANL.GDT.DATA[i].TVD

True Vertical Depth

6.5.15 VMT - VLP Matching


The following commands are valid for both DoSet and DoGet functions:
Naturally Flowing Well

Index i = 0 to 999

PROSPER.ANL.VMT.Data[i].Date

Test point date

PROSPER.ANL.VMT.DATA[i].
DATESTRING

Returns the date as a date string

PROSPER.ANL.VMT.DATA[i].
DATE

Returns the date in terms of number of seconds


since 01/01/1970

PROSPER.ANL.VMT.Data[i].Label

Test point comment

PROSPER.ANL.VMT.DATA[i].
THPRES

Tubing Head Pressure

PROSPER.ANL.VMT.DATA[i].
THTEMP

Tubing Head Temperature

PROSPER.ANL.VMT.DATA[i].WC

Water Cut

PROSPER.ANL.VMT.DATA[i].
RATE

Rate
i = 0 to 1
0 - Liquid rates
1 - Oil rates

PROSPER.ANL.VMT.Data[0].Rate

Gas rate

PROSPER.ANL.VMT.DATA[i].
GDEPTH

Gauge depth

PROSPER.ANL.VMT.DATA[i].
GPRES

Gauge pressure

PROSPER.ANL.VMT.Data[0].Pres

Reservoir pressure

PROSPER.ANL.VMT.DATA[i].
GOR

GOR

PROSPER.ANL.VMT.DATA[i].
GORFREE

Free GOR

PROSPER.ANL.VMT.DATA[i].WGR Water gas ratio


PROSPER.ANL.VMT.DATA[i].CGR Condensate gas ratio
PROSPER.ANL.VMT.DATA[i].

OpenServer User's Manual

Separator GOR

PROSPER and the OpenServer

300

SGOR
PROSPER.ANL.VMT.RATETYPE

Rate type
i = 0 to 1
0 - Liquid rate
1 - Oil rate

PROSPER.ANL.VMT.Corr[i], j

Correlation selection
i = Correlation Index
j = Set flag = 1, Unset Flag = 0
(see TCC_-_Tubing_Correlation_Comparison)

PROSPER.ANL.VMT.DONE

Match done flag

PROSPER.ANL.VMT.MAX

Maximum Number of Match Points

PROSPER.ANL.VMT.CORR.
COUNT

Returns the number of Tubing Correlations

PROSPER.ANL.VMT.DATA.
COUNT

Returns the number of well test Data (Match)


Points

PROSPER.ANL.VMT.DATA[i].
ENABLE

Enable / disable test data

i = 0 : PROSPER.ANL.VMT.DATA.
COUNT-1

i varies from 0 to (COUNT-1) where (COUNT) is


the value returned by the previous statement

Gas Lift
PROSPER.ANL.VMT.Data[0].Irate

Gas lift gas rate

PROSPER.ANL.VMT.Data[0].Idepth Injection depth - measured


ESP
PROSPER.ANL.VMT.Data[0].Freq

Operating frequency

PROSPER.ANL.VMT.Data[0].Wear Pump wear factor

6.5.16 PMT - PipeLine Matching


The following commands are valid for both DoSet and DoGet functions:
PROSPER.ANL.PMT.RateType

Rate
i = 0 to 1
0 - Liquid rates
1 - Oil rates

PROSPER.ANL.PMT.Data[0].Label

Match point comment


1990-2011 Petroleum Experts Limited

301

OpenServer

PROSPER.ANL.PMT.Data[0].THpres

Manifold pressure

PROSPER.ANL.PMT.Data[0].WC

Water cut

PROSPER.ANL.PMT.Data[0].Rate

Liquid rate

PROSPER.ANL.PMT.Data[0].Gpres

Tubing head match pressure

PROSPER.ANL.PMT.Data[0].GOR

GOR

PROSPER.ANL.PMT.Data[0].GORfree

GOR free

PROSPER.ANL.PMT.Data[0].WGR

Water gas ratio

PROSPER.ANL.PMT.Data[0].CGR

Condensate gas ratio

PROSPER.ANL.PMT.Data[0].SGOR

Separator GOR

PROSPER.ANL.PMT.Corr[i]

Correlation
selection
(See
PCC__Pipeline_Correlation_Comparison)

PROSPER.ANL.PMT.DONE

Match Done FLag

PROSPER.ANL.PMT.MAX

Maximum Number of Match Points

PROSPER.ANL.PMT.DATA.COUNT

Number of Data (Match) Points

i = 0 : PROSPER.ANL.PMT.DATA.
COUNT-1
PROSPER.ANL.PMT.DATA[i].ENABLE

Enable / disable test data flag

6.5.17 CHK - Choke Performance


PROSPER.ANL.CHK.Method, i

Calculation option:
i = 0 to 2
0 - Predict mass flowrate
1 - Predict pressure drop
2 - Predict choke setting

PROSPER.ANL.CHK.Choke, i

Choke method:
i = 0, 1, 2, 4
0 - Petroleum Experts
1 - HYDRO - short frozen flow
2 - HYDRO - long frozen flow
4 - ELF (recommended)

PROSPER.ANL.CHK.DATA[16]

Total GOR

PROSPER.ANL.CHK.DATA[17]

Water Cut

PROSPER.ANL.CHK.DATA[0]

Inlet Pressure

PROSPER.ANL.CHK.DATA[1]

Inlet Temperature

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.ANL.CHK.DATA[2]

Outlet Pressure

PROSPER.ANL.CHK.DATA[4]

Choke Setting

PROSPER.ANL.CHK.DONE

Calculation Done Flag

PROSPER.ANL.CHK.CHOKE

Calculation Type Flag

PROSPER.ANL.CHK.VALVE

Valve Characteristics Flag

PROSPER.ANL.CHK.DATA[3]

Outlet Temperature

PROSPER.ANL.CHK.DATA[5]

Liquid Rate

PROSPER.ANL.CHK.DATA[6]

Gas Rate

PROSPER.ANL.CHK.DATA[7]

Inlet Diameter

PROSPER.ANL.CHK.DATA[8]

Outlet Diameter

PROSPER.ANL.CHK.DATA[9]

Contraction Coefficient

PROSPER.ANL.CHK.DATA[10]

Max Ct Value

PROSPER.ANL.CHK.DATA[11]

Max Cv For Water Only

PROSPER.ANL.CHK.DATA[12]

Hydrostatic Height From 1 To 2

PROSPER.ANL.CHK.DATA[13]

Hydrostatic Height From 3 To 2

PROSPER.ANL.CHK.DATA[14]

Stem Travel

PROSPER.ANL.CHK.DATA[15]

Slip Factor At 2

PROSPER.ANL.CHK.DATA[18]

Condensate Gas Ratio

PROSPER.ANL.CHK.DATA[19]

Water Gas Ratio

PROSPER.ANL.CHK.DATA[20]

Separator GOR

PROSPER.ANL.CHK.DATA[21]

Mass Flowrate

PROSPER.ANL.CHK.DATA[22]

Critical Pressure

PROSPER.ANL.CHK.DATA[23]

Critical Rate

302

6.5.18 GEN - Generate For GAP


PROSPER.ANL.GEN.DONE

Calculation Done Flag

PROSPER.ANL.GEN.PIPE

Pipeline Correlation

PROSPER.ANL.GEN.TUBING

Tubing Correlation

PROSPER.ANL.GEN.SLUG

Slug Method

PROSPER.ANL.GEN.RATEMETHOD

Rate Type:
1990-2011 Petroleum Experts Limited

303

OpenServer

0 - Automatic linear
1 - Automatic geometric
PROSPER.ANL.GEN.PRES

First Node Pressure

PROSPER.ANL.GEN.WC

Water Cut

PROSPER.ANL.GEN.TOTALGOR

Total GOR

PROSPER.ANL.GEN.WGR

Water Gas Ratio

PROSPER.ANL.GEN.CGR

Condensate Gas Ratio

PROSPER.ANL.GEN.SGOR

Separator GOR

PROSPER.ANL.GEN.RATES.COUNT

Number of Rates

i = 0 : PROSPER.ANL.GEN.RATES.COUNT1
PROSPER.ANL.GEN.RATES[i]

Rates

PROSPER.ANL.GEN.MANPRES.COUNT

Number of Manifold Pressures

i = 0 : PROSPER.ANL.GEN.MANPRES.
COUNT-1
PROSPER.ANL.GEN.MANPRES[i]

Manifold Pressures

PROSPER.ANL.GEN.GENGLR[i].COUNT

Number of GLRs per Manifold


Pressure

j = 0 : PROSPER.ANL.GEN.GENGLR[i].
COUNT-1
PROSPER.ANL.GEN.GENGLR[i][j]

GLRs

6.5.19 WHP - BHP from WHP


PROSPER.ANL.WHP.DONE

Calculation Done Flag

PROSPER.ANL.WHP.DATA.COUNT

Number of Records

i = 0 : PROSPER.ANL.WHP.DATA.COUNT-1

OpenServer User's Manual

PROSPER and the OpenServer

304

PROSPER.ANL.WHP.DATA[i].ENABLE

Enable Flag

PROSPER.ANL.WHP.DATA[i].SEL

Selected Flag

PROSPER.ANL.WHP.DATA[i].LABEL

Label

PROSPER.ANL.WHP.DATA[i].TIME

Time

PROSPER.ANL.WHP.DATA[i].RATE

Rate (Liquid/Oil/Gas)

PROSPER.ANL.WHP.DATA[i].WHP

WellHead Pressure

PROSPER.ANL.WHP.DATA[i].WHT

WellHead Temperature

PROSPER.ANL.WHP.DATA[i].GASF

Gas Fraction
GOR / Gas Rate
CGR / Oil Rate
Separator GOR / Oil Rate

PROSPER.ANL.WHP.DATA[i].WATF

Water Fraction
Water Cut / Water Rate
WGR / Water Rate
WGR / Water Rate

PROSPER.ANL.WHP.DATA[i].BHP

Bottom Hole Flowing Pressure

PROSPER.ANL.WHP.DATA[i].GLIFT

Injected Gaslift Gas rate

6.5.20 PLD - Plot Details


PROSPER.ANL.PLD.DET.COUNT

Number of Plot Detail Records

i = 0 : PROSPER.ANL.PLD.DET.COUNT-1
PROSPER.ANL.PLD.DET[i].USED

Used Flag

PROSPER.ANL.PLD.DET[i].TITLE

Graph Title

PROSPER.ANL.PLD.DET[i].XAXIS

X axis Label

PROSPER.ANL.PLD.DET[i].YAXIS

Y axis Label

PROSPER.ANL.PLD.DET[i].XMIN

Minimum X Value

PROSPER.ANL.PLD.DET[i].XMAX

Maximum X Value

PROSPER.ANL.PLD.DET[i].XSTEP

X axis Step Value

PROSPER.ANL.PLD.DET[i].YMIN

Minimum Y Value

PROSPER.ANL.PLD.DET[i].YMAX

Maximum Y Value

1990-2011 Petroleum Experts Limited

305

OpenServer

PROSPER.ANL.PLD.DET[i].YSTEP

Y axis Step Value

PROSPER.ANL.PLD.DET[i].TMIN

Minimum X Value (2nd X Axis)

PROSPER.ANL.PLD.DET[i].TMAX

Maximum X Value (2nd X Axis)

PROSPER.ANL.PLD.DET[i].TSTEP

X axis Step Value (2nd X Axis)

PROSPER.ANL.PLD.DET[i].XEXTENT

X axis Extent

PROSPER.ANL.PLD.DET[i].YEXTENT

Y axis EXtent

PROSPER.ANL.PLD.DET[i].XBLKS

Number of X axis Grid Blocks

PROSPER.ANL.PLD.DET[i].YBLKS

Number of Y axis Grid Blocks

PROSPER.ANL.PLD.DET[i].THICK

Line Thickness

PROSPER.ANL.PLD.DET[i].METHOD

Scaling Method

PROSPER.ANL.PLD.DET[i].SCALE

Plot Scales Flag

PROSPER.ANL.PLD.DET[i].LABEL

Plot Labels Flag

PROSPER.ANL.PLD.DET[i].GRID

Plot Grid FLag

PROSPER.ANL.PLD.DET[i].STAMP

Date Stamp Title Flag

PROSPER.ANL.PLD.DET[i].LEGEND

Draw LEgendds Flag

PROSPER.ANL.PLD.DET[i].MOUSE

Show Mouse Position Flag

PROSPER.ANL.PLD.DET[i].HORIZ.
HEIGHT

Horizontal Font Details

PROSPER.ANL.PLD.DET[i].HORIZ.
WIDTH
PROSPER.ANL.PLD.DET[i].HORIZ.
ESCAPEMENT
PROSPER.ANL.PLD.DET[i].HORIZ.
ORIENTATION
PROSPER.ANL.PLD.DET[i].HORIZ.
WEIGHT
PROSPER.ANL.PLD.DET[i].HORIZ.ITALIC
PROSPER.ANL.PLD.DET[i].HORIZ.
UNDERLINE
PROSPER.ANL.PLD.DET[i].HORIZ.
STRIKEOUT
PROSPER.ANL.PLD.DET[i].HORIZ.
CHARSET

OpenServer User's Manual

PROSPER and the OpenServer

306

PROSPER.ANL.PLD.DET[i].HORIZ.
OUTPRECISION
PROSPER.ANL.PLD.DET[i].HORIZ.
CLIPPRECISION
PROSPER.ANL.PLD.DET[i].HORIZ.
QUALITY
PROSPER.ANL.PLD.DET[i].HORIZ.
PITCHANDFAMILY
PROSPER.ANL.PLD.DET[i].HORIZ.
FACENAME
PROSPER.ANL.PLD.DET[i].VERT.
HEIGHT

Vertical Font Details

PROSPER.ANL.PLD.DET[i].VERT.WIDTH
PROSPER.ANL.PLD.DET[i].VERT.
ESCAPEMENT
PROSPER.ANL.PLD.DET[i].VERT.
ORIENTATION
PROSPER.ANL.PLD.DET[i].VERT.
WEIGHT
PROSPER.ANL.PLD.DET[i].VERT.ITALIC
PROSPER.ANL.PLD.DET[i].VERT.
UNDERLINE
PROSPER.ANL.PLD.DET[i].VERT.
STRIKEOUT
PROSPER.ANL.PLD.DET[i].VERT.
CHARSET
PROSPER.ANL.PLD.DET[i].VERT.
OUTPRECISION
PROSPER.ANL.PLD.DET[i].VERT.
CLIPPRECISION
PROSPER.ANL.PLD.DET[i].VERT.
QUALITY
PROSPER.ANL.PLD.DET[i].VERT.
PITCHANDFAMILY
PROSPER.ANL.PLD.DET[i].VERT.
FACENAME
PROSPER.ANL.PLD.DET[i].COLOR.

Number of Colour Records


1990-2011 Petroleum Experts Limited

307

OpenServer

COUNT
j = 0 : PROSPER.ANL.PLD.DET[i].
COLOR.COUNT-1
PROSPER.ANL.PLD.DET[i].COLOR[j].
BAW

Black And White Setting

PROSPER.ANL.PLD.DET[i].COLOR[j].
GRY

Grey Scale Setting

PROSPER.ANL.PLD.DET[i].COLOR[j].
COL

Colour Setting

PROSPER.ANL.PLD.DET[i].ANN.COUNT Number of Annotation Records


j = 0 : PROSPER.ANL.PLD.DET[i].ANN.
COUNT-1
PROSPER.ANL.PLD.DET[i].ANN[j].TEXT

Annotation Text

PROSPER.ANL.PLD.DET[i].ANN[j].RECT

Bounding Rectangle

PROSPER.ANL.PLD.DET[i].ANN[j].SHOW Show Flag


PROSPER.ANL.PLD.DET[i].ANN[j].FILL

Background Fill Flag

PROSPER.ANL.PLD.DET[i].ANN[j].
VERTICAL

Text alignment flag

PROSPER.ANL.PLD.DET[i].ANN[j].
COLTEXT

Text Colour

PROSPER.ANL.PLD.DET[i].ANN[j].
COLFILL

Background Colour

PROSPER.ANL.PLD.DET[i].ANN[j].
COLBORDER

Border Colour

PROSPER.ANL.PLD.DET[i].ANN[j].FONT. Annotation Font Details


HEIGHT
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
WIDTH
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
ESCAPEMENT
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
ORIENTATION
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
WEIGHT

OpenServer User's Manual

PROSPER and the OpenServer

308

PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
ITALIC
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
UNDERLINE
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
STRIKEOUT
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
CHARSET
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
OUTPRECISION
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
CLIPPRECISION
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
QUALITY
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
PITCHANDFAMILY
PROSPER.ANL.PLD.DET[i].ANN[j].FONT.
FACENAME

6.5.21 COR - Flow Correlation Data


PROSPER.ANL.COR.CORR.COUNT

Number of Correlations

i = 0 : CORR.COUNT-1
PROSPER.ANL.COR.CORR[i].DLL

DLL Index

PROSPER.ANL.COR.CORR[i].NAME

Correlations Name

PROSPER.ANL.COR.CORR[i].INDEX

Correlations Index

PROSPER.ANL.COR.CORR[i].PIPE

Valid for PipeLine

PROSPER.ANL.COR.CORR[i].TUBE

Valid for Tubing

PROSPER.ANL.COR.CORR[i].GAS

Valid for Oil

PROSPER.ANL.COR.CORR[i].OIL

Valid for Gas

PROSPER.ANL.COR.CORR[i].CON

Valid for Condensate

PROSPER.ANL.COR.CORR[i].SELTUBE Selected as Tubing

Correlation

PROSPER.ANL.COR.CORR[i].SELPIPE

Selected as Pipeline Correlation

PROSPER.ANL.COR.CORR[i].COMP

Selected for Tubing Comparison


1990-2011 Petroleum Experts Limited

309

OpenServer

PROSPER.ANL.COR.CORR[i].GMATCH

Selected for Gradient Matching

PROSPER.ANL.COR.CORR[i].VMATCH

Selected for VLP

PROSPER.ANL.COR.CORR[i].PMATCH

Selected for PipeLine Matching

PROSPER.ANL.COR.CORR[i].PCOMP

Selected for PipeLine Comparison

PROSPER.ANL.COR.CORR[i].SDTUBE

Tubing Matching Standard Deviation

PROSPER.ANL.COR.CORR[i].SDPIPE

PipeLine Matching Standard Deviation

Matching

PROSPER.ANL.COR.CORR[i].THRTUBE Threshold Flag for tubing


PROSPER.ANL.COR.CORR[i].THRPIPE

Threshold Flag for PipeLine

j=0:1
PROSPER.ANL.COR.CORR[i].A[j]

Matching Parameters for Tubing

PROSPER.ANL.COR.CORR[i].S[j]

Matching Parameters for PipeLine

6.5.22 THR - Correlation Threshold Data


PROSPER.ANL.THR.USE

Use Threshold Angle Flag

PROSPER.ANL.THR.TUBE

Pipeline Correlation to use for tubing

PROSPER.ANL.THR.ANGT

Angle Greater Than (From vertical)

PROSPER.ANL.THR.PIPE

Tubing Correlation to use for Pipeline

PROSPER.ANL.THR.ANGP

Angle Less Than (From Vertical)

6.5.23 CST - Constrained System Calculations


PROSPER.ANL.CST.DONE

Calculation Done Flag

PROSPER.ANL.CST.PIPE

Pipeline Correlation

PROSPER.ANL.CST.TUBING

Tubing Correlation

PROSPER.ANL.CST.PRES

Constrained Node Pressure

PROSPER.ANL.CST.WC

Water Cut

PROSPER.ANL.CST.WGR

Water Gas Ratio

PROSPER.ANL.CST.TIME

Time Since Production Started

OpenServer User's Manual

PROSPER and the OpenServer

310

PROSPER.ANL.CST.SENS.TNODE

First Node

PROSPER.ANL.CST.SENS.BNODE

Last Node

PROSPER.ANL.CST.SENS.TNODETYPE

First Node Type

PROSPER.ANL.CST.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.CST.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.CST.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.CST.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.CST.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.CST.SENS.YVAR

X Variable

PROSPER.ANL.CST.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.CST.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.CST.SENS.GENNUM

Generate Rates Number of Values

PROSPER.ANL.CST.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.CST.SENS.REFPRES

Reference Pressure

PROSPER.ANL.CST.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.CST.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.CST.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.CST.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.CST.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.CST.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.CST.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.CST.SENS.VARS.VAL1.NUM

1st Sensitivity Variable No of


values

PROSPER.ANL.CST.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.CST.SENS.VARS.VAL2.NUM

2nd Sensitivity Variable No of


values

PROSPER.ANL.CST.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.CST.SENS.VARS.VAL3.NUM

3rd Sensitivity Variable No of


values

PROSPER.ANL.CST.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
1990-2011 Petroleum Experts Limited

311

OpenServer

PROSPER.ANL.CST.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.CST.SENS.VARS.GENLAST[i]

Generate Values Last Value

PROSPER.ANL.CST.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.CST.SENS.VARS.GENSPACE
[i]

Generate Values Spacing Type

PROSPER.ANL.CST.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.CST.SENS.COMB.DATA[i].
TYPE

Combination Variable Type

PROSPER.ANL.CST.SENS.COMB.DATA[i].
UNIT

Combination Variable Unit

PROSPER.ANL.CST.SENS.COMB.DATA[i].
INDEX

Combination Variable Index

PROSPER.ANL.CST.SENS.COMB.DATA[i].
RATE

Combination Variable Rate

PROSPER.ANL.CST.SENS.COMB.DATA[i].VAL. Combination Variable No of


Values
COUNT
j = 0 : No of Values-1
PROSPER.ANL.CST.SENS.COMB.DATA[i].VAL Combination Variable Values
[j]

6.5.24 CVT - Constrained VLP Calculations


PROSPER.ANL.CVT.DONE

Calculation Done Flag

PROSPER.ANL.CVT.PIPE

Pipeline Correlation

PROSPER.ANL.CVT.TUBING

Tubing Correlation

PROSPER.ANL.CVT.FREE

Free End Node

PROSPER.ANL.CVT.CONS

Constrained Node

PROSPER.ANL.CVT.TYPE

Rate Type

PROSPER.ANL.CVT.RATES.COUNT

Number of Rates

i = 0 : PROSPER.ANL.CVT.RATES.COUNT-1
PROSPER.ANL.CVT.RATES[i]

OpenServer User's Manual

Rate

PROSPER and the OpenServer

312

PROSPER.ANL.CVT.PRES

Constrained Node Pressure

PROSPER.ANL.CVT.WC

Water Cut

PROSPER.ANL.CVT.WGR

Water Gas Ratio

PROSPER.ANL.CVT.TIME

Time Since Production Started

PROSPER.ANL.CVT.TEMP

Free End Fluid Temperature

PROSPER.ANL.CVT.SENS.TNODE

First Node

PROSPER.ANL.CVT.SENS.BNODE

Last Node

PROSPER.ANL.CVT.SENS.TNODETYPE

First Node Type

PROSPER.ANL.CVT.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.CVT.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.CVT.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.CVT.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.CVT.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.CVT.SENS.YVAR

X Variable

PROSPER.ANL.CVT.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.CVT.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.CVT.SENS.GENNUM

Generate Rates Number of Values

PROSPER.ANL.CVT.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.CVT.SENS.REFPRES

Reference Pressure

PROSPER.ANL.CVT.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.CVT.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.CVT.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.CVT.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.CVT.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.CVT.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.CVT.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.CVT.SENS.VARS.VAL1.NUM

1st Sensitivity Variable No of


values

PROSPER.ANL.CVT.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.CVT.SENS.VARS.VAL2.NUM

2nd Sensitivity Variable No of


values

1990-2011 Petroleum Experts Limited

313

OpenServer

PROSPER.ANL.CVT.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.CVT.SENS.VARS.VAL3.NUM

3rd Sensitivity Variable No of


values

PROSPER.ANL.CVT.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
PROSPER.ANL.CVT.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.CVT.SENS.VARS.GENLAST[i]

Generate Values Last Value

PROSPER.ANL.CVT.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.CVT.SENS.VARS.GENSPACE
[i]

Generate Values Spacing Type

PROSPER.ANL.CVT.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.CVT.SENS.COMB.DATA[i].
TYPE

Combination Variable Type

PROSPER.ANL.CVT.SENS.COMB.DATA[i].UNIT Combination Variable Unit


PROSPER.ANL.CVT.SENS.COMB.DATA[i].
INDEX

Combination Variable Index

PROSPER.ANL.CVT.SENS.COMB.DATA[i].
RATE

Combination Variable Rate

PROSPER.ANL.CVT.SENS.COMB.DATA[i].VAL. Combination Variable No of


Values
COUNT
j = 0 : No of Values-1
PROSPER.ANL.CVT.SENS.COMB.DATA[i].VAL Combination Variable Values
[j]

6.5.25 UST - Unconstrained System Calculations


PROSPER.ANL.UST.DONE

Calculation Done Flag

PROSPER.ANL.UST.PIPE

Pipeline Correlation

PROSPER.ANL.UST.TUBING

Tubing Correlation

PROSPER.ANL.UST.TYPE

Rate Type

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.ANL.UST.RATES.COUNT

314

Number of Rates

i = 0 : PROSPER.ANL.UST.RATES.COUNT-1
PROSPER.ANL.UST.RATES[i]

Rate

PROSPER.ANL.UST.WC

Water Cut

PROSPER.ANL.UST.WGR

Water Gas Ratio

PROSPER.ANL.UST.TIME

Time Since Production Started

PROSPER.ANL.UST.SENS.TNODE

First Node

PROSPER.ANL.UST.SENS.BNODE

Last Node

PROSPER.ANL.UST.SENS.TNODETYPE

First Node Type

PROSPER.ANL.UST.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.UST.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.UST.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.UST.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.UST.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.UST.SENS.YVAR

X Variable

PROSPER.ANL.UST.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.UST.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.UST.SENS.GENNUM

Generate Rates Number of Values

PROSPER.ANL.UST.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.UST.SENS.REFPRES

Reference Pressure

PROSPER.ANL.UST.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.UST.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.UST.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.UST.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.UST.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.UST.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.UST.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.UST.SENS.VARS.VAL1.NUM

1st Sensitivity Variable No of


values

PROSPER.ANL.UST.SENS.VARS.VAL1[I]

1st Sensitivity Values

PROSPER.ANL.UST.SENS.VARS.VAL2.NUM

2nd Sensitivity Variable No of


values
1990-2011 Petroleum Experts Limited

315

OpenServer

PROSPER.ANL.UST.SENS.VARS.VAL2[I]

2nd Sensitivity Values

PROSPER.ANL.UST.SENS.VARS.VAL3.NUM

3rd Sensitivity Variable No of


values

PROSPER.ANL.UST.SENS.VARS.VAL3[I]

3rd Sensitivity Values

i=0:3
PROSPER.ANL.UST.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.UST.SENS.VARS.GENLAST[i]

Generate Values Last Value

PROSPER.ANL.UST.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.UST.SENS.VARS.GENSPACE[i] Generate Values Spacing Type


PROSPER.ANL.UST.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.UST.SENS.COMB.DATA[i].TYPE Combination Variable Type


PROSPER.ANL.UST.SENS.COMB.DATA[i].UNIT Combination Variable Unit
PROSPER.ANL.UST.SENS.COMB.DATA[i].
INDEX

Combination Variable Index

PROSPER.ANL.UST.SENS.COMB.DATA[i].
RATE

Combination Variable Rate

PROSPER.ANL.UST.SENS.COMB.DATA[i].VAL. Combination Variable No of


Values
COUNT
j = 0 : No of Values-1
PROSPER.ANL.UST.SENS.COMB.DATA[i].VAL
[j]

Combination Variable Values

6.5.26 UVT - Unconstrained VLP Calculations


PROSPER.ANL.UVT.DONE

Calculation Done Flag

PROSPER.ANL.UVT.PIPE

Pipeline Correlation

PROSPER.ANL.UVT.TUBING

Tubing Correlation

PROSPER.ANL.UVT.FIRST

First Node

PROSPER.ANL.UVT.LAST

Last Node

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.ANL.UVT.TYPE

Rate Type

PROSPER.ANL.UVT.RATES.COUNT

Number of Rates

316

i = 0 : PROSPER.ANL.UVT.RATES.COUNT-1
PROSPER.ANL.UVT.RATES[i]

Rate

PROSPER.ANL.UVT.PRES

First Node Pressure

PROSPER.ANL.UVT.WC

Water Cut

PROSPER.ANL.UVT.WGR

Water Gas Ratio

PROSPER.ANL.UVT.TIME

Time Since Production Started

PROSPER.ANL.UVT.TEMP

First Node FLuid Temperature

PROSPER.ANL.UVT.SENS.TNODE

First Node

PROSPER.ANL.UVT.SENS.BNODE

Last Node

PROSPER.ANL.UVT.SENS.TNODETYPE

First Node Type

PROSPER.ANL.UVT.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.UVT.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.UVT.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.UVT.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.UVT.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.UVT.SENS.YVAR

X Variable

PROSPER.ANL.UVT.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.UVT.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.UVT.SENS.GENNUM

Generate Rates Number of


Values

PROSPER.ANL.UVT.SENS.GENTYPE

Generate Rates Spacing Type

PROSPER.ANL.UVT.SENS.REFPRES

Reference Pressure

PROSPER.ANL.UVT.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.UVT.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.UVT.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.UVT.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.UVT.SENS.VARS.UNIT1

1st Sensitivity Unit

1990-2011 Petroleum Experts Limited

317

OpenServer

PROSPER.ANL.UVT.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.UVT.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.UVT.SENS.VARS.VAL1.NUM

1st Sensitivty Variable No of


values

PROSPER.ANL.UVT.SENS.VARS.VAL1[I]

1st Sensitivty Values

PROSPER.ANL.UVT.SENS.VARS.VAL2.NUM

2nd Sensitivty Variable No of


values

PROSPER.ANL.UVT.SENS.VARS.VAL2[I]

2nd Sensitivty Values

PROSPER.ANL.UVT.SENS.VARS.VAL3.NUM

3rd Sensitivty Variable No of


values

PROSPER.ANL.UVT.SENS.VARS.VAL3[I]

3rd Sensitivty Values

i=0:3
PROSPER.ANL.UVT.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.UVT.SENS.VARS.GENLAST[i]

Generate Values Last Value

PROSPER.ANL.UVT.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.UVT.SENS.VARS.GENSPACE[i]

Generate Values Spacing Type

PROSPER.ANL.UVT.SENS.COMB.DATA.COUNT Number of Combination Records


PROSPER.ANL.UVT.SENS.COMB.DATA[i].TYPE

Combination Variable Type

PROSPER.ANL.UVT.SENS.COMB.DATA[i].UNIT

Combination Variable Unit

PROSPER.ANL.UVT.SENS.COMB.DATA[i].INDEX Combination Variable Index


PROSPER.ANL.UVT.SENS.COMB.DATA[i].RATE Combination Variable Rate
PROSPER.ANL.UVT.SENS.COMB.DATA[i].VAL.
COUNT

Combination Variable No of
Values

j = 0 : No of Values-1
PROSPER.ANL.UVT.SENS.COMB.DATA[i].VAL[j] Combination Variable Values

OpenServer User's Manual

PROSPER and the OpenServer

318

6.5.27 UGT - Unconstrained Gradient Calculations


PROSPER.ANL.UGT.DONE

Calculation Done Flag

PROSPER.ANL.UGT.PIPE

Pipeline Correlation

PROSPER.ANL.UGT.TUBING

Tubing Correlation

PROSPER.ANL.UGT.SLUG

Slug Method

PROSPER.ANL.UGT.FIRST

First Node

PROSPER.ANL.UGT.LAST

Last Node

PROSPER.ANL.UGT.TYPE

Rate Type

PROSPER.ANL.UGT.RATES

Rate

PROSPER.ANL.UGT.PRES

First Node Pressure

PROSPER.ANL.UGT.WC

Water Cut

PROSPER.ANL.UGT.WGR

Water Gas Ratio

PROSPER.ANL.UGT.TIME

Time Since Production Started

PROSPER.ANL.UGT.TEMP

First Node Fluid Temperature

PROSPER.ANL.UGT.SENS.TNODE

First Node

PROSPER.ANL.UGT.SENS.BNODE

Last Node

PROSPER.ANL.UGT.SENS.TNODETYPE

First Node Type

PROSPER.ANL.UGT.SENS.BNODETYPE

Last Node Type

PROSPER.ANL.UGT.SENS.TNODEDEPTH

First Node Depth

PROSPER.ANL.UGT.SENS.BNODEDEPTH

Last Node Depth

PROSPER.ANL.UGT.SENS.XPVD

X Variable PvD Plot

PROSPER.ANL.UGT.SENS.YPVD

Y Variable PvD Plot

PROSPER.ANL.UGT.SENS.YVAR

X Variable

PROSPER.ANL.UGT.SENS.GENFIRST

Generate Rates First Value

PROSPER.ANL.UGT.SENS.GENLAST

Generate Rates Last Value

PROSPER.ANL.UGT.SENS.GENNUM

Generate Rates Number of Values

PROSPER.ANL.UGT.SENS.GENTYPE

Generate Rates Spacing Type

1990-2011 Petroleum Experts Limited

319

OpenServer

PROSPER.ANL.UGT.SENS.REFPRES

Reference Pressure

PROSPER.ANL.UGT.SENS.REFTEMP

Reference Temperature

PROSPER.ANL.UGT.SENS.VARS.VAR1

1st Sensitivity Variable

PROSPER.ANL.UGT.SENS.VARS.VAR2

2nd Sensitivity Variable

PROSPER.ANL.UGT.SENS.VARS.VAR3

3rd Sensitivity Variable

PROSPER.ANL.UGT.SENS.VARS.UNIT1

1st Sensitivity Unit

PROSPER.ANL.UGT.SENS.VARS.UNIT2

2nd Sensitivity Unit

PROSPER.ANL.UGT.SENS.VARS.UNIT3

3rd Sensitivity Unit

PROSPER.ANL.UGT.SENS.VARS.VAL1.NUM

1st Sensitivty Variable No of values

PROSPER.ANL.UGT.SENS.VARS.VAL1[I]

1st Sensitivty Values

PROSPER.ANL.UGT.SENS.VARS.VAL2.NUM

2nd Sensitivty Variable No of


values

PROSPER.ANL.UGT.SENS.VARS.VAL2[I]

2nd Sensitivty Values

PROSPER.ANL.UGT.SENS.VARS.VAL3.NUM

3rd Sensitivty Variable No of


values

PROSPER.ANL.UGT.SENS.VARS.VAL3[I]

3rd Sensitivty Values

i=0:3
PROSPER.ANL.UGT.SENS.VARS.GENFIRST[i]

Generate Values First Value

PROSPER.ANL.UGT.SENS.VARS.GENLAST[i]

Generate Values Last Value

PROSPER.ANL.UGT.SENS.VARS.GENNUM[i]

Generate Values Number of


Values

PROSPER.ANL.UGT.SENS.VARS.GENSPACE
[i]

Generate Values Spacing Type

PROSPER.ANL.UGT.SENS.COMB.DATA.
COUNT

Number of Combination Records

PROSPER.ANL.UGT.SENS.COMB.DATA[i].
TYPE

Combination Variable Type

PROSPER.ANL.UGT.SENS.COMB.DATA[i].UNIT Combination Variable Unit


PROSPER.ANL.UGT.SENS.COMB.DATA[i].
INDEX

Combination Variable Index

PROSPER.ANL.UGT.SENS.COMB.DATA[i].

Combination Variable Rate

OpenServer User's Manual

PROSPER and the OpenServer

320

RATE
PROSPER.ANL.UGT.SENS.COMB.DATA[i].VAL. Combination Variable No of
Values
COUNT
j = 0 : No of Values-1
PROSPER.ANL.UGT.SENS.COMB.DATA[i].VAL Combination Variable Values
[j]

6.6

Artificial Lift Design Input Data

6.6.1 GasLift Design


The following commands are valid for both DoSet and DoGet functions:
Gas Lift Design - New Well:
PROSPER.ANL.GLD.DesignMethod, i Design rate method:
i = 0 to 2
0 - Entered by user
1 - Calculated from maximum production
2 - Calculated from maximum revenue
Entered by User
PROSPER.ANL.GLD.DesignType, i
Design type:
i = 0 to 1
0 - Liquid
1 - Oil
PROSPER.ANL.GLD.DesignRate
Design rate
PROSPER.ANL.GLD.MAXGAS
Maximum gas available
PROSPER.ANL.GLD.MAXGASUL
Maximum gas during unloading
PROSPER.ANL.GLD.FWHP
Flowing top node pressure
PROSPER.ANL.GLD.UWHP
Unloading top node pressure
PROSPER.ANL.GLD.OPINJPRES
Operating injection pressure
PROSPER.ANL.GLD.KOINJPRES
Kick-off injection pressure
PROSPER.ANL.GLD.DPVALVE
Desired dP across valve
PROSPER.ANL.GLD.MAXDEPTH
Max depth of injection
PROSPER.ANL.GLD.WC
Water cut
PROSPER.ANL.GLD.MINSPACE
Minimum spacing
PROSPER.ANL.GLD.STATGRAD
Static gradient of load fluid
PROSPER.ANL.GLD.MINTRAN
Minimum transfer dP
PROSPER.ANL.GLD.SAFETY
Safety for closure of last unloading valve
PROSPER.ANL.GLD.Solgor
Total GOR
PROSPER.ANL.GLD.ThornV
De-rating percentage for valves

1990-2011 Petroleum Experts Limited

321

OpenServer

PROSPER.ANL.GLD.ValveType, i

Valve type:
i = 0 to 2
0 - Casing sensitive
1 - Tubing sensitive
2 - Proportional
PROSPER.ANL.GLD.ValveD1
Min CHP decrease per valve
PROSPER.ANL.GLD.ValveSet, i
Valve settings:
i = 1 to 4
1 - PVc = gas pressure
2 - First valve PVo = gas pressure
3 - All valves PVo = gas pressure
4 - Pmin - Pmax
PROSPER.ANL.GLD.LastValve, i
Injection point:
i = 0 to 1
0 - Injection point is orifice
1 - Injection point is valve
PROSPER.ANL.GLD.Dome, i
Dome pressure correction above 1200psig:
i = 0 to 1
0 - No
1 - Yes
PROSPER.ANL.GLD.SpacngMethod, i Valve spacing method:
i = 0 to 1
0 - Normal
1 - Spacing line procedure
PROSPER.ANL.GLD.CheckRate, i
Check rate conformance with IPR:
i = 0 to 1
0 - Yes
1 - No
PROSPER.ANL.GLD.Tubing
Vertical lift correlation (see
Calculation_Input_Data)
PROSPER.ANL.GLD.Pipe
Surface pipe correlation (see PCC__Pipeline_Correlation_Comparison)
PROSPER.ANL.GLD.CheckIPR, i
User IPr for unloading:
i = 0 to 1
0 - Yes
1 - No
PROSPER.ANL.GLD.Orifice, i
Orifice sizing on:
i = 0 to 1
0 - Calculated dP @ orifice
1 - Min dP across orifice
PROSPER.ANL.GLD.ThornO
De-rating percentage for orifice
PROSPER.ANL.GLD.VALVEDB.
Current valve type manufacturer
MANU
PROSPER.ANL.GLD.VALVEDB.TYPE Valve type folder
PROSPER.ANL.GLD.VALVEDB.
Valve specification
SPEC

OpenServer User's Manual

PROSPER and the OpenServer

322

PROSPER.ANL.GLD.DONERATE
Get rate done flag
PROSPER.ANL.GLD.DONECALC
Calculation done flag
PROSPER.ANL.GLD.FRACTEF
Fraction of TEF
PROSPER.ANL.GLD.DOME
Dome pressure correction above 1200psig
PROSPER.ANL.GLD.MAXPORT
Max port size
PROSPER.ANL.GLD.VALVEDB.SIZE Valve Port Size
PROSPER.ANL.GLD.VALVEDB.RVAL Valve R value
PROSPER.ANL.GLD.VALVE.COUNT Number of mandrels
I = 0 : PROSPER.ANL.GLD.VALVE.
COUNT-1
PROSPER.ANL.GLD.VALVE[0].TYPE Valve type
PROSPER.ANL.GLD.VALVE[i].
Enable flag
ENABLE
PROSPER.ANL.GLD.VALVE[i].
dP casing
CASING
PROSPER.ANL.GLD.Valve[0].GasInj Valve gas lift gas injection value
PROSPER.ANL.GLD.VALVE[i].TVD
True Vertical Depth
PROSPER.ANL.GLD.VALVE[i].
Tubing pressure
TUBPRES
PROSPER.ANL.GLD.VALVE[i].
Casing pressure
CASPRES
PROSPER.ANL.GLD.VALVE[i].
Transfer pressure
TRNPRES
PROSPER.ANL.GLD.VALVE[i].TEMP Temperature
PROSPER.ANL.GLD.VALVE[i].
Gaslift gas rate
GASINJ
PROSPER.ANL.GLD.VALVE[i].PVO Valve opening pressure
PROSPER.ANL.GLD.VALVE[i].PVC Valve closing pressure (at depth)
PROSPER.ANL.GLD.VALVE[i].DOME Dome pressure
PROSPER.ANL.GLD.VALVE[i].TEST Test rack opening pressure
PROSPER.ANL.GLD.VALVE[i].
Opening casing pressure
CASPVO
PROSPER.ANL.GLD.VALVE[i].
Closing casing pressure
CASPVC
PROSPER.ANL.GLD.VALVE[i].
Unloadable gradient
UNLGRD
Calculated from Max Production
PROSPER.ANL.GLD.MaxProd

Maximum liquid rate

Calculated from Max Revenue


PROSPER.ANL.GLD.OilRev
PROSPER.ANL.GLD.GasRev
PROSPER.ANL.GLD.WaterCost
PROSPER.ANL.GLD.GasCost

Oil revenue
Sales gas revenue
Water processing cost
Gas lift gas cost
1990-2011 Petroleum Experts Limited

323

OpenServer

PROSPER.ANL.GLD.MaxProd

Maximum liquid rate

Gas Lift Design - Existing Mandrels - Mandrel Details


PROSPER.ANL.GLD.Valve[0].Valve
Number of valves
Valve type:
PROSPER.ANL.GLD.Valve[index].
i = 0 to 3, [index] 0 to 29
Type, i
0 - None
1 - Valve
2 - Orifice
3 - Dummy
PROSPER.ANL.GLD.Valve[index].
Measured depth: [index] 0 to 29
MSD
PROSPER.ANL.GLD.Valve[index].
dP casing: [index] 0 to 29
Casing
PROSPER.ANL.GLD.Valve[index].
Maximum gas injected: [index] 0 to 29
MaxGI
Gas Lift Design - Gas Lift Adjustments
PROSPER.ANL.GLA.GLA[0]
Downstream pressure constraint
PROSPER.ANL.GLA.GLA[1]
kick-off casing head pressure
PROSPER.ANL.GLA.GLA[2]
Lift gas network normal pressure
PROSPER.ANL.GLA.GLA[3]
Safety margin for lift gas control
PROSPER.ANL.GLA.GLA[5]
Min CP decrease to close last unloading valve
PROSPER.ANL.GLA.GLA[6]
Lift gas temperature
PROSPER.ANL.GLA.GLA[7]
Target liquid production rate
PROSPER.ANL.GLA.GLA[8]
Water cut
PROSPER.ANL.GLA.GLA[9]
Production (total) GOR
PROSPER.ANL.GLA.Corr
Vertical flow correlation (see
Calculation_Input_Data)
PROSPER.ANL.GLA.Dome, i
Dome pressure correction:
i = 0 to 1
0 - No
1 - Yes
PROSPER.ANL.GLA.Flow, i
Flowing calculation mode:
i = 0 to 2
0 - All valves
1 - Orifice only
2 - Gradient only
PROSPER.ANL.GLA.GasInj, i
Performance curve:
i = 0 to 1
0 - Automatic
1 - User specified

OpenServer User's Manual

PROSPER and the OpenServer

Intermittent Gas Lift Design


PROSPER.SIN.GLI.Input[0]
PROSPER.SIN.GLI.Input[1]
PROSPER.SIN.GLI.Input[2]
PROSPER.SIN.GLI.Input[3]
PROSPER.SIN.GLI.Input[4]
PROSPER.SIN.GLI.Input[5]
PROSPER.SIN.GLI.Input[6]

324

Downhole injection pressure


Downhole pressure
Gas lift gas gravity
Wellhead pressure
Valve port size
Water cut
Tubing liquid level

6.6.2 Electical Submersible Pump Design


PROSPER.SIN.ESP.Depth
PROSPER.SIN.ESP.Frequency
PROSPER.SIN.ESP.MaxPumpOD
PROSPER.SIN.ESP.CableLength
PROSPER.SIN.ESP.Efficiency
PROSPER.SIN.ESP.Rate
PROSPER.SIN.ESP.WC
PROSPER.SIN.ESP.Solgor
PROSPER.SIN.ESP.Pres
PROSPER.SIN.ESP.Safety
PROSPER.SIN.ESP.Wear
PROSPER.SIN.ESP.Pipe
PROSPER.SIN.ESP.Tubing
PROSPER.SIN.ESP.GDRflag

Pump depth (measured)


Operating frequency
Pump maximum O.D.
Length of cable
Gas separator efficiency
Design rate
Water cut
Total GOR
Top node pressure
Motor power safety margin
Pump wear factor
Pipe correlation (see PCC__Pipeline_Correlation_Comparison)
Tubing correlation (seeTCC__Tubing_Correlation_Comparison)
Gas de-rating model

6.6.3 Hydraulic Drive Downhole Pump Design


PROSPER.SIN.HSP.PumpDepth
PROSPER.SIN.HSP.PumpMaxOD
PROSPER.SIN.HSP.TurbMaxOD
PROSPER.SIN.HSP.Rate
PROSPER.SIN.HSP.WC
PROSPER.SIN.HSP.Pres
PROSPER.SIN.HSP.PumpSpeed
PROSPER.SIN.HSP.TotalGOR
PROSPER.SIN.HSP.PowerPC
PROSPER.SIN.HSP.Wear

Pump depth (measured)


Pump maximum O.D.
Turbine maximum O.D.
Design liquid rate
Water cut
Top node pressure
Pump speed
Total GOR
% Power fluid of reservoir fluid
Pump wear factor
1990-2011 Petroleum Experts Limited

325

OpenServer

PROSPER.SIN.HSP.Pipe
PROSPER.SIN.HSP.Tubing
PROSPER.SIN.HSP.GDRflag
PROSPER.SIN.HSP.DesPump, Index
PROSPER.SIN.HSP.DesTurb, Index

Pipe correlation (see PCC__Pipeline_Correlation_Comparison)


Tubing correlation (seeTCC__Tubing_Correlation_Comparison)
Gas de-rating model
Pump
Turbine

6.6.4 Progressive Cavity Pump Design


Sucker Rod Drive
PROSPER.SIN.PCP.Input[0]
PROSPER.SIN.PCP.Input[1]
PROSPER.SIN.PCP.Input[2]
PROSPER.SIN.PCP.Input[3]
PROSPER.SIN.PCP.Input[6]
PROSPER.SIN.PCP.Input[7]
PROSPER.SIN.PCP.Input[12]
PROSPER.SIN.PCP.Input[8]
PROSPER.SIN.PCP.Input[10]
PROSPER.SIN.PCP.Pipe
PROSPER.SIN.PCP.Tubing
Downhole Motor Drive
PROSPER.SIN.PCP.Input[4]
PROSPER.SIN.PCP.Input[5]
PROSPER.SIN.PCP.Input[9]

Pump depth (measured)


Pump maximum O.D.
Gas separator efficiency
Pump wear factor
Design rate
Water cut
Total GOR
Top node pressure
Total rod length
Pipe correlation (see PCC__Pipeline_Correlation_Comparison)
Tubing correlation (seeTCC__Tubing_Correlation_Comparison)
Cable length
Voltage at surface
Motor power safety margin

6.6.5 Jet Pump Design


PROSPER.SIN.JET.Input[0]
PROSPER.SIN.JET.Input[1]
PROSPER.SIN.JET.Input[4]
PROSPER.SIN.JET.Input[5]
PROSPER.SIN.JET.Input[6]
PROSPER.SIN.JET.Input[7]
PROSPER.SIN.JET.Input[8]
PROSPER.SIN.JET.Input[9]
PROSPER.SIN.JET.LossCoef[0]
PROSPER.SIN.JET.LossCoef[1]
PROSPER.SIN.JET.LossCoef[2]
PROSPER.SIN.JET.LossCoef[3]
PROSPER.SIN.PCP.Pipe

OpenServer User's Manual

Pump depth (measured)


Pump maximum O.D.
Design liquid rate
Water cut
Total GOR
Top node pressure
Surface injection rate
Surface injection pressure
Nozzle loss coefficient
Suction loss coefficient
Throat loss coefficient
Diffuser loss coefficient
Pipe correlation (see PCC_-

PROSPER and the OpenServer

PROSPER.SIN.PCP.Tubing

326

_Pipeline_Correlation_Comparison)
Tubing correlation (seeTCC__Tubing_Correlation_Comparison)

6.6.6 Sucker Rod Pump Design


Oil gravity
Gas gravity
Water salinity
Water cut
GOR
Calculation mode
i = 0 to 1
0 - Enter stroke rate - calculate production rate
1 - Enter production rate - estimate stroke rate
PROSPER.SIN.SRP.Input[9], Index Pumping unit selection
PROSPER.SIN.SRP.Input[26]
Rod type
PROSPER.SIN.SRP.Input[27], Index Rod number
PROSPER.SIN.SRP.Input[29], i
Rod grade
i = 0 to 3
0-K
1-C
2-D
3-E
PROSPER.SIN.SRP.Input[36], i
Service factor
i = 0 to 2
0 - Non-corrosive
1 - salty water
2 - Hydrogen sulphide
PROSPER.SIN.SRP.Input[9], i
Unit type
i = 0 to 3
0 - Conventional clockwise
1 - Conventional anticlockwise
2 - Type II
3 - Air balanced
PROSPER.SIN.SRP.Input[10], i
Anchored tubing
i = 0 to 1
0 - Yes
1 - No
PROSPER.SIN.SRP.Input[15]
Midpoint perforation depth
PROSPER.SIN.SRP.Input[16]
Pump depth
PROSPER.SIN.SRP.Input[20]
Pump volumetric efficiency
PROSPER.SIN.SRP.Input[21]
Unit efficiency
PROSPER.SIN.SRP.Input[12], i
Pump diameter
i = 0 to 10
0 - 1.062-in
PROSPER.SIN.SRP.Input[80]
PROSPER.SIN.SRP.Input[81]
PROSPER.SIN.SRP.Input[82]
PROSPER.SIN.SRP.Input[83]
PROSPER.SIN.SRP.Input[84]
PROSPER.SIN.SRP.Input[35]

1990-2011 Petroleum Experts Limited

327

OpenServer

PROSPER.SIN.SRP.Input[13], i
PROSPER.SIN.SRP.Input[23]
PROSPER.SIN.SRP.Input[24]
PROSPER.SIN.SRP.Input[25]

6.7

1 - 1.25-in
2 - 1.50-in
3 - 1.75-in
4 - 1.87-in
5 - 2.00-in
6 - 2.25-in
7 - 2.50-in
8 - 2.75-in
9 - 3.75-in
10 - 4.75-in
Surface stroke length
Bottom hole temperature
Wellhead temperature
Wellhead pressure

Calculation Results
The Calculation Results are accessed using the root name PROSPER.OUT and is split
up into several sections as listed below.
INF

Inflow Sensitivity Calculations

SYS

System Sensitivity Calculations

GRD

Gradient Sensitivity Calculations

QLG

QuickLook - GasLift

QLE

QuickLook - ESP

QLH

QuickLook - HSP

PCP

Pipeline Correlation Comparison

TCC

Tubing Correlation Comparison

GMT

Gradient Matching

VL3

VLP Sensitivity Calculations (3 Variables)

VL4

VLP Sensitivity Calculations (4 Variables)

GEN

Generate For GAP

SPD

Sensitivity PvD

SPT

Sensitivity PvD (Enthalpy Balance)

GLN

Gas Lift Design (New Well)

GLE

Gas Lift Design (Existing Well)

GLI

Gas Lift Design (Intermittent)

ESP

ESP Design

OpenServer User's Manual

PROSPER and the OpenServer

HSP

HSP Design

CST

Constrained System Calculations

CVT

Constrained VLP Calculations

UST

Unconstrained System Calculations

UVT

Unconstrained VLP Calculations

UGT

Unconstrained Gradient Calculations

328

Each section will be accessed thus:


PROSPER.OUT.INF
PROSPER.OUT.SYS
PROSPER.OUT.GRD
PROSPER.OUT.QLG
PROSPER.OUT.QLE
PROSPER.OUT.QLH
PROSPER.OUT.PCP
PROSPER.OUT.TCC
PROSPER.OUT.GMT
PROSPER.OUT.VL3
PROSPER.OUT.VL4
PROSPER.OUT.GEN
PROSPER.OUT.SPD
PROSPER.OUT.SPT
PROSPER.OUT.GLN
PROSPER.OUT.GLE
PROSPER.OUT.ESP
PROSPER.OUT.HSP
PROSPER.OUT.CST
PROSPER.OUT.CVT
PROSPER.OUT.UST
PROSPER.OUT.UVT
PROSPER.OUT.UGT

6.7.1 INF - Inflow Sensitivity Calculations


PROSPER.OUT.INF.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.INF.SENS.VARS.VAL1.NUM-1
j = 0 : PROSPER.ANL.INF.SENS.VARS.VAL2.NUM-1
k = 0 : PROSPER.ANL.INF.SENS.VARS.VAL3.NUM-

1990-2011 Petroleum Experts Limited

329

OpenServer

1
l = 0 : PROSPER.ANL.INF.RATES.COUNT
PROSPER.OUT.INF.RESULTS[i][j][k].LIQRATE[l]

Liquid rate

PROSPER.OUT.INF.RESULTS[i][j][k].OILRATE[l]

Oil rate

PROSPER.OUT.INF.RESULTS[i][j][k].WATRATE[l]

Water rate

PROSPER.OUT.INF.RESULTS[i][j][k].GASRATE[l]

Gas ate

PROSPER.OUT.INF.RESULTS[i][j][k].IPRPRES[l]

Inflow pressure

PROSPER.OUT.INF.RESULTS[i][j][k].DPTOTAL[l]

Total dP skin

PROSPER.OUT.INF.RESULTS[i][j][k].DPPERF[l]

Perforation dP skin

PROSPER.OUT.INF.RESULTS[i][j][k].DPDAM[l]

Damage dP skin

PROSPER.OUT.INF.RESULTS[i][j][k].DPCOMP[l]

Completion dP skin

PROSPER.OUT.INF.RESULTS[i][j][k].DPGRAV[l]

Gravel pack dP pkin

PROSPER.OUT.INF.RESULTS[i][j][k].SKTOTAL[l]

Total skin

PROSPER.OUT.INF.RESULTS[i][j][k].SKCOMP[l]

Completion skin

PROSPER.OUT.INF.RESULTS[i][j][k].SKGRAV[l]

Gravel pack skin

PROSPER.OUT.INF.RESULTS[i][j][k].SKLAM[l]

Laminar skin (SkinAide)

PROSPER.OUT.INF.RESULTS[i][j][k].SKTURB[l]

Turbulence skin (SkinAide)

PROSPER.OUT.INF.RESULTS[i][j][k].DPLAM[l]

Laminar dP skin (SkinAide)

PROSPER.OUT.INF.RESULTS[i][j][k].DPTURB[l]

Turbulence dP skin
(SkinAide)

6.7.2 SYS - System Sensitivity Calculations


PROSPER.OUT.SYS.DONE
i = 0 : PROSPER.ANL.SYS.SENS.VARS.
VAL1.NUM-1
j = 0 : PROSPER.ANL.SYS.SENS.VARS.
VAL2.NUM-1
k = 0 : PROSPER.ANL.SYS.SENS.VARS.
VAL3.NUM-1
Multi-Lateral Results

OpenServer User's Manual

Calculation Done Flag

PROSPER and the OpenServer

l = 0 : PROSPER.OUT.SYS.RESULTS[i][j][k].
ML.BRANCHES

Number of Branches

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
BRANCHLABEL[i]

Branch Label

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
BRANCHRATE[i]

Branch Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
BRANCHPRES[i]

Branch Pressure

l = 0 : PROSPER.OUT.SYS.RESULTS[i][j][k].
ML.LAYERS

Number of Layers

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
LAYERLABEL[i]

Layer Label

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
LAYERPI[i]

PI

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
LAYERSKIN[i]

Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
LAYERTOP[i]

Top Depth

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
LAYERBOT[i]

Bottom Depth

l = 0 : PROSPER.OUT.SYS.RESULTS[i][j][k].
ML.SEGMENTS

Number of Segments

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGMDTOP[i]

Top Measured Depth

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGMDBOT[l]

Bottom Measured Depth

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGRATE[l]

Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGPRES[l]

Pressure

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGRATEPUL[l]

Rate per Unit Length

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGCUMRATE[l]

Cumulative Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].ML.

Reservoir Pressure

330

1990-2011 Petroleum Experts Limited

331

OpenServer

SEGRESPRES[l]
PROSPER.OUT.SYS.RESULTS[i][j][k].ML.
SEGTVD[l]

True Vertical Depth


General Data

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
LIQRATE

Liquid Rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
OILRATE

Oil Rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
GASRATE

Gas Rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
BHP

Bottom Hole Pressure


Well Head Results

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHDENLIQUID

Liquid Density

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHDENGAS

Gas Density

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHVISLIQUID

Liquid Viscosity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHVISGAS

Gas Viscosity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHVELLIQUID

Liquid Velocity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHVELGAS

Gas Velocity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHZFACTOR

Z Factor

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHSURFACETENSION

InterFacial Tension

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHPRESSURE

Pressure
First Node Results

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNDENLIQUID

Liquid Density

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNDENGAS

Gas Density

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNVISLIQUID

Liquid Viscosity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNVISGAS

Gas Viscosity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNVELLIQUID

Liquid Velocity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNVELGAS

Gas Velocity

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNZFACTOR

Z Factor

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNSURFACETENSION

InterFacial Tension

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNPRESSURE

Pressure

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
DPTOTALSKIN

Total

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
DPPERFORATION

Perforation dP Skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
DPDAMAGE

Damge

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PIP

Pump Intake Pressure

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PDP

Pump Discharge Pressure

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
INJECTIONDEPTH

Injection Depth

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
DPCOMPLETION

Completion dP Skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
COMPLETIONSKIN

Completion Skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
GRAVELPACKSKIN

Gravel Pack Skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
TOTALSKIN

Total

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PUMPAVRATE

Average Rate Thru Pump

332

dP Skin

dP Skin

Skin

1990-2011 Petroleum Experts Limited

333

OpenServer

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PUMPHEAD

Pump Head Generated

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PUMPPOWER

Pump Power Requirement

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PUMPEFFICIENCY

Pump Efficiency

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
MOTORAMPS

Motor Amps Requirement

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
MOTORPOWER

Motor Power Generated

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
MOTOREFFICIENCY

Motor Efficiency

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
MOTORSPEED

Motor Speed

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
CABLEVOLTS

Voltage at Surface

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PRFRIC

Friction Pressure Loss

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PRSTAT

Static Pressure Loss

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
WHTEMPERATURE

WH Temperature

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
FNTEMPERATURE

WH Pressure

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
TBLEAK

HSP Balance Supply Rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
PRETUR

HSP Power Fluid Return


Pressure

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
HYDRATE

Hydrates Flag

MultiLayer IPR Results (Per Layer)


PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
DPG[l]

DP Gravel

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
RAT[l]

Rate

SkinAide Results
OpenServer User's Manual

Skin

PROSPER and the OpenServer

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[0]

Total

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[l]

Total Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[2]

Total Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[3]

Perforation Geometry
Crushed +Damaged Zone Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[4]

Crushed Zone Laminar


Crushed +Damaged Zone
Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[5]

Crushed Zone Turbulent


Only Crushed Zone Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[6]

Gravel Pack Tunnel Laminar


Only Crushed Zone Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[7]

Gravel Pack Tunnel Turbulent


Hemispherical Inlet Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[8]

Gravel Pack Annulus Laminar


Hemispherical Inlet Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[9]

Gravel Pack Annulus Turbulent


Cement +Casing Tunnel Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[10]

Partial Penetration and Deviation


Cement +Casing Tunnel Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[11]

Gravel Pack Annulus Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[12]

Gravel Pack Annulus Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFSKIN[13]

Partial Penetration and Deviation

SkinAide Results

DP Skin

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[0]

Total

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[l]

Total Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[2]

Total Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].

Perforation Geometry

334

1990-2011 Petroleum Experts Limited

335

OpenServer

SOL.ELFDPSKIN[3]

Crushed +Damaged Zone Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[4]

Crushed Zone Laminar


Crushed +Damaged Zone
Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[5]

Crushed Zone Turbulent


Only Crushed Zone Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[6]

Gravel Pack Tunnel Laminar


Only Crushed Zone Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[7]

Gravel Pack Tunnel Turbulent


Hemispherical Inlet Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[8]

Gravel Pack Annulus Laminar


Hemispherical Inlet Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[9]

Gravel Pack Annulus Turbulent


Cement +Casing Tunnel Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[10]

Partial Penetration and Deviation


Cement +Casing Tunnel Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[11]

Gravel Pack Annulus Laminar

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[12]

Gravel Pack Annulus Turbulent

PROSPER.OUT.SYS.RESULTS[I][J][K].
SOL.ELFDPSKIN[13]

Partial Penetration and Deviation

Multi Layer friction dP Solution Results


(per Layer)

Layer

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][0]

oil rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][1]

gas rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][2]

liquid rate

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][3]

pressure

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][4]

distance from top

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][5]

productivity index

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][6]

skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][7]

non-darcy skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][8]

gravel pack skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][9]

gravel pack non-darcy skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][10]

dP skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][11]

dP non-darcy skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][12]

dP gravel pack skin

PROSPER.OUT.SYS.RESULTS[I][J][K].SOL.
ML[l][13]

dP gravel pack non-darcy skin

336

l = 0 : PROSPER.ANL.SYS.RATES.COUNT
Results Per Rate
PROSPER.OUT.SYS.RESULTS[i][j][k].
LIQRATE[l]

Liquid Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].
OILRATE[l]

Oil Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].
WATRATE[l]

Water Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].
GASRATE[l]

Gas Rate

PROSPER.OUT.SYS.RESULTS[i][j][k].
IPRPRES[l]

Inflow Pressure

PROSPER.OUT.SYS.RESULTS[i][j][k].
VLPPRES[l]

Outflow Pressure

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPTOTAL[l]

Total dP Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPPERF[l]

Perforation dP Skin

1990-2011 Petroleum Experts Limited

337

OpenServer

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPDAM[l]

Damage dP Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPCOMP[l]

Completion dP Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPGRAV[l]

Gravel Pack dP Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
SKTOTAL[l]

Total Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
SKCOMP[l]

Completion Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
SKGRAV[l]

Gravel Pack Skin

PROSPER.OUT.SYS.RESULTS[i][j][k].
SKLAM[l]

Laminar Skin (SkinAide)

PROSPER.OUT.SYS.RESULTS[i][j][k].
SKTURB[l]

Turbulence Skin (SkinAide)

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPLAM[l]

Laminar dP Skin (SkinAide)

PROSPER.OUT.SYS.RESULTS[i][j][k].
DPTURB[l]

Turbulence dP Skin (SkinAide)

PROSPER.OUT.SYS.RESULTS[i][j][k].PIP[l]

Pump Intake Pressure

PROSPER.OUT.SYS.RESULTS[i][j][k].PDP[l] Pump Discharge Pressure


PROSPER.OUT.SYS.RESULTS[i][j][k].
DEPTH[l]

Injection Depth

PROSPER.OUT.SYS.RESULTS[i][j][k].
WHPRES[l]

WellHead Pressure

PROSPER.OUT.SYS.RESULTS[i][j][k].
WHTEMP[l]

WellHead Temperature

PROSPER.OUT.SYS.RESULTS[i][j][k].
FNPRES[l]

First Node Pressure

PROSPER.OUT.SYS.RESULTS[i][j][k].
FNTEMP[l]

First Node temperature

PROSPER.OUT.SYS.RESULTS[i][j][k].
PRFRIC[l]

Friction Pressure Drop

PROSPER.OUT.SYS.RESULTS[i][j][k].
PRSTAT[l]

Static Pressure Drop

PROSPER.OUT.SYS.RESULTS[i][j][k].

Hydrates Flag

OpenServer User's Manual

PROSPER and the OpenServer

338

HYDRATE[l]

6.7.3 GRD - Gradient Sensitivity Calculations


PROSPER.OUT.GRD.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.GRD.SENS.VARS.VAL1.
NUM-1

Number

j = 0 : PROSPER.ANL.GRD.SENS.VARS.VAL2.
NUM-1

Of

k = 0 : PROSPER.ANL.GRD.SENS.VARS.VAL3.
NUM-1

Sensitivity Values

PROSPER.OUT.GRD.RESULTS[i][j][k].NUM

Number of gradient results

l = 0 : PROSPER.OUT.GRD.RESULTS[i][j][k].NUM-1
PROSPER.OUT.GRD.RESULTS[i][j][k].REGIME[l]

Flow Regime Number.


See Flow Regime Number
for further information

PROSPER.OUT.GRD.RESULTS[i][j][k].LABEL[l]

Label Number

PROSPER.OUT.GRD.RESULTS[i][j][k].PRES[l]

Pressure

PROSPER.OUT.GRD.RESULTS[i][j][k].TEMP[l]

Fluid Temperature

PROSPER.OUT.GRD.RESULTS[i][j][k].TVD[l]

True Vertical Depth

PROSPER.OUT.GRD.RESULTS[i][j][k].MSD[l]

Measured Depth

PROSPER.OUT.GRD.RESULTS[i][j][k].GRAD[l]

Gradient

PROSPER.OUT.GRD.RESULTS[i][j][k].HOLDUP[l]

Holdup

PROSPER.OUT.GRD.RESULTS[i][j][k].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.GRD.RESULTS[i][j][k].TFO[l]

Formation Temperature

PROSPER.OUT.GRD.RESULTS[i][j][k].GRSTAT[l]

Static Gradient

PROSPER.OUT.GRD.RESULTS[i][j][k].GRFRIC[l]

Friction Gradient

PROSPER.OUT.GRD.RESULTS[i][j][k].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.GRD.RESULTS[i][j][k].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.GRD.RESULTS[i][j][k].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.GRD.RESULTS[i][j][k].VGNSLP[l]

NoSlip Gas Velocity


1990-2011 Petroleum Experts Limited

339

OpenServer

PROSPER.OUT.GRD.RESULTS[i][j][k].AVRHSL[l]

Mixture Density

PROSPER.OUT.GRD.RESULTS[i][j][k].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.GRD.RESULTS[i][j][k].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.GRD.RESULTS[i][j][k].CASTEM[l]

Casing temperature

PROSPER.OUT.GRD.RESULTS[i][j][k].ANNTEM[l]

Average annulus
temperature

PROSPER.OUT.GRD.RESULTS[i][j][k].RHOOIL[l]

Gas density

PROSPER.OUT.GRD.RESULTS[i][j][k].RHOGAS[l]

Oil density

PROSPER.OUT.GRD.RESULTS[i][j][k].RHOWAT[l]

Water density

PROSPER.OUT.GRD.RESULTS[i][j][k].DIAINT[l]

Diameter

PROSPER.OUT.GRD.RESULTS[i][j][k].ANGLE[l]

Angle

PROSPER.OUT.GRD.RESULTS[i][j][k].DSTEP[l]

Section length

PROSPER.OUT.GRD.RESULTS[i][j][k].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.GRD.RESULTS[i][j][k].FMUGAS[l]

Gas viscosity

PROSPER.OUT.GRD.RESULTS[i][j][k].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.GRD.RESULTS[i][j][k].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.GRD.RESULTS[i][j][k].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.GRD.RESULTS[i][j][k].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.GRD.RESULTS[i][j][k].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.GRD.RESULTS[i][j][k].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.GRD.RESULTS[i][j][k].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.GRD.RESULTS[i][j][k].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.GRD.RESULTS[i][j][k].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.GRD.RESULTS[i][j][k].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.GRD.RESULTS[i][j][k].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.GRD.RESULTS[i][j][k].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.GRD.RESULTS[i][j][k].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.GRD.RESULTS[i][j][k].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.GRD.RESULTS[i][j][k].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.GRD.RESULTS[i][j][k].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.GRD.RESULTS[i][j][k].CFACTR[l]

C Factor (Erosional
Velocity)

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.GRD.RESULTS[i][j][k].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.GRD.RESULTS[i][j][k].CORR[l]

Correlation Index

PROSPER.OUT.GRD.RESULTS[i][j][k].HYDRATE[l]

Hydrates Formation Flag

340

InJected Gas Gradient


PROSPER.OUT.GRD.RESULTS[i][j][k].GASGRAD[l]. Number of Points
NUM
m = 0 : PROSPER.OUT.GRD.RESULTS[i][j][k].
GASGRAD[l].NUM-1
PROSPER.OUT.GRD.RESULTS[i][j][k].GASGRAD[l]. Depth
DEPTH[m]
PROSPER.OUT.GRD.RESULTS[i][j][k].GASGRAD[l]. Pressure
PRES[m]

6.7.3.1 GRD - Flow Regime Number


The following string "PROSPER.OUT.GRD.RESULTS[i][j][k].REGIME[l]" can be used to
retrieve the predicted flow regime index for the selected multiphase flow correlation.
Indices [i][j][k] reference the gradient calculation sensitivity variables i.e., 1, 2, 3
Index [l] references the gradient result node number
The following table summarizes the flow regime associated with the returned value for
each multiphase flow correlation:
Vertical Flow Correlation
Duns and Ros Modified

Mukerjee Brill

Returned
Index Value
1
2
3
4
5
6
7
8
9
10
1
2
3
4

Flow Regime
Bubble
Plug
Bubble / Slug
Heading
Sklug
Froth
Transition
Mist
Gas
Liquid
Stratified
Wavy
Bubble / Plug
Slug
1990-2011 Petroleum Experts Limited

341

OpenServer

5
6
7
8
9
10
11

Transition
Froth
Dispersed
Annular / Mist
Gas
Liquid
Annular

Beggs and Brill

1
2
3
4
5
6

Liquid
Gas
Distributed
Intermittent
Segregated
Transition

Dukler Flannigan

1
2
3

Liquid
Gas
Two Phase

Dukler Eaton Flannigan

1
2
3

Liquid
Gas
Two Phase

Petroleum Experts

1
2
3
4
5

Bubble
Slug
Transition
Mist
Gas

Orkiszewski

1
2
3
4
5

Bubble
Slug
Transition
Mist
Gas

Petroleum Experts 2

1
2
3
4
5

Bubble
Slug
Transition
Mist
Gas

Duns and Ros Original

1
2
3
4
5
6
7

Bubble
Plug
Bubble / Slug
Heading
Slug
Froth
Transition

OpenServer User's Manual

PROSPER and the OpenServer

8
9
10

Mist
Gas
Liquid

Petroleum Experts 3

1
2
3
4
5

Bubble
Slug
Transition
Mist
Gas

Beggs and Brill (Gas Head)

1
2
3
4
5
6

Liquid
Gas
Distributed
Intermittent
Segregated
Transition

GRE (modified by PE)

1
2
3
4
5
6
7
8

Liquid
Gas
Strat. Smooth
Strat. Wavy
Annular
Slug (normal)
Slug (induced)
Disp. Bubble

GRE (with DSM)

1
2
3
4
5
6
7
8
9

Liquid
Gas
Strat. Smooth
Strat. Wavy
Annular
Slug (normal)
Slug (induced)
Disp. Bubble
Slug (DSM)

GRE (Original)

1
2
3
4
5
6
7
8

Liquid
Gas
Strat. Smooth
Strat. Wavy
Annular
Slug (normal)
Slug (induced)
Disp. Bubble

GRE (with AE)

1
2

Liquid
Gas

342

1990-2011 Petroleum Experts Limited

343

OpenServer

3
4
5
6
7
8

Strat. Smooth
Strat. Wavy
Annular
Slug (normal)
Slug (induced)
Disp. Bubble

Petroleum Experts 4

1
2
3
4
5
6
7
8

Liquid
Gas
Strat. Smooth
Strat. Wavy
Annular
Slug (normal)
Slug (induced)
Disp. Bubble

Hydro-3P

0
1
2
3
4
5
6
7
8

Strat. Smooth
Strat. Wavy
Annular
Slug Flow
Bubble Flow
Oil / Water (2P)
Gas (1P)
Oil (1P)
Water (1P)

Petroleum Experts 5

1
2
3
4
5
6
7
8

Liquid
Gas
Strat. Smooth
Strat. Wavy
Annular
Slug (normal)
Slug (induced)
Disp. Bubble

The flow regime numeric value PROSPER returns will have the prefix '10.'
Thus, for Petroleum Experts 5 predicting Annular Flow, the returned index
value will be: 105, etc.

6.7.4 QLG - QuickLook GasLift

PROSPER.OUT.QLG.DONE

Done Flag

PROSPER.OUT.QLG.XMIN

Minimum Pressure

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.QLG.XMAX

Maxmum Pressure

PROSPER.OUT.QLG.YMIN

Minimum Temperature

PROSPER.OUT.QLG.YMAX

Maximum Temperature

344

THEORETICAL GAS LIFT GAS GRADIENT


(BOTTOM to TOP)
i=0:1

i ranges from 0 to 1

PROSPER.OUT.QLG.GPRES[i]

Pressure

PROSPER.OUT.QLG.GDEPT[i]

Depth

VALVE INFORMATION
PROSPER.OUT.QLG.VTVD.COUNT

Number of Valves

i = 0 : PROSPER.OUT.QLG.VTVD.COUNT-1

i ranges from 0 to
(COUNT - 1) where
COUNT represents the
Number of valves returned
by the above variable

PROSPER.OUT.QLG.VTVD [i]

True Vertical Depth

PROSPER.OUT.QLG.VOPEN[I]

Opening

PROSPER.OUT.QLG.VCLOS[i]

Closing

PROSPER.OUT.QLG.VTEMP[i]

Temperature

PROSPER.OUT.QLG.VTUBI[i]

Tubing

PROSPER.OUT.QLG.VGASP[i]

Gas

Pressure
Pressure
Pressure
Pressure

GRADIENT RESULTS
i = 0 : Top Down Tubing Gradient
i = 1 : Bottom Up Tubing Gradient
Example to retrieve pressure from Top Down
tubing gradient results:
PROSPER.OUT.QLG.Results[0].Pres[Row Index]
Example to retrieve pressure from Bottom Up
tubing gradient results:
PROSPER.OUT.QLG.Results[1].Pres[Row Index]

1990-2011 Petroleum Experts Limited

345

OpenServer

PROSPER.OUT.QLG.RESULTS[i].NUM

Number of Gradient
Results

j = 0 : PROSPER.OUT.QLG.RESULTS[i].NUM-1

j ranges from 0 to (NUM 1) where NUM represents


the number of gradient
results returned by the
above variable.

PROSPER.OUT.QLG.RESULTS[i].REGIME[j]

Flow Regime Number

PROSPER.OUT.QLG.RESULTS[i].LABEL[j]

Label Number

PROSPER.OUT.QLG.RESULTS[i].PRES[j]

Pressure

PROSPER.OUT.QLG.RESULTS[i].TEMP[j]

Fluid Temperature

PROSPER.OUT.QLG.RESULTS[i].TVD[j]

True Vertical Depth

PROSPER.OUT.QLG.RESULTS[i].MSD[j]

Measured Depth

PROSPER.OUT.QLG.RESULTS[i].GRAD[j]

Gradient

PROSPER.OUT.QLG.RESULTS[i].HOLDUP[j]

Holdup

PROSPER.OUT.QLG.RESULTS[i].HTC[j]

Heat Transfer Coefficient

PROSPER.OUT.QLG.RESULTS[i].TFO[j]

Formation Temperature

PROSPER.OUT.QLG.RESULTS[i].GRSTAT[j]

Static Gradient

PROSPER.OUT.QLG.RESULTS[i].GRFRIC[j]

Friction Gradient

PROSPER.OUT.QLG.RESULTS[i].VLSLIP[j]

Slip Liquid Velocity

PROSPER.OUT.QLG.RESULTS[i].VLNSLP[j]

NoSlip Liquid Velocity

PROSPER.OUT.QLG.RESULTS[i].VGSLIP[j]

Slip Gas Velocity

PROSPER.OUT.QLG.RESULTS[i].VGNSLP[j]

NoSlip Gas Velocity

PROSPER.OUT.QLG.RESULTS[i].AVRHSL[j]

Mixture Density

PROSPER.OUT.QLG.RESULTS[i].PRSTAT[j]

Pressure due to friction

PROSPER.OUT.QLG.RESULTS[i].PRFRIC[j]

Pressure due to gravity

PROSPER.OUT.QLG.RESULTS[i].CASTEM[j]

Casing temperature

PROSPER.OUT.QLG.RESULTS[i].ANNTEM[j]

Average annulus
temperature

PROSPER.OUT.QLG.RESULTS[i].RHOOIL[j]

Gas density

PROSPER.OUT.QLG.RESULTS[i].RHOGAS[j]

Oil density

PROSPER.OUT.QLG.RESULTS[i].RHOWAT[j]

Water density

PROSPER.OUT.QLG.RESULTS[i].DIAINT[j]

Diameter

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.QLG.RESULTS[i].ANGLE[j]

Angle

PROSPER.OUT.QLG.RESULTS[i].DSTEP[j]

Section length

PROSPER.OUT.QLG.RESULTS[i].FMULIQ[j]

Liquid viscosity

PROSPER.OUT.QLG.RESULTS[i].FMUGAS[j]

Gas viscosity

PROSPER.OUT.QLG.RESULTS[i].SIGLIQ[j]

Gas-Liquid IFT

PROSPER.OUT.QLG.RESULTS[i].SIGWAT[j]

Gas-Water IFT

PROSPER.OUT.QLG.RESULTS[i].SIGOIL[j]

Gas-Oil IFT

PROSPER.OUT.QLG.RESULTS[i].SIGOW[j]

Oil-Water IFT

PROSPER.OUT.QLG.RESULTS[i].SLUGLM[j]

Mean Slug Length

PROSPER.OUT.QLG.RESULTS[i].SLUGLX[j]

1/000 Slug Length

PROSPER.OUT.QLG.RESULTS[i].BUBLNM[j]

Mean Bubble Length

PROSPER.OUT.QLG.RESULTS[i].BUBLNX[j]

1/1000 Bubble Length

PROSPER.OUT.QLG.RESULTS[i].SLUGQL[j]

Mean Slug Liquid Rate

PROSPER.OUT.QLG.RESULTS[i].SLUGQG[j]

Mean Slug Gas Rate

PROSPER.OUT.QLG.RESULTS[i].BUBLQL[j]

Mean Bubble Liquid Rate

PROSPER.OUT.QLG.RESULTS[i].BUBLQG[j]

Mean Bubble Gas Rate

PROSPER.OUT.QLG.RESULTS[i].SLGFRM[j]

Mean Slug Frequency

PROSPER.OUT.QLG.RESULTS[i].SLGFRX[j]

1/1000 Slug Frequency

PROSPER.OUT.QLG.RESULTS[i].SLGHLS[j]

Slug Holdup (HLS)

PROSPER.OUT.QLG.RESULTS[i].SLGHLE[j]

Equilibrium Holdup (HLE)

PROSPER.OUT.QLG.RESULTS[i].CFACTR[j]

C Factor (Erosional
Velocity)

PROSPER.OUT.QLG.RESULTS[i].SANDDI[j]

Max Transportable Grain


Diameter

PROSPER.OUT.QLG.RESULTS[i].CORR[j]

Correlation Index

PROSPER.OUT.QLG.RESULTS[i].HYDRATE[j]

Hydrates Formation Flag

346

MEASURED GAS LIFT GAS GRADIENT (TOP to


BOTTOM)
PROSPER.OUT.QLG.RESULTS[0].GASGRAD.NUM

Number of Points in the


Measured Gas Gradient
1990-2011 Petroleum Experts Limited

347

OpenServer

k = 0 : PROSPER.OUT.QLG.RESULTS[0].GASGRAD k ranges from 0 to (NUM 1) where NUM represents


[k].NUM-1
the Number of Points
returned by the above
variable
PROSPER.OUT.QLG.RESULTS[0].GASGRAD[k].
DEPTH

Depth

PROSPER.OUT.QLG.RESULTS[0].GASGRAD[k].
PRES

Pressure

OUTPUT PLOT VARIABLES

PROSPER.OUT.QLG.OUTPUT[0]

Tubing Pressure at Valve

PROSPER.OUT.QLG.OUTPUT[1]

Temperature at Valve

PROSPER.OUT.QLG.OUTPUT[2]

GOR

PROSPER.OUT.QLG.OUTPUT[3]

GOR Free

PROSPER.OUT.QLG.OUTPUT[4]

dP Across Valve

PROSPER.OUT.QLG.OUTPUT[5]

Calculated CHP

PROSPER.OUT.QLG.OUTPUT[6]

Drawdown

PROSPER.OUT.QLG.OUTPUT[7]

Equivalent Calculate PI

PROSPER.OUT.QLG.OUTPUT[8]

Calculated Critical Flow Rate

PROSPER.OUT.QLG.OUTPUT[9]

% of Critical Flow Rate

PROSPER.OUT.QLG.OUTPUT[10]

Fitted Thermal Coeff.

6.7.5 QLE - QuickLook ESP


PROSPER.OUT.QLE.DONE

Calculation Done Flag

PROSPER.OUT.QLE.XMIN

Minimum Pressure

PROSPER.OUT.QLE.XMAX

Maximum Pressure

PROSPER.OUT.QLE.YMIN

Minimum Temperature

PROSPER.OUT.QLE.YMAX

Maximum Temperature

PROSPER.OUT.QLE.INPUT[0]

Wellhead pressure

PROSPER.OUT.QLE.INPUT[1]

Liquid Rate

PROSPER.OUT.QLE.INPUT[2]

Water Cut

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.QLE.INPUT[3]

Frequency

PROSPER.OUT.QLE.INPUT[4]

Gas Separator Efficiency

PROSPER.OUT.QLE.INPUT[5]

Gas Oil Ratio

PROSPER.OUT.QLE.INPUT[6]

Reservoir Pressure

PROSPER.OUT.QLE.INPUT[7]

Pump Depth

PROSPER.OUT.QLE.INPUT[8]

Number Of Stages

PROSPER.OUT.QLE.OUTPUT[0]

Pump Power Required

PROSPER.OUT.QLE.OUTPUT[1]

Motor Power Required

PROSPER.OUT.QLE.OUTPUT[2]

Motor Efficiency

PROSPER.OUT.QLE.OUTPUT[3]

Voltage At Surface

PROSPER.OUT.QLE.OUTPUT[4]

Pump Intake Pressure

PROSPER.OUT.QLE.OUTPUT[5]

Pump Discharge Pressure

PROSPER.OUT.QLE.OUTPUT[6]

Downhole Rate

PROSPER.OUT.QLE.OUTPUT[7]

Free Gas in Pump

PROSPER.OUT.QLE.OUTPUT[8]

KVA

PROSPER.OUT.QLE.PUMP.MANU

Pump Manufacturer

PROSPER.OUT.QLE.PUMP.NAME

Pump Name

PROSPER.OUT.QLE.PUMP.SIZE

Pump Size

PROSPER.OUT.QLE.PUMP.STAGES

Number of Stages

PROSPER.OUT.QLE.PUMP.FREQUENCY

Pump Frequency

PROSPER.OUT.QLE.PUMP.MINRATE

Minimum Rate

PROSPER.OUT.QLE.PUMP.MAXRATE

Maximum Rate

PROSPER.OUT.QLE.PUMP.HEAD.COEFF [i] i =
0:5

Head Coefficients

348

PROSPER.OUT.QLE.PUMP.HP.COEFF [i] i = 0:5 Power Coefficients


PROSPER.OUT.QLE.MOTOR.MANU

Motor Series

PROSPER.OUT.QLE.MOTOR.SERIES

Motor Frequency

PROSPER.OUT.QLE.MOTOR.FREQUENCY

Size (OD)

PROSPER.OUT.QLE.MOTOR.DIAMETER

Motor Speed
1990-2011 Petroleum Experts Limited

349

OpenServer

PROSPER.OUT.QLE.MOTOR.SPEED

Name Plate Amps Coefficients

PROSPER.OUT.QLE.MOTOR.NPA.COEFF [i] i =
0:5

Motor Speed Coefficients

PROSPER.OUT.QLE.MOTOR.RPM.COEFF [i] i = Motor Efficiency Coefficients


0:5
PROSPER.OUT.QLE.MOTOR.EFF.COEFF [i] i =
0:5

Motor Power Coefficients

PROSPER.OUT.QLE.MOTOR.HP.COEFF [i] i =
0:5

Maximum
Options

PROSPER.OUT.QLE.MOTOR.MAXPOWER

Current Number of Power Options

PROSPER.OUT.QLE.MOTOR.NUMPOWER

Selected Power Option

Number

of

PROSPER.OUT.QLE.MOTOR.CURPOWER
i = 0 : PROSPER.OUT.QLE.MOTOR.
NUMPOWER-1

Power

PROSPER.OUT.QLE.MOTOR.OPTION[i].POWER Power
PROSPER.OUT.QLE.MOTOR.OPTION[i].VOLTS

Volts

PROSPER.OUT.QLE.MOTOR.OPTION[i].AMPS

Amps

PROSPER.OUT.QLE.MOTOR.OPTION[i].TYPE

Type

PROSPER.OUT.QLE.CABLE.TYPE

Cable Type

PROSPER.OUT.QLE.CABLE.VOLTSDROP

Voltage Drop Coefficient

PROSPER.OUT.QLE.CABLE.MAXAMPS

Maximum Allowable Current

GRADIENT RESULTS
i = 0: Bottom Up Tubing Gradient
i = 1: Top Down Tubing Gradient
Example to retrieve pressure from Bottom Up
tubing gradient results:
PROSPER.OUT.QLE.Results[0].Pres[Row Index]
Example to retrieve pressure from Top Down
tubing gradient results:
PROSPER.OUT.QLE.Results[1].Pres[Row Index]
PROSPER.OUT.QLE.RESULTS[i].NUM

OpenServer User's Manual

Number of Gradient Results

Power

PROSPER and the OpenServer

350

l = 0 : PROSPER.OUT.QLE.RESULTS[i].NUM-1
PROSPER.OUT.QLE.RESULTS[i].REGIME[l]

Flow Regime Number

PROSPER.OUT.QLE.RESULTS[i].LABEL[l]

Label Number

PROSPER.OUT.QLE.RESULTS[i].PRES[l]

Pressure

PROSPER.OUT.QLE.RESULTS[i].TEMP[l]

Fluid Temperature

PROSPER.OUT.QLE.RESULTS[i].TVD[l]

True Vertical Depth

PROSPER.OUT.QLE.RESULTS[i].MSD[l]

Measured Depth

PROSPER.OUT.QLE.RESULTS[i].GRAD[l]

Gradient

PROSPER.OUT.QLE.RESULTS[i].HOLDUP[l]

Holdup

PROSPER.OUT.QLE.RESULTS[i].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.QLE.RESULTS[i].TFO[l]

Formation Temperature

PROSPER.OUT.QLE.RESULTS[i].GRSTAT[l]

Static Gradient

PROSPER.OUT.QLE.RESULTS[i].GRFRIC[l]

Friction Gradient

PROSPER.OUT.QLE.RESULTS[i].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.QLE.RESULTS[i].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.QLE.RESULTS[i].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.QLE.RESULTS[i].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.QLE.RESULTS[i].AVRHSL[l]

Mixture Density

PROSPER.OUT.QLE.RESULTS[i].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.QLE.RESULTS[i].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.QLE.RESULTS[i].CASTEM[l]

Casing temperature

PROSPER.OUT.QLE.RESULTS[i].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.QLE.RESULTS[i].RHOOIL[l]

Gas density

PROSPER.OUT.QLE.RESULTS[i].RHOGAS[l]

Oil density

PROSPER.OUT.QLE.RESULTS[i].RHOWAT[l]

Water density

PROSPER.OUT.QLE.RESULTS[i].DIAINT[l]

Diameter

PROSPER.OUT.QLE.RESULTS[i].ANGLE[l]

Angle

PROSPER.OUT.QLE.RESULTS[i].DSTEP[l]

Section length

PROSPER.OUT.QLE.RESULTS[i].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.QLE.RESULTS[i].FMUGAS[l]

Gas viscosity

1990-2011 Petroleum Experts Limited

351

OpenServer

PROSPER.OUT.QLE.RESULTS[i].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.QLE.RESULTS[i].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.QLE.RESULTS[i].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.QLE.RESULTS[i].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.QLE.RESULTS[i].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.QLE.RESULTS[i].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.QLE.RESULTS[i].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.QLE.RESULTS[i].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.QLE.RESULTS[i].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.QLE.RESULTS[i].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.QLE.RESULTS[i].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.QLE.RESULTS[i].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.QLE.RESULTS[i].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.QLE.RESULTS[i].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.QLE.RESULTS[i].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.QLE.RESULTS[i].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.QLE.RESULTS[i].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.QLE.RESULTS[i].SANDDI[l]

Max Transportable Grain Diameter

PROSPER.OUT.QLE.RESULTS[i].CORR[l]

Correlation Index

PROSPER.OUT.QLE.RESULTS[i].HYDRATE[l]

Hydrates Formation Flag

6.7.6 QLH - QuickLook HSP


PROSPER.OUT.QLH.DONE

Calculation Done Flag

PROSPER.OUT.QLH.XMIN

Minimum Pressure

PROSPER.OUT.QLH.XMAX

Maximum Pressure

PROSPER.OUT.QLH.YMIN

Minimum Temperature

PROSPER.OUT.QLH.YMAX

Maximum Temperature

PROSPER.OUT.QLH.INPUT[0]

WellHead Pressure

PROSPER.OUT.QLH.INPUT[1]

Liquid Rate

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.QLH.INPUT[2]

Water Cut

PROSPER.OUT.QLH.INPUT[3]

Pump Speed

PROSPER.OUT.QLH.INPUT[4]

Gas Oil Ratio

PROSPER.OUT.QLH.INPUT[5]

Reservoir Pressure

PROSPER.OUT.QLH.INPUT[6]

Pump Depth

PROSPER.OUT.QLH.INPUT[7]

Pump Stages

PROSPER.OUT.QLH.INPUT[8]

Turbine Stages

PROSPER.OUT.QLH.OUTPUT[0]

Pump Power Required

PROSPER.OUT.QLH.OUTPUT[1]

Turbine Power Generated

PROSPER.OUT.QLH.OUTPUT[2]

Turbine Efficiency

PROSPER.OUT.QLH.OUTPUT[3]

Pressure At Surface

PROSPER.OUT.QLH.OUTPUT[4]

Pump Intake Pressure

PROSPER.OUT.QLH.OUTPUT[5]

Pump Discharge
Pressure

PROSPER.OUT.QLH.OUTPUT[6]

Downhole Rate

PROSPER.OUT.QLH.OUTPUT[7]

GOR In Pump

PROSPER.OUT.QLH.OUTPUT[8]

dP Across Turbine

PROSPER.OUT.QLH.OUTPUT[9]

Leak Rate

PROSPER.OUT.QLH.OUTPUT[10]

Pump Torque

PROSPER.OUT.QLH.OUTPUT[11]

Gas Fraction

PROSPER.OUT.QLH.PUMP.MANU

Pump Manufacturer

PROSPER.OUT.QLH.PUMP.NAME

Pump Name

PROSPER.OUT.QLH.PUMP.SIZE

Pump Size (OD)

PROSPER.OUT.QLH.PUMP.STAGES

Number of Stages

PROSPER.OUT.QLH.PUMP.MAXSTAGE

Maximum Number of
Stages

PROSPER.OUT.QLH.PUMP.SPEED

Pump Speed

PROSPER.OUT.QLH.PUMP.MINRATE

Minimum Rate

PROSPER.OUT.QLH.PUMP.MAXRATE

Maximum Rate

PROSPER.OUT.QLH.PUMP.MINSPEED

Minimum Speed

352

1990-2011 Petroleum Experts Limited

353

OpenServer

PROSPER.OUT.QLH.PUMP.MAXSPEED

Maximum Speed

PROSPER.OUT.QLH.PUMP.HEAD.COEFF [i] i=0:5

Head Coefficients

PROSPER.OUT.QLH.PUMP.HP.COEFF [i] i=0:5

Power Coefficients

PROSPER.OUT.QLH.TURB.MANU

Turbine Manufacturer

PROSPER.OUT.QLH.TURB.NAME

Turbine Name

PROSPER.OUT.QLH.TURB.REFSPEED

Reference Speed

PROSPER.OUT.QLH.TURB.MAXSPEED

Maximum Speed

PROSPER.OUT.QLH.TURB.MAXTESTPRES

Maximum Test Preesure

PROSPER.OUT.QLH.TURB.MAXWORKPRES

Maximum Working
Pressure

PROSPER.OUT.QLH.TURB.MAXSTAGEPRES

Maximum Stage Pressure

PROSPER.OUT.QLH.TURB.MAXSTAGES

Maximum Number of
Stages

PROSPER.OUT.QLH.TURB.MAXSUPPLYFLOW

Maximum Supply Flow

PROSPER.OUT.QLH.TURB.MAXTOTALTORQUE

Maximum Total Shaft


Torque

PROSPER.OUT.QLH.TURB.MAXSTAGETORQUE

Maximum Stage Torque

PROSPER.OUT.QLH.TURB.CASINGOD

Turbine Casing OD

PROSPER.OUT.QLH.TURB.MAXVELOCITY

Max. Velocity Over


Turbine Casing

GRADIENT RESULTS
i = 0: Bottom Up Tubing Gradient
i = 1: Top Down Tubing Gradient
Example to retrieve pressure from Bottom Up
tubing gradient results:
PROSPER.OUT.QLH.Results[0].Pres[Row Index]
Example to retrieve pressure from Top Down
tubing gradient results:
PROSPER.OUT.QLH.Results[1].Pres[Row Index]
PROSPER.OUT.QLH.RESULTS[i].NUM

OpenServer User's Manual

Number of Gradient
Results

PROSPER and the OpenServer

354

l = 0 : PROSPER.OUT.QLH.RESULTS[i].NUM-1
PROSPER.OUT.QLH.RESULTS[i].REGIME[l]

Flow Regime Number

PROSPER.OUT.QLH.RESULTS[i].LABEL[l]

Label Number

PROSPER.OUT.QLH.RESULTS[i].PRES[l]

Pressure

PROSPER.OUT.QLH.RESULTS[i].TEMP[l]

Fluid Temperature

PROSPER.OUT.QLH.RESULTS[i].TVD[l]

True Vertical Depth

PROSPER.OUT.QLH.RESULTS[i].MSD[l]

Measured Depth

PROSPER.OUT.QLH.RESULTS[i].GRAD[l]

Gradient

PROSPER.OUT.QLH.RESULTS[i].HOLDUP[l]

Holdup

PROSPER.OUT.QLH.RESULTS[i].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.QLH.RESULTS[i].TFO[l]

Formation Temperature

PROSPER.OUT.QLH.RESULTS[i].GRSTAT[l]

Static Gradient

PROSPER.OUT.QLH.RESULTS[i].GRFRIC[l]

Friction Gradient

PROSPER.OUT.QLH.RESULTS[i].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.QLH.RESULTS[i].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.QLH.RESULTS[i].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.QLH.RESULTS[i].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.QLH.RESULTS[i].AVRHSL[l]

Mixture Density

PROSPER.OUT.QLH.RESULTS[i].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.QLH.RESULTS[i].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.QLH.RESULTS[i].CASTEM[l]

Casing temperature

PROSPER.OUT.QLH.RESULTS[i].ANNTEM[l]

Average annulus
temperature

PROSPER.OUT.QLH.RESULTS[i].RHOOIL[l]

Gas density

PROSPER.OUT.QLH.RESULTS[i].RHOGAS[l]

Oil density

PROSPER.OUT.QLH.RESULTS[i].RHOWAT[l]

Water density

PROSPER.OUT.QLH.RESULTS[i].DIAINT[l]

Diameter

PROSPER.OUT.QLH.RESULTS[i].ANGLE[l]

Angle

PROSPER.OUT.QLH.RESULTS[i].DSTEP[l]

Section length

PROSPER.OUT.QLH.RESULTS[i].FMULIQ[l]

Liquid viscosity

1990-2011 Petroleum Experts Limited

355

OpenServer

PROSPER.OUT.QLH.RESULTS[i].FMUGAS[l]

Gas viscosity

PROSPER.OUT.QLH.RESULTS[i].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.QLH.RESULTS[i].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.QLH.RESULTS[i].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.QLH.RESULTS[i].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.QLH.RESULTS[i].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.QLH.RESULTS[i].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.QLH.RESULTS[i].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.QLH.RESULTS[i].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.QLH.RESULTS[i].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.QLH.RESULTS[i].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.QLH.RESULTS[i].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.QLH.RESULTS[i].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.QLH.RESULTS[i].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.QLH.RESULTS[i].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.QLH.RESULTS[i].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.QLH.RESULTS[i].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.QLH.RESULTS[i].CFACTR[l]

C Factor (Erosional
Velocity)

PROSPER.OUT.QLH.RESULTS[i].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.QLH.RESULTS[i].CORR[l]

Corrleation Index

PROSPER.OUT.QLH.RESULTS[i].HYDRATE[l]

Hydrates Formation Flag

6.7.7 PCP - Pipeline Correlation Comparison


PROSPER.OUT.PCP.DONE

Calculation Done Flag

PROSPER.OUT.PCP.NUM

Number of Correlations

i = 0 : PROSPER.OUT.PCP.NUM-1
PROSPER.OUT.PCP.RESULTS[i].NUM
l = 0 : PROSPER.OUT.PCP.RESULTS[i].NUM-1

OpenServer User's Manual

Number of Gradient Results

PROSPER and the OpenServer

356

PROSPER.OUT.PCP.RESULTS[i].REGIME[l]

Flow Regime Number

PROSPER.OUT.PCP.RESULTS[i].LABEL[l]

Label Number

PROSPER.OUT.PCP.RESULTS[i].PRES[l]

Pressure

PROSPER.OUT.PCP.RESULTS[i].TEMP[l]

Fluid Temperature

PROSPER.OUT.PCP.RESULTS[i].TVD[l]

True Vertical Depth

PROSPER.OUT.PCP.RESULTS[i].MSD[l]

Measured Depth

PROSPER.OUT.PCP.RESULTS[i].GRAD[l]

Gradient

PROSPER.OUT.PCP.RESULTS[i].HOLDUP[l]

Holdup

PROSPER.OUT.PCP.RESULTS[i].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.PCP.RESULTS[i].TFO[l]

Formation Temperature

PROSPER.OUT.PCP.RESULTS[i].GRSTAT[l]

Static Gradient

PROSPER.OUT.PCP.RESULTS[i].GRFRIC[l]

Friction Gradient

PROSPER.OUT.PCP.RESULTS[i].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.PCP.RESULTS[i].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.PCP.RESULTS[i].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.PCP.RESULTS[i].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.PCP.RESULTS[i].AVRHSL[l]

Mixture Density

PROSPER.OUT.PCP.RESULTS[i].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.PCP.RESULTS[i].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.PCP.RESULTS[i].CASTEM[l]

Casing temperature

PROSPER.OUT.PCP.RESULTS[i].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.PCP.RESULTS[i].RHOOIL[l]

Gas density

PROSPER.OUT.PCP.RESULTS[i].RHOGAS[l]

Oil density

PROSPER.OUT.PCP.RESULTS[i].RHOWAT[l]

Water density

PROSPER.OUT.PCP.RESULTS[i].DIAINT[l]

Diameter

PROSPER.OUT.PCP.RESULTS[i].ANGLE[l]

Angle

PROSPER.OUT.PCP.RESULTS[i].DSTEP[l]

Section length

PROSPER.OUT.PCP.RESULTS[i].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.PCP.RESULTS[i].FMUGAS[l]

Gas viscosity

PROSPER.OUT.PCP.RESULTS[i].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.PCP.RESULTS[i].SIGWAT[l]

Gas-Water IFT

1990-2011 Petroleum Experts Limited

357

OpenServer

PROSPER.OUT.PCP.RESULTS[i].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.PCP.RESULTS[i].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.PCP.RESULTS[i].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.PCP.RESULTS[i].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.PCP.RESULTS[i].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.PCP.RESULTS[i].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.PCP.RESULTS[i].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.PCP.RESULTS[i].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.PCP.RESULTS[i].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.PCP.RESULTS[i].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.PCP.RESULTS[i].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.PCP.RESULTS[i].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.PCP.RESULTS[i].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.PCP.RESULTS[i].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.PCP.RESULTS[i].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.PCP.RESULTS[i].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.PCP.RESULTS[i].CORR[l]

Corrleation Index

PROSPER.OUT.PCP.RESULTS[i].HYDRATE[l]

Hydrates Formation Flag


Injected Gas Gradient
Number of Points

PROSPER.OUT.PCP.RESULTS[i].GASGRAD[l].
NUM
m = 0 : PROSPER.OUT.PCP.RESULTS[i].
GASGRAD[l].NUM-1
PROSPER.OUT.PCP.RESULTS[i].GASGRAD[l].
DEPTH[m]

Depth

PROSPER.OUT.PCP.RESULTS[i].GASGRAD[l].
PRES[m]

Pressure

6.7.8 TCC - Tubing Correlation Comparison


PROSPER.OUT.TCC.DONE

OpenServer User's Manual

Calculation Done Flag

PROSPER and the OpenServer

PROSPER.OUT.TCC.NUM

358

Number of Correlations

i = 0 : PROSPER.OUT.TCC.NUM-1
PROSPER.OUT.TCC.RESULTS[i].NUM

Number of Gradient Results

l = 0 : PROSPER.OUT.TCC.RESULTS[i].NUM-1
PROSPER.OUT.TCC.RESULTS[i].REGIME[l]

Flow Regime Number

PROSPER.OUT.TCC.RESULTS[i].LABEL[l]

Label Number

PROSPER.OUT.TCC.RESULTS[i].PRES[l]

Pressure

PROSPER.OUT.TCC.RESULTS[i].TEMP[l]

Fluid Temperature

PROSPER.OUT.TCC.RESULTS[i].TVD[l]

True Vertical Depth

PROSPER.OUT.TCC.RESULTS[i].MSD[l]

Measured Depth

PROSPER.OUT.TCC.RESULTS[i].GRAD[l]

Gradient

PROSPER.OUT.TCC.RESULTS[i].HOLDUP[l]

Holdup

PROSPER.OUT.TCC.RESULTS[i].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.TCC.RESULTS[i].TFO[l]

Formation Temperature

PROSPER.OUT.TCC.RESULTS[i].GRSTAT[l]

Static Gradient

PROSPER.OUT.TCC.RESULTS[i].GRFRIC[l]

Friction Gradient

PROSPER.OUT.TCC.RESULTS[i].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.TCC.RESULTS[i].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.TCC.RESULTS[i].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.TCC.RESULTS[i].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.TCC.RESULTS[i].AVRHSL[l]

Mixture Density

PROSPER.OUT.TCC.RESULTS[i].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.TCC.RESULTS[i].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.TCC.RESULTS[i].CASTEM[l]

Casing temperature

PROSPER.OUT.TCC.RESULTS[i].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.TCC.RESULTS[i].RHOOIL[l]

Gas density

PROSPER.OUT.TCC.RESULTS[i].RHOGAS[l]

Oil density

1990-2011 Petroleum Experts Limited

359

OpenServer

PROSPER.OUT.TCC.RESULTS[i].RHOWAT[l]

Water density

PROSPER.OUT.TCC.RESULTS[i].DIAINT[l]

Diameter

PROSPER.OUT.TCC.RESULTS[i].ANGLE[l]

Angle

PROSPER.OUT.TCC.RESULTS[i].DSTEP[l]

Section length

PROSPER.OUT.TCC.RESULTS[i].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.TCC.RESULTS[i].FMUGAS[l]

Gas viscosity

PROSPER.OUT.TCC.RESULTS[i].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.TCC.RESULTS[i].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.TCC.RESULTS[i].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.TCC.RESULTS[i].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.TCC.RESULTS[i].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.TCC.RESULTS[i].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.TCC.RESULTS[i].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.TCC.RESULTS[i].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.TCC.RESULTS[i].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.TCC.RESULTS[i].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.TCC.RESULTS[i].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.TCC.RESULTS[i].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.TCC.RESULTS[i].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.TCC.RESULTS[i].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.TCC.RESULTS[i].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.TCC.RESULTS[i].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.TCC.RESULTS[i].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.TCC.RESULTS[i].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.TCC.RESULTS[i].CORR[l]

Corrleation Index

PROSPER.OUT.TCC.RESULTS[i].HYDRATE[l]

Hydrates Formation Flag


Injected Gas Gradient

PROSPER.OUT.TCC.RESULTS[i].GASGRAD[l]. Number of Points


NUM
m = 0 : PROSPER.OUT.TCC.RESULTS[i].
GASGRAD[l].NUM-1

OpenServer User's Manual

PROSPER and the OpenServer

360

PROSPER.OUT.TCC.RESULTS[i].GASGRAD[l]. Depth
DEPTH[m]
PROSPER.OUT.TCC.RESULTS[i].GASGRAD[l]. Pressure
PRES[m]

6.7.9 GMT - Gradient Matching


PROSPER.OUT.GMT.DONE

Calculation Done Flag

PROSPER.OUT.GMT.NUM

Number of Correlations

i = 0 : PROSPER.OUT.GMT.NUM-1
PROSPER.OUT.GMT.RESULTS[i].NUM

Number of Gradient Results

l = 0 : PROSPER.OUT.GMT.RESULTS[i].NUM-1
PROSPER.OUT.GMT.RESULTS[i].REGIME[l]

Flow Regime Number

PROSPER.OUT.GMT.RESULTS[i].LABEL[l]

Label Number

PROSPER.OUT.GMT.RESULTS[i].PRES[l]

Pressure

PROSPER.OUT.GMT.RESULTS[i].TEMP[l]

Fluid Temperature

PROSPER.OUT.GMT.RESULTS[i].TVD[l]

True Vertical Depth

PROSPER.OUT.GMT.RESULTS[i].MSD[l]

Measured Depth

PROSPER.OUT.GMT.RESULTS[i].GRAD[l]

Gradient

PROSPER.OUT.GMT.RESULTS[i].HOLDUP[l]

Holdup

PROSPER.OUT.GMT.RESULTS[i].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.GMT.RESULTS[i].TFO[l]

Formation Temperature

PROSPER.OUT.GMT.RESULTS[i].GRSTAT[l]

Static Gradient

PROSPER.OUT.GMT.RESULTS[i].GRFRIC[l]

Friction Gradient

PROSPER.OUT.GMT.RESULTS[i].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.GMT.RESULTS[i].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.GMT.RESULTS[i].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.GMT.RESULTS[i].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.GMT.RESULTS[i].AVRHSL[l]

Mixture Density
1990-2011 Petroleum Experts Limited

361

OpenServer

PROSPER.OUT.GMT.RESULTS[i].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.GMT.RESULTS[i].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.GMT.RESULTS[i].CASTEM[l]

Casing temperature

PROSPER.OUT.GMT.RESULTS[i].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.GMT.RESULTS[i].RHOOIL[l]

Gas density

PROSPER.OUT.GMT.RESULTS[i].RHOGAS[l]

Oil density

PROSPER.OUT.GMT.RESULTS[i].RHOWAT[l]

Water density

PROSPER.OUT.GMT.RESULTS[i].DIAINT[l]

Diameter

PROSPER.OUT.GMT.RESULTS[i].ANGLE[l]

Angle

PROSPER.OUT.GMT.RESULTS[i].DSTEP[l]

Section length

PROSPER.OUT.GMT.RESULTS[i].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.GMT.RESULTS[i].FMUGAS[l]

Gas viscosity

PROSPER.OUT.GMT.RESULTS[i].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.GMT.RESULTS[i].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.GMT.RESULTS[i].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.GMT.RESULTS[i].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.GMT.RESULTS[i].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.GMT.RESULTS[i].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.GMT.RESULTS[i].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.GMT.RESULTS[i].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.GMT.RESULTS[i].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.GMT.RESULTS[i].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.GMT.RESULTS[i].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.GMT.RESULTS[i].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.GMT.RESULTS[i].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.GMT.RESULTS[i].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.GMT.RESULTS[i].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.GMT.RESULTS[i].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.GMT.RESULTS[i].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.GMT.RESULTS[i].SANDDI[l]

Max Transportable Grain


Diameter

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.GMT.RESULTS[i].CORR[l]

Corrleation Index

PROSPER.OUT.GMT.RESULTS[i].HYDRATE[l]

Hydrates Formation Flag

362

Injected Gas Gradient


PROSPER.OUT.GMT.RESULTS[i].GASGRAD[l]. Number of Points
NUM
m = 0 : PROSPER.OUT.GMT.RESULTS[i].
GASGRAD[l].NUM-1
PROSPER.OUT.GMT.RESULTS[i].GASGRAD[l]. Depth
DEPTH[m]
PROSPER.OUT.GMT.RESULTS[i].GASGRAD[l]. Pressure
PRES[m]
PROSPER.Anl.Cor.Corr[i].Name
PROSPER.Anl.Cor.Corr[i].A[j]
PROSPER.Anl.Cor.Corr[i].S[j]
i is correlation index
j is parameter index (0 for gravity, 1 for friction)
A is tubing matching
S is pipeline

6.7.10 VL3 - VLP Sensitivity Calculations (3 Variables)


PROSPER.OUT.VL3.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.VL3.SENS.VARS.
VAL1.NUM-1

Number

j = 0 : PROSPER.ANL.VL3.SENS.VARS.
VAL2.NUM-1

Of

k = 0 : PROSPER.ANL.VL3.SENS.VARS.
VAL3.NUM-1

Sensitivity Values

l = 0 : PROSPER.ANL.VL3.RATES.COUNT- Number of Rates


1
PROSPER.OUT.VL3.RESULTS[i][j][k].

Liquid Rate

1990-2011 Petroleum Experts Limited

363

OpenServer

LIQRATE [l]
PROSPER.OUT.VL3.RESULTS[i][j][k].
OILRATE [l]

Oil Rate

PROSPER.OUT.VL3.RESULTS[i][j][k].
WATRATE [l]

Water Rate

PROSPER.OUT.VL3.RESULTS[i][j][k].
GASRATE [l]

Gas

PROSPER.OUT.VL3.RESULTS[i][j][k].
VLPPRES [l]

VLP Pressure

PROSPER.OUT.VL3.RESULTS[i][j][k].PIP
[l]

Pump Intake

PROSPER.OUT.VL3.RESULTS[i][j][k].PDP
[l]

Pump Discharge Pressure

PROSPER.OUT.VL3.RESULTS[i][j][k].
DEPTH [l]

Injection Depth

PROSPER.OUT.VL3.RESULTS[i][j][k].
WHPRES [l]

Well Head Pressure

PROSPER.OUT.VL3.RESULTS[i][j][k].
WHTEMP [l]

Well Head Temperature

PROSPER.OUT.VL3.RESULTS[i][j][k].
FNPRES [l]

First Node Pressure

PROSPER.OUT.VL3.RESULTS[i][j][k].
FNTEMP [l]

First Node Temperature

PROSPER.OUT.VL3.RESULTS[i][j][k].
PRFRIC [l]

Friction Pressure Loss

PROSPER.OUT.VL3.RESULTS[i][j][k].
PRSTAT [l]

Gravity Pressure Loss

PROSPER.OUT.VL3.RESULTS[i][j][k].
PMPPOWER[l]

Pump Power

PROSPER.OUT.VL3.RESULTS[i][j][k].
PMPEFF [l]

Pump Efficiency

PROSPER.OUT.VL3.RESULTS[i][j][k].
PMPHEAD [l]

Pump Head

PROSPER.OUT.VL3.RESULTS[i][j][k].
PMPRATE [l]

Average Rate Through Pump

PROSPER.OUT.VL3.RESULTS[i][j][k].
MOTCURR [l]

Motor Current

OpenServer User's Manual

Rate

Pressure

PROSPER and the OpenServer

PROSPER.OUT.VL3.RESULTS[i][j][k].
MOTPOW [l]

Motor Power

PROSPER.OUT.VL3.RESULTS[i][j][k].
MOTEFF [l]

Motor Efficiency

PROSPER.OUT.VL3.RESULTS[i][j][k].
MOTRPM [l]

Motor Speed

PROSPER.OUT.VL3.RESULTS[i][j][k].
VLTSURF [l]

Voltage Required At Surface

PROSPER.OUT.VL3.RESULTS[i][j][k].
CABTEMP [l]

Average Temperature in Cable

PROSPER.OUT.VL3.RESULTS[i][j][k].
VLTDROP [l]

Voltage Drop Along Cable

PROSPER.OUT.VL3.RESULTS[i][j][k].
HYDRATE [l]

Hydrates Warning Flag

PROSPER.OUT.VL3.RESULTS[i][j][k].
EROSION [l]

Erosion Warning Flag

364

6.7.11 VL4 - VLP Sensitivity Calculations (4 Variables)


PROSPER.OUT.VL4.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.VL4.SENS.VARS.
VAL1.NUM-1

Number

j = 0 : PROSPER.ANL.VL4.SENS.VARS.
VAL2.NUM-1

Of

k = 0 : PROSPER.ANL.VL4.SENS.VARS.
VAL3.NUM-1

Sensitivity

l = 0 : PROSPER.ANL.VL4.SENS.VARS.
VAL4.NUM-1

Variables

m = 0 : PROSPER.ANL.VL4.RATES.
COUNT-1

Number of Rates

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
LIQRATE [m]

Liquid Rate

1990-2011 Petroleum Experts Limited

365

OpenServer

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
OILRATE [m]

Oil Rate

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
WATRATE [m]

Water Rate

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
GASRATE [m]

Gas

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
VLPPRES [m]

VLP Pressure

Rate

PROSPER.OUT.VL4.RESULTS[i][j][k][l].PIP Pump Intake


[m]

Pressure

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PDP [m]

Pump Discharge Pressure

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
DEPTH [m]

Injection Depth

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
WHPRES [m]

Well Head Pressure

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
WHTEMP [m]

Well Head Temperature

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
FNPRES [m]

First Node Pressure

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
FNTEMP [m]

First Node Temperature

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PRFRIC [m]

Friction Pressure Loss

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PRSTAT [m]

Gravity Pressure Loss

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PMPPOWER[m]

Pump Power

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PMPEFF [m]

Pump Efficiency

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PMPHEAD [m]

Pump Head

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
PMPRATE [m]

Average Rate Through Pump

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
MOTCURR [m]

Motor Current

PROSPER.OUT.VL4.RESULTS[i][j][k][l].

Motor Power

OpenServer User's Manual

PROSPER and the OpenServer

366

MOTPOW [m]
PROSPER.OUT.VL4.RESULTS[i][j][k][l].
MOTEFF [m]

Motor Efficiency

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
MOTRPM [m]

Motor Speed

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
VLTSURF [m]

Voltage Required At Surface

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
CABTEMP [m]

Average Temperature in Cable

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
VLTDROP [m]

Voltage Drop Along Cable

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
HYDRATE [m]

Hydrates Warning Flag

PROSPER.OUT.VL4.RESULTS[i][j][k][l].
EROSION [m]

Erosion Warning Flag

6.7.12 GEN - Generate For GAP


PROSPER.ANL.GEN.MANPRES.COUNT

Returns the Number of


Manifold Pressures

i varies from 0 to Count-1


PROSPER.ANL.GEN.GENGLR[i].COUNT

Returns the Number of


Injected GLRs

j varies from 0 to Count-1


PROSPER.ANL.GEN.RATES.COUNT

Returns the Number of


Rates

k varies from 0 to Count-1


Prosper.OUT.GEN.Results[i][j].LiqRate[k]

Liquid Rate

Prosper.OUT.GEN.Results[i][j].OilRate[k]

Oil Rate

Prosper.OUT.GEN.Results[i][j].IPRpres[k]

Inflow Pressure

Prosper.OUT.GEN.Results[i][j].VLPpres[k]

Outflow Pressure

Prosper.OUT.GEN.Results[i][j].DpTotal[k]

Total dP Skin

Prosper.OUT.GEN.Results[i][j].DPPerf[k]

Perforation dP Skin

Prosper.OUT.GEN.Results[i][j].DPDam[k]

Damage dP Skin

1990-2011 Petroleum Experts Limited

367

OpenServer

Prosper.OUT.GEN.Results[i][j].DPComp[k]

Completion dP Skin

Prosper.OUT.GEN.Results[i][j].DPGrav[k]

Gravity dP Skin

Prosper.OUT.GEN.Results[i][j].SKTotal[k]

Total Skin

Prosper.OUT.GEN.Results[i][j].SKComp[k]

Completion Skin

Prosper.OUT.GEN.Results[i][j].SKGrav[k]

Gravel Pack Skin

Prosper.OUT.GEN.Results[i][j].VcGrav[k]

Velocity at Casing (for


Gravel Pack)

Prosper.OUT.GEN.Results[i][j].VsGrav[k]

Velocity at Screen (for


Gravel Pack)

Prosper.OUT.GEN.Results[i][j].PIP[k]

Pump Intake Pressure

Prosper.OUT.GEN.Results[i][j].PDP[k]

Pump Discharge
Pressure

Prosper.OUT.GEN.Results[i][j].Depth[k]

Injection Depth

Prosper.OUT.GEN.Results[i][j].WHpres[k]

Wellhead Pressure

Prosper.OUT.GEN.Results[i][j].WHtemp[k]

Wellhead Temperature

Prosper.OUT.GEN.Results[i][j].FNtemp[k]

First Node Temperature

Prosper.OUT.GEN.Results[i][j].PrFric[k]

Friction Pressure Drop

Prosper.OUT.GEN.Results[i][j].PrStat[k]

Static Pressure Drop

Prosper.OUT.GEN.Results[i][j].Hydrate[k]

Hydrates Flag

Prosper.OUT.GEN.Results[i][j].Turner[k]

Turner Velocity

Prosper.OUT.GEN.Results[i][j].Erosion[k]

Erosional Velocity

Prosper.OUT.GEN.Results[i][j].Cavitation[k]

Cavitation

SOLUTION DATA
PROSPER.OUT.GEN.Results[i][j].Sol.LiqRate

Liquid Rate

PROSPER.OUT.GEN.Results[i][j].Sol.OilRate

Oil Rate

PROSPER.OUT.GEN.Results[i][j].Sol.GasRate

Gas Rate

PROSPER.OUT.GEN.Results[i][j].Sol.WatRate

Water Rate

PROSPER.OUT.GEN.Results[i][j].Sol.WC

Water Cut

PROSPER.OUT.GEN.Results[i][j].Sol.BHP

BHP

PROSPER.OUT.GEN.Results[i][j].Sol.THT

Tubing Head
Temperature

OpenServer User's Manual

PROSPER and the OpenServer

368

PROSPER.OUT.GEN.Results[i][j].Sol.FNP

First Node Pressure

PROSPER.OUT.GEN.Results[i][j].Sol.FNT

First Node Temperature


WELLHEAD RESULTS

PROSPER.OUT.GEN.Results[i][j].Sol.WHDenLiquid

Liquid Density

PROSPER.OUT.GEN.Results[i][j].Sol.WHDenGas

Gas Density

PROSPER.OUT.GEN.Results[i][j].Sol.WHVisLiquid

Liquid Density

PROSPER.OUT.GEN.Results[i][j].Sol.WHVisGas

Gas Viscosity

PROSPER.OUT.GEN.Results[i][j].Sol.WHVelLiquid

Liquid Velocity

PROSPER.OUT.GEN.Results[i][j].Sol.WHVelGas

Gas Velocity

PROSPER.OUT.GEN.Results[i][j].Sol.WHZFactor

Z Factor

PROSPER.OUT.GEN.Results[i][j].Sol.
WHSurfaceTension

Interfacial Tension

PROSPER.OUT.GEN.Results[i][j].Sol.WHPressure

Pressure
FIRST NODE RESULTS

PROSPER.OUT.GEN.Results[i][j].Sol.FNDenLiquid

Liquid density

PROSPER.OUT.GEN.Results[i][j].Sol.FNDenGas

Gas Density

PROSPER.OUT.GEN.Results[i][j].Sol.FNVisLiquid

Liquid Viscosity

PROSPER.OUT.GEN.Results[i][j].Sol.FNVisGas

Gas Vscosity

PROSPER.OUT.GEN.Results[i][j].Sol.FNVelLiquid

Liquid Velocity

PROSPER.OUT.GEN.Results[i][j].Sol.FNVelGas

Gas Velocity

PROSPER.OUT.GEN.Results[i][j].Sol.FNZFactor

Z Factor

PROSPER.OUT.GEN.Results[i][j].Sol.
FNSurfaceTension

Interfacial Tension

PROSPER.OUT.GEN.Results[i][j].Sol.FNPressure

Pressure
SKIN RESULTS

PROSPER.OUT.GEN.Results[i][j].Sol.dPTotalSkin

Total Skin dP

PROSPER.OUT.GEN.Results[i][j].Sol.dPPerforation

Perforation dP

PROSPER.OUT.GEN.Results[i][j].Sol.dPDamage

Damage Skin dP

PROSPER.OUT.GEN.Results[i][j].Sol.dPCompletion

dP Completion Skin

1990-2011 Petroleum Experts Limited

369

OpenServer

PROSPER.OUT.GEN.Results[i][j].Sol.CompletionSkin

Completion Skin

PROSPER.OUT.GEN.Results[i][j].Sol.GravelPackSkin

Gravel Pack Skin

PROSPER.OUT.GEN.Results[i][j].Sol.TotalSkin

Total Skin

PROSPER.OUT.GEN.Results[i][j].Sol.PumpAvRate

Pump Average Rate


PUMP RESULTS

PROSPER.OUT.GEN.Results[i][j].Sol.PIP

Pump Intake Pressure

PROSPER.OUT.GEN.Results[i][j].Sol.PDP

Pump Output Pressure

PROSPER.OUT.GEN.Results[i][j].Sol.InjectionDepth

Injection Depth

PROSPER.OUT.GEN.Results[i][j].Sol.PumpHead

Pump Head

PROSPER.OUT.GEN.Results[i][j].Sol.PumpPower

Pump Power

PROSPER.OUT.GEN.Results[i][j].Sol.PumpEfficiency

Pump Efficiency

PROSPER.OUT.GEN.Results[i][j].Sol.PRFRIC

Frictional Pressure Drop

PROSPER.OUT.GEN.Results[i][j].Sol.PRSTAT

Static Pressure Drop

PROSPER.OUT.GEN.Results[i][j].Sol.WHTemperature

Wellhead Temperature

PROSPER.OUT.GEN.Results[i][j].Sol.FNTemperature

First Node Temperature

PROSPER.OUT.GEN.Results[i][j].Sol.Hydrate

Hydrates Flag

PROSPER.OUT.GEN.Results[i][j].Sol.dpGravel

Gravel Pack dP

PROSPER.OUT.GEN.Results[i][j].Sol.vcGravel

Velocity at Casing (Gravel


Pack)

PROSPER.OUT.GEN.Results[i][j].Sol.vsGravel

Velocity at Screen (Gravel


Pack)

PROSPER.OUT.GEN.Results[i][j].Sol.Grvgas

Gas Gravity

PROSPER.OUT.GEN.Results[i][j].Sol.OilAPI

Oil API

PROSPER.OUT.GEN.Results[i][j].Sol.GorTOT

Total GOR

6.7.13 SPD - Sensitivity PvD


PROSPER.OUT.SPD.DONE

Calculation Done Flag

PROSPER.OUT.SPD.RESULTS[0].NUM

Number of Gradient Results

OpenServer User's Manual

PROSPER and the OpenServer

370

l = 0 : PROSPER.OUT.SPD.RESULTS[0].NUM-1
PROSPER.OUT.SPD.RESULTS[0].REGIME[l]

Flow Regime Number

PROSPER.OUT.SPD.RESULTS[0].LABEL[l]

Label Number

PROSPER.OUT.SPD.RESULTS[0].PRES[l]

Pressure

PROSPER.OUT.SPD.RESULTS[0].TEMP[l]

Fluid Temperature

PROSPER.OUT.SPD.RESULTS[0].TVD[l]

True Vertical Depth

PROSPER.OUT.SPD.RESULTS[0].MSD[l]

Measured Depth

PROSPER.OUT.SPD.RESULTS[0].GRAD[l]

Gradient

PROSPER.OUT.SPD.RESULTS[0].HOLDUP[l]

Holdup

PROSPER.OUT.SPD.RESULTS[0].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.SPD.RESULTS[0].TFO[l]

Formation Temperature

PROSPER.OUT.SPD.RESULTS[0].GRSTAT[l]

Static Gradient

PROSPER.OUT.SPD.RESULTS[0].GRFRIC[l]

Friction Gradient

PROSPER.OUT.SPD.RESULTS[0].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.SPD.RESULTS[0].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.SPD.RESULTS[0].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.SPD.RESULTS[0].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.SPD.RESULTS[0].AVRHSL[l]

Mixture Density

PROSPER.OUT.SPD.RESULTS[0].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.SPD.RESULTS[0].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.SPD.RESULTS[0].CASTEM[l]

Casing temperature

PROSPER.OUT.SPD.RESULTS[0].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.SPD.RESULTS[0].RHOOIL[l]

Gas density

PROSPER.OUT.SPD.RESULTS[0].RHOGAS[l]

Oil density

PROSPER.OUT.SPD.RESULTS[0].RHOWAT[l]

Water density

PROSPER.OUT.SPD.RESULTS[0].DIAINT[l]

Diameter

PROSPER.OUT.SPD.RESULTS[0].ANGLE[l]

Angle

PROSPER.OUT.SPD.RESULTS[0].DSTEP[l]

Section length

PROSPER.OUT.SPD.RESULTS[0].FMULIQ[l]

Liquid viscosity

1990-2011 Petroleum Experts Limited

371

OpenServer

PROSPER.OUT.SPD.RESULTS[0].FMUGAS[l]

Gas viscosity

PROSPER.OUT.SPD.RESULTS[0].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.SPD.RESULTS[0].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.SPD.RESULTS[0].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.SPD.RESULTS[0].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.SPD.RESULTS[0].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.SPD.RESULTS[0].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.SPD.RESULTS[0].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.SPD.RESULTS[0].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.SPD.RESULTS[0].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.SPD.RESULTS[0].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.SPD.RESULTS[0].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.SPD.RESULTS[0].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.SPD.RESULTS[0].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.SPD.RESULTS[0].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.SPD.RESULTS[0].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.SPD.RESULTS[0].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.SPD.RESULTS[0].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.SPD.RESULTS[0].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.SPD.RESULTS[0].CORR[l]

Corrleation Index

PROSPER.OUT.SPD.RESULTS[0].HYDRATE[l]

Hydrates Formation Flag


Injected Gas Gradient

PROSPER.OUT.SPD.RESULTS[0].GASGRAD[l]. Number of Points


NUM
m = 0 : PROSPER.OUT.SPD.RESULTS[0].
GASGRAD[l].NUM-1
PROSPER.OUT.SPD.RESULTS[0].GASGRAD[l]. Depth
DEPTH[m]
PROSPER.OUT.SPD.RESULTS[0].GASGRAD[l]. Pressure
PRES[m]

OpenServer User's Manual

PROSPER and the OpenServer

372

6.7.14 SPT - Sensitivity PvD (Enthalpy Balance)


PROSPER.OUT.SPT.DONE

Calculation Done Flag

PROSPER.OUT.SPT.RESULTS[0].NUM

Number of Gradient Results

l = 0 : PROSPER.OUT.SPT.RESULTS[0].NUM-1
PROSPER.OUT.SPT.RESULTS[0].REGIME[l]

Flow Regime Number

PROSPER.OUT.SPT.RESULTS[0].LABEL[l]

Label Number

PROSPER.OUT.SPT.RESULTS[0].PRES[l]

Pressure

PROSPER.OUT.SPT.RESULTS[0].TEMP[l]

Fluid Temperature

PROSPER.OUT.SPT.RESULTS[0].TVD[l]

True Vertical Depth

PROSPER.OUT.SPT.RESULTS[0].MSD[l]

Measured Depth

PROSPER.OUT.SPT.RESULTS[0].GRAD[l]

Gradient

PROSPER.OUT.SPT.RESULTS[0].HOLDUP[l]

Holdup

PROSPER.OUT.SPT.RESULTS[0].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.SPT.RESULTS[0].TFO[l]

Formation Temperature

PROSPER.OUT.SPT.RESULTS[0].GRSTAT[l]

Static Gradient

PROSPER.OUT.SPT.RESULTS[0].GRFRIC[l]

Friction Gradient

PROSPER.OUT.SPT.RESULTS[0].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.SPT.RESULTS[0].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.SPT.RESULTS[0].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.SPT.RESULTS[0].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.SPT.RESULTS[0].AVRHSL[l]

Mixture Density

PROSPER.OUT.SPT.RESULTS[0].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.SPT.RESULTS[0].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.SPT.RESULTS[0].CASTEM[l]

Casing temperature

PROSPER.OUT.SPT.RESULTS[0].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.SPT.RESULTS[0].RHOOIL[l]

Gas density

PROSPER.OUT.SPT.RESULTS[0].RHOGAS[l]

Oil density

PROSPER.OUT.SPT.RESULTS[0].RHOWAT[l]

Water density
1990-2011 Petroleum Experts Limited

373

OpenServer

PROSPER.OUT.SPT.RESULTS[0].DIAINT[l]

Diameter

PROSPER.OUT.SPT.RESULTS[0].ANGLE[l]

Angle

PROSPER.OUT.SPT.RESULTS[0].DSTEP[l]

Section length

PROSPER.OUT.SPT.RESULTS[0].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.SPT.RESULTS[0].FMUGAS[l]

Gas viscosity

PROSPER.OUT.SPT.RESULTS[0].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.SPT.RESULTS[0].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.SPT.RESULTS[0].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.SPT.RESULTS[0].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.SPT.RESULTS[0].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.SPT.RESULTS[0].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.SPT.RESULTS[0].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.SPT.RESULTS[0].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.SPT.RESULTS[0].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.SPT.RESULTS[0].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.SPT.RESULTS[0].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.SPT.RESULTS[0].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.SPT.RESULTS[0].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.SPT.RESULTS[0].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.SPT.RESULTS[0].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.SPT.RESULTS[0].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.SPT.RESULTS[0].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.SPT.RESULTS[0].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.SPT.RESULTS[0].CORR[l]

Corrleation Index

PROSPER.OUT.SPT.RESULTS[0].HYDRATE[l]

Hydrates Formation Flag


Injected Gas Gradient

PROSPER.OUT.SPT.RESULTS[0].GASGRAD[l].
NUM

Number of Points

m = 0 : PROSPER.OUT.SPT.RESULTS[0].
GASGRAD[l].NUM-1
PROSPER.OUT.SPT.RESULTS[0].GASGRAD[l].

OpenServer User's Manual

Depth

PROSPER and the OpenServer

374

DEPTH[m]
PROSPER.OUT.SPT.RESULTS[0].GASGRAD[l].
PRES[m]

Pressure

6.7.15 GLN - Gas Lift Design (New Well)


i=0:7
PROSPER.OUT.GLN.MATCHL[i]

Match Parameters for Liquid


Rate

PROSPER.OUT.GLN.MATCHR[i]

Match Parameters for Revenue

PROSPER.OUT.GLN.NUMPC

No of Points in Performance
Curve

i = 0 : PROSPER.OUT.GLN.NUMPC-1
PROSPER.OUT.GLN.PCX[i]

GLR Injected

PROSPER.OUT.GLN.PCY[i]

Oil Produced / Revenue

Automatic Rate Calculation Results


PROSPER.OUT.GLN.GLR

GLR Injected

PROSPER.OUT.GLN.CLL

Liquid Rate

PROSPER.OUT.GLN.CLO

Oil Rate

PROSPER.OUT.GLN.VLP

VLP Pressure

PROSPER.OUT.GLN.IPR

IPR PRessure

PROSPER.OUT.GLN.STD

Standard Deviation of Curve


Fit

PROSPER.OUT.GLN.GMX

Max Gas Injected

PROSPER.OUT.GLN.OMX

Max Oil Produced

Objective Gradient
PROSPER.OUT.GLN.MSD

Measured Depth of Injection

PROSPER.OUT.GLN.TVD

True Vertical Depth of Injection

PROSPER.OUT.GLN.PRS

Pressure

PROSPER.OUT.GLN.TMP

Temperature

1990-2011 Petroleum Experts Limited

375

OpenServer

PROSPER.OUT.GLN.GAS

Gas Injection Pressure

PROSPER.OUT.GLN.NVPLOT

Number of Points

i= 0 : PROSPER.OUT.GLN.NVPLOT-1
PROSPER.OUT.GLN.COMPFL[i]

Unloading Gradient Pressure

PROSPER.OUT.GLN.DPPLOT[i]

Unloading Gradient - Depth

PROSPER.OUT.GLN.LISTBOX.COUNT

Number of Lines in ListBox

i= 0 : PROSPER.OUT.GLN.LISTBOX.COUNT-1
PROSPER.OUT.GLN.LISTBOX[i]

Descriptive text

PROSPER.OUT.GLN.NVALR

Number of Valves

i= 0 : PROSPER.OUT.GLN.NVALR-1
PROSPER.OUT.GLN.PORT[i]

Port Size

PROSPER.OUT.GLN.PTRTVD[i]

Valve Transfer Pressure Depth

PROSPER.OUT.GLN.PTRPRS[i]

Valve Transfer Pressure Pressure

PROSPER.OUT.GLN.PMAXAR[i]

Max Transfer Pressure

PROSPER.OUT.GLN.PREFAR[i]

Total Injected Gas Pressure

PROSPER.OUT.GLN.PGARRR[i]

Actual Injected Gas Pressure

PROSPER.OUT.GLN.PMINAR[i]

Minimum Transfer Pressure

PROSPER.OUT.GLN.DELTEF[i]

Tubing Effect Pressure

PROSPER.OUT.GLN.LEGEND[0]

Maximum Gas Available

PROSPER.OUT.GLN.LEGEND[1]

Flowing Top Node Pressure

PROSPER.OUT.GLN.LEGEND[2]

Operating Injection Pressure

PROSPER.OUT.GLN.LEGEND[3]

Water Cut

PROSPER.OUT.GLN.LEGEND[4]

ACTUAL Liquid Rate

PROSPER.OUT.GLN.LEGEND[5]

ACTUAL Oil Rate

OpenServer User's Manual

PROSPER and the OpenServer

376

PROSPER.OUT.GLN.LEGEND[6]

ACTUAL Gas Injection Rate

PROSPER.OUT.GLN.LEGEND[7]

ACTUAL Injection Pressure

PROSPER.OUT.GLN.RESULTS[0].NUM

Number of Gradient Results

l = 0 : PROSPER.OUT.GLN.RESULTS[0].NUM-1
PROSPER.OUT.GLN.RESULTS[0].REGIME[l]

Flow Regime Number

PROSPER.OUT.GLN.RESULTS[0].LABEL[l]

Label Number

PROSPER.OUT.GLN.RESULTS[0].PRES[l]

Pressure

PROSPER.OUT.GLN.RESULTS[0].TEMP[l]

Fluid Temperature

PROSPER.OUT.GLN.RESULTS[0].TVD[l]

True Vertical Depth

PROSPER.OUT.GLN.RESULTS[0].MSD[l]

Measured Depth

PROSPER.OUT.GLN.RESULTS[0].GRAD[l]

Gradient

PROSPER.OUT.GLN.RESULTS[0].HOLDUP[l]

Holdup

PROSPER.OUT.GLN.RESULTS[0].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.GLN.RESULTS[0].TFO[l]

Formation Temperature

PROSPER.OUT.GLN.RESULTS[0].GRSTAT[l]

Static Gradient

PROSPER.OUT.GLN.RESULTS[0].GRFRIC[l]

Friction Gradient

PROSPER.OUT.GLN.RESULTS[0].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.GLN.RESULTS[0].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.GLN.RESULTS[0].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.GLN.RESULTS[0].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.GLN.RESULTS[0].AVRHSL[l]

Mixture Density

PROSPER.OUT.GLN.RESULTS[0].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.GLN.RESULTS[0].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.GLN.RESULTS[0].CASTEM[l]

Casing temperature

PROSPER.OUT.GLN.RESULTS[0].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.GLN.RESULTS[0].RHOOIL[l]

Gas density

PROSPER.OUT.GLN.RESULTS[0].RHOGAS[l]

Oil density

PROSPER.OUT.GLN.RESULTS[0].RHOWAT[l]

Water density

1990-2011 Petroleum Experts Limited

377

OpenServer

PROSPER.OUT.GLN.RESULTS[0].DIAINT[l]

Diameter

PROSPER.OUT.GLN.RESULTS[0].ANGLE[l]

Angle

PROSPER.OUT.GLN.RESULTS[0].DSTEP[l]

Section length

PROSPER.OUT.GLN.RESULTS[0].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.GLN.RESULTS[0].FMUGAS[l]

Gas viscosity

PROSPER.OUT.GLN.RESULTS[0].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.GLN.RESULTS[0].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.GLN.RESULTS[0].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.GLN.RESULTS[0].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.GLN.RESULTS[0].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.GLN.RESULTS[0].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.GLN.RESULTS[0].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.GLN.RESULTS[0].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.GLN.RESULTS[0].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.GLN.RESULTS[0].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.GLN.RESULTS[0].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.GLN.RESULTS[0].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.GLN.RESULTS[0].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.GLN.RESULTS[0].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.GLN.RESULTS[0].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.GLN.RESULTS[0].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.GLN.RESULTS[0].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.GLN.RESULTS[0].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.GLN.RESULTS[0].CORR[l]

Corrleation Index

PROSPER.OUT.GLN.RESULTS[0].HYDRATE[l]

Hydrates Formation Flag


Injected Gas Gradient

PROSPER.OUT.GLN.RESULTS[0].GASGRAD[l].
NUM

Number of Points

m = 0 : PROSPER.OUT.GLN.RESULTS[0].
GASGRAD[l].NUM-1
PROSPER.OUT.GLN.RESULTS[0].GASGRAD[l].

OpenServer User's Manual

Depth

PROSPER and the OpenServer

378

DEPTH[m]
PROSPER.OUT.GLN.RESULTS[0].GASGRAD[l].
PRES[m]

Pressure

6.7.16 GLE - Gas Lift Design (Existing Well)


i=0:7
PROSPER.OUT.GLE.MATCHL[i]

Match Parameters for Liquid


Rate

PROSPER.OUT.GLE.MATCHR[i]

Match Parameters for Revenue

PROSPER.OUT.GLE.NUMPC

No of Points in Performance
Curve

i = 0 : PROSPER.OUT.GLE.NUMPC-1
PROSPER.OUT.GLE.PCX[i]

GLR Injected

PROSPER.OUT.GLE.PCY[i]

Oil Produced / Revenue

PROSPER.OUT.GLE.GLR

GLR Injected

PROSPER.OUT.GLE.CLL

Liquid Rate

PROSPER.OUT.GLE.CLO

Oil Rate

PROSPER.OUT.GLE.VLP

VLP Pressure

PROSPER.OUT.GLE.IPR

IPR PRessure

PROSPER.OUT.GLE.STD

Standard Deviation of Curve


Fit

PROSPER.OUT.GLE.GMX

Max Gas Injected

PROSPER.OUT.GLE.OMX

Max Oil Produced

PROSPER.OUT.GLE.MSD

Measured Depth of Injection

PROSPER.OUT.GLE.TVD

True Vertical Depth of Injection

PROSPER.OUT.GLE.PRS

Pressure

PROSPER.OUT.GLE.TMP

Temperature

PROSPER.OUT.GLE.GAS

Gas Injection Pressure


1990-2011 Petroleum Experts Limited

379

OpenServer

PROSPER.OUT.GLE.NVPLOT

Number of Points

i= 0 : PROSPER.OUT.GLE.NVPLOT-1
PROSPER.OUT.GLE.COMPFL[i]

Unloading Gradient Pressure

PROSPER.OUT.GLE.DPPLOT[i]

Unloading Gradient - Depth

PROSPER.OUT.GLE.LISTBOX.COUNT

Number of Lines in ListBox

i= 0 : PROSPER.OUT.GLE.LISTBOX.COUNT-1
PROSPER.OUT.GLE.LISTBOX[i]

Descriptive text

PROSPER.OUT.GLE.NVALR

Number of Valves

i= 0 : PROSPER.OUT.GLE.NVALR-1
PROSPER.OUT.GLE.PORT[i]

Port Size

PROSPER.OUT.GLE.PTRTVD[i]

Valve Transfer Pressure Depth

PROSPER.OUT.GLE.PTRPRS[i]

Valve Transfer Pressure Pressure

PROSPER.OUT.GLE.PMAXAR[i]

Max Transfer Pressure

PROSPER.OUT.GLE.PREFAR[i]

Total Injected Gas Pressure

PROSPER.OUT.GLE.PGARRR[i]

Actual Injected Gas Pressure

PROSPER.OUT.GLE.PMINAR[i]

Minimum Transfer Pressure

PROSPER.OUT.GLE.DELTEF[i]

Tubing Effect Pressure

PROSPER.OUT.GLE.LEGEND[0]

Maximum Gas Available

PROSPER.OUT.GLE.LEGEND[1]

Flowing Top Node Pressure

PROSPER.OUT.GLE.LEGEND[2]

Operating Injection Pressure

PROSPER.OUT.GLE.LEGEND[3]

Water Cut

PROSPER.OUT.GLE.LEGEND[4]

ACTUAL Liquid Rate

PROSPER.OUT.GLE.LEGEND[5]

ACTUAL Oil Rate

PROSPER.OUT.GLE.LEGEND[6]

ACTUAL Gas Injection Rate

OpenServer User's Manual

PROSPER and the OpenServer

380

PROSPER.OUT.GLE.LEGEND[7]

ACTUAL Injection Pressure

PROSPER.OUT.GLE.RESULTS[0].NUM

Number of Gradient Results

l = 0 : PROSPER.OUT.GLE.RESULTS[0].NUM-1
PROSPER.OUT.GLE.RESULTS[0].REGIME[l]

Flow Regime Number

PROSPER.OUT.GLE.RESULTS[0].LABEL[l]

Label Number

PROSPER.OUT.GLE.RESULTS[0].PRES[l]

Pressure

PROSPER.OUT.GLE.RESULTS[0].TEMP[l]

Fluid Temperature

PROSPER.OUT.GLE.RESULTS[0].TVD[l]

True Vertical Depth

PROSPER.OUT.GLE.RESULTS[0].MSD[l]

Measured Depth

PROSPER.OUT.GLE.RESULTS[0].GRAD[l]

Gradient

PROSPER.OUT.GLE.RESULTS[0].HOLDUP[l]

Holdup

PROSPER.OUT.GLE.RESULTS[0].HTC[l]

Heat Transfer Coefficient

PROSPER.OUT.GLE.RESULTS[0].TFO[l]

Formation Temperature

PROSPER.OUT.GLE.RESULTS[0].GRSTAT[l]

Static Gradient

PROSPER.OUT.GLE.RESULTS[0].GRFRIC[l]

Friction Gradient

PROSPER.OUT.GLE.RESULTS[0].VLSLIP[l]

Slip Liquid Velocity

PROSPER.OUT.GLE.RESULTS[0].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.GLE.RESULTS[0].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.GLE.RESULTS[0].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.GLE.RESULTS[0].AVRHSL[l]

Mixture Density

PROSPER.OUT.GLE.RESULTS[0].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.GLE.RESULTS[0].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.GLE.RESULTS[0].CASTEM[l]

Casing temperature

PROSPER.OUT.GLE.RESULTS[0].ANNTEM[l]

Average annulus temperature

PROSPER.OUT.GLE.RESULTS[0].RHOOIL[l]

Gas density

PROSPER.OUT.GLE.RESULTS[0].RHOGAS[l]

Oil density

PROSPER.OUT.GLE.RESULTS[0].RHOWAT[l]

Water density

PROSPER.OUT.GLE.RESULTS[0].DIAINT[l]

Diameter

1990-2011 Petroleum Experts Limited

381

OpenServer

PROSPER.OUT.GLE.RESULTS[0].ANGLE[l]

Angle

PROSPER.OUT.GLE.RESULTS[0].DSTEP[l]

Section length

PROSPER.OUT.GLE.RESULTS[0].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.GLE.RESULTS[0].FMUGAS[l]

Gas viscosity

PROSPER.OUT.GLE.RESULTS[0].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.GLE.RESULTS[0].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.GLE.RESULTS[0].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.GLE.RESULTS[0].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.GLE.RESULTS[0].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.GLE.RESULTS[0].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.GLE.RESULTS[0].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.GLE.RESULTS[0].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.GLE.RESULTS[0].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.GLE.RESULTS[0].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.GLE.RESULTS[0].BUBLQL[l]

Mean Bubble Liquid Rate

PROSPER.OUT.GLE.RESULTS[0].BUBLQG[l]

Mean Bubble Gas Rate

PROSPER.OUT.GLE.RESULTS[0].SLGFRM[l]

Mean Slug Frequency

PROSPER.OUT.GLE.RESULTS[0].SLGFRX[l]

1/1000 Slug Frequency

PROSPER.OUT.GLE.RESULTS[0].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.GLE.RESULTS[0].SLGHLE[l]

Equilibrium Holdup (HLE)

PROSPER.OUT.GLE.RESULTS[0].CFACTR[l]

C Factor (Erosional Velocity)

PROSPER.OUT.GLE.RESULTS[0].SANDDI[l]

Max Transportable Grain


Diameter

PROSPER.OUT.GLE.RESULTS[0].CORR[l]

Corrleation Index

PROSPER.OUT.GLE.RESULTS[0].HYDRATE[l]

Hydrates Formation Flag


Injected Gas Gradient

PROSPER.OUT.GLE.RESULTS[0].GASGRAD[l].
NUM

Number of Points

m = 0 : PROSPER.OUT.GLE.RESULTS[0].
GASGRAD[l].NUM-1
PROSPER.OUT.GLE.RESULTS[0].GASGRAD[l].
DEPTH[m]

OpenServer User's Manual

Depth

PROSPER and the OpenServer

PROSPER.OUT.GLE.RESULTS[0].GASGRAD[l].
PRES[m]

382

Pressure

6.7.17 Gas Lift Design (Intermittent)


PROSPER.SIN.GLI.Input[0]

Downhole injection pressure

PROSPER.SIN.GLI.Input[1]

Downhole pressure

PROSPER.SIN.GLI.Input[2]

Gas lift gas gravity

PROSPER.SIN.GLI.Input[3]

Wellhead pressure

PROSPER.SIN.GLI.Input[4]

Valve port size

PROSPER.SIN.GLI.Input[5]

Water cut

PROSPER.SIN.GLI.Input[6]

Tubing liquid level

PROSPER.SIN.GLI.Input[0]

Slug velocity

PROSPER.SIN.GLI.Input[0]

Gas injection rate

PROSPER.SIN.GLI.Input[0]

Fall back

PROSPER.SIN.GLI.Input[0]

Produced slug length

PROSPER.SIN.GLI.Input[0]

Produced slug volume

PROSPER.SIN.GLI.Input[0]

Pcasing / Pslug

PROSPER.SIN.GLI.Input[0]

Produced / accumulated slug length

PROSPER.SIN.GLI.Input[0]

Starting slug length / valve depth

PROSPER.SIN.GLI.Input[0]

Time to surface

PROSPER.SIN.GLI.Input[0]

Cycle frequency

PROSPER.SIN.GLI.Input[0]

Daily produced rate

6.7.18 ESP - ESP Design


Design List-Box Results
PROSPER.OUT.ESP.LISTBOX.COUNT
PROSPER.OUT.ESP.ListBox[i]

Counts the number of list box contents


Contents of list box results
Index i = 0 to 21
0 - Wellhead pressure
1 - Flowing bottomhole pressure
2 - Water cut
3 - Pump frequency
1990-2011 Petroleum Experts Limited

383

OpenServer

4 - Pump intake pressure


5 - Pump intake temperature
6 - Pump intake rate
7 - Free GOR entering pump
8 - Pump discharge pressure
9 - Pump discharge rate
10 - Total GOR above pump
11 - Mass flow rate
12 - Total fluid gravity
13 - Average downhole rate
14 - Head required
15 - Actual head required
16 - Fluid power requried
17 - GLR @ pump intake (V/V)
18 - Gas fraction @ pump intake
19 - Bo @ pump intake
20 - Bg @ pump intake
21 - Average cable temperature

Dunbar Plot Data


PROSPER.OUT.ESP.ESPPR1

Test point pressure

PROSPER.OUT.ESP.ESPGL1

Test point GLR

PROSPER.OUT.ESP.ESPPRS[i]
i=0:19

Test curve pressures

PROSPER.OUT.ESP.ESPGLR[i][j]
i=0:19 j=0:9
PROSPER.OUT.ESP.ESPDBX[i]
i=0:9

Dunbar curve GLR

PROSPER.OUT.ESP.ESPDBY[i]
i=0:9

Dunbar curve pressure

PROSPER.OUT.ESP.NUM

Number of user entered points

i = 0 : PROSPER.OUT.ESP.NUM-1
PROSPER.OUT.ESP.USERGOR[i]

User entered GOR

PROSPER.OUT.ESP.USERPIP[i]

User entered pump intake pressure

PROSPER.OUT.ESP.USERLAB

User entered label

Design Menu Results


OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.ESP.DONE

Calculation done flag

PROSPER.OUT.ESP.PMPREQ
PROSPER.OUT.ESP.PUMRAT
PROSPER.OUT.ESP.PUMPGR
PROSPER.OUT.ESP.PUMPGF
PROSPER.OUT.ESP.PUMPGA
PROSPER.OUT.ESP.PUMPIT
PROSPER.OUT.ESP.PUMPIP
PROSPER.OUT.ESP.PUMPIR
PROSPER.OUT.ESP.PUMPDR
PROSPER.OUT.ESP.PUMPMF
PROSPER.OUT.ESP.PUMPAT
PROSPER.SIN.ESP.DesPump, i
PROSPER.SIN.ESP.DesMotor, i
PROSPER.SIN.ESP.DesCable, i
PROSPER.OUT.ESP.NSTAGE
PROSPER.OUT.ESP.PUMPOW
PROSPER.OUT.ESP.PEFFIC
PROSPER.OUT.ESP.PUMPOT
PROSPER.OUT.ESP.XMTAMP
PROSPER.OUT.ESP.SURKVA
PROSPER.OUT.ESP.XMTEFF
PROSPER.OUT.ESP.XMTPOW
PROSPER.OUT.ESP.XMTRPM
PROSPER.OUT.ESP.VOLDRP
PROSPER.OUT.ESP.VOLTSF
PROSPER.OUT.ESP.TORQUE
PROSPER.OUT.ESP.SIZE

Head required
Average downhole rate
Total fluid gravity
Free GOR below pump
Total GOR above pump
Pump inlet temperature
Pump intake pressure
Pump intake rate
Pump discharge rate
Pump mass flow rate
Average cable temperature
Select pump
Select motor
Select cable
Number of stages
Power required
Pump efficiency
Pump outlet temperature
Current used
Surface KVA
Motor efficiency
Power generated
Motor speed
Voltage drop along cable
Voltage required at surface
Torque on shaft
Pump size

384

6.7.19 HSP - HSP Design


PROSPER.OUT.HSP.DONE

Calculation Done Flag

PROSPER.OUT.HSP.SIZE

Pump Maximum Outside Diameter

PROSPER.OUT.HSP.RATE

Aveage DownHole Rate

PROSPER.OUT.HSP.SOL[0]

Head Required

PROSPER.OUT.HSP.SOL[1]

Average Downhole Rate

PROSPER.OUT.HSP.SOL[2]

Total Fluid Gravity

PROSPER.OUT.HSP.SOL[3]

Free GOR Below Pump

PROSPER.OUT.HSP.SOL[4]

Total GOR Above Pump

1990-2011 Petroleum Experts Limited

385

OpenServer

PROSPER.OUT.HSP.SOL[5]

Pump Inlet Temperature

PROSPER.OUT.HSP.SOL[6]

Pump Intake Pressure

PROSPER.OUT.HSP.SOL[7]

Pump Intake Rate

PROSPER.OUT.HSP.SOL[8]

Pump Discharge Pressure

PROSPER.OUT.HSP.SOL[9]

Pump Discharge Rate

PROSPER.OUT.HSP.SOL[10]

Pump Mass Flow Rate

PROSPER.OUT.HSP.SOL[11]

Number Of Pump Stages

PROSPER.OUT.HSP.SOL[12]

Pump Power Required

PROSPER.OUT.HSP.SOL[13]

Pump Efficiency

PROSPER.OUT.HSP.SOL[14]

Pump Outlet Temperature

PROSPER.OUT.HSP.SOL[15]

Number Of Turbine Stages

PROSPER.OUT.HSP.SOL[16]

Turbine Power Generated

PROSPER.OUT.HSP.SOL[17]

Delta P Across Turbine

PROSPER.OUT.HSP.SOL[18]

Head Loss Across Turbine

PROSPER.OUT.HSP.SOL[19]

Pressure At Surface

PROSPER.OUT.HSP.SOL[20]

% Power Fluid Of Reservoir Fluid

6.7.20 CST - Constrained System Calculations


PROSPER.OUT.CST.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.CST.SENS.VARS.VAL1.NUM1
j = 0 : PROSPER.ANL.CST.SENS.VARS.VAL2.NUM1
k = 0 : PROSPER.ANL.CST.SENS.VARS.VAL3.
NUM-1
Solution Data

MultiLateral Results

l = 0 : PROSPER.OUT.CST.RESULTS[i][j][k].ML.
BRANCHES

Number of Branches

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
BRANCHLABEL

Branch Label

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
BRANCHRATE

Branch Rate

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].

Branch Pressure

OpenServer User's Manual

PROSPER and the OpenServer

386

BRANCHPRES
l = 0 : PROSPER.OUT.CST.RESULTS[i][j][k].ML.
LAYERS

Number of Layers

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
LAYERLABEL

Layer Label

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].LAYERPI PI
PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
LAYERSKIN

Skin

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
LAYERTOP

Top Depth

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
LAYERBOT

Bottom Depth

l = 0 : PROSPER.OUT.CST.RESULTS[i][j][k].ML.
SEGMENTS

Number of Segments

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGMDTOP

Top Measured Depth

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGMDBOT

Bottom Measured Depth

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGRATE

Rate

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGPRES

Pressure

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGRATEPUL

Rate per Unit Length

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGCUMRATE

Cumulative Rate

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].
SEGRESPRES

Reservoir Pressure

PROSPER.OUT.CST.RESULTS[i][j][k].ML[l].SEGTVD True Vertical Depth


General Data
PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
LIQRATE

Liquid Rate

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.BHP

Bottom Hole Pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.THP

Tubing Head Pressure

1990-2011 Petroleum Experts Limited

387

OpenServer

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.THT

Tubing Head
Temperature

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.FNP

Top Node Pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.FNT

Top Node Temperature


Well Head Results

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHDENLIQUID

Liquid Density

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHDENGAS

Gas Density

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHVISLIQUID

Liquid Viscosity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHVISGAS

Gas Viscosity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHVELLIQUID

Liquid Velocity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHVELGAS

Gas Velocity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHZFACTOR

Z Factor

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHSURFACETENSION

InterFacial Tension

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHPRESSURE

Pressure
First Node Results

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNDENLIQUID

Liquid Density

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNDENGAS

Gas Density

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNVISLIQUID

Liquid Viscosity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNVISGAS

Gas Viscosity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNVELLIQUID

Liquid Velocity

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNVELGAS

Gas Velocity

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNZFACTOR

Z Factor

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNSURFACETENSION

InterFacial Tension

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNPRESSURE

Pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
DPTOTALSKIN

Total

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
DPPERFORATION

Perforation dP Skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
DPDAMAGE

Damge

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.PIP

Pump Intake Pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.PDP

Pump Discharge
Pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
INJECTIONDEPTH

Injection Depth

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
DPCOMPLETION

Completion dP Skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
COMPLETIONSKIN

Completion Skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
GRAVELPACKSKIN

Gravel Pack Skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
TOTALSKIN

Total

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
PUMPAVRATE

Average Rate Thru


Pump

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
PUMPHEAD

Pump Head Generated

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
PUMPPOWER

Pump Power
Requirement

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
PUMPEFFICIENCY

Pump Efficiency

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
MOTORAMPS

Motor Amps
Requirement

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.

Motor Power Generated

388

dP Skin

dP Skin

Skin

1990-2011 Petroleum Experts Limited

389

OpenServer

MOTORPOWER
PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
MOTOREFFICIENCY

Motor Efficiency

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
MOTORSPEED

Motor Speed

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
CABLEVOLTS

Voltage at Surface

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.PRFRIC Friction Pressure Loss


PROSPER.OUT.CST.RESULTS[I][J][K].SOL.PRSTAT Static Pressure Loss
PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
WHTEMPERATURE

WH Temperature

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
FNTEMPERATURE

WH Pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.TBLEAK HSP Balance Supply


Rate
PROSPER.OUT.CST.RESULTS[I][J][K].SOL.PRETUR HSP Power Fluid Return
Pressure
Hydrates Flag

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
HYDRATE
MultiLayer IPR Results (Per Layer)
PROSPER.OUT.CST.RESULTS[I][J][K].SOL.DPG[l]

DP Gravel

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.RAT[l]

Rate

SkinAide Results

Skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[0]

Total

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[l]

Total Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[2]

Total Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[3]

Perforation Geometry
Crushed +Damaged Zone
Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[4]

Crushed Zone Laminar


Crushed +Damaged Zone
Turbulent

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[5]

Crushed Zone Turbulent


Only Crushed Zone Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[6]

Gravel Pack Tunnel Laminar


Only Crushed Zone Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[7]

Gravel Pack Tunnel Turbulent


Hemispherical Inlet Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[8]

Gravel Pack Annulus Laminar


Hemispherical Inlet Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[9]

Gravel Pack Annulus


Turbulent
Cement +Casing Tunnel
Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[10]

Partial Penetration and


Deviation
Cement +Casing Tunnel
Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[11]

Gravel Pack Annulus Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[12]

Gravel Pack Annulus


Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFSKIN[13]

Partial Penetration and


Deviation

SkinAide Results

DP Skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[0]

Total

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[l]

Total Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[2]

Total Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[3]

Perforation Geometry
Crushed +Damaged Zone
Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[4]

Crushed Zone Laminar


Crushed +Damaged Zone
Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[5]

Crushed Zone Turbulent


Only Crushed Zone Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[6]

Gravel Pack Tunnel Laminar


Only Crushed Zone Turbulent

390

1990-2011 Petroleum Experts Limited

391

OpenServer

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[7]

Gravel Pack Tunnel Turbulent


Hemispherical Inlet Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[8]

Gravel Pack Annulus Laminar


Hemispherical Inlet Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[9]

Gravel Pack Annulus


Turbulent
Cement +Casing Tunnel
Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[10]

Partial Penetration and


Deviation
Cement +Casing Tunnel
Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[11]

Gravel Pack Annulus Laminar

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[12]

Gravel Pack Annulus


Turbulent

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.
ELFDPSKIN[13]

Partial Penetration and


Deviation

Multi Layer friction dP Solution Results (per


Layer)

Layer

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][0]

oil rate

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][1]

gas rate

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][2]

liquid rate

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][3]

pressure

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][4]

distance from top

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][5]

productivity index

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][6]

skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][7]

non-darcy skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][8]

gravel pack skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][9]

gravel pack non-darcy


skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][10] dP skin
PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][11] dP non-darcy skin
OpenServer User's Manual

PROSPER and the OpenServer

392

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][12] dP gravel pack skin


PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][13] dP gravel pack nondarcy skin

6.7.21 CVT - Constrained VLP Calculations


PROSPER.OUT.CVT.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.CVT.SENS.VARS.VAL1.
NUM-1

Number

j = 0 : PROSPER.ANL.CVT.SENS.VARS.VAL2.
NUM-1

Of

k = 0 : PROSPER.ANL.CVT.SENS.VARS.VAL3.
NUM-1

Sensitivity Variables

PROSPER.OUT.CVT.RESULTS[I][J][K].RATE

Rate

PROSPER.OUT.CVT.RESULTS[I][J][K].PRESFE Free End Pressure


PROSPER.OUT.CVT.RESULTS[I][J][K].PRESTH Tubing Head Pressure
PROSPER.OUT.CVT.RESULTS[I][J][K].TEMPTH Tubing Head
Temperature
PROSPER.OUT.CVT.RESULTS[I][J][K].PRESLN Last Node Pressure
PROSPER.OUT.CVT.RESULTS[I][J][K].TEMPLN Last Node Temperature
PROSPER.OUT.CVT.RESULTS[I][J][K].
HYDRATE

Hydrates Formation
Flag

6.7.22 UST - Unconstrained System Calculations


PROSPER.OUT.UST.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.UST.SENS.VARS.VAL1.NUM-1
j = 0 : PROSPER.ANL.UST.SENS.VARS.VAL2.NUM-1
k = 0 : PROSPER.ANL.UST.SENS.VARS.VAL3.NUM-1
1990-2011 Petroleum Experts Limited

393

OpenServer

Solution Data

MultiLateral Results

l = 0 : PROSPER.OUT.UST.RESULTS[i][j][k].ML.
BRANCHES

Number of Branches

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
BRANCHLABEL

Branch Label

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
BRANCHRATE

Barnch Rate

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
BRANCHPRES

Branch Pressure

l = 0 : PROSPER.OUT.UST.RESULTS[i][j][k].ML.LAYERS Number of Layers


PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
LAYERLABEL

Layer Label

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].LAYERPI

PI

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].LAYERSKIN

Skin

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].LAYERTOP

Top Depth

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].LAYERBOT

Bottom Depth

l = 0 : PROSPER.OUT.UST.RESULTS[i][j][k].ML.
SEGMENTS

Number of Segments

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].SEGMDTOP

Top Measured Depth

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].SEGMDBOT Bottom Measured Depth


PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].SEGRATE

Rate

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].SEGPRES

Pressure

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
SEGRATEPUL

Rate per Unit Length

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
SEGCUMRATE

Cumulative Rate

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].
SEGRESPRES

Reservoir Pressure

PROSPER.OUT.UST.RESULTS[i][j][k].ML[l].SEGTVD

True Vertical Depth


General Data

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.LIQRATE

Liquid Rate

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.BHP

Bottom Hole Pressure

OpenServer User's Manual

PROSPER and the OpenServer

394

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.THP

Tubing Head Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.THT

Tubing Head Temperature

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.FNP

Top Node Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.FNT

Top Node Temperature


Well Head Results

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHDENLIQUID

Liquid Density

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHDENGAS

Gas Density

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHVISLIQUID

Liquid Viscosity

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.WHVISGAS

Gas Viscosity

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHVELLIQUID

Liquid Velocity

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.WHVELGAS Gas Velocity


PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHZFACTOR

Z Factor

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHSURFACETENSION

InterFacial Tension

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHPRESSURE

Pressure
First Node Results

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNDENLIQUID

Liquid Density

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.FNDENGAS Gas Density


PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNVISLIQUID

Liquid Viscosity

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.FNVISGAS

Gas Viscosity

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNVELLIQUID

Liquid Velocity

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.FNVELGAS Gas Velocity


PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNZFACTOR

Z Factor

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNSURFACETENSION

InterFacial Tension

1990-2011 Petroleum Experts Limited

395

OpenServer

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNPRESSURE

Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
DPTOTALSKIN

Total

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
DPPERFORATION

Perforation dP Skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
DPDAMAGE

Damge

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.PIP

Pump Intake Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.PDP

Pump Discharge Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
INJECTIONDEPTH

Injection Depth

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
DPCOMPLETION

Completion dP Skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
COMPLETIONSKIN

Completion Skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
GRAVELPACKSKIN

Gravel Pack Skin

dP Skin

dP Skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.TOTALSKIN Total
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
PUMPAVRATE

Skin

Average Rate Thru Pump

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.PUMPHEAD Pump Head Generated


PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
PUMPPOWER

Pump Power Requirement

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
PUMPEFFICIENCY

Pump Efficiency

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
MOTORAMPS

Motor Amps Requirement

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
MOTORPOWER

Motor Power Generated

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
MOTOREFFICIENCY

Motor Efficiency

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
MOTORSPEED

Motor Speed

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.

Voltage at Surface

OpenServer User's Manual

PROSPER and the OpenServer

396

CABLEVOLTS
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.PRFRIC

Friction Pressure Loss

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.PRSTAT

Static Pressure Loss

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
WHTEMPERATURE

WH Temperature

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.
FNTEMPERATURE

WH Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.TBLEAK

HSP Balance Supply Rate

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.PRETUR

HSP Power Fluid Return


Pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.HYDRATE

Hydrates Flag

MultiLayer IPR Results (Per Layer)


PROSPER.OUT.UST.RESULTS[I][J][K].SOL.DPG[l]

DP Gravel

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.RAT[l]

Rate

SkinAide Results

Skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[0]

Total

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[l]

Total Laminar

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[2]

Total Turbulent

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[3]

Perforation Geometry
Crushed +Damaged Zone
Laminar

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[4]

Crushed Zone Laminar


Crushed +Damaged Zone
Turbulent

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[5]

Crushed Zone Turbulent


Only Crushed Zone
Laminar

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[6]

Gravel Pack Tunnel


Laminar
Only Crushed Zone
Turbulent

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[7]

Gravel Pack Tunnel


Turbulent
Hemispherical Inlet
Laminar

1990-2011 Petroleum Experts Limited

397

OpenServer

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[8]

Gravel Pack Annulus


Laminar
Hemispherical Inlet
Turbulent

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[9]

Gravel Pack Annulus


Turbulent
Cement +Casing Tunnel
Laminar

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[10] Partial Penetration and


Deviation
Cement +Casing Tunnel
Turbulent
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[11] Gravel Pack Annulus
Laminar
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[12] Gravel Pack Annulus
Turbulent
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFSKIN[13] Partial Penetration and
Deviation
SkinAide Results

DP Skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Total
[0]
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Total Laminar
[l]
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Total Turbulent
[2]
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Perforation Geometry
Crushed +Damaged Zone
[3]
Laminar
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Crushed Zone Laminar
Crushed +Damaged Zone
[4]
Turbulent
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Crushed Zone Turbulent
Only Crushed Zone
[5]
Laminar
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Gravel Pack Tunnel
Laminar
[6]
Only Crushed Zone
Turbulent
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Gravel Pack Tunnel
Turbulent
[7]
OpenServer User's Manual

PROSPER and the OpenServer

398

Hemispherical Inlet
Laminar
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Gravel Pack Annulus
Laminar
[8]
Hemispherical Inlet
Turbulent
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Gravel Pack Annulus
Turbulent
[9]
Cement +Casing Tunnel
Laminar
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Partial Penetration and
Deviation
[10]
Cement +Casing Tunnel
Turbulent
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Gravel Pack Annulus
Laminar
[11]
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Gravel Pack Annulus
Turbulent
[12]
PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ELFDPSKIN Partial Penetration and
Deviation
[13]

Multi Layer friction dP Solution Results (per Layer)

Layer

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][0]

oil rate

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][1]

gas rate

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][2]

liquid rate

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][3]

pressure

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][4]

distance from top

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][5]

productivity index

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][6]

skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][7]

non-darcy skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][8]

gravel pack skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][9]

gravel pack non-darcy skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][10]

dP skin

1990-2011 Petroleum Experts Limited

399

OpenServer

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][11]

dP non-darcy skin

PROSPER.OUT.UST.RESULTS[I][J][K].SOL.ML[l][12]

dP gravel pack skin

PROSPER.OUT.CST.RESULTS[I][J][K].SOL.ML[l][13]

dP gravel pack non-darcy


skin

L = 0 : PROSPER.ANL.UST.RATES.COUNT-1
PROSPER.OUT.UST.RESULTS[i][j][k].RATE[l]

Rate

PROSPER.OUT.UST.RESULTS[i][j][k].PRESBH[l]

Bottom Hole Pressure

PROSPER.OUT.UST.RESULTS[i][j][k].PRESTH[l]

Tubing Head Pressure

PROSPER.OUT.UST.RESULTS[i][j][k].TEMPTH[l]

Tubing Head Temperature

PROSPER.OUT.UST.RESULTS[i][j][k].PRESLN[l]

Last Node Pressure

PROSPER.OUT.UST.RESULTS[i][j][k].TEMPLN[l]

Last Node Temperature

PROSPER.OUT.UST.RESULTS[i][j][k].HYDRATE[l]

Hydrates Formation Flag

6.7.23 UVT - Unconstrained VLP Calculations


PROSPER.OUT.UVT.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.UVT.SENS.VARS.
VAL1.NUM-1
j = 0 : PROSPER.ANL.UVT.SENS.VARS.
VAL2.NUM-1
k = 0 : PROSPER.ANL.UVT.SENS.VARS.
VAL3.NUM-1

PROSPER.OUT.UVT.RESULTS[i][j][k].RATE

Rate

PROSPER.OUT.UVT.RESULTS[i][j][k].
PRESFN

First Node Pressure

PROSPER.OUT.UVT.RESULTS[i][j][k].
PRESTH

Tubing Head Pressure

PROSPER.OUT.UVT.RESULTS[i][j][k].
TEMPTH

Tubing Head Temperature

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.UVT.RESULTS[i][j][k].
PRESLN

Last Node Pressure

PROSPER.OUT.UVT.RESULTS[i][j][k].
TEMPLN

Last Node Temperature

PROSPER.OUT.UVT.RESULTS[i][j][k].
HYDRATE

Hydrates Formation Flag

400

6.7.24 UGT - Unconstrained Gradient Calculations


PROSPER.OUT.UGT.DONE

Calculation Done Flag

i = 0 : PROSPER.ANL.UGT.SENS.VARS.VAL1.NUM-1 Number
j = 0 : PROSPER.ANL.UGT.SENS.VARS.VAL2.NUM-1

Of

k = 0 : PROSPER.ANL.UGT.SENS.VARS.VAL3.NUM-1 Sensitivity Values


PROSPER.OUT.UGT.RESULTS[i][j][k].NUM

Number of gradient
results

l = 0 : PROSPER.OUT.UGT.RESULTS[i][j][k].NUM-1
PROSPER.OUT.UGT.RESULTS[i][j][k].REGIME[l]

Flow Regime Number

PROSPER.OUT.UGT.RESULTS[i][j][k].LABEL[l]

Label Number

PROSPER.OUT.UGT.RESULTS[i][j][k].PRES[l]

Pressure

PROSPER.OUT.UGT.RESULTS[i][j][k].TEMP[l]

Fluid Temperature

PROSPER.OUT.UGT.RESULTS[i][j][k].TVD[l]

True Vertical Depth

PROSPER.OUT.UGT.RESULTS[i][j][k].MSD[l]

Measured Depth

PROSPER.OUT.UGT.RESULTS[i][j][k].GRAD[l]

Gradient

PROSPER.OUT.UGT.RESULTS[i][j][k].HOLDUP[l]

Holdup

PROSPER.OUT.UGT.RESULTS[i][j][k].HTC[l]

Heat Transfer
Coefficient

PROSPER.OUT.UGT.RESULTS[i][j][k].TFO[l]

Formation
Temperature

PROSPER.OUT.UGT.RESULTS[i][j][k].GRSTAT[l]

Static Gradient

PROSPER.OUT.UGT.RESULTS[i][j][k].GRFRIC[l]

Friction Gradient

PROSPER.OUT.UGT.RESULTS[i][j][k].VLSLIP[l]

Slip Liquid Velocity

1990-2011 Petroleum Experts Limited

401

OpenServer

PROSPER.OUT.UGT.RESULTS[i][j][k].VLNSLP[l]

NoSlip Liquid Velocity

PROSPER.OUT.UGT.RESULTS[i][j][k].VGSLIP[l]

Slip Gas Velocity

PROSPER.OUT.UGT.RESULTS[i][j][k].VGNSLP[l]

NoSlip Gas Velocity

PROSPER.OUT.UGT.RESULTS[i][j][k].AVRHSL[l]

Mixture Density

PROSPER.OUT.UGT.RESULTS[i][j][k].PRSTAT[l]

Pressure due to friction

PROSPER.OUT.UGT.RESULTS[i][j][k].PRFRIC[l]

Pressure due to gravity

PROSPER.OUT.UGT.RESULTS[i][j][k].CASTEM[l]

Casing temperature

PROSPER.OUT.UGT.RESULTS[i][j][k].ANNTEM[l]

Average annulus
temperature

PROSPER.OUT.UGT.RESULTS[i][j][k].RHOOIL[l]

Gas density

PROSPER.OUT.UGT.RESULTS[i][j][k].RHOGAS[l]

Oil density

PROSPER.OUT.UGT.RESULTS[i][j][k].RHOWAT[l]

Water density

PROSPER.OUT.UGT.RESULTS[i][j][k].DIAINT[l]

Diameter

PROSPER.OUT.UGT.RESULTS[i][j][k].ANGLE[l]

Angle

PROSPER.OUT.UGT.RESULTS[i][j][k].DSTEP[l]

Section length

PROSPER.OUT.UGT.RESULTS[i][j][k].FMULIQ[l]

Liquid viscosity

PROSPER.OUT.UGT.RESULTS[i][j][k].FMUGAS[l]

Gas viscosity

PROSPER.OUT.UGT.RESULTS[i][j][k].SIGLIQ[l]

Gas-Liquid IFT

PROSPER.OUT.UGT.RESULTS[i][j][k].SIGWAT[l]

Gas-Water IFT

PROSPER.OUT.UGT.RESULTS[i][j][k].SIGOIL[l]

Gas-Oil IFT

PROSPER.OUT.UGT.RESULTS[i][j][k].SIGOW[l]

Oil-Water IFT

PROSPER.OUT.UGT.RESULTS[i][j][k].SLUGLM[l]

Mean Slug Length

PROSPER.OUT.UGT.RESULTS[i][j][k].SLUGLX[l]

1/000 Slug Length

PROSPER.OUT.UGT.RESULTS[i][j][k].BUBLNM[l]

Mean Bubble Length

PROSPER.OUT.UGT.RESULTS[i][j][k].BUBLNX[l]

1/1000 Bubble Length

PROSPER.OUT.UGT.RESULTS[i][j][k].SLUGQL[l]

Mean Slug Liquid Rate

PROSPER.OUT.UGT.RESULTS[i][j][k].SLUGQG[l]

Mean Slug Gas Rate

PROSPER.OUT.UGT.RESULTS[i][j][k].BUBLQL[l]

Mean Bubble Liquid


Rate

PROSPER.OUT.UGT.RESULTS[i][j][k].BUBLQG[l]

Mean Bubble Gas


Rate

PROSPER.OUT.UGT.RESULTS[i][j][k].SLGFRM[l]

Mean Slug Frequency

OpenServer User's Manual

PROSPER and the OpenServer

PROSPER.OUT.UGT.RESULTS[i][j][k].SLGFRX[l]

1/1000 Slug
Frequency

PROSPER.OUT.UGT.RESULTS[i][j][k].SLGHLS[l]

Slug Holdup (HLS)

PROSPER.OUT.UGT.RESULTS[i][j][k].SLGHLE[l]

Equilibrium Holdup
(HLE)

PROSPER.OUT.UGT.RESULTS[i][j][k].CFACTR[l]

C Factor (Erosional
Velocity)

PROSPER.OUT.UGT.RESULTS[i][j][k].SANDDI[l]

Max Transportable
Grain Diameter

PROSPER.OUT.UGT.RESULTS[i][j][k].CORR[l]

Correlation Index

PROSPER.OUT.UGT.RESULTS[i][j][k].HYDRATE[l]

Hydrates Formation
Flag

402

InJected Gas Gradient


PROSPER.OUT.UGT.RESULTS[i][j][k].GASGRAD[l].
NUM

Number of Points

m = 0 : PROSPER.OUT.UGT.RESULTS[i][j][k].
GASGRAD[l].NUM-1
PROSPER.OUT.UGT.RESULTS[i][j][k].GASGRAD[l].
DEPTH[m]

Depth

PROSPER.OUT.UGT.RESULTS[i][j][k].GASGRAD[l].
PRES[m]

Pressure

6.7.25 VLP Export


The OpenServer command to export the VLPs (3 variables) is:
PROSPER.ANL.VL3.EXPORT
The command "PROSPER.ANL.VL3.EXPORT" will not export any file if the exported file
name and file path have not been specified before hand. The export parameters (type of VLP
format, units, name of the file, etc) can be entered through OpenServer using those
variables:

VLP format (from 0 to 18):


Prosper.ANL.VL3.EXP.Sel
Table Number:
Prosper.ANL.VL3.EXP.Table
Well Number:
Prosper.ANL.VL3.EXP.Well
Unit System (for VIP for instance, 0 corresponds to OILFIELD units, 1 to METRICKPA, etc):
Prosper.ANL.VL3.EXP.Unit
Path and name of the file:
Prosper.ANL.VL3.EXP.File
Datum depth:
Prosper.ANL.VL3.EXP.Datum

1990-2011 Petroleum Experts Limited

403

OpenServer

Well density:
Table Quantity:

Prosper.ANL.VL3.EXP.Density
Prosper.ANL.VL3.EXP.BHP

Those input data differ accordingly to the VLP format selected. The same OpenServer strings
can be used for the VLP (4 variables) option, changing VL3 into VL4. The format for the VLP
is indicated using the following tables.

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

VLP 3 Variable format


SLB Eclipse
WellDrill - SIMCO 3
ExxonMobil - Pegasus
SSI - Comp4
Franlab - FRAGOR
SSI - Comp3
Landmark VIP
Roxar - MORE
Petroleum Experts GAP/MBAL
Shell - Mores
Franlab - ATHOS
BP - GCOMP
ChevronTexaco - CHEARS
ExxonMobil - EMPOWER
ConocoPhillips - Psim
CMG - IMEX / GEM (old Format)
CMG - IMEX / GEM (Release 2009.10)
Saudi Aramco - Powers

0
1
2
3
4
5
6
7
8
9
10
11

VLP4 Export Format


SLB Eclipse
Franlab - SCORE
SSI - Comp3
Landmark VIP
Petroleum Experts GAP/MBAL
Shell - Mores
Franlab - ATHOS
BP - GCOMP
ChevronTexaco - CHEARS
ExxonMobil - EMPOWER
CMG - IMEX / GEM (old Format)
CMG - IMEX / GEM (Release 2009.10)

For example, the three following OpenServer statements would export an ECLIPSE
formatted VLP file called "test.ecl" under the C drive:
DoSet "Prosper.ANL.VL3.EXP.Sel", 0
DoSet "Prosper.ANL.VL3.EXP.File", "C:\test.ecl"
DoCmd ("PROSPER.ANL.VL3.Export")

OpenServer User's Manual

PROSPER and the OpenServer

6.8

404

Commands
File Management
PROSPER.SHUTDOWN
PROSPER.OPENFILE

PROSPER.SAVEFILE
PROSPER.NEWFILE
PROSPER.REFRESH
Units
PROSPER.MENU.UNITS.
LATSI
PROSPER.MENU.UNITS.
OILFIELD
PROSPER.MENU.UNITS.
NORSI
PROSPER.MENU.UNITS.
CANSI
PROSPER.MENU.UNITS.
GERSI
PROSPER.MENU.UNITS.
FRESI
PROSPER.MENU.UNITS.
LATSI
PROSPER.UNITS.RESET
PVT Section
PROSPER.PVT.CALC
PROSPER.PVT.MATCH
PROSPER.PVT.MATCHALL
PROSPER.PVT.INPUT.
WGRMIN
PROSPER.EOS.INT
PROSPER.EOS.GEN
PROSPER.EOS.HYD

Exit the PROSPER program


Open an existing file
Example: DoCmd ("PROSPER.OPENFILE(""C:
\WORK\gliftg3.Out"")") - opens a macro code based
PROSPER file.
DoCmd ("PROSPER.OPENFILE=""" + Range("a3") +
"""") - opens an Excel spreadsheet based PROSPER file.
DoCmd ("PROSPER.OPENFILE(" + Range("a3")) alternative method to open an Excel spreadsheet based
PROSPER file.
Save the current data set to file
Reset the current data set to initial conditions
Redraw the font screen to update any changes
Units
Select oil field
Select Norwegian SI
Select Canadian SI
Select German SI
Select French SI
Select Latin SI
Resets the unit system to default (oil field units)
Perform the calculation command in the PVT section
Perform the PVT matching regression
Perform the PVT matching for ALL variables and
correlations
Calculate minimum free WGR
EOS - interpolate
EOS - generate
EOS - calculate hydrates pressure curve

1990-2011 Petroleum Experts Limited

405

OpenServer

PROSPER.EOS.PROP
PROSPER.EOS.PHASE
PROSPER.EOS.WAX

EOS - calculate black oil properties


EOS - calculate phase envelope
EOS - calculate wax apperance temperature

Inflow Section
PROSPER.IPR.CALC
PROSPER.IPR.API43
PROSPER.ANL.INF.CALC
PROSPER.ANL.INF.
GENRATES

Perform the inflow calculation


Perform the API RP43 calculation
Perfoms the inflow sensitivity calculation
Generate rates for the inflow sensitivity calculation

Downhole Equipment
Section
PROSPER.EQP.DEV.FIL.
FILTER
PROSPER.EQP.DEV.FIL.
RESET
PROSPER.EQP.DEV.FIL.
TRANS
PROSPER.EQP.DEV.FIL.
CALC

Perform the filter calculation in the deviation survey


section
Resets the deviation survey filter calculation
Transfers the deviation survey filter data to the deviation
survey section
Calculates the angle in the deviation survey filter

System Calculations
PROSPER.ANL.SYS.CALC Performs the system 3-variable calculation
PROSPER.ANL.SYS.
Generates rates for the system 3-variable calculation
GENRATES
PROSPER.ANL.SY4.CALC
Performs the system 4-variable calculation
PROSPER.ANL.SY4.
Generates rates for the system 4-variable calculation
GENRATES
PROSPER.ANL.SYM.CALC Performs the multi-variable system calculation
PROSPER.ANL.SYM.
Generates rates for the multi-variable system calculation
GENRATES
PROSPER.ANL.SYS.EXPORTExport lift curves generated by the system 3-variable
calculation
PROSPER.ANL.SY4.EXPORT Export lift curves generated by the system 4-variable
calculation
PROSPER.ANL.SYM.
Export lift curves generated by the system Multi-Variable
calculation
EXPORT
Sensitivity PvD
Calculations
PROSPER.ANL.SPD.CALC

PROSPER.ANL.SP4.CALC

OpenServer User's Manual

Performs the sensitivity PvD (3-variables) calculation


Example: PROSPER.ANL.SPD.CALC(Var1, Var2,
Var3)-1 based
Performs the sensitivity PvD (4-variables) calculation
Example: PROSPER.ANL.SPD.CALC(Var1, Var2,Var3,

PROSPER and the OpenServer

PROSPER.ANL.SPM.CALC

Gradient Calculations
PROSPER.ANL.SYM.
GENRATES
PROSPER.ANL.GRD.CALC
Tubing / Pipeline
Correlation Comparison
PROSPER.ANL.TCC.CALC
PROSPER.ANL.TTC.CALC
PROSPER.ANL.TPC.CALC
PROSPER.ANL.PCC.CALC

406

Var4)-1 based
Performs the sensitivity PvD Multi-Variable calculation
Example: PROSPER.ANL.SPM.CALC(V1,V2,V3,V4,
V5,V6,V7,V8,V9,V10) -1 based
Performs the gradient matching calculation
Performs the gradient sensitivity calculation

Performs the tubing correlation comparison


Performs the tubing correlation comparison (Enthalpy
Balance)
Performs the pipeline correlation comparison (Enthalpy
Balance)
Performs the pipeline correlation comparison

VLP Calculations
PROSPER.ANL.VL3.CALC
Performs the VLP 3-variable calculation
PROSPER.ANL.VL3.
Generate rates for the VLP 3-variable calculation
GENRATES
PROSPER.ANL.VL4.CALC
Performs the VLP 4-variable calculation
PROSPER.ANL.VL4.
Generate rates for the VLP 4-variable calculation
GENRATES
PROSPER.ANL.VLM.CALC Performs the VLP Multi-Variable calculation
PROSPER.ANL.VLM.
Generate rates for the VLP Multi-Variable calculation
GENRATES
PROSPER.ANL.VL3.EXPORT Export lift curves generated by the VLP 3-variable
calculation
PROSPER.ANL.VL4.EXPORT Export lift curves generated by the VLP 4-variable
calculation
PROSPER.ANL.VLM.
Export lift curves generated by the VLP Multi-Variable
calculation
EXPORT
Choke Performance
PROSPER.ANL.CHK.CALC

Performs the choke performance

VLP / IPR Matching


PROSPER.ANL.VMT.VLPIPR Performs the VLP / IPR matching
PROSPER.ANL.VMT.UVAL Estimate U-value for the VLP / IPR matching
Pipeline Matching
PROSPER.ANL.PMT.CALC

Performs the pipeline matching

1990-2011 Petroleum Experts Limited

407

OpenServer

GAP Performance Curves


PROSPER.ANL.GEN.CALC Generates GAP performance curve
Artificial Lift Design &
Quick-Look
PROSPER.ANL.GLN.CALC

Performs the gas lift design (New Well). This command


will also perform the Calculations for the Gas Lift
Performance Curve (when using the method as
Calculated from Max Production). In the Results section
the Calculations for the Dome Pressure and Test Rack
Opening Pressure are also performed with the help of
this command.
PROSPER.ANL.GLE.CALC Performs the gas lift design (Existing Well)
PROSPER.ANL.GLI.CALC
Performs the gas lift design (Intermittent Gas Lift)
PROSPER.ANL.CLT.CALC Performs the coil tubing gas lift design calculation
PROSPER.ANL.GLA.CALC Performs the gas lift adjustments calculation
PROSPER.ANL.ESP.CALC Performs the ESP design calculation
PROSPER.ANL.ESP.PLOT. Calculate the ESP Plot Data after design and pump
CALC
selection
PROSPER.ANL.HSP.CALC Performs the HSP design calculation
PROSPER.ANL.HSP.SYS.
Performs the System Command in the HSP design
CALC
section
PROSPER.ANL.PCP.CALC Performs the PCP design calculation
PROSPER.ANL.JET.CALC
Performs the jet pump design calculation
PROSPER.ANL.JET.DESIGN Performs the jet pump design Pump Selection
calculation
PROSPER.ANL.QLG.CALC Performs the quick-look gas lift
PROSPER.ANL.QLE.CALC Performs the quick-look ESP
PROSPER.ANL.QLH.CALC Performs the quick-look HSP
PROSPER.ANL.SRP.CALC Performs the sucker rod pump design
Enthalpy Balance
PROSPER.ANL.CST.CALC
PROSPER.ANL.CVT.CALC
PROSPER.ANL.UST.CALC
PROSPER.ANL.UVT.CALC
PROSPER.ANL.UGT.CALC

Perform the constrained system calculation


Perform the constrained VLP calculation
Perform the unconstrained system calculation
Perform the unconstrained VLP calculation
Perform the unconstrained gradient calculation

Calculations
PROSPER.ANL.WHP.CALC

Performs the WHP to BHP calculation

Menu Commands - File


PROSPER.MENU.FILE.
IMPORTMANY
PROSPER.MENU.FILE.

OpenServer User's Manual

Import files
Add import type

PROSPER and the OpenServer

IMPORTADD
PROSPER.MENU.FILE.
PRINTSET
PROSPER.MENU.FILE.
REMOTE
PROSPER.MENU.FILE.
CLIPBOARD
PROSPER.MENU.FILE.
WORDPAD
PROSPER.MENU.FILE.APP1
PROSPER.MENU.FILE.APP2
PROSPER.MENU.FILE.APP3
PROSPER.MENU.FILE.APP4
PROSPER.MENU.FILE.
USER_FLOW
PROSPER.MENU.FILE.
USER_EOS
PROSPER.MENU.FILE.
USER_CHOKE
PROSPER.MENU.FILE.
USER_HSP
PROSPER.MENU.FILE.
USER_VISC
PROSPER.MENU.FILE.
USER_IPR
PROSPER.MENU.FILE.
PREFERENCES
PROSPER.MENU.FILE.
FILELIST
PROSPER.MENU.FILE.EVAL

408

Printer set up
Software key
Clipboard
WordPad
User application 1
User application 2
User application 3
User application 4
User correlations - flow correlations
user correlations - EOS model
User correlations - choke model
User correlations - ESP / HSP gas de-rating model
User correlations - viscosity model
User corrlations - inflow performance model
File preferences
File list
Evaluate OpenServer statement

Menu Commands - Options


PROSPER.MENU.OPTIONS Options
Menu Commands - PVT
PROSPER.MENU.PVT.INPUT
PROSPER.MENU.PVT.
TABLE
PROSPER.MENU.PVT.
MATCH
PROSPER.MENU.PVT.CALC
PROSPER.MENU.PVT.
REGRESS
PROSPER.MENU.PVT.SAVE
PROSPER.MENU.PVT.OPEN

PVT input
PVT table
PVT match
PVT calculation
PVT matching (regression)
save a PVT (*.pvt) file
Open a *.pvt file

1990-2011 Petroleum Experts Limited

409

OpenServer

PROSPER.MENU.PVT.
CORREL
PROSPER.MENU.PVT.
STEAM
PROSPER.MENU.PVT.
REPORT
PROSPER.MENU.PVT.
EXPORT

PVT correlation parameters


Steam calculator
PVT report
PVT export

Menu Commands - System


PROSPER.MENU.SIN.EQUIP Equipment (tubing, etc.)
PROSPER.MENU.SIN.IPR
System inflow performance
PROSPER.MENU.SIN.
Edit ALL system equipment (tubing, etc.)
EDITEQUIP
PROSPER.MENU.SIN.
Display equipment summary
EQUIPSUM
PROSPER.MENU.SIN.GAS Gas lift data
PROSPER.MENU.SIN.ESP
Electrical submersible pumps
PROSPER.MENU.SIN.HSP
Hydraulic submersible pumps
PROSPER.MENU.SIN.PCP Progressive cavity pumps
PROSPER.MENU.SIN.CLT
Coil tubing data
PROSPER.MENU.SIN.DIL
Diluent injection
PROSPER.MENU.SIN.JET
Jet pumps
PROSPER.MENU.SIN.MPP Multi-phase pumps
PROSPER.MENU.SIN.SRP
Sucker rod pumps
PROSPER.MENU.SIN.GLI
Intermittent gas lift
PROSPER.MENU.SIN.
Solids
SOLIDS
PROSPER.MENU.MATCH.
Matching - VLP / IPR quality check
VLP
PROSPER.MENU.MATCH.
Matching - gradient traverse
GRADIENT
PROSPER.MENU.MATCH.
Matching - pipeline
PIPE
PROSPER.MENU.MATCH.
Matching - correlation comparison - Tubing
COMPTUBE
PROSPER.MENU.MATCH.
Matching - comparison - pipeline
COMPPIPE
PROSPER.MENU.MATCH.
Matching - correlation comparison parameters - Tubing
PARMTUBE
PROSPER.MENU.MATCH.
Matching - correlation comparison parameters PARMPIPE
Pipeline
PROSPER.MENU.MATCH.
Matching - correlation thresholds
THRESHOLD
PROSPER.MENU.MATCH.
Matching - quick-look

OpenServer User's Manual

PROSPER and the OpenServer

410

QUICKLOOK
Menu Commands Calculation
PROSPER.MENU.ANL.IPR
PROSPER.MENU.ANL.
SYSTEM
PROSPER.MENU.ANL.SYS4
PROSPER.MENU.ANL.SYSM
PROSPER.MENU.ANL.
GRADIENT
PROSPER.MENU.ANL.VLP3
PROSPER.MENU.ANL.VLP4
PROSPER.MENU.ANL.VLPM
PROSPER.MENU.ANL.
GENGAP
PROSPER.MENU.ANL.
CHOKEPERF
PROSPER.MENU.ANL.
WHP2BHP
PROSPER.MENU.TEMP.
CONSYS
PROSPER.MENU.TEMP.
CONVLP
PROSPER.MENU.TEMP.
UNSYS
PROSPER.MENU.TEMP.
UNVLP
PROSPER.MENU.TEMP.
UNGRAD
Menu Commands - Design
PROSPER.MENU.DESIGN.
DATABASE
PROSPER.MENU.DESIGN.
GLD.NEW
PROSPER.MENU.DESIGN.
GLD.EXIST
PROSPER.MENU.DESIGN.
GLD.ADJUST
PROSPER.MENU.DESIGN.
CLT
PROSPER.MENU.DESIGN.
ESP
PROSPER.MENU.DESIGN.

Inflow (IPR)
System (Ipr + Vlp) 3-variables
System (Ipr + Vlp) 4-variables
System (Ipr + Vlp) multi-variables
Gradient traverse
VLP (tubing curves) 3-variables
VLP (tubing curves) 4-variables
VLP (tubing curves) multi-variables
Generate for GAP
Choke performance
BHP from WHP
Constrained system (IPR / VLP)
Constrained VLP (tubing curves)
Unconstrained system (IPR / VLP)
Unconstrained VLP (tubing curves)
Unconstrained gradient (traverse)

Artificial lift database


Gas lift - new well
Gas lift - existing mandrels
Gas lift - gas lift adjustments
Coil tubing gas lift
Electrical submersible pump
Hydraulic pump

1990-2011 Petroleum Experts Limited

411

OpenServer

HSP
PROSPER.MENU.DESIGN.
PCP
PROSPER.MENU.DESIGN.
JET

Progressive cavity pump


Jet pump

Menu Commands - Output


PROSPER.MENU.OUTPUT. Report
REPORT
PROSPER.MENU.OUTPUT. Export
EXPORT
PROSPER.MENU.OUTPUT. Plot
PLOT
Menu Commands - Help
PROSPER.MENU.
HELP_CONTENTS
PROSPER.MENU.
HELP_INDEX
PROSPER.MENU.
HELP_SEARCH
PROSPER.MENU.
HELP_KEYBOARD
PROSPER.MENU.
HELP_WHATSNEW
PROSPER.MENU.
HELP_QUICKSTART
PROSPER.MENU.
HELP_EXAMPLE
PROSPER.MENU.
HELP_DEFINITIONS
PROSPER.MENU.
HELP_GLOSSARY
PROSPER.MENU.
HELP_MANUAL
PROSPER.MENU.
HELP_FLOWCORR
PROSPER.MENU.
HELP_OS_COMMAND
PROSPER.MENU.
HELP_OS_VARIABLES
PROSPER.MENU.
HELP_OS_HELP
PROSPER.MENU.
HELP_ABOUT
PROSPER.MENU.
OpenServer User's Manual

Contents
Index
search
Keyboard
What's new
Quick start guide
Worked examples
Definitions and references
Glossary of terms
Manual
Flow correlations
OpenServer commands
OpenServer variables
OpenServer help
About PROSPER
Web home page

PROSPER and the OpenServer

HELP_WEB_HOME
PROSPER.MENU.
HELP_WEB_USER
Calculation Plots
PROSPER.PLOT.1
PROSPER.PLOT.2
PROSPER.PLOT.3
PROSPER.PLOT.4
PROSPER.PLOT.5
PROSPER.PLOT.6
PROSPER.PLOT.7
PROSPER.PLOT.8
PROSPER.PLOT.9
PROSPER.PLOT.10
PROSPER.PLOT.11
PROSPER.PLOT.12
PROSPER.PLOT.13
PROSPER.PLOT.14
PROSPER.PLOT.15
PROSPER.PLOT.16
PROSPER.PLOT.17
PROSPER.PLOT.18
PROSPER.PLOT.19
PROSPER.PLOT.20
PROSPER.PLOT.21
PROSPER.PLOT.22
PROSPER.PLOT.23
PROSPER.PLOT.24
PROSPER.PLOT.25
PROSPER.PLOT.26
PROSPER.PLOT.27
PROSPER.PLOT.28
PROSPER.PLOT.29
PROSPER.PLOT.30
PROSPER.PLOT.31
PROSPER.PLOT.32
PROSPER.PLOT.33
PROSPER.PLOT.34
PROSPER.PLOT.35
PROSPER.PLOT.36
PROSPER.PLOT.37
PROSPER.PLOT.38
PROSPER.PLOT.39

412

Web user area

IPR
VLP matching IPR
Inflow
System
Sustem (selected curves)
Gas lift design
Gas lift design (selected curves)
ESP pump plot
ESP solution pump plot
ESP design pump plot
Sensitivity
Sensitivity PvD
Sensitivity PvD (selected curves)
Deviation survey
Constrained VLP
Unconstrained system
Unconstrained VLP
Generate for GAP
Gas lift design performance curve
PVT calculations
Tubing correlation comparison
Gradient matching
Gradient
Gradient (selected curves)
VLP
VLP (4-variables)
ESP motor
EOS phase envelope
EOS (generated data)
EOS (calculated data)
GAP performance curve
Quick-look
VLP mataching
IPR relative permeability
Downhole equipment drawing
Surface equipment drawing
Pipe elevation
Horizontal IPR
ESP gas separation sensitivity (Dunbar plot)

1990-2011 Petroleum Experts Limited

413

OpenServer

PROSPER.PLOT.40
PROSPER.PLOT.41
PROSPER.PLOT.42
PROSPER.PLOT.43
PROSPER.PLOT.44
PROSPER.PLOT.45
PROSPER.PLOT.46
PROSPER.PLOT.47
PROSPER.PLOT.48
PROSPER.PLOT.49
PROSPER.PLOT.50
PROSPER.PLOT.51
PROSPER.PLOT.52
PROSPER.PLOT.53
PROSPER.PLOT.54
PROSPER.PLOT.55
PROSPER.PLOT.56
PROSPER.PLOT.57
PROSPER.PLOT.58
PROSPER.PLOT.59
PROSPER.PLOT.60
PROSPER.PLOT.61
PROSPER.PLOT.62
PROSPER.PLOT.63
PROSPER.PLOT.64
PROSPER.PLOT.65
PROSPER.PLOT.66
PROSPER.PLOT.67
PROSPER.PLOT.68
PROSPER.PLOT.69
PROSPER.PLOT.70
PROSPER.PLOT.71
PROSPER.PLOT.72

6.9

GLA mandrel performance


GLA static gradient
GLA flowing gradient
Emulsion
ESP quick-look
Pipeline correlation comparison
WHP to BHP
Flow map
HSP pump plot
HSP design pump plot
HSP system solution pump plot
HSP turbine plot
HSP design turbine plot
Curve fit plot
HSP quick-look
Downhole temperature gradient (downhole equipment
section)
PVT table
PVT match data
IPR multi-lateral
IPR multi-lateral details
Sea temperature gradient
Customised completion fluid
Hydrates data
Water vapour
Rheological parameters
PCP pump
HSP power fluid data
Isochronal inflow performance curve
Deviation survey raw data
FRAMO pump performance curve
4-variable system
4-variable sensitivity
FRAMO pump solution point

Functions
The following are functions that can be retrieved using the DOGET statement.
for example doget "PROSPER.GETTVD(1500)" will return the TVD for a depth of 1500.
PROSPER.ANL.NODES.NUMBER Returns The Number Of Nodes In The Equipment Description
PROSPER.ANL.NODES.TYPE
Returns The Equipment Type Of The ith Node (PROSPER.ANL.
NODES.TYPE[i])

OpenServer User's Manual

PROSPER and the OpenServer

414

PROSPER.ANL.NODES.NUMBER Returns The Number Of Nodes In The Equipment Description


PROSPER.ANL.NODES.MSD
Returns The Measured Depth Of The ith Node (PROSPER.ANL.
NODES.MSD[i])
PROSPER.ANL.NODES.TVD
Returns The True Vertical Depth Of The ith Node (PROSPER.ANL.
NODES.TVD[i])
PROSPER.ANL.NODES.TYPE
Returns The Equipment Type Of The ith Node (PROSPER.ANL.
NODES.TYPE[i])
PROSPER.GETMD
Returns The Measured Depth For A Given True Vertical Depth
PROSPER.GETTVD
Returns The True Vertical Depth For A Given Measured Depth
for example:
cells (1,1) = DoGet "PROSPER.GETTVD(1500)" will return the TVD
value for an MD = 1500.

PROSPER.PVT.MATCHED
PROSPER.INTERACT

Returns 1 if the PVT is Matched otherwise 0


Set Interactive Mode On/Off (1/0)
For example:
Cells(1, 1) = DoGet("PROSPER.INTERACT(1)") This will set the
PROSPER instance to be in INTERACTIVE mode. In the interactive
mode, any error messages displayed by PROSPER will be relayed
to the user (and may cause the macro to abort.)
Cells(1, 2) = DoGet("PROSPER.INTERACT(0)") This will set the
PROSPER instance to be in NON-INTERACTIVE mode. Any error
messages that are generated will be suppressed and the macro will
continue execution.
Both these commands will return a value 0 is the command is
executed correctly. If it is executed incorrectly, the command will
return a value = 1.

PROSPER.MULTILAT.ADDTIE
PROSPER.MULTILAT.ADDJOINT
PROSPER.MULTILAT.ADDCOMP
PROSPER.MULTILAT.ADDRES
PROSPER.MULTILAT.ADDLINK
PROSPER.MULTILAT.CALCSKIN
PROSPER.ESP.DESIGNPUMPS
PROSPER.ESP.DESIGNMOTORS
PROSPER.ESP.DESIGNCABLES
PROSPER.ESP.SELECTPUMP

MultiLateral Inflow - Add Tie Point ("Label", x, y) - returns node


index
MultiLateral Inflow - Add Joint ("Label", x, y) - returns node index
MultiLateral Inflow - Add Completion ("Label", x, y) - returns node
index
MultiLateral Inflow - Add Reservoir ("Label", x, y) - returns node
index
MultiLateral Inflow - Join Two Nodes ("Label", from, to)
MultiLateral Inflow - Calculate Skin (node, row) or ("node", row) returns calculated skin
Returns number and list of suitable pumps after ESP Design
Calculation has been done.
Returns number and list of suitable motors after ESP Design
Calculation has been done.
Returns number and list of suitable cables after ESP Design
Calculation has been done.
Selects desired pump after ESP Design Calculation has been done
and calculates design parameters. (ret = PROSPER.ESP.
1990-2011 Petroleum Experts Limited

415

OpenServer

PROSPER.ANL.NODES.NUMBER Returns The Number Of Nodes In The Equipment Description


SELECTPUMP(i)
PROSPER.ESP.SELECTMOTOR Selects desired motor after ESP Design Calculation has been done
and calculates design parameters. (ret = PROSPER.ESP.
SELECTMOTOR(motor,power)
PROSPER.ESP.SELECTCABLE Selects desired cable after ESP Design Calculation has been done
and calculates design parameters. (ret = PROSPER.ESP.
SELECTCABLE(i)
PROSPER.ESP.PUMPNAME
Returns the name of the Pump specified by the index (PROSPER.
ESP.PUMPNAME(index). The index is zero-based.
PROSPER.ESP.MOTORNAME
Returns the name of the Motor specified by the index (PROSPER.
ESP.MOTORNAME(index). The index is zero-based
PROSPER.ESP.CABLENAME
Returns the name of the Cable specified by the index (PROSPER.
ESP.CABLENAME(index). The index is zero-based.
PROSPER.IPR.AOF
Returns the AOF of a layer specified by the index (PROSPER.IPR.
AOF(index). Layer zero returns the total AOF
PROSPER.HSP.SELECTPUMP
Selects desired pump after HSP Design Calculation has been done
and calculates design parameters. (ret = PROSPER.HSP.
SELECTPUMP(i)

6.10 Code Samples


The following examples are not a tutorial in VBA and are presented as an illustration
rather than an implementation. Variables are defined as necessary, and then used in
later code fragments.
The first example is an explanation of the OpenServer code illustrated in the
OpenServer PROSPER example located in: C:/Program Files/Petroleum Experts/
IPM 7/samples/OpenServer/Prosper.
The folder contains the PROSPER file (HORWELDP.OUT) and the OpenServer Macro.
xls file.
The objective of the macro is to perform sensitivities on the well length and completion
zone length and automatically retrieve and plot the results from a system 3-variable VLP
/ IPR calculation.
The example illustrates the use of DoSet, DoGet and DoCmd functions.
OpenServer Example 1:
The following code structure will be observed when reviewing the macro code (Macro.
xls file) via the Visual Basic editor:

OpenServer User's Manual

PROSPER and the OpenServer

416

Sub Macro1()'Macro name


Connect

'Establishes the connection between Excel and the IPM tools

For Row = 13 To 29
spreadsheet

'Loop, telling Excel where the data is situated in the

DoSet ("PROSPER.SIN.IPR.Single.WellLen"), Cells(Row, 4)


data as the well length in PROSPER

'Sets the Excel

DoSet ("PROSPER.SIN.IPR.Single.HorizdP[0].ZONLEN"), Cells(Row, 4)


Excel data as the zone length in PROSPER

'Sets

the

DoCmd ("PROSPER.ANL.SYS.CALC") 'Performs the system 3-variable calculation


Cells(Row, 5) = DoGet("Prosper.OUT.SYS.Results[0][0][0].Sol.LiqRate")
'Extracts
the system calculation liquid rate result and passes the value to the defined cell
reference in Excel i.e., Row, Column.
DoEvents

'Plots the data in Excel after each calculation (VB code)

Next

'Closes the defined loop

Disconnect

'Disconnects the Excel communication to PROSPER

End Sub

'Macro ends

Scrolling further down the OpenServer template sample code (and in the OpenServer
sample macro template), it can be observed that error handling code has already been
entered.
The error handling code structure that follows, illustrates the necessary error handling
code that needs to be included in macros, ensuring that correct communication
between Excel and the tools is established.
As previously mentioned, the OpenServer template already contains the necessary
error handling code that is required. Also, all the OpenServer examples located in the
above samples directory structure can be modified to suit individual needs and can be
used as a starting basis to develop additional macros to meet individual modelling
requirements.
The following error handling code structures are to be used when developing
OpenServer macros when not using the provided template that already includes the
error handling macro code:
Function GetAppName(Strval As String) As String
application name from the tag string

'This utility function extracts the

1990-2011 Petroleum Experts Limited

417

OpenServer

Dim Pos
Pos = InStr(Strval, ".")
If Pos < 2 Then
MsgBox "Badly formed tag string"
End
End If
GetAppName = Left(Strval, Pos - 1)
If StrComp(GetAppName, "PROSPER", 1) <> 0 Then
MsgBox "Unrecognised application name in tag string"
End
End If
End Function
Sub DoCmd(Cmd As String)
'Performs a command, then checks for
errors
Dim lErr As Long
lErr = Server.DoCommand(Cmd)
If lErr > 0 Then
MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
End Sub
Function DoGet(Gv As String) As String
Dim lErr As Long
Dim AppName As String

'Gets a value, then checks for errors

DoGet = Server.GetValue(Gv)
AppName = GetAppName(Gv)
lErr = Server.GetLastError(AppName)
If lErr > 0 Then
MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
End Function
Sub DoSet(Sv As String, Val)
Dim lErr As Long
Dim AppName As String

'Sets a value, then checks for errors

lErr = Server.SetValue(Sv, Val)


AppName = GetAppName(Sv)
lErr = Server.GetLastError(AppName)
OpenServer User's Manual

PROSPER and the OpenServer

418

If lErr > 0 Then


MsgBox Server.GetErrorDescription(lErr)
Set Server = Nothing
End
End If
End Sub
OpenServer Example 2:
The objective of the following code samples show how to establish connection between
Excel and the tools using a different structure and use the DoSet, DoGet and DoCmd
functions.
Other code samples will also illustrate how to open a PROSPER file and set up macro
code structures to manage data arrays.
The following code skeleton should wrap around all code fragments. This simply
initialises a data-server object and provides a sub-routine that can be called as a macro
from an action push-button for instance.
Option Explicit
Dim Server As Object
Sub DoStuff()
Set Server = CreateObject("PX32.OpenServer.1") 'This complete string can
be replaced with Connect if desired (as above), and establishes the link
between Excel and the tools
Range("A6", "Z1000").Clear
specified range

'Clears the Excel spreadsheet data in the

Rem Your code goes here


Set Server = Nothing 'Disconnects the Excel communication to the IPM tool
MsgBox "Macro completed" 'Message box will appear after the macro has
completed showing the entered "text"
End Sub
Given the above functions, the first code fragment in the following example shows how
to open a file by name either from being hard-coded in the macro or obtained from an
Excel cell reference.
The above macro code can be modified to perform the following calls if desired:
DoCmd ("PROSPER.OPENFILE(C:\Well Files\PROSPER.OUT)")
PROSPER file located in the directory structure

'Opens the

1990-2011 Petroleum Experts Limited

419

OpenServer

DoCmd ("PROSPER.OPENFILE=""" + Range("a3") + """")


PROSPER file located in the 'a3' Excel cell reference

'Opens a

The code below obtains a single variable. This variable can also be from a table as
shown in the third and fourth lines the first layer pressure from the multi-layer IPR
model.
Cells(6, 2) = DoSet ("PROSPER.SIN.IPR.SINGLE.PRES") 'Sets the reservoir
pressure with the value located in the Excel cell
reference
Cells(6, 3) = DoGet ("PROSPER.SIN.IPR.SINGLE.PRES") 'Gets the reservoir
pressure from the PROSPER file and places it in the
defined cell reference
Cells(7, 2) = Doset ("PROSPER.SIN.IPR.SINGLE.MLAYER[0].PRESSURE")
'Sets the layer '1' reservoir pressure in the multilayer IPR model
Cells(7, 3) = DoGet ("PROSPER.SIN.IPR.SINGLE.MLAYER[0].PRESSURE")
'Gets the reservoir pressure from layer '1' in the
multi-layer IPR model
Extracting Data from a Multi-Layer IPR Model:
Lets consider a multi-layer IPR model where it is desired to extract layer pressure and
GOR data sequentially from each layer for a 3-layer system.
We can achieve the objective by setting up a loop that will sequentially interrogate each
layer and retrieve the layer pressure and GOR.
The DoGet functions can of course be expanded to extract additional information as
required and the code can also be modified to use the Doset function to set values from
Excel to PROSPER.
One way to do this using a loop type structure is as follows:
Dim i, k As Integer
i=0
k=0
For k = 0 To 2
For i = 0 To 1
Cells(10, 1 + k) = DoGet("PROSPER.SIN.IPR.Single.MLayer[" + CStr(k) + "].
PRESSURE")
'The above string cell reference tells Excel that the layer pressure data for the 3layer IPR model will be placed in row 10 and column 1, 2 and 3 respectively (cell
OpenServer User's Manual

PROSPER and the OpenServer

420

references are row, column). Excel will increase the column by '1' since the column
counter k = 1.
The [" + Cstr(k) + "] remark converts the k-string to a value that is used to index through
each layer. The string suffix .PRESSURE tells the macro that it is the pressure variable
value that is being queried via the DoGet function.
Cells(11, 1 + k) = DoGet("PROSPER.SIN.IPR.Single.MLayer[" + CStr(k) + "].GOR")
'The syntax to retrieve (or set) the GOR is the same as above.
Next i 'Closes the 'i' loop
Next k 'Closes the 'k' loop
End Sub
The above code illustrates one of many possible methods to retrieve (or set) multiple
data sets.
The code below tabulates the variables from a multi-layer model using a slightly different
approach:
Dim i As Integer
Dim j As Integer
Dim StringRoot As String 'The below StringRoot call defines the following
section of a given OpenServer string, and enables having to paste repeated
OpenServer strings to set or retrieve common string variables. For example,
the StringRoot of: PROSPER.SIN.IPR.SINGLE.MLAYER.PRESSURE is:
PROSPER.SIN.IPR.SINGLE.MLAYER, followed by [" & FORMAT(i) & "], where 'i'
will be the loop counter that will be used to automatically loop through all the
defined given layers in a multi-layer IPR model.
As can be observed below, rather than using the common returned openserver
string for the IPR section, the StringRoot approach can be used as illustrated
below:
Dim StringOut As String
i=0
Do While i < 5
StringRoot = "PROSPER.SIN.IPR.SINGLE.MLAYER[" & Format(i) & "]"
Cells(10 + i, 2) = StringRoot
Cells(10 + i, 3) = DoGet(StringRoot & ".TYPE")
Cells(10 + i, 4) = DoGet(StringRoot & ".IGRAV")
Cells(10 + i, 5) = DoGet(StringRoot & ".PRESSURE")
Cells(10 + i, 6) = DoGet(StringRoot & ".HEIGHT")
Cells(10 + i, 7) = DoGet(StringRoot & ".SKIN")

1990-2011 Petroleum Experts Limited

421

OpenServer

Cells(10 + i, 8) = DoGet(StringRoot & ".PERM")


Cells(10 + i, 9) = DoGet(StringRoot & ".DAREA")
Cells(10 + i, 10) = DoGet(StringRoot & ".DIETZ")
Cells(10 + i, 11) = DoGet(StringRoot & ".WBR")
Cells(10 + i, 12) = DoGet(StringRoot & ".PILAY")
Cells(10 + i, 13) = DoGet(StringRoot & ".GOR")
Cells(10 + i, 14) = DoGet(StringRoot & ".API")
Cells(10 + i, 15) = DoGet(StringRoot & ".GASGRAV")
Cells(10 + i, 16) = DoGet(StringRoot & ".WC")
i=i+1
Loop
Note that the multi-rate models within the multi-layer constitute a table within a table.
i=0
Do While i < 5
StringRoot = "PROSPER.SIN.IPR.SINGLE.MLAYER[" & Format(i) & "]"
Cells(16, 2 + 3 * i) = StringRoot
j=0
Do While j < 10
StringOut = StringRoot & ".MRATE[" & Format(j) & "].PRESSURE"
Cells(16 + j, 3 + (3 * i)) = DoGet(StringOut)
StringOut = StringRoot & ".MRATE[" & Format(j) & "].RATE"
Cells(16 + j, 4 + (3 * i)) = DoGet(StringOut)
j=j+1
Loop
i=i+1
Loop
Now a variable length data structure is dealt with in the multi-lateral network. Some of
the state variables for each item are printed out.
Dim String1 As String
Dim String3 As String
Cells(8, 2) = "PROSPER.SIN.IPR.MULTILAT.NETWORK.COUNT"
StringRoot = DoGet("PROSPER.SIN.IPR.MULTILAT.NETWORK.COUNT")
Cells(8, 3) = StringRoot
Dim Count As Integer
Count = Val(StringRoot)
StringRoot = "PROSPER.SIN.IPR.MULTILAT.NETWORK["
i=0
Do While i < Count
String1 = StringRoot & Format(i) & "]"
String3 = String1 & ".LABEL"
Cells(i * 10 + 11, 2) = String3
Cells(i * 10 + 11, 3) = DoGet(String3)
OpenServer User's Manual

PROSPER and the OpenServer

422

String3 = String1 & ".Type"


Cells(i * 10 + 12, 2) = String3
Cells(i * 10 + 12, 3) = DoGet(String3)
String3 = String1 & ".Node"
Cells(i * 10 + 13, 2) = String3
Cells(i * 10 + 13, 3) = DoGet(String3)
String3 = String1 & ".Mask"
Cells(i * 10 + 14, 2) = String3
Cells(i * 10 + 14, 3) = DoGet(String3)
String3 = String1 & ".HasData"
Cells(i * 10 + 16, 2) = String3
Cells(i * 10 + 16, 3) = DoGet(String3)
String3 = String1 & ".ID"
Cells(i * 10 + 17, 2) = String3
Cells(i * 10 + 17, 3) = DoGet(String3)
String3 = String1 & ".Valid"
Cells(i * 10 + 18, 2) = String3
Cells(i * 10 + 18, 3) = DoGet(String3)
i=i+1
Loop
Now, get all tie-point or junction data.
formatting.

Note the use of a line-count variable for

StringRoot = "PROSPER.SIN.IPR.MULTILAT.NETWORK["
Dim iType As Integer
Dim iLineCount As Integer
iLineCount = i * 10 + 11
i=0
Do While i < Count
String1 = StringRoot & Format(i) & "]"
String3 = String1 & ".Type"
iType = Val(DoGet(String3))
If (iType = 0) Or (iType = 1) Then
iLineCount = iLineCount + 1
Cells(iLineCount, 2) = "Junction/Tiepoint"
iLineCount = iLineCount + 1
String3 = String1 & ".MD"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".TVD"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 2
End If

1990-2011 Petroleum Experts Limited

423

OpenServer

Continuing the loop, get all tubing model and deviation survey items, whether in a tubing
network item or a completion node.
Dim iHasData As Integer
String3 = String1 & ".HasData"
iHasData = Val(DoGet(String3))
If (iType = 2) Or (iType = 4 And iHasData = 1) Then
iLineCount = iLineCount + 1
Cells(iLineCount, 2) = "Completion/tubing"
iLineCount = iLineCount + 1
String3 = String1 & ".Hflow"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".Vflow"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".Choke"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".Threshold"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".FlowType"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".Angle"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".WBR"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 1
String3 = String1 & ".Dietz"
Cells(iLineCount, 2) = String3
Cells(iLineCount, 3) = DoGet(String3)
iLineCount = iLineCount + 2
String3 = String1 & ".Dev.COUNT"
Dim iDevCount As Integer
iDevCount = Val(DoGet(String3))
j=0
OpenServer User's Manual

PROSPER and the OpenServer

424

Do While j < iDevCount


String2 = String1 & ".Dev[" & Format(j) & "]"
Cells(iLineCount, 2) = String2
String3 = String2 & ".MD"
Cells(iLineCount, 3) = DoGet(String3)
String3 = String2 & ".TVD"
Cells(iLineCount, 4) = DoGet(String3)
String3 = String2 & ".Azimuth"
Cells(iLineCount, 5) = DoGet(String3)
String3 = String2 & ".Disp"
Cells(iLineCount, 6) = DoGet(String3)
String3 = String2 & ".Angle"
Cells(iLineCount, 7) = DoGet(String3)
iLineCount = iLineCount + 1
j=j+1
Loop
iLineCount = iLineCount + 3
i=i+1
Loop
Finally, a method of obtaining the unique identifier (ID) of a node called Comp1 is
illustrated. The node label is placed within braces {} to differentiate it generically from
an index.
StringRoot = "{Comp1}"
StringOut = "PROSPER.SIN.IPR.MULTILAT.NETWORK[" & StringRoot & "].ID"
Cells(10, 2) = StringOut
Cells(10, 3) = DoGet(StringOut)

1990-2011 Petroleum Experts Limited

Chapter

PVTP and the Open Server

PVTP and the Open Server

7.1

OverView

426

Open Server is designed to provide an Open Architecture for Petroleum Experts


products. This allows the programs to be accessed and driven by other programs such
as Excel.For a fuller description of the Open Server, the user should consult the manual
on this subject which is distributed with the suite of programs.
In common with all the programs, the labels used within the open server can be
visualised by pressing Ctrl while doing a mouse right click when over a specific dialog
item.
A comprehensive series of Excel spreadsheets are distributed with PVTP. All major
labels, methods and calculations are illustrated within these files.
The main areas that can be accessed via the PVTP Open Server are:

BLACKOIL
OPTIONS
STREAMBASE[stream no. or stream name]
STREAMRUN[stream no. or stream name]
CALCUL[stream no. or stream name]

Note
At present, no access is given to matching within the blackoil or equation of state
models.

7.2

File and Streams


PVTP has a Multiple Document Interface(MDI) . This means the program can load more
than one *.pvi file. The files are manipulated using the following commands:
OPENFILE

Opens a pvi file

SAVEFILE

Saves the active file with the given file name

CLOSEFILE

Closes the active file without saving it

SHUTDOWN

Closes all files without saving them

SETACTIVEFILE

Sets named file as the active document

UPDATEDISPLAY

Instructs program to update the main screen with the


latest active file data

The file commands are demonstrated in the OPENPVT.XLS sample Excel file.
Each file can contain multiple streams. Each stream contains Base, Runtime and
Calculation data. Individual streams can be accessed by way of a zero-based index or
the stream name.
1990-2011 Petroleum Experts Limited

427

OpenServer

A typical string to get a piece of stream data would be:


PVT.STREAMBASE[{WellStream}].COMPOSITION[1]
This accesses the composition of the second component within the stream called
WellStream. Details of stream contents are described in Sections 8.4 and 8.5.
The stream commands are demonstrated in the OPENPVT.XLS sample Excel file.
Streams can be manipulated using the following:
CREATE_EMPTY_STREAM

Adds an empty stream to the active file

SET_ACTIVE_STREAM

Sets the active stream within the active file

COPY_STREAM

Copies an identified stream within the active


file

COPYSTREAMBASE_TO_STREAMR Copies BASE data to RUNTIME for the


UN
identified stream
COPYSTREAMRUN_TO_STREAMBA Copies RUNTIME data to BASE for the
SE
identified stream

7.3

BLACKOIL
This section deals with access to the input data and calculations within the Blackoil
model of the PVTP program. Use of the model and data is demonstrated within the
OPEN_BLACKOIL_CALC.XLS sample Excel file.
The setting of the file to a blackoil model is done within the options section with the
DoSet command.
"PVT.OPTIONS.METHOD with value BLACKOIL"
The type of model is set by
PVT.OPTIONS.FLUIDTYPE to OIL,GAS or CONDENSATE
There is only one set of blackoil data per file so no stream indication is required. To
obtain a piece of blackoil data the command string would be:
"PVT.BLACKOIL.SEPPRESS".
CORRPB

Correlation for PB,Rs,Bo

CORRUO

Correlation for Oil Viscosity

CORRUG

Correlation for Gas Viscosity

SOLGOR

Solution GOR

OILGRAV

Oil Gravity

OpenServer User's Manual

PVTP and the Open Server

7.4

GASGRAV

Gas Gravity

SEPPRESS

Separator Pressure

SEPTEMP

Separator Temperature

SEPGOR

Separator GOR

SEPGASGRAV

Separator Gas Gravity

TANKGOR

Tank GOR

TANKGASGRAV

Tank Gas Gravity

CGR

Condensate to Gas Ratio

H2S

H2S Concentration

CO2

CO2 Concentration

N2

N2 Concentration

DEWPOINT

Condensate Dewpoint

RESTEMP

Reservoir Temperature

RESPRESS

Reservoir Pressure

WATER_SALINITY

Water Salinity

PVT_MATCHED

Flag to indicate that PVT is matched

428

OPTIONS
This section deals with access to common options within the active PVTP file. The
options deal with many aspects of how and where models are used, which calculations
are carried out etc.
The Options sheet within the OPENPVT.XLS sample Excel file, gives an indication of
how these data points can be accessed.
A typical DoSet command would be
" PVT.OPTIONS.VISCMETHOD with value LOHRENZ sets the model for EoS
calculations to Lohrenz Bray Clark.
The option available includes:
METHOD

Defines the model being used i.e. BLACK OIL or EOS

FLUIDTYPE

Defines the black oil model to be used i.e. OIL,GAS or


CONDENSATE

SEPARATORTYPE

Defines the number of separators within a blackoil


model i.e. SINGLE to TWO

EOSTYPE

Defines the equation to be used for the EoS model i.e.


1990-2011 Petroleum Experts Limited

429

OpenServer

PENGROB or SRK
COMPANY

Gives access to the Company string within the Options


Dialog

FIELD

Gives access to the Field string within the Options


Dialog

LOCATION

Gives access to the Location string within the Options


Dialog

PLATFROM

Gives access to the Platform string within the Options


Dialog

ANALYST

Gives access to the Analyst string within the Options

<