You are on page 1of 660

DYNAMIC MULTIPHASE FLOW SIMULATOR

OLGA 2016
Version 2016.2

User manual
Copyright Notice
Copyright © 2017 Schlumberger. All rights reserved.
This work contains the confidential and proprietary trade secrets of Schlumberger and may not
be copied or stored in an information retrieval system, transferred, used, distributed, translated
or retransmitted in any form or by any means, electronic or mechanical, in whole or in part,
without the express written permission of the copyright owner.

Trademarks & Service Marks


Schlumberger, the Schlumberger logotype, and other words or symbols used to identify the
products and services described herein are either trademarks, trade names or service marks of
Schlumberger and its licensors, or are the property of their respective owners. These marks
may not be copied, imitated or used, in whole or in part, without the express prior written
permission of Schlumberger. In addition, covers, page headers, custom graphics, icons, and
other design elements may be service marks, trademarks, and/or trade dress of Schlumberger,
and may not be copied, imitated, or used, in whole or in part, without the express prior written
permission of Schlumberger. Other company, product, and service names are the properties of
their respective owners.

® ®
ECLIPSE and ROCX are marks of Schlumberger.
An asterisk (*) is used throughout this document to designate other marks of Schlumberger.

Security Notice
The software described herein is configured to operate with at least the minimum specifications
set out by Schlumberger. You are advised that such minimum specifications are merely
recommendations and not intended to be limiting to configurations that may be used to operate
the software. Similarly, you are advised that the software should be operated in a secure
environment whether such software is operated across a network, on a single system and/or on
a plurality of systems. It is up to you to configure and maintain your networks and/or system(s)
in a secure manner. If you have further questions as to recommendations regarding
recommended specifications or security, please feel free to contact your local Schlumberger
representative.

-1-
OLGA User manual

Table of Contents

Table of Contents ....................................................................................................................... 2


OLGA User manual .................................................................................................................... 8
Introduction ................................................................................................................................ 9
Background .............................................................................................................................. 9
OLGA as a strategic tool ........................................................................................................ 10
Applications ............................................................................................................................ 10
Input files ................................................................................................................................ 14
Simulation model .................................................................................................................... 22
The OLGA model ...................................................................................................................... 24
OLGA Model basics................................................................................................................ 24
Transport Equations ........................................................................................................... 24
Flow regimes ...................................................................................................................... 28
Flowline modeling ............................................................................................................... 35
Line................................................................................................................................. 38
Numerics ............................................................................................................................ 38
Temperature ....................................................................................................................... 39
Initial conditions .................................................................................................................. 39
Steady state preprocessor.................................................................................................. 40
2nd order scheme .............................................................................................................. 42
Time step control ................................................................................................................ 45
Tuning ................................................................................................................................ 45
Fluids and PVT ....................................................................................................................... 46
Special fluids and solids ..................................................................................................... 46
PVT models ........................................................................................................................ 47
PVT lookup table ............................................................................................................ 47
Blackoil ........................................................................................................................... 49
Compositional tracking ................................................................................................... 58
Single component ........................................................................................................... 65
Standard Conditions in OLGA ............................................................................................ 71
Heat transfer ........................................................................................................................... 73
One-dimensional heat transfer ........................................................................................... 74
Thermal coupling to ambient .......................................................................................... 74
Thermal coupling between flowpaths ............................................................................. 79
Two-dimensional heat transfer ........................................................................................... 83
FEMTherm - Model description ...................................................................................... 83
FEMTherm / Solid bundle - How to use .......................................................................... 90
Boundary conditions ............................................................................................................... 91
Source ................................................................................................................................ 91
Well inflow and injection ..................................................................................................... 96
Point contact ................................................................................................................... 96
Zone ............................................................................................................................. 105
Near-wellbore ................................................................................................................... 107
Flow assurance and special modelling options .................................................................... 113
Slug tracking..................................................................................................................... 113
Model description ......................................................................................................... 113
How to use ................................................................................................................... 118
Slug tuning ................................................................................................................... 120
Pig .................................................................................................................................... 122

-2-
Table of Contents

Drilling .............................................................................................................................. 126


Corrosion .......................................................................................................................... 130
Elastic walls ...................................................................................................................... 134
Shut-in .............................................................................................................................. 140
Water module - Emulsion ................................................................................................. 141
Drilling fluid ....................................................................................................................... 147
PVT table approach ...................................................................................................... 148
Compositional approach ............................................................................................... 152
Built-in correlations ....................................................................................................... 155
Complex fluid (Deprecated) .............................................................................................. 158
Non-Newtonian rheology .................................................................................................. 159
Special fluids and solids ................................................................................................... 161
Hydrate ......................................................................................................................... 163
Inhibitor tracking ........................................................................................................... 168
Particle flow .................................................................................................................. 170
SteamWater-HC ........................................................................................................... 175
Tracer tracking.............................................................................................................. 179
Wax deposition ............................................................................................................. 181
User defined dispersions and plug-in framework.............................................................. 186
Equipment and devices ........................................................................................................ 191
Valve ................................................................................................................................ 191
Introduction ................................................................................................................... 191
Valve models ................................................................................................................ 191
How to use ................................................................................................................... 193
Theory .......................................................................................................................... 194
Introduction ................................................................................................................... 202
Venturi valve ................................................................................................................. 205
Gas sizing valve ........................................................................................................... 207
Check valve .................................................................................................................. 208
Standing valve .............................................................................................................. 208
GLV .............................................................................................................................. 212
Pumps .............................................................................................................................. 217
Pressure boost ............................................................................................................. 217
Simplified Pump............................................................................................................ 217
Pump battery ................................................................................................................ 220
Displacement pump ...................................................................................................... 222
Bornemann pump ......................................................................................................... 225
Centrifugal pump .......................................................................................................... 228
OneSubsea pump......................................................................................................... 234
ESPump (ESP) ............................................................................................................. 243
Jet pump....................................................................................................................... 246
Optional Built-In Bypass and Recycle........................................................................... 249
Controlling the pump speed .......................................................................................... 251
Compressor ...................................................................................................................... 251
Phase split node ............................................................................................................... 257
Separator.......................................................................................................................... 258
Heat exchanger ................................................................................................................ 261
Leak ................................................................................................................................. 262
Loss .................................................................................................................................. 264
Control systems .................................................................................................................... 265
Controller introduction ...................................................................................................... 265

-3-
OLGA User manual

Controller details .............................................................................................................. 266


Controller mode ................................................................................................................ 268
Controller activation/deactivation ...................................................................................... 269
Actuator time of controlled device................................................................................. 269
Analog vs. digital controllers ......................................................................................... 270
Constraining the controller output ..................................................................................... 270
Algebraic controller ........................................................................................................... 270
ASC controller .................................................................................................................. 271
Cascade controller ........................................................................................................... 273
ESD controller .................................................................................................................. 275
Manual controller .............................................................................................................. 278
Override controller ............................................................................................................ 278
PID controller.................................................................................................................... 280
PSV controller .................................................................................................................. 286
Scaler controller ............................................................................................................... 288
Selector controller ............................................................................................................ 289
STD controller .................................................................................................................. 291
Switch controller ............................................................................................................... 292
Table controller................................................................................................................. 293
Transmitter ....................................................................................................................... 293
OLGA extensibility ................................................................................................................ 294
REFERENCES ..................................................................................................................... 295
Server ...................................................................................................................................... 298
OLGA OPC server ................................................................................................................ 298
Submodelling ........................................................................................................................ 298
Introduction....................................................................................................................... 298
Reference manual .................................................................................................................. 299
Keywords .............................................................................................................................. 299
CaseDefinition .................................................................................................................. 299
ANIMATE (on CaseLevel) ............................................................................................ 299
CASE (on CaseLevel) .................................................................................................. 299
DTCONTROL (on CaseLevel) ...................................................................................... 300
ECLIPSEOPTIONS (on CaseLevel) ............................................................................. 301
EVENTLOGGING (on CaseLevel)................................................................................ 302
FILES (on CaseLevel) .................................................................................................. 302
INTEGRATION (on CaseLevel) .................................................................................... 303
OPTIONS (on CaseLevel) ............................................................................................ 305
RESTART (on CaseLevel) ........................................................................................... 308
SERVEROPTIONS (on CaseLevel) ............................................................................. 310
SCHEDULER (on CaseLevel) ...................................................................................... 311
UDFEED (on CaseLevel) ............................................................................................. 311
UDOPTIONS (on CaseLevel) ....................................................................................... 312
Compositional................................................................................................................... 312
BLACKOILCOMPONENT (on CaseLevel) ................................................................... 312
BLACKOILFEED (on CaseLevel) ................................................................................. 313
BLACKOILOPTIONS (on CaseLevel)........................................................................... 314
COMPOPTIONS (on CaseLevel) ................................................................................. 315
FEED (on CaseLevel)................................................................................................... 316
SINGLEOPTIONS (on CaseLevel) ............................................................................... 317
Controller .......................................................................................................................... 318
AlgebraicController ....................................................................................................... 318

-4-
Table of Contents

ASCController............................................................................................................... 321
CascadeController ........................................................................................................ 324
ESDController............................................................................................................... 328
ManualController .......................................................................................................... 331
OverrideController ........................................................................................................ 333
PIDController ................................................................................................................ 335
PSVController ............................................................................................................... 339
ScalerController ............................................................................................................ 342
SelectorController ......................................................................................................... 343
STDController ............................................................................................................... 346
SwitchController ........................................................................................................... 348
TableController ............................................................................................................. 350
Output........................................................................................................................... 351
Drilling .............................................................................................................................. 353
TOOLJOINT (on CaseLevel) ........................................................................................ 353
FA-models ........................................................................................................................ 354
FLUID (on CaseLevel) .................................................................................................. 354
PARTICLEOPTIONS (on CaseLevel)........................................................................... 355
SLUGTRACKING (on CaseLevel) ................................................................................ 356
SLUGTUNING (on CaseLevel) ..................................................................................... 358
WATEROPTIONS (on CaseLevel) ............................................................................... 358
FlowComponent ............................................................................................................... 362
Node ............................................................................................................................. 362
Flowpath ....................................................................................................................... 371
JunctionNode ............................................................................................................... 470
GlobalGeom ..................................................................................................................... 473
PIPE (on GlobalGeom) ................................................................................................. 473
GroupData ........................................................................................................................ 474
UDGroup ...................................................................................................................... 474
UDFRACTION (on UDGroup) ...................................................................................... 475
Library .............................................................................................................................. 476
DRILLINGFLUID (on Library) ....................................................................................... 476
HYDRATECURVE (on Library)..................................................................................... 478
MATERIAL (on Library) ................................................................................................ 479
PARTICLES (on Library) .............................................................................................. 481
RESERVOIRINFLOW (on Library) ............................................................................... 481
SHAPE (on Library) ...................................................................................................... 488
TABLE (on Library) ....................................................................................................... 489
TIMESERIES (on Library) ............................................................................................ 490
TRACERFEED (on Library) .......................................................................................... 491
UDDISPERSION (on Library) ....................................................................................... 492
UDPHASE (on Library) ................................................................................................. 492
WALL (on Library) ........................................................................................................ 492
Output............................................................................................................................... 495
OUTPUT (on CaseLevel) ............................................................................................. 495
OUTPUTDATA (on CaseLevel) .................................................................................... 495
PLOT (on CaseLevel) ................................................................................................... 495
PROFILE (on CaseLevel) ............................................................................................. 496
PROFILEDATA (on CaseLevel) ................................................................................... 497
SERVERDATA (on CaseLevel) .................................................................................... 497
TREND (on CaseLevel) ................................................................................................ 498

-5-
OLGA User manual

TRENDDATA (on CaseLevel) ...................................................................................... 499


Submodelling.................................................................................................................... 499
FLOWIN (on Submodel) ............................................................................................... 499
FLOWOUT (on Submodel) ........................................................................................... 501
SIGNALIN (on Submodel) ............................................................................................ 502
SIGNALOUT (on Submodel) ........................................................................................ 503
Submodel ..................................................................................................................... 503
SUBMODELCONTROL (on Submodel) ....................................................................... 504
SUBMODELTAG (on Submodel).................................................................................. 507
ProcessEquipment ........................................................................................................... 507
PhaseSplitNode ............................................................................................................ 507
Separator ...................................................................................................................... 509
BitNode......................................................................................................................... 512
StandNode ................................................................................................................... 513
JetPump ....................................................................................................................... 513
Output........................................................................................................................... 514
ThermalComponent .......................................................................................................... 522
Annulus ........................................................................................................................ 522
FluidBundle .................................................................................................................. 526
SolidBundle .................................................................................................................. 530
Output variables ................................................................................................................... 540
Global Output Variables ................................................................................................... 541
Branch Output Variables .................................................................................................. 543
Boundary Output Variables .............................................................................................. 546
Volume Output Variables.................................................................................................. 554
Bundle Output Variables................................................................................................... 559
Check valve Output Variables .......................................................................................... 559
Compositional Output Variables ....................................................................................... 559
Compressor Output Variables .......................................................................................... 568
Controller Output Variables .............................................................................................. 568
Corrosion Output Variables .............................................................................................. 569
Drilling Output Variables ................................................................................................... 570
Heat exchanger Output Variables .................................................................................... 575
HTCRIT Numerical codes................................................................................................. 575
Hydrate kinetics Output Variables .................................................................................... 577
Jet pump Output Variables ............................................................................................... 578
Leak Output Variables ...................................................................................................... 579
Node Output Variables ..................................................................................................... 581
OneSubsea pump Output Variables ................................................................................. 582
Particle flow Output Variables .......................................................................................... 582
Pig Output Variables ........................................................................................................ 585
Pump Output Variables .................................................................................................... 587
Separator Output Variables .............................................................................................. 588
Slug tracking Output Variables ......................................................................................... 591
Source Output Variables .................................................................................................. 597
Steam and Single component Output Variables ............................................................... 598
Tracer tracking Output Variables ...................................................................................... 599
Transmitter Output Variables............................................................................................ 601
UDPhase Output Variables .............................................................................................. 601
Valve Output Variables ..................................................................................................... 602
Wax deposition Output Variables ..................................................................................... 603

-6-
Table of Contents

Well Output Variables ....................................................................................................... 605


Fluid properties and other data files ..................................................................................... 606
Compressor data file ........................................................................................................ 607
Fann file............................................................................................................................ 609
Hydrate curve definition file .............................................................................................. 610
OLGA ROCX .................................................................................................................... 611
Rheology file..................................................................................................................... 611
UDPVT FILE AND UDFEED FILE .................................................................................... 613
Wax table file .................................................................................................................... 614
Fluid properties file ........................................................................................................... 615
Feed file for Compositional Tracking ............................................................................ 615
PVT properties for non-existing phase ......................................................................... 616
Keyword based format for fluid properties .................................................................... 616
Fixed/standard format for fluid properties ..................................................................... 630
Pump Data Files ............................................................................................................... 641
Pump Data Table for Centrifugal Pumps ...................................................................... 641
Pump Data Table for Displacement Pumps .................................................................. 645
Data Format for ESPDBFILEs ...................................................................................... 647
Restrictions and Limitations ................................................................................................. 650
Memory consumption ........................................................................................................... 650
Limitations in the use of fluid properties ............................................................................... 650
Input/Output Limitations ........................................................................................................ 651
Standard Conditions in OLGA .............................................................................................. 652
Flow Model Limitations ......................................................................................................... 653
Important Numerical Recommendations .............................................................................. 654
Compatibility matrix – modules/options in OLGA.................................................................. 656

-7-
OLGA User manual

OLGA User manual

The complete program documentation includes:

 OLGA* Release notes


 OLGA User manual (this document)
 OLGA GUI User manual
 OLGA Sample cases
 Well editor User manual
 OLGA Viewer User manual
 Pipeline editor User manual
 Profile generator User manual
 FEMTherm editor User manual
 OLGA OPC server guide
 OLGA Submodeling guide
 OLGA Namespace Explorer guide
 Installation guide
 ROCX User manual

All documents listed above are available from the Start menu (Start > All Programs > Schlumberger >
OLGA [version] > Documentation).

The OLGA User manual is also available from the Help menu in the GUI. User Manuals for other tools
included with the installation (for example, FEMTherm, ROCX, OLGA Namespace Explorer) are available
from the Help menus in the tools.

Release information

Refer to the Release notes for detailed release information.

Online help

OLGA is equipped with a context sensitive help document which can be opened directly from the user
interface. The help can be reached in several ways:

 Click the Properties view and press F1 -> leads to the information on the relevant model
 Select Help from the File menu
 Select the Help icon in the upper right corner of the OLGA main window.

Support center

The Support Portal provides useful information about frequently asked questions and known issues.

Please contact OLGA support if problems or missing functionality are encountered when using OLGA or
any of the related tools included in the OLGA software package.

-8-
Introduction

Introduction

OLGA is the industry standard tool for transient simulation of multiphase petroleum production. The
purpose of this manual is to assist you in the preparation of the input data for an OLGA simulation.

In this manual you can find

 a general introduction to OLGA


 an overview of the required and the optional input to OLGA. It also describes in some detail different
simulation options such as wax deposition, corrosion, and so on.
 a detailed description of all input data and the required fluid property tables
 a description of the output

The sample cases presented with the installation of OLGA illustrate important program options and typical
simulation output. A description of the sample cases is also included in this manual.

OLGA comes in a basic version with a number of optional modules: FEMTherm, ROCX, Multiphase
pumps, Corrosion, Wells, Slug tracking, Wax deposition, Inhibitor tracking, Compositional tracking, Single
component, Tuning, Hydrate kinetics, Plugin Interface, Complex fluid, OLGA High Definition, Risk
management and Optimisation and Blowout control.

There are a number of additional programs, such as the OLGA GUI and the FEMThermViewer, for the
preparation of input data and the visualization of results.

These optional modules and additional programs are available to you depending on you licensing
agreement with Schlumberger.

Background
OLGA 2016.2 is the latest version in a continuous development that was started by the Institute for Energy
Research (IFE) in 1980. The oil industry started using OLGA in 1984 when Statoil had supported its
development for three years. Data from the large scale flow loop at SINTEF, and later from the medium
scale loop at IFE, were essential for the development of the multiphase flow correlations and also for the
validation of OLGA. Oil companies have since then supported the development and provided field data to
help manage uncertainty, predominantly within the OLGA Verification and Improvement Project (OVIP).
OLGA has been commercially available since the SPT Group started marketing it in 1990.

OLGA is used for networks of wells, flowlines and pipelines and process equipment, covering the
production system from bottom hole into the production system. OLGA comes with a steady state pre-
processor included which is intended for calculating initial values to the transient simulations, but which
also is useful for traditional steady state parameter variations. However, the transient capabilities of OLGA
dramatically increase the range of applicability compared with steady state simulators.

-9-
OLGA User manual

OLGA as a strategic tool

OLGA is applied for engineering throughout field life, from conceptual studies to the support of operations.
However, the application has been extended to be an integral part of operator training simulators, used for
making operating procedures, training of operators and check out of control systems. Further, OLGA is
frequently embedded in on-line systems for monitoring of pipeline conditions and forecasting and planning
of operations.

OLGA can dynamically interface with all major dynamic process simulators, such as Hysys, DynSim,
UniSim, D-SPICE, INDISS and ASSETT. This allows for making integrated engineering simulators and
operator training simulators studying the process from bottom hole all the way through the process facility
in a single high fidelity model.

Note: The OLGA flow correlation has been implemented in all major steady state simulators, providing
consistent results moving between different simulators.

Applications
When the resources become more scarce and complicated to get to, careful design and optimisation of the
entire production system is vital for investments and revenues. The dimensions and layout of wells and
pipelines must be optimized for variable operational windows defined by changing reservoir properties and
limitations given by environment and processing facilities.

OLGA is used for design and engineering, mapping of operational limits and to establish operational
procedures. OLGA is also used for safety analysis to assess the consequences of equipment malfunctions
and operational failures.

REFERENCES contains a list of papers describing the OLGA model and its applications.

- 10 -
Introduction

Design and Engineering

OLGA is a powerful instrument for the design engineer when considering different concepts for
hydrocarbon production and transport - whether it is new developments or modifications to existing
installations.
1
OLGA should be used in the various design phases, that is, Conceptual, FEED and detailed design and
the following issues should be addressed.

Design

 Sizes of tubing and pipes


 Insulation and coverage
 Inhibitors for hydrate / wax
 Liquid inventory management / pigging
 Slug mitigation
 Processing capacity (Integrated simulation)

Focus on maximizing the production window during field life

 Initial
 Mid-life
 Tail

Accuracy / Uncertainty management

 Input accuracy
 Parameter sensitivity

Risk and Safety

Normally the engineering challenge becomes more severe when accounting for tail-end production with
reduced pressure, increasing water-cut and gas-oil ratio. This increase the slugging potential while fluid
temperature reduces which in turn increase the need for inhibitors and the operational window is generally
reduced.

Operation

OLGA should be used to establish

 Operational procedures and limitations


 Emergency procedures
 Contingency plans

1
Front End Engineering and Design

- 11 -
OLGA User manual

OLGA is also a very useful tool for operator training

 Training in flow assurance in general


 Practising operational procedures
 Initial start-up preparations

Some typical operational events suitable for OLGA simulations are discussed below.

Pipeline shut-down

If, for some reason, the flow in a pipeline must be shut down, different procedures can be investigated. The
dynamics during the shut-down can be studied, as well as the final conditions in the pipe. The liquid
content is of interest, as well as the temperature evolution in the fluid at rest, because the walls may cool
the fluid below a critical temperature where hydrates can start to form.

Pipeline blow-down

One of the primary strategies for hydrate prevention in case of a pipeline shut-down is to blow down. The
primary aim is to reduce the pipeline pressure below the pressure where hydrates can form. The main
effects that can be studied are the liquid and gas rates during the blow-down, the time required and the
final pressure.

Pipeline start-up

The initial conditions of a pipeline to be started is either specified by the user or defined by a restart from a
shut-down case. The start-up simulation can determine the evolution of any accumulated liquid slugs in the
system. A start-up procedure is often sought by which any terrain slugging is minimized or avoided
altogether. The Slug tracking module is very useful in this regard.

In a network case a strategy for the start-up procedure of several merging flow lines could be particularly
important.

Change in production

Sometimes the production level or type of fluid changes during the lifetime of a reservoir. The modification
of the liquid properties due to the presence of water is one of the important effects accounted for in OLGA.

A controlled change in the production rate or an injection of another fluid are important cases to be
simulated. Of particular interest is the dynamics of network interaction, for example, how the transport line
operation is affected by flow rate changes in one of several merging flow lines.

Process equipment

Process equipment can be used to regulate or control the varying flow conditions in a multi-phase flow line.
This is of special interest in cases where slugging is to be avoided.

The process equipment simulated in OLGA includes critical- and sub-critical chokes with fixed or controlled
openings, check-valves, compressors with speed and anti- surge controllers, separators, heat exchangers,
pumps and mass sources and sinks.

Pipeline pigging

OLGA can simulate the pigging of a pipeline. A user specified pig can be inserted in the pipeline in OLGA
at any time and place. Any liquid slugs that are created by the pig along the pipeline can be followed in
time. Of special interest is the determination of the size and velocity of a liquid slug leaving the system
ahead of a pig that has been inserted into a shut-down flow line.

- 12 -
Introduction

Hydrate control

Hydrate prevention and control are important for flow assurance. Passive and active control strategies can
be investigated: Passive control is mainly achieved by proper insulation while there are several options for
active control that can be simulated with OLGA: Bundles, electrical heating, inhibition by additives such as
MEG.

Wax deposition

In many production systems wax would tend to deposit on the pipe wall during production. The wax
deposition depends on the fluid composition and temperature. OLGA can model wax deposition as
function of time and location along the pipeline.

Tuning

Even if the OLGA models are sophisticated models made for conceptual studies and engineering will be
based on input and assumptions which are not 100% relevant for operations. Therefore, OLGA is
equipped with a tuning module which can be used online and offline to modify input parameters and also
critical model parameters to match field data.

Wells

 Flow stability: permanent or temporary slugging, rate changes, etc..


 Artificial lift for production optimization
 Shut-in/start-up - water cut limit for natural flow
 Cross flow between layers under static conditions
 WAG injection
 Horizontal wells / Smart wells
 Well Clean-up and Kick-off
 Well Testing
 Well control and Work-over Solutions

Safety Analysis

Safety analysis is an important field of application of OLGA. OLGA is capable of describing propagation of
pressure fronts. For such cases the time step can be limited by the velocity of sound across the shortest
pipe section.

OLGA may be useful for safety analysis in the design phase of a pipeline project, such as the positioning
of valves, regulation equipment, measuring devices, and so on. Critical ranges in pipe monitoring
equipment may be estimated and emergency procedures investigated.

Consequence analysis of possible accidents is another interesting application. The state of the pipeline
after a specified pipe rupture or after a failure in any process equipment can be determined using OLGA.

Simulations with OLGA can also be of help when defining strategies for accident management, for
example, well killing by fluid injection.

Finally it should be mentioned that the OLGA model is well suited for use with simulators designed for
particular pipelines and process systems. Apart from safety analysis and monitoring, such simulators are
powerful instruments in the training of operators.

- 13 -
OLGA User manual

Input files
The OLGA simulator uses text files for describing the simulation model:

 .opi; generated and used by the OLGA GUI


 .inp; input format used by OLGA 5 and earlier versions
 .key; input format used by OLGA

The .key format is the input file format for the OLGA engine. The OLGA GUI automatically generates files
in this format (with the extension .genkey). The .key format reflects the network model described in the
simulation model and should be the preferred format.

In addition to the simulation file, OLGA handles input in several other formats as described in Data files.

Simulation description

The input keywords are organized in Logical sections, with Case level at the top, followed by the various
network components and then the connections at the end.

Case level

Case level is defined as the global keywords specified outside of the network components and
connections. The following keywords are available at Case level:

CaseDefinition; Case, Files, Integration, Options, Dtcontrol, Restart, Serveroptions, Udoptions, Scheduler

Library; Material, Wall, Shape, Table, Drillingfluid, Hydratecurve, Timeseries, Tracerfeed, Udphase,
Uddispersion, Centpumpcurve, Reservoirinflow, Particles

Compositional; Compoptions, Feed, Udfeed, Blackoiloptions, Blackoilcomponent, Blackoilfeed,


Singleoptions

FA-models; Wateroptions, Fluid, Slugtuning, Slugtracking

Output; Animate, Output, Trend, Profile, Outputdata, Trenddata, Profiledata, Serverdata, Plot

Drilling; Tooljoint

Geometries; Globalgeom

Example - text file structure

Below are examples on how this is given in the genkey file:

CASE PROJECT="OLGA Manual", TITLE="Example case", AUTHOR="Schlumberger"

INTEGRATION STARTTIME=0, ENDTIME=7200, DTSTART=0.1, MINDT=0.1, MAXDT=5

FILES PVTFILE=fluid.tab

MATERIAL LABEL=MAT-1, DENSITY=0.785E+04, CAPACITY=0.5E+03, CONDUCTIVITY=0.5E+02

WALL LABEL=WALL-1, THICKNESS=(0.9000E-02, 0.2E-01), MATERIAL=(MAT-1, MAT-1)

Network components

The network components are the major building blocks in the simulation network.

Each network component is enclosed within start (NETWORKCOMPONENT) and end


(ENDNETWORKCOMPONENT) tags as shown below. Each data group belonging to this network
component will be written within these tags.

- 14 -
Introduction

NETWORKCOMPONENT TYPE=FlowPath, TAG=FP_BRAN

...

ENDNETWORKCOMPONENT

The following network component keywords can be specified (see links for further details on each
component):

FlowComponent: See 'Flowpath' on page 15, See 'NODE' on page 17

ProcessEquipment: See 'PHASESPLITNODE' on page 18, See 'SEPARATOR' on page 18

Controller: See 'CONTROLLER' on page 18

ThermalComponent: See 'ANNULUS' on page 19, See 'FLUIDBUNDLE' on page 19, See
'SOLIDBUNDLE' on page 19

Submodelling: Submodel

UserDefined: Udgroup

Flowpath

Piping

The flowpath can be divided into several pipes, which can have an inclination varying from the other pipes
in the flowpath. Each pipe can again be divided into sections as described above. All sections defined
within the same pipe must have the same diameter and inclination. Each pipe in the system can also have
a pipe wall consisting of layers of different materials.

The following keywords are used for Piping:

BRANCH; Defines geometry and fluid labels.

GEOMETRY; Defines starting point for flowpath.

PIPE; Specifies end point or length and elevation of a pipe. Further discretization, diameter, inner surface
roughness, and wall name are specified.

Example - text file structure

Below are examples on how this is given in the genkey file:

BRANCH LABEL=BRAN-1, GEOMETRY=GEOM-1, FLUID=1

GEOMETRY LABEL=GEOM-1

PIPE LABEL=PIPE-1, DIAMETER=0.12, ROUGHNESS=0.28E-04, NSEGMENT=4, LENGTH=0.4E+03,


ELEVATION=0, WALL=WALL-1

Position

The following keywords are used for Position:

 POSITION; Defined a named position for reference in other keywords

Boundary and Initial Conditions

For the solution of the flow equations, all relevant boundary conditions must be specified for all points in
the system where mass flow into or out of the system. Initial conditions at start up and parameters used for
calculating heat transfer must also be specified.

- 15 -
OLGA User manual

The following keywords are used for Boundary and Initial Conditions:

HEATTRANSFER; Definition of the heat transfer parameters.

INITIALCONDITION; Defines initial values for flow, pressure, temperature and holdup.
INITIALCONDITIONS is not required when a steady state calculation is performed.

NEARWELLSOURCE; Defines a near-wellbore source used together with OLGA ROCX.

SOURCE; Defines a mass source with name, position, and data necessary for calculating the mass flow
into or out of the system. The source flow can be given by a time series or determined by a controller.

WELL; Defines a well with name, position and flow characteristics.

ZONE; Defines a reservoir zone with name, position and reference to a reservoir inflow.

Example - text file structure

Below are examples on how this is given in the genkey file:

HEATTRANSFER PIPE=ALL, HAMBIENT=6.5, TAMBIENT=6, HMININNERWALL=0.5E+03

SOURCE LABEL=SOUR-1-1, PIPE=1, SECTION=1, TIME=0, TEMPERATURE=62, GASFRACTION=-1,


TOTALWATERFRACTION=-1, PRESSURE=70 bara, DIAMETER=0.12,
SOURCETYPE=PRESSUREDRIVEN

Process Equipment

To obtain a realistic simulation of a pipeline system, it is normally required to include some process
equipment in the simulation. OLGA supports a broad range of different types of process equipment, as
shown below.

It should be noted that the steady state preprocessor ignores the process equipment marked with (*) in the
list below.

The following keywords are used for Process equipment:

CHECKVALVE (*); Defines name, position and allowed flow direction for a check valve.

COMPRESSOR (*); Defines name, position and operating characteristics of a compressor.

HEATEXCHANGER; Defines name, position and characteristic data for a heat exchanger.

LOSS; Defines name, position and values for local pressure loss coefficients.

LEAK; Defines the position of a leak in the system with leak area and back pressure. The leak can also be
connected to another flowpath to simulate gas lift etc.

PRESSUREBOOST; Defines name, type and characteristic data for a pump

CENTRIFUGALPUMP; Defines name, type and characteristic data for a pump

ESPUMP(*); Defines name, type and characteristic data for a pump

DISPLACEMENTPUMP; Defines name, type and characteristic data for a pump

ONESUBSEAPUMP; Defines name, type and characteristic data for a pump

BORNEMANNPUMP(*); Defines name, type and characteristic data for a pump

PUMPBATTERY; Defines name, type and characteristic data for a pump

SIMPLIFIEDPUMP Defines name, type and characteristic data for a pump

TRANSMITTER (*); Defines a transmitter position and the variable to be transmitted.

- 16 -
Introduction

VALVE; Defines name, position and characteristic data for a choke or a valve.

Example - text file structure

Below are examples on how this is given in the genkey file:

VALVE LABEL=CHOKE-1-1, PIPE=PIPE-1, SECTIONBOUNDARY=4, DIAMETER=0.12, CD=0.7,


TIME=0, OPENING=1.0

Output

OLGA provides several output methods for plotting simulation results.

The following keywords are used for Output for Process equipment:

OUTPUT(DATA); Defines variable names, position and time for printed output.

PLOT; Defines variable names and time intervals for writing of data to the OLGA viewer file.

PROFILE(DATA); Defines variable names and time intervals for writing of data to the profile plot file.

TREND(DATA); Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

ANIMATE ; Defines time intervals for given variables to the 3D Plot.

Example - text file structure

Below are examples on how this is given in the genkey file:

TRENDDATA PIPE=1, SECTION=1, VARIABLE=(PT bara, TM, HOLHL, HOLWT)

PROFILEDATA VARIABLE=(GT, GG, GL)

NODE

PARAMETERS; A collection keyword for all node keys. This keyword is hidden in the GUI.

Output

OLGA provides several output methods for plotting simulation results.

The following keywords are available under the Output for NODE:

OUTPUTDATA; Defines variable names, position and time for printed output.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

Process equipment

Transmitter: Defines the variable to be transmitted.

Example - text file structure

Below are examples on how this is given in the genkey file:

NETWORKCOMPONENT TYPE=Node, TAG=NODE_INLET

PARAMETERS LABEL=INLET, TYPE=CLOSED

ENDNETWORKCOMPONENT

- 17 -
OLGA User manual

NETWORKCOMPONENT TYPE=Node, TAG=NODE_OUTLET

PARAMETERS LABEL=OUTLET, GASFRACTION=-1, PRESSURE=50 bara, TEMPERATURE=32,


TIME=0, TOTALWATERFRACTION=-1, TYPE=PRESSURE, FLUID=1

ENDNETWORKCOMPONENT

PHASESPLITNODE

PARAMETERS; A collection keyword for all phase split node keys. This keyword is hidden in the GUI.

Output

OLGA provides several output methods for plotting simulation results.

The following keywords are used for Output for PHASESPLITNODE:

OUTPUTDATA; Defines variable names, position and time for printed output.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

Process equipment

Transmitter: Defines the variable to be transmitted.

SEPARATOR

PARAMETERS; A collection keyword for all separator keys. This keyword is hidden in the GUI.

Output

OLGA provides several output methods for plotting simulation results.

The following keywords are used for Output for SEPARATOR

OUTPUTDATA; Defines variable names, position and time for printed output.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

CONTROLLER

PARAMETERS; A collection keyword for all controller keys. This keyword is hidden in the GUI.

Output

OLGA provides several output methods for plotting simulation results.

The following keywords are used for Output for CONTROLLER:

OUTPUTDATA; Defines variable names, position and time for printed output.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

- 18 -
Introduction

Note that there are several controller types. In the example below, Manual controller is used:

NETWORKCOMPONENT TYPE=ManualController, TAG=SetPoint-1

PARAMETERS SETPOINT=(2:0.1,2:0.2,0.3), TIME=(0,2000,2010,4000,4010) s, STROKETIME=0.0,


MAXCHANGE=1.0

ENDNETWORKCOMPONENT

ANNULUS

Initialconditions

PARAMETERS; A collection keyword for all annulus keys. This keyword is hidden in the GUI.

AmbientConditions

AMBIENTDATA; A collection keyword for specifying the Annulus ambient conditions.

AnnulusComponents

COMPONENT; A component to place within the annulus definition.

Output

PROFILEDATA; Defines variable names and time intervals for writing of data to the profile plot file.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

FLUIDBUNDLE

Initialconditions

PARAMETERS; A collection keyword for all fluid bundle keys. This keyword is hidden in the GUI.

AmbientConditions

AMBIENTDATA; A collection keyword for specifying the fluid bundle ambient conditions.

BundleComponents

COMPONENT; A component to place within the fluid bundle definition.

Output

PROFILEDATA; Defines variable names and time intervals for writing of data to the profile plot file.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SOLIDBUNDLE

Initialconditions

PARAMETERS; A collection keyword for all solid bundle keys. This keyword is hidden in the GUI.

- 19 -
OLGA User manual

AmbientConditions

AMBIENTDATA; A collection keyword for specifying the solid bundle ambient conditions.

BundleComponents

COMPONENT; A component to place within the solid bundle definition.

Output

PROFILEDATA; Defines variable names and time intervals for writing of data to the profile plot file.

TRENDDATA; Defines variable names and time intervals for writing of data to the trend plot file.

SERVERDATA; Defines variable names to be available through server and for interactive plotting.

Connections

The CONNECTION keyword is used to couple network components, such as a node and a flowpath.

Each flowpath has an inlet and an outlet terminal that can be connected to a node terminal. Boundary
nodes (that is, NODE TYPE = CLOSED, MASSFLOW, PRESSURE) have one terminal, while nodes
connecting flowpaths have an arbitrary number of terminals where flowpaths can be connected to. Note
that the Junction node has a special terminal for the mixing section.

CONNECTION TERMINALS = (FP_BRAN INLET,NODE_INLET FLOWTERM_1)

CONNECTION TERMINALS = (FP_BRAN OUTLET,NODE_OUTLET FLOWTERM_1)

Separator and PhaseSplitNode have special handling of terminals.

The CONNECTION keyword is also used for coupling signal components.

CONNECTION TERMINALS = (FP_BRAN Transmitter-1@INPSIG, SETPOINT-1 OUTSIG_1)

Example file

The keyword examples shown above can be combined to an OLGA .key file or .genkey file

- 20 -
Introduction

- 21 -
OLGA User manual

Simulation model
An OLGA simulation is controlled by defining a set of data groups consisting of a keyword followed by a list
of keys with appropriate values. Each data group can be seen as either a simulation object, information
object, or administration object.

Logical sections

The different keywords are divided into logical sections:

 CaseDefinition: administration objects for simulation control


 Library: information objects referenced in one or more simulation objects
 Controller: controller simulation objects
 FlowComponent: network simulation objects
 Boundary&InitialConditions: simulation objects for flow in and out of flowpath
 ProcessEquipment: simulation objects for flow manipulation
 ThermalComponent: thermal simulation objects
 FA-models: administration objects for flow assurance models
 Compositional: administration and information objects for component tracking
 Output: administration objects for output generation
 Drilling: drilling simulation object
 Submodeling: simulation objects for submodeling
 OLGA Well: OLGA Well simulation object

Network model

A simulation model is then created by combining several simulation objects to form a simulation network,
where information objects can be used within the simulation objects and the administration objects control
various parts of the simulation. The simulation objects can again reference both information and
administration objects.

The network objects can be of the following types:

 Flowpath: the pipeline through which the fluid mix flows


 Node: a boundary condition or connection point for two or more flowpaths
 Separator: a special node model that can separate the fluid into single phases
 Controller: objects that perform supervision and automatic adjustments of other parts of the
simulation network
 Thermal: objects for ambient heat conditions

The simulation model can handle a network of diverging and converging flowpaths. Each flowpath consists
of a sequence of pipes and each pipe is divided into sections (that is, control volumes). These sections
correspond to the spatial mesh discretization in the numerical model. The staggered spatial mesh applies
flow variables (for example, velocity, mass flow, flux) at section boundaries and volume variables (for
example, pressure, temperature, mass, volume fractions) as average values in the middle of the section.

The figure below shows a flowpath divided into five sections.

- 22 -
Introduction

Each flowpath must start and end at a node, and there are two applications for nodes:

 Specifying boundary conditions for a flowpath: Closed node, Mass node and Pressure node.
 Coupling flowpaths (for example, split or merge): e.g. Internal node, Junction node and Phase split
node.

The figure below shows a simple simulation network consisting of three flowpaths and four nodes.

The flowpath is the main component in the simulation network, and can also contain other simulation
objects (for example, process equipment, not shown in the figure above).

It is also possible to describe the simulation model with a text file. See Input files for further descriptions.

- 23 -
OLGA User manual

The OLGA model

OLGA Model basics


OLGA is a three-fluid model, that is, separate continuity equations are applied for the gas, for the oil (or
condensate) and water liquids and also for oil (or condensate) and water droplets. Gas is always assumed
to be lighter than oil and water in OLGA, but oil may be either lighter or heavier than water.

These fluids may be coupled through interfacial mass transfer. Three momentum equations are used; one
for each of the continuous liquid phases (oil/condensate and water) and one for the combination of gas
with liquid droplets. The velocity of any liquid droplets entrained in the gas phase is given by a slip
relation. One mixture energy equation is applied; assuming that all phases are at the same temperature.
This yields seven conservation equations and one equation of state to be solved: the seven conservation
equations are three for mass, three for momentum, and one for energy, while the equation of state is for
pressure.

To close the system of equations, fluid properties, boundary and initial conditions are required.

The equations are linearized and a sequential solution scheme is applied. The pressure and temperature
calculations are de-coupled that is, current pressure is based on previous temperature.

The semi-implicit time integration implemented allows for relatively long time steps, orders of magnitudes
longer than those of an explicit method (which would be limited by the Courant Friedrich Levy criterion
based on the speed of sound).

The numerical error is corrected for over a period of time. The error manifests as an error in local fluid
volume (as compared to the relevant pipe volume).

[1] Note that the OLGA model has only been verified and tuned for fluids where oil is lighter than water.

Transport Equations
In the sections below, the transport equations at the foundation of OLGA are outlined on a general,
continuous form.

Note: Numerical considerations, such as discretization in time and space, are not addressed here.

Mass Transport Equations

For a mass field denoted mi traveling at velocity Ui the mass transport equation is

where ∂t denotes differentiation in time, ∂z denotes spatial differentiation, Ψji denotes the rate of mass
transfer between the j-th and i-th mass field, that is, dispersions, droplet deposition and entrainment, and
phase transitions, and Gi denotes any mass source/sink.

For standard, table-based, three-phase flow, five mass fields are considered - mass of gas phase, mass of
oil in the liquid layers, mass of water in the liquid layers, mass of oil droplets in gas, and mass of water
droplets in gas - which yields five mass transport equations. The only mass transfer terms considered are
those governing the entrainment and deposition of droplets, resulting in the five mass transport equations
below. Other dispersions and the mass distribution between the phases are given instantaneously based
on the current conditions.

- 24 -
The OLGA model

Mass transport equation for gas phase:

where a subscript G denotes gas phase.

Mass transport equation for oil in liquid layers:

where a subscript H denotes oil phase while subscripts l and g denote the liquid and gas layers,
respectively.

Mass transport equation for water in liquid layers:

where a subscript W denotes water phase while subscripts l and g denote the liquid and gas layers,
respectively.

Mass transport equation for oil droplets in gas layer:

where a subscript H denotes oil phase while subscripts l and g denote the liquid and gas layers,
respectively.

Mass transport equation for water droplets in gas layer:

where a subscript W denotes water phase while subscripts l and g denote the liquid and gas layers,
respectively.

Momentum Balance Equations

For a momentum field denoted miUi the momentum balance equation is

(1)

where ∂t denotes differentiation in time, ∂t denotes spatial differentiation, g is the acceleration of gravity, φ
is the pipe angle relative to the gravitational vector, Pi is the pressure force, GiUi is the momentum
contribution corresponding to the mass source/sink Gi, FIji are friction forces between the i-th and j-th mass
field, and Fw denotes the wall friction. Ψji denotes momentum contributions corresponding to the mass
transfer between the j-th and i-th mass field. In the equation above Ψ+ji accounts for a net contribution from
mass field i to j while Ψ-ji accounts for a net contribution from mass field j to i.

For standard, table-based, three-phase flow, three momentum balance equations are considered - one for
the gas layer, one for the oil layer, and one for the water layer - but before stating them a few
considerations need to be made.

- 25 -
OLGA User manual

First, introduce the definitions

where mg, mh, and mw are the masses associated with the gas, oil, and water layers, respectively.

Then define friction coefficients according to

where l and k are layers and the sum over i in l indicates summation over all mass fields associated with
layer l.

Finally, using information about the geometry and properties of the layers, the layer pressures Pi can be
rewritten in terms of the pressure P at the top of the pipe according to

where α denote layer volume fractions. The additional terms in equations for the oil and water layer
pressures are referred to as level gradients.

With these definitions at hand, the momentum equations can be written as below.

Momentum equation for the gas layer:

Momentum equation for the oil layer:

- 26 -
The OLGA model

Momentum equation for the water layer:

Conservation of Volume

Given the pressure, P, and the volume fractions, αi, the mass transport equations and momentum balance
equations above can be used to determine the masses, mi, and velocities, Ui.

Using the trivial constraint that the volume of the fluid equals to the volume of the pipe it resides in together
with the equation of state, the volume equation is given by

where L denotes the existing phases.

Now, given a temperature, T, the pressure, P, can be obtained, and, thus, all that remains is to determine
the temperature to solve the set of equations outlined.

Energy Balance

The energy balance equation for a mass field mi can be written as

where Ei denotes the field energy, Hi denotes the field enthalpy, S denotes enthalpy source/sink, Q is the
heat flux through the pipe wall, and Tij models the energy transfer between fields.

Because OLGA operates with a single temperature, the energy equation reduces to

(2)

- 27 -
OLGA User manual

Flow regimes
The equations governing the flow in OLGA, outlined in Transport Equations on page 24, contain a number
of undetermined quantities, for example, friction coefficients and mass transfer terms. The treatment of
these quantities are determined by the flow, or more precisely by the flow regime. OLGA recognizes two
basic classes of flow regimes, separated and distributed flow, the former subdivided into stratified and
annular flow and the latter subdivided into dispersed bubble flow and slug flow, see Figure 5.

Figure 1 Illustrations of the flow regimes in OLGA. For clarity, gas-liquid flow is used in the
illustrations. The top left and right image illustrate the separated flow regimes and the two images
on the bottom left illustrate the distributed ones.

 Stratified flow (a): For illustration purposes, a sharp gas-liquid interface is used despite that the
presence of droplets indicate that it should be diffuse.
 Annular flow (b): For illustration purposes, a sharp gas-liquid interface is used despite that it should be
diffuse.
 Dispersed bubble flow or bubbly flow (c).
 Slug flow (d): The turbulence at the slug front expels droplets into the gas layer ahead of the slug and
entrains gas bubbles into the slug body. Behind the slug, the Taylor/Dumitrescu bubble is seen with a
liquid layer smoothly decaying back to an equilibrium state.

The following sections outline the different flow regimes as well as the transition between them.

- 28 -
The OLGA model

Stratified flow

In Figure 2, the basic geometry parameters for stratified pipe flow are illustrated. For clarity, the illustration
is limited to two-phase flow, but the extension to three-phase flow is straight forward and will only add a
second liquid layer with associated parameters.

Figure 2 Illustration of the basic geometry parameter for stratified pipe flow used in OLGA. For
clarity, only two-phase gas-liquid flow is shown. The coordinate system is defined so that z
denotes the coordinate along the pipe while y denotes the elevation inside the pipe. φ denotes the
pipe inclination relative to the gravity vector while θ is used to denote pipe inclination relative to
the horizontal. hg and hl are the center line depths for the gas and liquid layers, respectively, and Ag
and Al are the areas of the gas and liquid layers, respectively. δl denotes half the liquid wetted
angle while Sg and Sl are the wetted perimeters for gas and liquid respectively. Finally, Sgl is the
gas-liquid interfacial perimeter.

Taking a step back, considering the momentum equations as derived from the generic conservation
equation for an extensive property, equation (1) in Transport Equations on page 24 can be written as

(3)

In principle this equation accounts for the full 3D effect of a slowly evolving three phase stratified flow
where the friction and mass flux depend on the 2-dimensional cross sectional dimension. OLGA has two
different fluid mechanical models for stratified flow: the OLGA flow model and the OLGA HD flow model.
The main difference between the two relates to how the cross sectional dimension is taken into account.
The parameters illustrated in the figure above, together with,for example, fluid properties and physical
properties of the pipe itself, are input to these models. Both models include liquid droplets in the gas and
oil-water dispersions.

- 29 -
OLGA User manual

The OLGA stratified flow model

The OLGA stratified flow model covers the stratified smooth and stratified wavy flow regimes. The cross
sectional dimension is taken into account by using average bulk velocities and friction model closures.

The momentum flux terms in equation (3) are approximated by

where Uf is the average bulk velocity, and subscript f denotes the phase.

The shear stress, f, is correlated to the friction factor, λf, and the bulk velocity through the relation

where ρf is the phase density.

Closure relations are used in determination of friction factors for the different phases. The frictions are
classified as either wall frictions or interfacial frictions.

In the OLGA stratified flow model the phase wall frictions are modeled starting from a single phase
analogy, where each layer is considered as being independent of the other layers. Hence, the gas-wall
friction is computed assuming that the gas flows as single phase closed duct flow above a 'frozen' liquid
layer. The liquid-wall frictions are computed assuming that the liquid flows as single phase open pipe flow,
in which the oil layer is assumed to be flowing above a 'frozen' water layer. However, the influence from
the interfacial shear on the wall frictions are accounted for. Furthermore, entrainment and deposition of
liquid droplets in the gas layer, gas (void) in the liquid layers and oil-water dispersions are predicted by the
model and taken into account in all calculations.

The friction factor applied for laminar flow is

The flow is considered laminar for Reynold numbers below the value Remin and turbulent for Reynold
numbers above the value Remax. Interpolation is used for Reynold numbers between the Remin and Remax.
The default values for the thresholds are Remin=2300 and Remax=3000.

For turbulent flow, the model estimates the wave height based on a correlation, and determines whether
the flow regime is smooth or wavy. The turbulent friction factors are determined from correlations taking
into account the flow regime, the wave height and the ratio between frictional and gravitational forces. In
addition the influence from the interfacial shear stress between the gas and the liquid and the presence of
liquid droplets in the gas is included.

Oil-water dispersions

Dispersions are assumed to travel with the same velocity as the continuous phase. that is, we assume
local no-slip. When oil and water are present, water can be dispersed in the oil layer or oil can be
dispersed in the water layer. More details about oil-water dispersions are described in Water.

Tuning of the OLGA stratified flow model

We refer to Tuning for a complete overview of the tuning possibilities for the fluid mechanical flow models.

- 30 -
The OLGA model

The OLGA HD stratified flow model

The OLGA HD stratified flow model, OLGA HD for short, computes the frictions and mass flux terms in (3)
above using a 2-dimensional velocity distributions over the pipe cross section instead of using bulk
velocities and friction factor closures as traditional 1-dimensional models, such as the OLGA stratified flow
model. Combining the 2-dimensional velocity distributions with the 1-dimensional conservation equations
yields a 3-dimensional representation of a slowly evolving flow. The evaluation speed is kept low by
analytical integration of the cross-sectional dimension prior to run-time. All in all this gives a 3-dimensional
flow description at 1-dimensional speed.

The model can handle 1-3 fluid layers, and features a generic layer approach as shown below.

The generic layer approach yields the velocity distribution over the pipe cross section and provides all
frictions and velocity shape factors. The special cases in which the upper and lower interfaces disappear,
is handled as well. The model agrees with the log law (in turbulence theory) at the pipe walls and a
generalized log law at interfaces. The model is adapted to handle wavy as well as smooth interfaces.
Integration of the velocity distribution yields a generic expression for the wall friction τ. For two phase flow,
when the possibility of partial back flow is neglected, the wall friction for gas and liquid can be written as

The wall friction depends on the Reynolds number Re, the wall roughness ks, the layer height, h, the
interface friction τi, and the turbulence parameter K. In the single phase limit, the generic wall friction
expression reduces to the Colebrook formula.

The interfacial frictions are found by coupling the layers and requiring continuity in forces and velocities
across the interfaces. The interfacial frictions depend on bulk velocities U, densities ρ, Reynolds numbers
Re and interfacial turbulence levels K in addition to the wall roughness ks and holdup. For two-phase gas
condensate flow, the expression for the interface friction is

Although the wall and interfacial frictions are given by mechanistic models, closure relations are used for
the turbulence parameters K which represent scaled eddy viscosities. Details, including derivations of the
turbulence parameters are given in reference [9]. Here the main formulas relevant for tuning of the model
are given. For smooth interfaces the turbulence parameter used by the model is

- 31 -
OLGA User manual

For wavy interfaces the gas and liquid are treated separately. For gas the expression used is

where Si is the interface perimeter, U is the bulk velocity, A is the pipe area, θ is the pipe angle to the
horizontal and, cg is a proportionality constant. The subscript g means gas and l means liquid.

For liquid the model uses

where cl is a constant.

Oil-water dispersions

Dispersions are assumed to travel with the same velocity as the continuous phase. that is, we assume
local no-slip. Non-uniform distributions yield a profile slip (bulk slip). When oil and water are present, OLGA
HD allows for co-existence of oil dispersed in water and water dispersed in oil. Computation of dispersion
viscosity and oil-water bulk slip are further described in Water module - Emulsion on page 141.

Tuning of the OLGA HD stratified flow model

It is possible to tune the wall and interfacial frictions by manipulation of the turbulence parameters K. In
three phase flow, the model uses four turbulence parameters:

Kg - turbulence parameter for the gas-oil interface, gas side

Kh - turbulence parameter for the gas-oil interface, oil side

Kb - turbulence parameter for the oil-water interface, oil side

Ka - turbulence parameter for the oil-water interface, water side

In practice the tuning is available through specification of the four keys: TC_GHFAC, TC_HGFAC,
TC_HWFAC and TC_WHFAC in the TUNING keyword. In the OLGA HD Stratified Flow Model these keys
are multiplied with the computed values of Kg, Kh, Kb and Ka respectively.

Figure 3 Illustration of the where the resulting parameters apply.

Note: The effect of varying the tuning keys on the wall and interface frictions is not linear. For two-phase
simulations, the model only uses two parameters. If one of the phases is gas, the model uses
TC_GHFAC for the gas side and TC_HGFAC for the liquid side. If no gas is present, the model uses
TC_WHFAC for the oil side and TC_WHFAC for the water side.

- 32 -
The OLGA model

We refer to Tuning on page 45 for a complete overview of the tuning possibilities for the fluid mechanical
flow models.

Annular flow

When the flow regime is annular, the flow model assumes that a dispersed oil-water layer exists at the pipe
wall, and that gas with liquid droplets exist in the center (see Figure 4). The wetted perimeter of the liquid
layer will in this case be equal to the pipe inner circumference.

Figure 4 Illustration of the cross section for annular flow.

If the volume fraction of water is below the inversion point, the liquid layer is assumed to be oil with
dispersed water, otherwise it is assumed as water with dispersed oil. In many respects the annular flow
regime is handled similarly to the stratified regime. Also here the cross sectional dimension is
approximated by bulk velocities and friction factor closures. The wall friction factor for the liquid layer at the
wall is calculated based on whether the flow is laminar or turbulent using interpolation between the laminar
and turbulent value for Reynold numbers between Remin(default value 2300) and Remax (default value
3000). The correlation used for the friction factor for the gas-liquid interface depends on the estimated
wave height and whether the flow is smooth or wavy.

Dispersed bubble flow

Dispersed bubble flow is characterized by a liquid continuum containing gas bubbles. Typically bubble flow
will occur when the liquid superficial velocity is large compared to the gas superficial velocity.

The OLGA flow model defines

where Ug is the average gas (bubble) velocity, Ul is the average liquid velocity, SD is the distribution slip
and Ur is the relative velocity. For bubble flow, the distribution slip and the relative velocity are determined
by the model from semi-empirical correlations.

The friction factors and the gas and liquid volume fractions are computed from semi-empirical correlations
taking the pipe inclination and the fluid properties into account.

- 33 -
OLGA User manual

Slug flow

Slug flow consists of liquid slugs separated by so-called Taylor/Dumitrescu bubbles, that is, elongated gas
bubbles several pipe diameters in length. There are several mechanisms that can be the onset of slugging,
for example, terrain slugs where liquid accumulates in dips or at a riser base, start-up slugs due to liquid
accumulated in low points during, for example, a shut-in, liquid surges due to pigging, or hydrodynamic
slugging due to instabilities induced by the flow itself. Common to all these situations are rapid changes in
holdup. Figure 5 illustrates a time series measurement of the holdup at a given position in a pipeline during
hydrodynamic slugging. The sharp jumps from a low to high holdup are slug fronts and the jumps from
high to low are slug tails. It can be seen that the jump in holdup is much sharper at the front and that a
distinctive holdup profile can be seen in the tail region.

Figure 5 Measurement of the holdup at a given position of a pipeline that is in hydrodynamic


slugging. This illustrates the effective holdup. In the slug bodies the gas is mixed into the liquid,
resulting in a bubbly flow that occupies the entire pipe cross section.

The standard OLGA flow regime treats hydrodynamic slug flow through the so-called unit cell model
whenever Slug tracking is not in use. In this approach, slug flow is treated in an average manner where a
control volume with hydrodynamic slug flow is assumed to consist of an infinitely long train of identical, fully
developed slug units. A slug unit consists of a Taylor/Dumitrescu bubble followed by a liquid slug, possibly
containing a fraction of small bubbles. The slug unit cell model utilizes the other three flow regimes to
describe the slug flow as a linear combination thereof; the Taylor/Dumitrescu bubble is modeled as either
stratified or annular flow while the slug body is described using bubbly flow. The slug unit cell model
provides information on mean holdup, mean pressure drop, and the slug fraction, that is, the relationship
between the length of the liquid slug as compared to the length of the slug unit, but it is unable to produce
information about slug length distributions or variations in slug frequency.

Note: The stratified flow regime in a Taylor/Dumitrescu bubble utilizes the OLGA stratified flow model.

To address individual slugs, whether induced by terrain effects, operationally induced, or hydrodynamic,
the slug tracking model must be invoked, see Slug tracking.

Flow regime transitions

The flow regime applied is determined in two steps. First, a candidate is determined for each class of flow
regimes, that is, for separated and distributed flow.

For separated flow, the choice between stratified and annular flow is purely based on the pipe inclination.
For downward flow, annular flow is assumed if sin(φ)<0.1 where φ is the pipe angle relative to the gravity
vector, that is, a pipe inclination at -84.3° relative to the horizontal. For upward flow, annular flow is
assumed if sin(φ)<0.5, that is, a +60° pipe inclination relative to the horizontal.

- 34 -
The OLGA model

For dispersed flow, the slug fraction determined by the slug unit cell model is considered. If the slug
fraction is unity or greater bubbly flow is used, otherwise slug flow is used as flow regime candidate.

When the two flow regime candidates for separated and dispersed flow has been settled, the flow regime
is determined by applying a minimum slip criterion.

Flowline modeling
The following sections outline how hydraulic systems can be set up in OLGA. The concepts of key
constituent parts of an OLGA model, e.g., branches, pipes, and nodes, will be briefly discussed.

Branch

In OLGA, a branch, also denoted flowpath, can be viewed as a pipeline stretching between two points in
space. The branch has an inlet and an outlet, each connected to a node that defines the local boundary
conditions. The notion of a branch having an inlet and an outlet implies that the branch also has a positive
flow direction, however properties of the flow are invariant to this direction and the only effect is whether
the flow through the branch is positive or negative. The branch itself contains no information about the
properties of the pipeline it forms, it is merely a container collecting all elements that define the pipeline,
e.g., pipes defining the physical properties of the pipeline, heat transfer defining its thermal behavior, and
equipment positioned in the branch.

Note: OLGA does not account for the effects of pipe bends apart from effects due to changes in static
head. Effects of pipe bends can be accounted for by explicitly adding pressure loss coefficients at
specified positions, please refer to the LOSS keyword.

Node

In OLGA, nodes can typically be generalized into three main categories; terminal nodes, internal nodes
and junction nodes. Terminal nodes, also known as boundary nodes, are connected to a single branch to
define the boundary conditions at the end of a network. Internal nodes can be viewed as mixing volumes
used to connect two or more branches.

An internal node has its own volume which is either specified by users or by default. The mass and energy
equations are set up and solved for the volume of the internal node. Momentum is not transferred over the
node. This means the fluid is accelerated from zero velocity to the velocity at the first/last boundary of a
connecting branch. A separator or a phase split node is handled as an internal node with regards to the
conservation equations.

A junction node does not have its own mixing volume. The mixing occurs in the first/last section of the
branch that is connected to the mixing terminal of this node. There is no storage of masses and energy in
the junction node itself. The node momentum velocity is calculated and is used for momentum equations of
the connecting branches that receive flows from the junction node. This means the fluid is accelerated
from the node velocity to the velocity at the first/last boundary of a connecting branch. Stand nodes, bit
nodes, and jet pumps, are treated as junction nodes, except the node velocity is set to zero for these three
node types. Hence, momentum is not transferred for these components. Junction nodes are the preferred
choice for multiple-in and single-out, or single-in and multiple-out configurations.

If for some reason it is desirable to divide a continuous flowpath into two flowpaths (single-in and single-
out), it is recommended to use a junction node to connect them. Even when conserving momentum, the
results obtained may be slightly different from the single flowpath case in simulations with multiple phases
(gas, oil and water), due to a slight difference in the calculation method used.

- 35 -
OLGA User manual

Note: Plots in the mixing section for the junction node may show values that are not consistent with the
values obtained at the connected flowpaths. This is because of how the node calculations are
performed. In particular, volume variables such as PT and TM show values at the section center that in
reality correspond to the values at the inlet boundary of the mixing volume closest to the node. These
inconsistencies can be safely ignored.

Pipe

A pipe is a straight segment of the pipeline with a defined length and elevation. Each pipe has a set of
constant properties, such as diameter, pipe wall, and wall surface roughness, but in a branch the different
pipes may have different sets of properties. Each pipe is split into several segments denoted sections, or
control volumes, see Figure 6. These sections form the spatial discretization of the model when solving the
equations outlined in Transport Equations on page 24.

Figure 6 Illustration of pipe split into six sections. The enumeration of sections (S) and section
boundaries (B) are indicated.

Position

To place equipment and devices as well as to retrieve output at specific locations in a branch, the position
needs to be determined. There are two ways to specify a position in a branch.

1. Use the PIPE key together with the SECTION or SECTIONBOUNDARY keys to reference a specific section
or section boundary in the pipe specified.
2. Use the ABSPOSITION key to specify a location in terms of the distance from the branch inlet. This
distance is then converted into a reference to a section or section boundary depending on its use. For
example, if the location is associated with a valve, it is converted to a section boundary reference,
while for source it is converted to a section reference. For section references, the position is moved to
the center of the section. For section boundary references, the position is moved to the closest section
boundary.

The specification of a position as outlined above, can either be given directly on the associated equipment,
device, or output specification, or it can be given indirectly as a reference to a POSITION keyword. The
POSITIONkeyword provides the same functionality as outlined above with the addition that it provides a
named reference that can be reused in multiple instances.

Multiple Pipes in the Cross Section

OLGA provides several different options for modeling configurations with multiple pipes in the same cross
section. For an individual pipe, it is possible to let it represent multiple identical pipes run in parallel and it
is also possible to use so-called simple annulus flow to model flow in an annulus without considering the
flow in the inner tubing. More advanced modeling capabilities are provided through the keywords
FLUIDBUNDLE and ANNULUS where different types of pipe-in-pipe setups can be achieved.

- 36 -
The OLGA model

Network

Using branches and nodes, see Figure 7, any type of network can be connected ranging from a single
branch configuration as shown in Figure 8, through converging and diverging networks as shown in Figure
9 and Figure 10, respectively, to looped networks as shown in Figure 11. Combinations of such
configurations allow any type of network to be created.

Figure 7 The basic components used to build a pipeline network.

Figure 8 Single branch configuration with a boundary node connected at each end of the branch.

Figure 9 Converging network (assuming flow from left to right). Four boundary nodes at the inlet
side are connected to branches that merge until reaching a single boundary node on the outlet
side.

Figure 10 Diverging network (assuming flow from left to right). A single boundary nodes at the inlet
side is connected to a branch that splits repeatedly into two at the internal node before reaching
four boundary nodes on the outlet side.

Figure 11 Looped network. From a single node at the inlet, the network splits into several parallel
branches before merging back again to reach a singe terminal node at the outlet.

- 37 -
OLGA User manual

Line

A LINE is a type of FLOWPATH for which simplified one-phase calculations are performed.

A LINE also takes into consideration frictional effects and gives a pressure drop along the pipeline. Thus, it
needs fluid properties as a function of both pressure and temperature. These fluid properties are given as
usual with the PVTFILE and FLUID keys.

Note: This also applies when running component tracking (for example, CompTrack, Blackoil). Example
1-phase fluid files are provided with the Sample cases.

How to use

The implementation of a LINE in the OLGA GUI is as follows:

From the Case level right-click and choose

Add → FlowComponent → FLOWPATH.

In the property window for the FLOWPATH choose LINE=YES.

Fill in the required fields in the Property editor. For further instructions on FLOWPATH properties see the
keyword description for FLOWPATH.

LINES must be connected to nodes just as FLOWPATHS are. These nodes must also be defined as
singe-phase by selecting LINE=YES.

Note: LINES cannot be connected to multiphase nodes. LINES can form networks but these networks
must be hydrodynamically decoupled from multiphase networks.

Numerics
OLGA applies one global time-step for the time integration and there is an automatic time-step control
based on the limitation that a fluid particle should not spend less than one time step on passing through
any numerical section length of a pipe (the Courant Friedrich Levy (CFL) criterion based on the fluid
velocity). The user controls the time integration by specifying simulation period in time, time-step
parameters such as initial time step and maximum and minimum time-step values. The latter overrules the
automatic control. There is also an option for using the second-derivative of pressure as a time step
controlling criterion. Some functions in OLGA, e.g. slug-tracking, take control of the time stepping to
ensure a successful simulation.

The spatial integration is performed on a user-defined grid. There are tools available to facilitate the
gridding. There are no formal limitations on the numerical section lengths, but it is considered good
practice to keep all neighbor section length ratios between 0.5 and 2:

0.5 ≤ Dxi/Dxi + 1 ≤ 2 for all i

Additionally it is recommended that each pipe should have at least two sections.

Due to the numerical solution scheme, OLGA is particularly well suited for simulating rather slow mass flow
transients. This is important for the simulation of long transport lines and thermal calculations, where
typical simulation times in the range of hours to several days, and sometimes years, will require long time
steps, to obtain efficient use of the computer.

OLGA is also being used successfully for fast transients such as water hammer and pressure surges in
general. Certain precautions with regards to spatial grid and time-stepping may be needed to keep the
numerical error within acceptable limits.

- 38 -
The OLGA model

The de-coupling of temperature from pressure would normally give a pressure wave propagation velocity
in gas which would be about 15% too low. However, a quasi implicit correction of temperature reduces this
error considerably.

Critical flow calculations are performed in the OLGA valve model, only. A valve with cross section equal to
the pipe should then be positioned on e.g. a pipe outlet if choked flow is expected.

Temperature
OLGA is particularly well suited for sophisticated thermal simulations. Because OLGA is one-dimensional
(calculates along the pipe axis) any 2 and 3-dimensional effects must be modeled explicitly. The basic
OLGA thermal model calculates the inner wall heat transfer coefficient. The built-in correlations are valid
for natural and forced convection and also for the transition between them. Flow pattern is accounted for.
The user may specify pipe walls with material properties, including emissivity to account for radiation, and
must give the ambient properties, that is, temperature and heat transfer coefficient. Based on this the fluid
temperature is calculated.

Special features such as Annulus, Solid- and Fluid bundles make it possible to simulate very complex
structures of pipe-in-pipe and parallel pipes within structures of various solid materials. Taking into account
that temperature is calculated along the pipes one obtains a combination of two-dimensional convective
heat transfer within 3-dimensional heat conducting structures.

Solid bundle cross section of 4 vertical tubes within rock – neighbor tubes are 2.5 m apart. The black "line"
is a temperature iso-line. You clearly see how the area between the tubes is subject to inter-tube heating.

Initial conditions
The requirement for initial conditions is a fundamental difference between a transient and a steady state
model, for example, the results of a steady state calculation may serve as the initial condition (at t = 0 ) for
a transient simulation.

With OLGA the user decides, and later specifies in the input, whether the simulation is to start from a user
defined condition (for instance a specific shut-in condition), or from a steady state multiphase flowing
situation calculated by the program. The steady state pre-processor in OLGA can be used to provide good
initial values for most production situations.

- 39 -
OLGA User manual

In addition, the user may specify the initial condition in detail, for example for a shut-in system, by defining
the initial values for pressures, temperatures, mass flow and gas fractions. Tools for interpolation are
available, for filling in the initial values in all numerical sections of the system.

Finally, the restart capability may be used to start a simulation from conditions saved during a previous
simulation.

Steady state preprocessor


The steady state preprocessor in OLGA computes a steady state solution for a pipeline or an entire flow
network. Steady state pressures, temperatures, mass flows, liquid hold-ups and flow regimes are
calculated along the pipelines.

The steady state preprocessor can be used to:

1. Eliminate the need for user-given initial conditions.


2. Get a consistent initial state as a basis for dynamic simulations.
3. Perform screening studies.

The steady state preprocessor can be used for flow networks with any combination of boundary conditions
at inlets and outlets. Both merging and diverging networks can be calculated. Except for displacement
pumps, Bornemann pumps, and pump battery, the steady state preprocessor incorporates the effect of
process equipment. For PID controllers, the bias settings are used as the controller outputs.

The point model used by the steady state preprocessor can be changed using extensions (see OLGA
Extensibility).

Model description

The steady state preprocessor finds a consistent solution for flow networks by iteration. Networks where all
inlet flows and outlet pressures are known are solved by the following sequence of computations:

1. Phase transitions are computed using old values of pressures and temperatures. The combination of
phase transition and inlet flows gives consistent flow rates along all the pipelines in the entire network.
2. Using the newly computed flows, old temperatures, and the pressure boundary conditions at the
outlet, new pressures are computed along all the pipelines in the network. The point model OLGAS
THREE-PHASE is used in this step.
3. The temperatures along all the network components are computed.

Iteration on the sequence (1) to (3) is performed until the change between two iterates is smaller than a
tolerance. If the inlet flows and/or outlet pressures are not known, an outer iteration is needed in addition
to the one shown above. In this iteration the initial guesses for inlet flows/outlet pressures are refined until
the residuals are smaller than a given tolerance.

How to use

To activate the steady state preprocessor from the OLGA GUI do the following:

In the Property editor for OPTIONS:

 Choose STEADYSTATE=ON to get a full steady state computation including calculations of


temperatures.
 Choose STEADYSTATE=NOTEMP to avoid the temperature calculation. In this case, initial
temperature profiles must be given for all the flow components in the network.

The latter option can be useful if the preprocessor has problems finding a solution. This implies that the
simulation must be run dynamically for some time to achieve a true thermal steady state solution.

- 40 -
The OLGA model

The steady state preprocessor can sometimes fail to find a solution if flows are negative, that is, if the flow
goes from the outlet to the inlet of a pipeline. For such pipelines you aretherefore recommended to set
INIFLOWDIR=NEGATIVE in the BRANCH input group.

To do some fast studies (screening studies), you can use the steady state preprocessor results. In this
case, use STEADYSTATE = ON under OPTIONS and STARTTIME equal ENDTIME under
INTEGRATION.

If input parameters (boundary conditions, valve openings, and so on) are given as time series, the steady
state preprocessor uses the values at the start time.

Notes

The solution computed by the steady state preprocessor and the solution obtained when simulation with
the dynamic solver until a steady state is achieved might not be equal. This is mainly because of the
following reasons:

1. For unstable systems (for example, slugging cases) the steady state preprocessor can find a solution
that differs from the average value in the transient solution because there is no truly steady-state
condition.
2. The steady state preprocessor has some small residual errors that are removed by the transient
simulation. In some sensitive cases, this can cause a difference in pressure, temperature and hold-up
profiles.

Therefore, if the slug flow regime is detected in the simulation, you are recommended to perform a
dynamic simulation with the slug tracking model.

The steady state preprocessor is not as robust as the dynamic OLGA. This is particularly the case for
simulations with pressure or well (productivity index) as inlet boundary conditions, or negative sources. In
such cases, if the preprocessor does not converge to a reliable solution, the preprocessor must be turned
OFF (STEADYSTATE=OFF under OPTIONS), and INITIALCONDITIONS must be applied to all the
FLOWPATHS instead.

The steady state preprocessor cannot handle counter-current flow (such as positive gas flow and negative
liquid flow).

The steady state preprocessor cannot handle zero flow in the pipeline, therefore it should not be used with
closed valves in the flowpath or with mass sources that sum up to zero flow rate at start time.

For flow networks with one or more separators, the steady state preprocessor uses a simplified approach.
The separator is treated as a simple node with mixture properties and the phase flow fractions of any
phase are assumed to be equal for any of the outlets of a separator. This approach can lead to
discontinuities between the steady state and dynamic solution.

The steady state preprocessor can be run with wax deposition or hydrate kinetics activated, but the
preprocessor does not consider the wax phase or hydrate formation.

The point model used by the steady-state preprocessor can be changed using extensions. Installed
extensions of this type are available in the key SSFLOWMODEL. If extensions are not used, the same
model as the FLOWMODEL key is used.

- 41 -
OLGA User manual

2nd order scheme


Mass equations can be solved with two different schemes in OLGA. The default is a 1st order scheme
(upwind implicit) and the alternative is a 2nd order Total Variation Diminishing (TVD) scheme.

The 1st order scheme is more robust and should be the preferred choice in most situations.

The 2nd order scheme has less numerical diffusion and therefore keeps holdup fronts better.

The 2nd order scheme for mass equations is to be used when it is important to track relatively sharp
holdup fronts. Examples are:

 Oil-Water fronts
 Inhibitor fronts
 Gas-Oil fronts

Model description

The 2nd order method used for the mass equations is a combination of different numerical schemes to get
a stable method that satisfies the TVD (total variation diminishing) condition. For smooth gradients the
method is 2nd order while for non-smooth flow (shocks) the method reduces to 1st order upstream. The
smoothness of the data is measured on the control volume boundary like this

Where m is the mass and θ is the measure of smoothness. If θ < 0 the method reduces to first order
upstream and if θ > 0 the method uses 2nd order methods. In the 2nd order region the numerical scheme
is determined based on a 2nd order limiter. In OLGA the limiter known as the van Leer limiter is chosen.

Simulation differences between the 1st order and 2nd order schemes

Figure 12 Profile plot of an oil–water front showing the differences between the two schemes. The
number of sections in the pipeline is 50, 100 and 500, respectively.

- 42 -
The OLGA model

Figure 13 Profile plots of a gas–oil front. The number of sections in the pipeline is 50, 100, 200, 500
and 1000, respectively.

Figure 14 Trend plot showing the hold-up at the top of a riser. The number of sections in the riser
is 15, 30 and 60, respectively.

- 43 -
OLGA User manual

Figure 15 The above figures show profile plots of an oil–water front. Inside the area filled with
water, there are three areas containing MEG.

- 44 -
The OLGA model

How to use

The 2nd order scheme for the mass equations is activated by setting MASSEQSCHEME=2NDORDER in
the OPTIONS keyword.

The 1st order scheme diffusive behavior reduces unphysical numerical instabilities in the simulation if they
occur. For simulations where instabilities are observed you are not recommended to use the 2nd order
scheme. For such problems the 2nd order scheme only make matters worse because it enhances the
numerical oscillations.

Because the 2nd order method is only implemented for the mass transport equations, the final result from
the equation set does not converge to 2nd order accuracy. The improvement in the result also differs
depending on which physical phenomena are of interest. For example, for simulations where pressure
waves or temperature waves are of interest, the improvement from the 2nd order method is small. For
simulations where propagation of holdup fronts is of interest, the improvement can be significant.

The 2nd order method only works if the CFL criterion is fulfilled. Therefore, it is not possible to violate the
CFL criterion by increasing MINDT when the 2nd order option is set.

Time step control


The DTCONTROL keyword makes it possible to adjust the time step according to different criteria. It
should be applied with care as it may affect the speed of the simulations.

DTCONTROL can be applied at Case level, for a flowpath and for a node. Keys available in each of these
three keywords are different, although some are present in more than one.

The keys can be categorized as either switches (accepting ON/OFF values) or tuning factors (accepting
values from 0 to 1). When a switch is OFF, the corresponding tuning factor is ignored. The smaller the
value of the tuning factor, the stricter the constraint set for the time step.

For individual flowpaths the tuning factors can be coupled to a controller. This means that the time step
controls can be modified and turned on and off at any time during the simulation. The main purpose of this
is to allow very careful time step control only when needed to not increase the run time more than
necessary. An example is turning on the rheology control only during start-up of pumps or sources when
the fluid velocity changes from very low (or zero) to a larger value.

Tuning
The TUNING keyword makes it possible to tune the fluid properties, friction, phase mass transfer and
entrainment of liquid droplets into the gas phase.

The TUNING keyword can be used for adjusting the OLGA model to specific sets of measured data or for
sensitivity studies. TUNING should be applied with great care, as it might cause the validation and
verification of the OLGA model to no longer be valid.

License requirements

The Tuning module requires a separate license.

Model description

The tuning coefficients are multiplied by the related values. These are either calculated by OLGA or set in
the input file. This depends on whether the tuned parameter is dynamically calculated by OLGA or case
invariant, for example, geometry information.

- 45 -
OLGA User manual

How to use

Specify the desired tuning coefficients and where they apply.

The tuning coefficients AREA, DIAMETER and ROUGHNESS can only be specified for an entire pipe or
an entire branch. It is not possible to specify these coefficients using the section key.

The keys POSITION, PIPE and SECTION will be processed in a nested manner. The number of entries
must either be one or a multiple of the listed number of combinations of pipes, sections or positions.

Fluids and PVT


There are four main methods for describing fluid properties (PVT) in OLGA:

 Lookup table: Fluid properties tabulated at given pressures and temperatures are read from a PVT-
file. The least computational demanding method. Suitable when the fluid composition does not change
much along the flowpaths or over time. See PVT lookup table on page 47 for more information.
 Compositional Tracking: The fluid properties are calculated using a full compositional approach. The
most computational demanding method. Should be considered when significant changes in the
composition are expected. See Compositional tracking on page 58 for more information.
 Blackoil: The fluid properties are calculated based on blackoil correlations. Useful when limited
information about the production fluid is available. See Blackoil on page 49 for more information.
 Single component: Handles single component fluids crossing the saturation line. Should be used for
fluids consisting of only one component. See Single component on page 65 for more information.

Special fluids and solids


The PVT methods can be combined with several different models to account for different types of fluids
and solids. See the compatibility table below for the full list of fluid and solids types available in OLGA and
for which PVT methods they can be used. Reservoir fluid refers to gas-oil-water fluids with Newtonian
rheology and are covered by all the PVT methods except Single component. For information about fluids
and solids (such as mud, particles and wax) that are covered by additional models, see Special fluids and
solids on page 161.

Table 1 Compatibility between fluid/solid models and PVT methods

- 46 -
The OLGA model

PVT models
PVT lookup table

The lookup table file is based on a PVT analysis/calculation of thermodynamic properties of a fluid with
constant total composition. The file name extension convention for this type of file is .tab.

A table file is normally generated by using a fluid property package with a specialized OLGA table file
generator.

A PVT lookup table file contains tables for varying pressure and temperature for basic fluid properties for
gas and liquid, and optionally water as a separate phase.

When applying the PVT lookup tables, OLGA reads the table files and interpolates in the property tables to
obtain fluid and related phase properties for specific pressures and temperatures at every segment along a
pipeline.

The required properties are listed in the description of the data file formats referenced below.

There are two types of table file formats which are accepted by OLGA: Fixed format and keyword-based
format.

The keyword-based format allows for some additional data that may be useful in some cases: The
composition is given and standard conditions properties are available separately, allowing a P-T table
range not including standard conditions, even if standard condition flow rates and phase ratios are given at
standard conditions in input and/or output.

Note: When more than one fluid properties file is used, they all have to have the same format.

The following sections describe how to use PVT lookup table files, model details and format of the lookup
table files for phase-related fluid properties:

Model description

It is assumed that the gas properties also include any water vapor contributions.

In the case where separate liquid/free water properties are given, the properties of the liquid phase are
interpreted as the properties of an oil/hydrocarbon phase.

The partial derivatives of gas and liquid densities with respect to pressure and temperature are required as
separate tables. This is because the partial derivatives should be those of the isolated phase, gas or liquid,
at the actual thermodynamic conditions. These cannot be obtained from the densities by interpolation in
the tables because the partial derivatives in that case would also include phase mass transfer/changes in
phase compositions.

OLGA has an internal water property package that can be used for gas-oil-water cases if there are no
water properties in the lookup table file. This option has the limitation that no water is present in the gas
phase and that water vaporization and condensation is not taken into account.

It is possible to define equidistant and non-equidistant regular and irregular pressure-temperature grids,
depending on file format.

A schematic representation of the pressure (P)-temperature (T) grid and indication of the two-phase region
in an equidistant table is given in Figure 16.

- 47 -
OLGA User manual

Figure 16 A schematic representation of a temperature-pressure equidistant table.

All pressure- and temperature-dependent properties will be given at such points in the P-T plane.
Properties at a given pressure and temperature are then calculated in OLGA by using bilinear interpolation
in the tables.

For the gas mass fraction, a more refined interpolation is used close to the two-phase envelope, utilizing
the bubble point pressures given in the file. For pressures above the bubble point pressure, the equilibrium
gas mass fraction is set to zero.

When generating a PVT lookup-table for OLGA, it is important to consider the following:

 When defining the pressure and temperature ranges for the lookup tables, it is important to include the
expected pressures and temperatures for the whole pipeline system modeled in OLGA. It is beneficial,
however, to obtain as much detail as possible within the pressure and temperature range. An
excessively wide range may result in lower accuracy for properties that varies non-linearly and could
thus give less accurate simulations.
 It is important to check the property tables for unphysical discontinuities or strange tendencies in the
properties as functions of P and T. This can be done by the plotting facility in the OLGA GUI.
 Check also that the gas and liquid fractions are properly set for the single-phase pressure-temperature
regions. Gas mass fraction should be zero to the left of the critical temperature and one to the right.
 Adding water to a composition in your PVT calculation tool: If there is free water in the reservoir
formation, the added water should be sufficient to saturate the gas phase. This may be particularly
important for gas wells.
 The properties of a phase (gas, oil, free water) which at thermodynamic equilibrium should not be
present for certain conditions, may still be required by OLGA in some situations. This issue is
discussed in more detail in the section PVT properties for non-existing phase.

- 48 -
The OLGA model

The syntax details for the two PVT file formats can be found in the following sections:

 Fixed format lookup table file


 In the case of activating the complex fluid module for multiphase flow with non-Newtonian liquid
rheology, additional input may be given in the fixed format file. See Complex fluid module for details.
 Keyword based lookup table file

How to use

The PVT lookup table files must be generated according to the rules given for the two formats defined for
OLGA:

 Fixed format, see Fixed format lookup table file for details.
 In the case of activating the complex fluid module for multiphase flow with non-Newtonian liquid
rheology, additional input may be given in the fixed format file. See the following section for details:
Complex fluid module.
 Keyword based format, see Keyword based lookup table file for details.

To activate the option of using lookup table files, the following input keys must be set:

 FILES PVTFILE must be set to the PVT lookup table files.


 OPTIONS COMPOSITIONAL must be set to OFF, MEG, MEOH or ETOH
 BRANCH FLUID must be set by using one of the following options:
 Keyword-based PVT file format:
 The relevant fluid label as defined in the lookup table file.
 Fixed format PVT file format:
 Number of the fluid as defined in the PVT file, numbering as sequence in file and sequence
of files, if multiple PVT files are defined.
 Label of fluid if defined in the PVT file.
 For keyword NODE of type mass, pressure, internal, separator or phase split, FLUID must be set for
the specific node according to the same rules as for branch.

Blackoil

Blackoil modeling enables you to make a compositional model with a minimum of input. Compared to
Compositional Tracking, the Blackoil model is faster in terms of cpu cycles, and it treats shut-in cases
more accurately than the standard PVT table option.

The module makes it possible to perform calculations with a minimum of information about the production
fluids. Details about the fluid composition are not required for a blackoil simulation; specific gravity of gas
and oil and the gas–oil ratio (GOR) at standard conditions are the only necessary data. If water is present,
also the specific gravity of water must be input. Note that no fluid table is needed.

A blackoil feed can consist of one gas, one oil and one water component. The gas component consists of
hydrocarbon gas, and optionally H2S, CO2 and N2 components. It is possible to specify more than one
blackoil feed, and for such a mixture each component of each feed is tracked, c.f. the example network in
Figure 17 below. Inside the OLGA engine, the Blackoil model uses the framework of the Compositional
Tracking module to track the components through the pipelines.

Water properties are calculated by the standard OLGA routines. The physical properties of gas and oil are
calculated from correlations belonging to a specific blackoil model –you can choose between four different
blackoil correlations. To find the properties at a position in a pipe, the correlations use the pressure and the
temperature, as well as the specific gravities of gas, oil and water, and the GOR, at that position. In the
case of multiple feeds, the specific gravities and the GOR are mixture values. The mixture is the average
taken over the constituting blackoils weighted by volume at standard conditions.

- 49 -
OLGA User manual

Figure 17 Network case with several blackoil fluids (feeds) specified. Each component is tracked
through the network. The fluid properties are calculated based on the fluid mixture.

Due to the limited amount of input, the Blackoil model can be a good choice when little is known about the
production fluids. For instance, during planning or design you can use specific gravities and a GOR typical
of the geographical area. Later when production is established, you can insert the actual values, and
possibly make use of the module’s tuning mechanism to further improve the match between observations
and the predictions made by OLGA.

As mentioned above, the Blackoil model is related to the Compositional Tracking module, and might be
preferred as the computationally faster alternative. This is because blackoil models are intrinsically crude,
and cannot provide the detailed analyses of Compositional Tracking. It is, however, possible to include the
effects of MEG in the density calculations by specifying a larger specific gravity for water. This method
should also be used if salts are present.

Model description

The following two assumptions are made for the Blackoil model:

1. An oil component cannot exist as gas in the gas phase. As a consequence, the module is not suited
for studying gas condensate systems. However, this assumption does not exclude the dispersion of oil
and water, the existence of water/oil droplets in the gas or gas bubbles in the liquids.
2. Gas can dissolve in oil.

Blackoil correlations

To calculate the solution gas-oil ratio RSGO and the bubble point pressure Pb, four different correlations
are available in OLGA. They are based on fluids from different areas, and have recommendation for use
as mentioned in Table 2 The default correlation is Lasater.

- 50 -
The OLGA model

Table 2 Blackoil correlations and their recommended usage.

Correlation API Description

Standing [23] API < 15 Based on fluids from California

Lasater [19] API > 15 Based on fluids from Canada, U.S. and South America

Vazquez & Beggs [37] API > 15 Similar to Lasater

Glasø [12] API > 15 Based on fluids from the North Sea

These correlations can be used to calculate the bubble-point pressure, Pb, for a given GOR or an
equilibrium value of RSGO (< GOR) at any pressure below Pb. If measured values for GOR and the bubble
point Pb(Tb) are available, you are recommended to tune the correlations for RSGO(P,T) and Pb(T). In the
following, the four sets of correlations are presented with their tuning coefficients.

Lasater correlation

The basis for the Lasater correlation is the following relationships:

with

, and

(4)

For the purpose of calculating the RSGO, the above equations are inverted with GOR replaced by RSGO,
and Pb replaced with the actual pressure P. That is, find yg from equation (4) with P instead of Pb, and invert
equation (4) to get RSGO, viz.:

(5)

Note: If P > Pb, then RSGO = GOR.

In these equations we have that

API = 141.5 / γo - 131.5

yg = mole fraction of gas

yo = mole fraction of oil

γg = specific gravity of gas

γo = specific gravity of oil

- 51 -
OLGA User manual

Mo = effective molecular weight of tank oil

GOR = gas-oil ratio

f1(yg) = tabulated function of yg

f2(API) = tabulated function of API

CPb = tuning coefficient (default = 1)

CRSGO = tuning coefficient (default = 1)

Pressure must be given with a unit of psia, temperature in °R (degrees Rankine), and GOR and RSGO in
scf/STBO.

Standing correlation

The bubble-point pressure at a given GOR is given by

where

(6)

Symbols have the same meanings as for the Lasater correlation.

To calculate RSGO, replace Pb with the actual pressure P, and replace GOR with RSGO, and invert
equation (6) to obtain

If the pressure is above the bubble-point pressure, then RSGO = GOR.

With the Standing correlation, pressure is measured in psia, and temperature is measured in °F.

Vazques & Beggs correlation

For API < 30:

, and

For API > 30:

, and

If P > Pb, then RSGO = GOR.

- 52 -
The OLGA model

Symbols have the same meanings as for the Lasater correlation. Units for pressure and temperature are
psia and R, respectively.

Glasø correlations

For known GOR, the bubble-point pressure is given implicitly by

and

Substitute RSGO for GOR and P for Pb to obtain

If P > Pb, then RSGO = GOR.

Symbols have the same meanings as for the Lasater correlation. Units for pressure and temperature are
psia and °F, respectively.

Oil and gas density


The oil density depends on pressure, temperature and the amount of gas dissolved in oil. At pressures
below the bubble-point the procedure is as follows.

First, the oil volume formation factor BO is calculated, see [23],

(7)

where

Now, the oil density is calculated as

The density at the bubble-point, ρob, is given by the above equations with RSGO = GOR. At pressures
above the bubble-point, the compressibility is taken into account, and the density is calculated by

co is the isothermal compressibility of undersaturated oil.

Units for equations (7) to : Temperature is given in °F, pressures in psia. BO is given in bbl/STB.

The basis for calculating the gas density is the compressibility equation of state, viz.:

When other variables have units of psia, ft3, lbm, moles and 0R, the gas constant R has the value 10.72.
Now, the gas volume formation factor, BG, can be expressed as

- 53 -
OLGA User manual

The gas density is obtained from

where ρgsc = 0.0764 γg. (The value 0.0764 is the density of air at standard conditions expressed as
lbm/ft3). γg denotes specific gravity of gas at standard conditions.

The gas compressibility z expresses the deviation of the real gas volume from the ideal gas behavior. The
assumption that real gas mixtures will have the same z-factor for the same values of pseudoreduced
pressure Ppr and temperature Tpr, is used to determine the value of z. An algebraic relationship, cf. [23],
has been developed, and this relates z to Ppr and Tpr. The implicit set of equations that emerges, requires
an iterative solution procedure. In order for OLGA to save cpu cycles, the z-values have been pre-
computed, and tabulated as a function of Ppr and Tpr.

Values for Tpr and Ppr are found from the pseudocritical temperature Tpc and the pseudocritical pressure Ppc:

Ppr = P/Ppc and Tpr = T/Tpc.

Empirical equations exist for Ppc and Tpc, [23], and we use them:

, and

As already mentioned, the units are psia and °R.

The presence of CO2 and H2S is accounted for by correcting the pseudocritical values Ppc and Tpc.
Nitrogen, N2, is assumed to have no significant effect on the z-factor. The corrected values become

and

where

where y is mole-fraction.

Oil and gas viscosity


Dead oil viscosity is calculated using the following equation:

- 54 -
The OLGA model

Now, the live oil viscosity μo is found by modifying the dead oil viscosity according to the gas dissolved in
the oil, that is,

where

, and

Note: Covisc is a tuning coefficient; its default value is 1.

If the pressure is above the bubble pressure Pb, the above expression corresponds to the viscosity at the
bubble point μob, where RSGO = GOR. For these pressures the viscosity is modified, viz.:

, with

Units: Pressures are measured in psia, temperatures in °F, viscosities in cp and RSGO in scf/STB.

The gas viscosity is calculated, according to [19], from the correlation

with

where Ma is the apparent molecular weight)

Units: ρg given in g/cm3; T in °R; μg in pc.

Liquid viscosity is calculated as for the standard PVT table option with oil viscosity as above.

- 55 -
OLGA User manual

Surface tension

The expression for the gas-oil surface tension needs to be simple without the information about the fluid
composition. Given values of API, T (°R) and P (psia), we can use

for dead oil, and then correct the value for saturated oil at saturation pressure:

For undersaturated oil, the corresponding saturation pressure for P(T,RS) is used. The unit of a surface
tension σ is dynes/cm (1 dyne/cm = 0.001 N/m).

The expression used for the gas-water surface tension is

For oil-water surface tension empirical data are scarce, and a preliminary relation is used:

with default coefficients A1 = 30.0, A2 = 0.0 and A3 = 0.0.

The above correlations are based on data from [17] and [1].

Thermodynamic properties of Blackoil

Specific heat of gas

The specific heat or heat capacity of gas cpg is tabulated as a function of temperature and specific gravity
of gas. The data are taken from [17], Figure 4-49. It is assumed that the specific heat of a gas mixture
corresponds to the specific heat of a pure gas with the same specific gravity.

Specific heat of oil

The specific heat of oil, cpl, can be calculated using the following equation, cf. [5]:

where

γo = specific gravity of oil

T = temperature in °C

The unit of cpl is kJ/kg °C.

Enthalpy of Gas

The enthalpy of gas, Hg is calculated from the equation

(8)

- 56 -
The OLGA model

The term (dH/dP)T can be expressed as

From tabulated values for cpg and z, a table for Hg can be generated; 0 °C and 1 bara is used as the zero
point. The compressibility factor z is tabulated as a function of Tpr and Ppr. Thus the term (dH/dP)TdP in
equation (8) can be expressed in terms of Tpr and Ppr:

Enthalpy of oil

The enthalpy of oil Ho is calculated directly by integrating cpo from zero to the actual temperature.
Modifications of Ho at elevated pressures are ignored.

Enthalpy of gas dissolved in oil

The latent heat for gas dissolved in oil ΔHgo is used to calculate the enthalpy of liquefied gas Hgo. We have

The term ΔHgo can be approximated by a simple correlation from [5]. First, the latent heat is estimated at 1
bara.

where Tabp is the atmospheric boiling point measured in K. The unit of the latent heat thus becomes kJ/kg.

Second, the latent heat is extrapolated for pressures above 1 bara, according to

Tabp is tabulated as a function of oil specific gravity and molecular weight, cf. [5], see Table 2 below.

Table 2: Tabp as a function of specific gravity of oil and molecular weight.

Atmospheric boiling point, Tabp (°C)

M 70 80 90 100 120 140 160 180 200 220

Spec grav. Tabp

0.6 27 42 60 79 104 128 146 165 190 205

0.9 66 93 116 132 165 202 222 252 274 294

- 57 -
OLGA User manual

Thermal conductivity

Data for the thermal conductivity of gas as a function of M and T is plotted in [17]. A function has been
developed that gives a reasonable approximation to these data, and this function is used by OLGA.

Little data are available for oil, and so a simple linear function is used, viz.:

The default values for the coefficients are: A=0.1385 W/m°C, and B=0.5*10 -4 W/m°C2.

Blackoil tuning

It is possible to tune the correlations for gas dissolved in oil RSGO, bubble pressure Pb and oil viscosity to
measured data.

Tuning of the correlations use data for a single fluid or a mixture. If there are several blackoil feeds (for
example, a network case), you must either tune to one of the fluids or to a mixture of the fluids. If the
measurements are from a separator, the data available will typically be for the mixture. Note that the tuned
correlations are used for the whole network. See the description of the correlations for how the tuned
parameters enter the calculations.

Tuning is specified through the BLACKOILOPTIONS keyword.

Converting to mass flow rate

When converting the volume flow rate at the standard conditions to the mass flow rate, OLGA first does a
recombination to saturate the gas phase with the water component. Secondly OLGA calculates the
densities of the gas, oil and water phase from the resulting composition and the densities given in
BLACKOILCOMPONENT by using the blackoil correlation. These densities are then combined with the
volumetric fractions specified in BLACKOILFEED to calculate the in-situ mass flow. When converting the
in-situ mass flow rates to the volumetric flow rate at standard conditions for output purposes, the phase-
fractions and densities at standard conditions are again calculated from the in-situ composition using the
blackoil correlations. These are then used to calculate the volumetric flows at standard condition.

Note: The Blackoil model has the same limitations to its usability as the Compositional Tracking module.

How to use

Set the following keywords to use the Blackoil model:

 OPTIONS to set COMPOSITIONAL = BLACKOIL


 BLACKOILOPTIONS to set GORMODEL (optional)
 BLACKOILCOMPONENT to set the properties of the gas, oil and/or water components
 BLACKOILFEED to combine the gas/oil/water blackoil components into feeds, and specify GOR and
WATERCUT.
 NODE/SOURCE/WELL to set flow rates or volume fractions of the feeds to enter the pipeline system
 The steady state pre-processor can be used with the Blackoil model. If one chooses to start from
INITIALCONDITIONS, the initial volume fractions for the feeds must be given.

Compositional tracking

Compositional tracking combines the powerful multiphase capabilities in OLGA with customized
calculations of fluid properties and mass transfer. The PVT package Multiflash, developed by KBC
Infochem, is used for thermodynamic equilibrium calculations on the fluid.

- 58 -
The OLGA model

With compositional tracking, every fluid component is accounted for throughout the calculation, enabling
simulation of scenarios such as start-up and blowdown with a high level of detail and accuracy. The extra
level of detail given by compositional tracking makes a case more CPU-intensive as compared to the
table-based approach, and, thus the simulation time will increase. Note that increasing the number of
components in a simulation will increase the simulation time.

OLGA simulations, using fluid tables, will in many cases give satisfactorily accurate results. Typically, this
is when the fluid does not change much along flowpaths or at boundaries in time. Typical cases where
compositional effects may have influence are:

 Networks with different fluids


 Changes in composition at boundaries
 Blowdown
 Gas injection / gas lift
 Start-up
 Shut-in and restart

License requirements

The Compositional Tracking module requires a separate OLGA license and a separate license for the PVT
package used.

Model description

In OLGA simulations where the fluid is described by fluid tables, thermodynamic phase equilibrium and
fluid properties are calculated for a predefined composition. This composition is assumed to be constant
throughout the whole simulation. Different compositions can be used for each flowpath in a system, but
within each of these flowpaths the composition is constant in time.

In reality the composition can vary along the pipeline due to slip effects (velocity differences between
phases), interphasial mass transfer, merging network with different fluids, elevated geometry, and changes
in fluid composition at the inlet. In the Compositional Tracking model the mass equations are solved for
each component (for example, H2O, C1, C14-C22) in each phase (for example, gas, liquid droplets, bulk
hydrocarbon liquid and bulk water). Thus, the model keeps track of the changes in composition in both
time and space, and ensures a more accurate fluid description compared with using fluid tables.

PVT package

Using the in-situ composition, pressure and temperature, the thermodynamic phase equilibrium and fluid
properties are then calculated in all sections continuously during the simulation. Moreover, the derivatives
of mole fractions with respect to the in-situ pressure and temperature at phase equilibrium are also
delivered by the package. Based on these results, the mass transfer between the phases needed for the
mixture to be at equilibrium is calculated.

These thermodynamic calculations are performed by a third-party PVT package; the Multiflash from
Infochem/KBC.

Physical limits for the temperature and pressure used in the PVT calculations are introduced and cannot
be changed by the user (as it can with fluid tables). The temperature range is from -200 to 500 °C and the
pressure range is from 0.05 to 2000 bara. If the temperature or pressure goes out of range, they are reset
to the upper or lower limits. These reset values are used in the PVT calculations only and are not fed back
to the overall calculations of temperature and pressure.

The thermodynamic phase-equilibrium and fluid property calculations are based on the methods available
in the PVT package. Generally the models, that are available in the standalone software, may be specified
in the fluid file.

- 59 -
OLGA User manual

Note: Some equations of state and fluid property methods can increase the simulation time significantly.
This must be considered when choosing a fluid description.

Flash algorithms

The flash-algorithm used in the PVT package can be specified in the key FLASHTYPE. You can choose
from three models:

 TWOPHASE
 SIMPLETHREEPHASE
 FULLTHREEPHASE

FLASHTYPE = TWOPHASEFLASH treats water as an inert component, if water is present. Initially, a two-
phase flash is carried out for the hydrocarbon components. Then the water components is put in the gas or
water phase, depending if the water-phase should be gas or not.

Note: Hydrate inhibitors such as MeOH and glycols will also be inert, and placed in the same phase as
water. Also the classical mixing rule is used for all component pairs for the two-phase flash calculation.

This is the only option allowed when performing simulations with fluids consisting purely of non-aqueous
components. It can also be used with fluids containing aqueous components when high simulation speed
is wanted. However, if the amount of free water is believed to have a significant impact on the conclusions,
this options should be used with caution.

FLASHTYPE = SIMPLETHREEPHASE means that the water components are treated as an inert phase
initially. A two-phase flash is performed for the hydrocarbon components. Then aqueous components are
added to the hydrocarbon phases, and hydrocarbon components and inorganic gas components are
added to the aqueous phase until the fugacity is the same for all the phases.

Note: The classical mixing rule is used for all component pairs throughout the calculation.

This approach involves two simplifications relative to full three phase flash.

 The change in phase equilibrium due to dissolution of components in a phase is not taken into
account, that is, the result is not rigorous equilibrium but approximated equilibrium.
 A simplified model for the solubility of hydrocarbon components and inorganic gasses in the aqueous
phase and vice versa is used.

This is the default option when at least one aqueous component is defined in the feed file, and is expected
to provide accurate results for most simulations involving fluids consisting of both hydrocarbons and
aqueous components. Although not as severe, SIMPLETHREEPHASE suffers from the same defects as
TWOPHASE compared to FULLTHREEPHASE. However, if the amount of free water is believed to have a
significant impact on the conclusions, this option should be used with care.

Note: Simplified three phase is the recommended option for performing screening/approximate
simulations where high accuracy may not be required. This is because the full three phase option is
significantly slower than the simplified three phase option.

FLASHTYPE = FULLTHREEPHASE means that a full three-phase flash is performed for the total
composition. The fugacity of all the components in all the phases are the same. All the phases are in
rigorous equilibrium, that is, any component can dissolve in any phase. Classical mixing rule is used for
component pairs not involving aqueous components while the Huron-Vidal mixing rule is used for all
component pairs involving aqueous components.

- 60 -
The OLGA model

This option is significantly slower than the simplified three phase flash option. It is recommended as an
option to make a final check of whether the accuracy obtained using the simplified three phase flash is
adequate for the given case. Full three phase flash is also recommended if

 Hydrate control is important and MeOH or another component more volatile than H2O is used as
inhibitor.
 Tracking of hydrocarbons and inorganic gasses dissolved in the aqueous phase is important.
 Tracking of aqueous components dissolved in a hydrocarbon liquid phase or a dense gas phase is
important.

Viscosity correlations

There are a number of different viscosity correlations in the PVT package in OLGA. The three most widely
used correlations are Supertrapp, Pedersen and the Lohrenz-Bray-Clark (LBC) correlation. These models
have to be specified in the OLGA Compositional Tracking fluid file .

Both Supertrapp and Pedersen are based on the corresponding states principle (CSP), and usually
predicts viscosities within 10 % up to about 1 cP. For higher viscosities the capability of these methods are
more uncertain. However there is an increased computational cost in using these methods compared to
LBC.

However, the LBC model is not reliable as a predictive model. The following steps should therefore be
taken when using LBC:

 Match LBC to experimental or reliable simulated viscosity data (such as with Supertrapp or Pedersen)
 Check if tuned oil viscosity data match reasonably well with the experimental data. If a good match
cannot be obtained, use a more predictive viscosity model in OLGA Compositional Tracking module (a
mismatch is more likely for heavy oils).
 Substantial tuning of the LBC model can affect the gas viscosity. Evaluate gas viscosity before and
after tuning of the model.

Note: To get good simulation results, it is still recommended to match the viscosity model to
experimental viscosity data. Even if a more predictive model, such as Supertrapp or Pedersen, is
chosen.

It is further recommended to consider if oil viscosities at temperatures below approximately 20-40 C are
influenced by precipitated wax. None of the available models can account for the influence of precipitated
wax, nor the non-Newtonian effects associated with the precipitation. These models can still be tuned to
follow the apparent oil viscosities. Since the Compositional Tracking module does not account for wax
precipitation/deposition, viscosities will follow the apparent oil viscosity.

Dense phase specification

In the dense-phase region (see Figure 18), there are no good criteria to distinguish gas-like fluid from oil-
like fluid. However OLGA needs to assign the fluid to a phase in this region. So a line is assigned in the
dense-phase region, where the fluid goes from gas to liquid phase. Although the 'chosen' phase at a
pressure and temperature point does not affect the fluid properties, a phase transition across this line can
cause numerical problems in OLGA.

- 61 -
OLGA User manual

Figure 18 Dense phase region.

To better control phase transfer in the dense-phase region, it is possible to specify a density-limit in OLGA
(key DENSITYLIMIT in COMPOPTIONS). If this key is given, the fluid is considered to be liquid if it has a
higher density than the given density-limit and a fluid with lower density is defined as gas.

The value of this density-limit may vary, and depends on the purpose of using this key. If the simulation
enters the two-phase region from the gas-side (across the dew-point line), it would be preferable to keep
the fluid in gas-phase. A high density-limit is then needed. Similarly a low density-limit is needed, if the
simulation crosses the bubble-point line when it enters the two-phase region. Otherwise, if just a
reasonable value is needed, the density can be set to the density of the fluid close to the critical point. If
not specified, internal routines are used to decide phase.

Delay constants

The keys TCONDENSATE and TVAPORIZATION are non-equilibrium delay constants for the mass
transfer from liquid phase to gas phase and vice versa. The keys can be introduced for each component,
and the equilibrium state reached in the flash calculations will be delayed. The default value is no delay.

In the non-equilibrium model the convective mass transfer terms are calculated according to:

where u is the superficial velocity of the mixture flowing into the section calculated for the equilibrium
conditions at the section and Dz is the section length. The is the convective mass transfer term
calculated by the equilibrium model for component fc. TDELAY, fc is the non-equilibrium delay factor for
component fc, which has the dimension seconds. The user must specify the value of this factor, and
separate values can be given for vaporization (TVAPORIZATION) and condensation (TCONDENSATION).

- 62 -
The OLGA model

The local non-equilibrium mass transfer term is derived from the following equation:

where is the local mass transfer term calculated by the equilibrium model and TDELAY,fc is the delay
factor for component fc for condensation or vaporization dependent on the sign of the equilibrium mass
transfer term.

This yields:

How to use

Input

To use the Compositional Tracking model, follow the steps below.

Step 1

Use the Multiflash fluid package to characterize the fluids to the same pseudo components and generate
the feed file with all the necessary compositional data for the fluid.

The Plus and No-plus fluid types only require mole or weight fractions, mole weights and liquid densities.
For the Plus fluid, the PVT package generates pseudo-components based on the last (plus) component.

Once the fluid has been characterized, the feed file can be generated in the fluid package. Refer to the
Multiflash documentation to find out how this is done. The feed defined in the feed file is then available in
OLGA.

If the fluid has been characterized in another PVT software, all component properties such as the critical
temperature, acentric factor, and so on, must be entered into Multiflash.

Read more about feed files for Compositional Tracking here.

Step 2

Prepare the OLGA input using the following keywords:

 OPTIONS; COMPOSITIONAL set to ON.


 FILE; FEEDFILE to specify the feed file name.
 FEED; to define additional feeds and their composition (use components from the feed file).
 COMPOPTIONS; Define calculation options sent to the PVT package.
 INITIALCONDITIONS; to specify initial feeds.
 SOURCE; to specify feeds and feed flows in the mass source.
 WELL; to specify feeds in the well stream.
 NODE; to specify feeds and feed flows in mass flow and pressure nodes.

- 63 -
OLGA User manual

Step 3

Specify output variables for detailed plotting of simulation information.

 OUTPUTDATA to print compositional information to output file (*.out).


 TRENDDATA to print compositional variables to trend file (*.tpl).
 PROFILEDATA to print compositional variables to profile file (*.ppl).
 PLOTDATA to print compositional variables to OLGA Viewer file (*.plt).

Note: Output variables for rates at standard conditions (for example, QGST) are CPU demanding
because a flash must be performed, and should be used with care for Compositional Tracking
simulations.

There are some compositional output variables available in OLGA that enable you to investigate the
compositional behavior of the system. These variables are:

 Mass flow rate for each component in each phase (oil droplets, oil film, total oil phase, water droplets,
water film, total water phase, and gas).
 Mass rate of flashing for each component to gas phase, oil phase and water phase.
 Specific mass for each component in each phase.
 Mole fraction for each component in gas phase, oil phase and water phase.
 Equilibrium mole fraction for each component in gas phase, oil phase and water phase.
 Mass fraction for each component in gas phase, oil phase and water phase.
 Equilibrium mass fraction for each component in gas phase, oil phase and water phase.
 Total mole fraction (all phases) for each component.
 Total mass in branch for each component.

These compositional output variables can be configured for individual components by specifying the
COMPONENTS=(<component names>) key to each output keyword. If COMPONENTS is not specified,
OLGA generates output values of all components for the specified variable.

Step 4

Special considerations can be specified in the keyword COMPOPTIONS

 FLASHTYPE to specify flash algorithm.


 TCONDENSATION and TVAPORIZATION to specify delay constants to fluid components.
 DENSITYLIMIT to specify a density limit for the dense phase region.
 GASCOMPONENT and OILCOMPONENT to specify default gas- and oil-component in non-existing
phases.

There are default values for all keys, in which case none of these parameters have to be specified. The
effects of these keys are described in Model description on page 59.

Other considerations

 The maximum number of components allowed in a feed file is limited. The maximum number of
components for the Multiflash PVT package is 150.
 The general limitations to fluid modeling in OLGA, described in Limitations in the use of fluid
properties, still apply when using the Compositional Tracking module.
 Compositional Tracking is more CPU intensive than other fluid modules in OLGA.

- 64 -
The OLGA model

Combination with other models

The Compositional Tracking module cannot be combined with other compositional fluid models such as
Inhibitor Tracking, Blackoil or Wax.

Restart

You cannot change compositional model between restart cases.

Single component

The Single component module enables tracking of a single component, for example H 2O or CO2, that
crosses the saturation line in time or space in a pipeline.

The numerics in standard OLGA have been designed for multi component hydrocarbon fluids. Due to the
explicit coupling between volume balance and energy balance equations, standard OLGA becomes
unstable for single component fluids that cross the saturation line. The same can happen for multi
component fluids with very narrow phase envelopes, for example a fluid composed predominantly of one
component, but with a small amount of impurities. Because the behavior is very case dependent, it is hard
to give general guidelines on the exact amount of impurities required before standard OLGA can be
expected to yield reasonable results. You should, however, be careful when using standard OLGA to
simulate fluids consisting of 90% or more of one component. Besides the numerical issues, it is important
to make sure that the fluid property calculations are accurate for the particular fluid composition to be
simulated.

To circumvent this limitation, time constants, or delays, are introduced in the evaporation/condensation
process. The difference between the saturation temperature and the fluid temperature serves as a
potential for phase mass transfer. Multiplying this temperature difference with a certain heat or energy
transfer coefficient yields an energy transfer rate that can be used to estimate the mass transfer rate. An
asymptotic approach to equilibrium occurs where the speed at which equilibrium is reached is determined
by the size of the energy transfer coefficient.

The Single component module should be used for all single component fluids. Special options exist for
H2O and CO2, for which the fluid property calculations have been hard coded into OLGA. For other single
component fluids, it is necessary to specify input parameters to the fluid property calculations.

Note: The Single component module can only be applied to pure single component fluids. Therefore,
you cannot use OLGA to simulate single component fluids with small amounts of impurities.

License requirements

The Single component module requires a separate license.

Model description

The following assumptions are made in the single component model:

 the gas and liquid phases have the same temperature.


 the pressure of the gas and liquid phases is the same.
 if the fluid temperature is higher than the saturation temperature, flashing or boiling of liquid will take
place.
 if the fluid temperature is lower than the saturation temperature, condensation of vapor takes place.

- 65 -
OLGA User manual

The inner pipe wall surface can be superheated or subcooled as compared to the saturation temperature.
Such situations might lead to surface boiling or surface condensation in cases where the liquid or gas is in
direct contact with the pipe wall. The resulting, additional, mass transfer term is not explicitly included, but
it can be accounted for by an enhanced heat transfer due to surface boiling/condensation.

Generation of gas and liquid properties

The equations used to calculate the H2O properties are taken from ref. 1. For CO2, the thermodynamic
equations are taken from ref. 4. The transport properties are calculated through the equations given in
ref. 2. For other single-component fluids than H2O and CO2, the Soave–Redlich–Kwong (SRK) cubic
equation of state (Appendix 1) is used to calculate the saturation line and the physical properties of the
vapor and liquid phases. Temperature dependent volume translation is applied to improve the accuracy of
phase density. The transport properties are determined by the corresponding state method by Pedersen
(ref. 2).

The evaluation of the fluid property equations is time consuming, and, therefore, they are only evaluated at
the start of the simulation. The properties are evaluated at a grid of pressure/temperature values that is
limited by the minimum and maximum values of pressure and temperature given in the input. An
equidistant grid is used with a minimum of 50 and maximum of 100 grid points for both pressure and
temperature. During the simulation, linear interpolation is used to evaluate the properties in between grid
points.

Saturation line for a single component

The saturation line is determined by solving the equal fugacity of gas and liquid from the equation of state
(EOS). Below the critical point, determined by the critical pressure, PC and the critical temperature, TC, the
saturation pressure, Psat(T), and saturation temperature, Tsat(P), at a given grid point (P,T) are determined
from the saturation line. Above the critical point, the saturation line is extrapolated with the slope of the
saturation line at the critical point.

Liquid properties for a single component

For pressures below the critical pressure liquid properties are determined by the EOS in the liquid region.
In the gas region, the liquid properties are extrapolated from the saturation point — the enthalpy equals the
gas enthalpy minus the latent heat at the saturation temperature and the density is integrated from the
vapor saturation pressure to actual pressure using the compressibility at the saturation temperature. All the
other properties are from the saturation temperature.

For pressures above the critical pressure, liquid properties are calculated from the EOS.

Gas properties for a single component

For pressures below the critical pressure, the gas properties in the gas region are acquired from the EOS.

In the liquid region and a pressure below the critical pressure, the gas properties are extrapolated from the
saturation line – the enthalpy equals the liquid enthalpy plus the latent heat at the saturation temperature
corresponding to the pressure and the density is acquired by linear interpolation between the value at
critical pressure and the saturation pressure. All other properties are taken at the saturation temperature
corresponding to the pressure. For pressures above the critical pressure, gas properties are calculated
based on the EOS. Using this procedure, the gas and liquid properties are continuous across the fictitious
gas-liquid (V–L) division line when the pressure is above the critical one.

At the critical point and its vicinity, the thermal capacity and density derivatives show extreme sensitivity to
temperature and pressure changes, even to the extent where discontinuities occur. Therefore, a buffer
zone is introduced near the critical temperature as shown below. Within this zone, the liquid density

- 66 -
The OLGA model

derivative and thermal capacity are given the values calculated at a temperature, Tlow, less than the
saturation point. Similarly, for the vapor phase, the gas density derivative and the thermal capacity are
given the values calculated at a temperature, Thigh, above the saturation point.

The buffer zone is bounded by the coordinates [Tlow, Psat(Tlow)], [Tlow, Pc], [Thigh, Pc], [Thigh, Psat(Thigh)].

Saturation line for H2O

Below the critical point, (PC,TC), the saturation pressure, Psat(T), and saturation temperature, Tsat(P), at a
given grid point (P,T), are determined from the saturation line. Above the critical point, PC = 221.2 bar and
T= 647.3 K, and up to T = 676 K and P = 250 bar, a straight line is used to divide the single-phase or
dense-phase region into gas and liquid. Above 676 K and 250 bar, the boundary line between region 2 and
region 3 is used as the division between gas and liquid. The definition of the regions is found in ref. 1.

- 67 -
OLGA User manual

Liquid properties for H2O

For pressures below 225 bar in region 1, the water properties equations found in ref. 1 are used for water
in the water region.

In the gas region, the properties for water are extrapolated from the saturation point – the enthalpy is
based on thermal capacity at the saturation temperature corresponding to a given pressure. The density,
on the other hand, is calculated using the density derivative w.r.t. pressure at the saturation pressure
corresponding to the given temperature. All the other properties are evaluated at the saturation
temperature.

For pressures above 225 bar, water properties are calculated based on equations for the different regions
specified in ref. 1.

The thermal capacity and enthalpy for water are singular near the critical point. To avoid numerical
problems in region 3, the water properties from region 1 are used instead of those for region 3 when the
pressure is below 225 bar. The same procedure is used for steam (gas).

Gas properties for H2O

For pressures below 225 bar, steam property equations for region 2 are used for gas in the gas region.

In the water region, the gas properties are extrapolated from the saturation point. Enthalpy is based on
thermal capacity at the saturation temperature corresponding to the given vapor pressure and the density
according to the density derivative with respect to pressure at the saturation pressure corresponding to the
given temperature. All other properties are evaluated at the saturation temperature corresponding to the
vapor pressure.

For pressures above 225 bar, vapor properties are calculated based on equations for the different regions.

Using this procedure, the vapor and water properties are continuous across the vapor-liquid (V–L) division
line when the pressure is above 225 bar.

Flashing/Condensation

The driving force for flashing of liquid or condensation of gas is the difference between the saturation
temperatures and the fluid temperature.

The effect of local boiling on a hot wall surface or condensation on a cold one are not explicitly included in
the mass balance of liquid and gas, but can be accounted for through an enhanced heat transfer at the
pipe wall.

The total energy available for generating gas or condensing it to obtain saturated conditions is

where mg is the specific mass of gas [kg/m3], ml is the specific mass of liquid [kg/m3], cpg is the specific heat
of gas [kJ/kgC], cpl is the specific heat of liquid [kJ/kgC], h is the heat transfer coefficient at inner wall
surface [kJ/m2sC], S is the inner surface area per unit volume of pipe [1/m] and V is the section volume
[m3].

The total mass transfer to obtain saturated conditions is:

where hsat,g is the enthalpy of saturated gas [kJ/kg] and hsat,l is the enthalpy of saturated liquid [kJ/kg].

- 68 -
The OLGA model

To reduce numerical problems, it is assumed that this mass transfer occurs over a time tψ. This yields the
mass transfer rate

The ψv is given in [kg/m3s]. The mass transfer per time step must not be larger than the available
component mass of the diminishing phase.

References

1. Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of
Water and Steam, The International Association for the Properties of Water and Steam, Lucerne,
Switzerland, August 2007.
2. K. S. Pedersen et al. Properties of Oils and Natural gases, Gulf Publishing Company, Houston, Texas,
1989.
3. B.E.Poling, J.M.Prausnitz, J.P.O’Connell. The properties of gases and liquids. 5th Edition. McGRAW-
HILL, 2000.
4. R. Span and W. Wagner. A New Equation of State for Carbon Dioxide Covering the Fluid Region from
the Triple-Point Temperature to 1100 K at Pressures up to 800 MPa. J. Phys. Chem. Ref. Data,
Vol. 25, No. 6, 1996.

Appendix 1

The Soave–Redlich–Kwong (SRK) equation of state:

where

R is the universal gas constant and ω is the acentric factor.

The SRK equation of state can be written on the form:

- 69 -
OLGA User manual

where Z is the compressibility factor.

The solution, Z, to the above equation is found by iteration. As initial guess, the pressure is given by the
Antoine equation except for CO2 where the Wagner equation is used. Coefficients for these equations can
be found in ref. 3.

The solution for Z can be adjusted by a volume tuning factor

according to

where XV1 and XV2 are given through the keys VOLX(1) and VOLX(2), respectively, and Pr = P/Pc.

The specific heat, CP, is calculated through the equation

where the coefficients, CPi, are given through the input by CPIC(i + 1).

How to use

The single component model is activated by setting the key COMPOSITIONAL=SINGLE under the
OPTIONS keyword.

The time constants for condensation and boiling are specified by the keys TCONDENSATION and
TBOILING, respectively, under the keyword SINGLEOPTIONS. These keys are available as time series if
desired. Large values of the time constants will slow down the mass transfer leading to a fairly large non-
equilibrium. Small values will speed up the mass transfer and thereby reduce the thermal non-equilibrium.
Too small values might however cause instabilities which in turn can result in nonphysical results.

The keyword SINGLEOPTIONS specifies options for COMPOSITIONAL=SINGLE. COMPONENT can


have the values H2O, CO2, or OTHER. H2O is set by default.

Note that if you use COMPONENT=OTHER, it is required to specify additional fluid properties. These are:

 viscosity tuning factor, VISX


 critical temperature, TC [C]
 critical pressure, PC [bara]
 acentric factor, OMEGA
 molecular weight, MW
 volume tuning factors, VOLX(2)
 coefficients in equation for specific heat, CPIC(5)

Also note that although it is possible to choose water as a component, all possible single components will
be treated similarly and as an 'oil phase'. This means that although the holdup in a single component water
simulation is 1 in a pipe, the HOLWT and HOLHL output from that pipe is 0 and 1 respectively. Similar
behavior is to be expected from other output-variables which has an option for water.

For many different components values of these coefficients can found in ref. 3.

The keys MINPRESSURE, MAXPRESSURE, MINTEMPERATURE and MAXTEMPERATURE in


SINGLEOPTIONS are used to generate a PVT tables for the single component properties, that is, no
external PVT file is needed. The properties are evaluated on a grid of pressure/temperature values that is
limited by the minimum and maximum values of pressure and temperature given in the input. An
equidistant grid is used with a minimum of 200 and maximum of 400 grid points for both pressure and

- 70 -
The OLGA model

temperature. The griding is adjusted so that a grid point is close to the critical point. During the simulation,
linear interpolation between the grid points (P,T) is applied.

For boundaries, sources and wells, the gas fraction will be either gas or liquid, all depending on the
specified temperature as compared to the saturation temperature at the specified pressure. For sources
without any given pressure, the pressure of the source receiving position is used.

The output variables TSAT, TSV, PSAT, PVAP (see output variables description) are used to retrieve the
vapor data. TSV equals TM and PVAP equals PT for single component simulations (no partial pressure
because only a single component is considered). Other data can be obtained by specifying compositional
variables.

Under OPTIONS, the key WRITEPVTFILES=[NO]/YES controls whether the program will write the single
component properties that are being used to file or not. For YES, a tab file <inputfile>_PVT.tab (fixed
format) will be generated. Furthermore, the saturation line will be written to a file <inputile>_pvt.env. Both
these files can be visualized in the GUI.

Standard Conditions in OLGA


Standard conditions for pressure and temperature normally refer to atmospheric conditions, and there are
varying definitions in different companies, regions and applications. It is generally expected that live
hydrocarbons are processed (stabilized) in some way before the properties of the separated fluid phases
at standard conditions can be measured or estimated.

The fluid phase properties, that is, densities, gas/oil ratio, and so on, depend on how the fluids are
processed from actual (in-situ) conditions to the standard conditions, that is, separator conditions and the
number of separation stages. OLGA, in some situations, accounts for any separation scheme (processing),
while in other cases standard condition fluid properties can only be based on a single-stage separation (a
flash) at built-in standard conditions. The default (built-in) standard conditions in OLGA are 1 atm
(14.7 psia) and 60 °F (15.6 °C).

The limitations with respect to standard conditions in OLGA depend on which type of fluid description is
used in a simulation model, as explained below.

Table-based Fluid Properties – Fixed format

The fixed (legacy) fluid file format contains tables of fluid properties based on single stage flash
simulations at given pressures and temperatures. The pressure and temperature intervals must comprise 1
atm and 60 °F, respectively, to enable the use of standard conditions in a simulation with this fluid file
format. OLGA obtains properties at standard conditions by interpolating in the fluid tables to the built-in
standard conditions of 1 atm and 60 °F. Thus, all input and output referring to standard conditions (for
example, QGST, GORST) is based on a single-stage separation when using this fluid description.

Table-based Fluid Properties – Keyword format

In addition to the information available in the legacy fluid file format, the improved keyword fluid table file
format contains information (in the header) about e.g. gas/oil ratio (GOR), water cut (WC) and phase
densities at standard conditions. Recent versions of OLGA use this information, instead of single-stage
interpolation in the property tables, when converting between actual and standard conditions. These
properties in the fluid file header need not be based on a single-stage flash, but can be the results from, for
example, a multi-stage separation, full process simulation or real field data. Thus, OLGA can account for
any applied processing scheme and standard conditions.

- 71 -
OLGA User manual

It should be noted, however, that PVT applications usually insert results from a single-stage flash at
standard conditions into the fluid file header when generating fluid files. This means that, to allow OLGA to
account for multi-stage processing, you must manually correct the values in the fluid file or use a different
PVT package to generate the file.

In some situations, PVT packages can fail to provide a reasonable density for one or more phases at
standard conditions. If at least one standard density value is less than or equal to zero, OLGA reverts to
interpolating in the property tables to obtain phase properties and fractions at the standard pressure and
temperature given in the fluid file header. If reasonable standard pressure and temperature values are not
provided in the fluid file, OLGA defaults to using 1 atm and 60 °F.

Compositional Tracking

When using compositional tracking in OLGA, conversion between standard and actual conditions is always
based on the results of a single-stage flash at 1 atm and 60 °F, using the in-situ fluid composition. Multi-
stage separation (processing, stabilization) can be simulated by including a separator train in the OLGA
model. However, this can increase the model complexity and simulation time considerably (depending on
the case) and only provides multi-stage separation phase flow rates at one location (typically at the outlet).

Black Oil Fluid Model

As explained in the section Blackoil - Model description on page 50, any oil component is always in the
liquid phase and does not evaporate at any conditions. Due to this limitation, the GOR in the Black Oil fluid
model is not affected by the number of separation stages. This means that single-stage flash properties or
results from multi-stage separation to standard conditions can be used as input to the simulation model.
However, you are recommended to use the tuning coefficients available for the selected Black Oil
correlation to obtain a good match of the bubble point curve and gas fractions at actual conditions when
such information is available.

General: GOR Adjustments

OLGA enables the GOR (or GLR, CGR) of a fluid to be adjusted by user input in, for example, a SOURCE
or a WELL. In Compositional Tracking, this adjustment is performed by flashing the feed fluid at standard
conditions and recombining the resulting phases according to the specified input value, thus changing the
composition of the fluid source.

For table-based fluid properties, OLGA tries instead to obtain the specified GOR by adjusting the gas
fraction at actual conditions. Therefore, it is impossible to adjust the GOR more than what corresponds to
an in-situ gas fraction of 0 (only liquid) or 1 (pure vapor). You are recommended to use a fluid property
table with the correct GOR instead of performing significant adjustments in the SOURCE or WELL
properties. In cases where adjustments are made, make sure that the specified value actually is obtained,
for example, by plotting the resulting GORST (and/or check if the in-situ gas flow fraction equals 0 or 1 at
the source section). Refer also to Source - Model description on page 91.

- 72 -
The OLGA model

Heat transfer
OLGA computes temperatures from energy conservation. Equation (2) in Transport Equations on page 24
represents the temperature equation for a section of a flowpath, including the heat transfer, Q.

One-dimensional heat transfer

Heat transfer between the fluid and the ambient is either user given or computed based on a thermal
connection through the pipe walls to the surroundings. When considering the ambient temperature, the
default behavior is to use a user given temperature of a surrounding heat reservoir, refer to Thermal
coupling to ambient on page 74 for details.

For fluid bundles and annuli, the ambient temperature for inner pipes can be given by the surrounding
fluid, see Thermal coupling between flowpaths on page 79, using specialized thermal components:

 Fluid bundle on page 80 - suitable when the effect of heat transfer between different flowpaths in a
fluid bundle is important.
 Annulus on page 80 - similar to the Fluid bundle, but specially designed for well and drilling
configurations.

Two-dimensional heat transfer

OLGA has the ability to account for complex interactions between flowpaths and surrounding solids using
a two-dimensional temperature field around flowpaths. This is useful when modeling, for example buried
pipelines or complex risers.

 Solid bundle should be used to investigate interactions between pipeline configurations and their
surroundings, see Two-dimensional heat transfer on page 83. Solid bundle uses FEMTherm to
compute a three-dimensional temperature by accounting for radial and angular dependencies in the
surrounding heat storage when computing the heat transfer between a pipeline configuration and the
surroundings, see FEMTherm - Model description on page 83.

- 73 -
OLGA User manual

One-dimensional heat transfer


Thermal coupling to ambient

The basic thermal coupling in OLGA considers radially symmetric heat transfer between the fluid inside a
section of a flowpath and the ambient through a set of concentric wall layers. The wall layers can for
example represent the actual pipe wall, cement, casing and insulation material, as well as the medium
surrounding the pipeline, for instance formation rock. An example of a pipeline with three concentric wall
layers is shown in Figure 19.

Figure 19 Pipe with three wall layers

For wall layers of solid material, thermal conduction and storage is considered. For fluid wall layers,
OLGA assumes a layer of stagnant fluid, and the heat flow is determined by natural convection. In
addition, thermal radiation across the fluid gap can be accounted for. Phase changing materials (see
Phase changing materials on page 75) can also be defined. Materials and the specification of material
properties are described in MATERIAL (on Library) on page 479. Large ambient temperature variations
may cause freezing or melting of the soil surrounding a pipeline. OLGA can provide detailed modeling of
the soil taking the latent heat of fusion and differences in thermal properties for frozen and unfrozen
materials into account (see Buried Pipelines on page 76).

Using the configuration illustrated in Figure 19, Figure 20 illustrates the boundary temperatures that go into
the heat transfer calculations.

Figure 20 Boundary temperatures for pipe with three wall layers

- 74 -
The OLGA model

OLGA sets up a system of dynamic equations describing the heat flow and heat storage in the pipe wall,
which determine the average temperature in each wall layer. The boundary condition on the inner wall
surface is

(9)

where qi is the heat flow from the fluid with average temperature Tf to the inner wall surface with
temperature Tiw. The inner wall heat transfer coefficient hi, is calculated by OLGA considering the
importance of natural vs. forced convection in the pipeline section as well as the influence of thermal
conduction in the fluid. The flow regime in the pipeline section is also accounted for in this calculation. For
high gas velocities, it can be shown that the average fluid temperature is not an accurate measure to use
in equation (9). Therefore, a correction term is used in such cases (see Adiabatic wall temperature
correction term on page 76).

For the outer wall surface, the boundary condition used is

where qamb is the heat flow from the outer wall surface with temperature Tow to the ambient with
temperature Tamb. The outer wall heat transfer coefficient hamb, is either user given or computed by OLGA
based on the type of ambient medium. In this case fluid properties and velocity of the ambient fluid must
be provided.

The equation system for temperatures in the wall layers is solved simultaneously with the energy balance
equation (2) in Transport Equations on page 24, thus ensuring an implicit coupling between the fluid
temperature and the temperatures in the wall layers.

Note: Heat can flow both ways through the pipe walls. The direction of flow is governed by the
difference in temperatures.

Reaching a thermal steady state in the total system, including the wall layers, can in some cases take a
very long time. If the dynamic process of heat storage in the walls is not of interest, a thermal steady state
computation for the wall layers can be used in combination with transient computation in the fluid.
Alternatively a U-value can be used. In this case, OLGA replaces the wall layer computation with the
simpler correlation

A summary of all available thermal calculation options and how to select between them is given in How to
use on page 78.

Phase changing materials

The model for simulating phase changing materials accounts for latent heat of fusion and the difference in
thermal properties for unfrozen and frozen materials. Thermal conductivity and heat capacity are given for
three ranges: above the melting point, below the melting point and in the transition zone.

For heat capacity, the value specified in CAPACITY is used for all temperatures above the melting point. A
multiplier (HCAPMULT) is used below the melting point. If the FUISIONMULT key is different from 0, a
step wise function is used for heat capacity having the value equal to FUSIONMULT*CAPACITY in the
phase changing region. If the FUSIONMULT key is 0, linear interpolation is performed between 1 and
HCAPMULT. The FUSIONMULT key takes the latent heat of fusion (additional energy added or withdrawn
for a phase change) into consideration.

The example below describes how the latent heat of fusion is calculated in a situation with a wet soil
material. The example uses a phase changing region from -1 to 0 C. This gives one multiplier between -1

- 75 -
OLGA User manual

and 0 C to account for the latent heat of fusion, while another multiplier is used below -1 C for the frozen
soil. The soil is assumed to have a dry density 1900 kg/m3, with 10% water weight/dry soil weight. The
moist unfrozen heat capacity is 1067 J/kgC (0.255 btu/lbF) and the frozen heat capacity is 876 J/kgC
(0.209 btu/lbF). The latent heat of fusion is (190 kg/m3*333 kJ/kg)/(2090 kg/m3) = 30.27 kJ/kg. This gives:

HCAPMULT = 876/1067 = 0.82

FUSIONMULT = (30270+1067)/1067 = 29.4

Thermal conductivity given in CONDUCTIVITY is used directly for temperatures above the melting point. A
conductivity multiplier (CONDMULT) is used for temperatures below the melting point. Linear interpolation
is used in between.

Adiabatic wall temperature correction term

OLGA applies an adiabatic wall temperature correction to the wall surface temperature (TWS) when the
liquid volume fraction (HOL) is less than 5% (AL > 0.95). The definition of adiabatic wall temperature is:

The temperature assumed by a wall in a moving fluid stream when there is no heat transfer between the
wall and the stream.

The temperature correction is given by:

where ΔTws is the adiabatic correction term for the wall surface temperature, w is the smoothing factor, µG
is the gas viscosity, uG is the average gas velocity and λG is the gas heat conductivity.

The correction term applies when the liquid volume fraction is less than 0.05.

Note that considerable amount of energy is added to the inner wall surface when high gas velocity

appears. The physical argument for this is high radial velocity gradient . That is: Gas velocity gradient
perpendicular to the flow direction (see Figure 21). The gas velocity is zero at the inner wall and increases
the further you go from the wall to the center of the pipeline. This causes the actual fluid temperature to be
at the highest at the wall and decrease towards the center of the pipeline.

Figure 21 Gas velocity and temperature profiles

Buried Pipelines

A buried pipeline configuration as illustrated in Figure 22 is not radially symmetric. However, as illustrated
below, buried pipelines can be modeled using concentric wall layers by letting the outermost wall layer
define the soil. The WALL option (where the heat flux is a function of the wall material properties) is in this
case recommended because of the large thermal mass of the soil.

- 76 -
The OLGA model

Figure 22 Illustration of a buried pipe

The thickness of the composite soil layer is based on an equivalent heat transfer coefficient for the soil for
a pipeline burial of a particular depth. Theoretically, the equivalent heat transfer coefficient from the outer
surface of a buried pipeline to the top of the soil can be calculated to be:

where D is the outer diameter of buried pipe, H is the distance from center of pipe to top of soil, λsoil is the
soil heat conductivity, hsoil overall heat transfer coefficient for soil.

The term cosh-1 (x) can be expressed mathematically as follows:

The adjusted thermal conductivity of the soil layer can be determined using the expression below for a
known value of the soil thermal conductivity:

where Rsi is the inner radius of soil layer (= outer radius of pipe wall), Rso is the outer radius of soil layer,
ksoil is the input value of soil conductivity.

The specific heat capacity of the soil may be adjusted as follows to predict the transient heat transfer
accurately:

where Cp, input is the input value of soil thermal capacity and Cp, soil is the soil thermal capacity.

Heat transfer at steady state conditions depends only on the outer soil layer radius Rso and on ksoil.
However, for dynamic situations, a good soil discretization is important to obtain a reliable temperature
profile. Alternatively, this can be modeled using the Solid bundle module, see Two-dimensional heat
transfer on page 83, utilizing FEMTherm (see FEMTherm - Model description on page 83).

- 77 -
OLGA User manual

How to use

In the OLGA GUI, the method used for temperature calculation is set from the OPTIONS keyword at the
Case level. In the OPTIONS Property editor the key TEMPERATURE can be set either to:

Setting Description

OFF No temperature calculation – initial temperatures must be specified with the INITIAL
keyword

ADIABATIC No heat transfer to surroundings

UGIVEN A user-defined overall heat transfer coefficient is used for the entire wall

WALL The heat flux through the pipe wall layers is calculated by the code with user-defined
thermal conductivities, specific heat capacities and densities for each wall layer

FASTWALL Similar to WALL but heat storage is neglected in the wall

User-defined heat transfer parameters for the chosen temperature option must be given for each pipeline.
In the OLGA GUI under Boundary&InitialConditions for each FLOWPATH, one or several
HEATTRANSFER keywords may be added. In the property window for each HEATTRANSFER keyword,
the required fields must be filled out.

Note: Each HEATTRANSFER keyword contains parameters for a range of pipes, each defined by a
PIPE keyword, see PIPE (on Flowpath) on page 441, which refers to a WALL keyword, see WALL (on
Library) on page 492, where the pipe wall is defined.

To include a fluid wall layer, TYPE must be set to FLUID in the MATERIAL keyword. In this case the fluid
density, viscosity and expansion coefficient must be defined in addition to the heat capacity and
conductivity. If radiation across the fluid filled layer is to be simulated, the emissivity of the inner and outer
surface of the fluid layer has to be given as well.

To simulate a phase changing material, TYPE must be set to PCM in the MATERIAL keyword. An upper
and lower temperature limit for melting and freezing must be specified, PHCHMAX and PHCHMIN.
Further, the three multipliers for properties below the melting point and in the phase changing region must
be given.

In a temperature calculation the homogeneous temperature profile along the pipeline should be critically
examined. Large discontinuities are often unphysical, although if large pressure differences occur between
two neighboring sections, the Joule-Thompson effect may give a substantial -temperature difference.
Furthermore, if there is a great difference in hold-up between two adjacent sections, temperature
differences can be expected depending on the thermal properties of the gas, liquid, and pipe walls, as well
as the surrounding medium.

Wall Layer Thickness

The numerical solution for the temperatures in the wall layers depends on the discretization of the layers.
For steady-state calculations it is sufficient to un-discretize the layers, however in transient simulations,
when heat storage in the pipe walls are important (cool down or warm up), a finer discretization of the wall
layers may be necessary. A wall layer should, as a rule of thumb, not be thicker than approximately 30% of
the outer radius of the layer. The change in thickness, δ, between two neighboring layers should be 0.2 ≤
δ(i)/δ(i-1) ≤ 5 to obtain a good accuracy.

- 78 -
The OLGA model

If ELECTRICHEAT is defined in the WALL definition, it is preferable to have at least three layers and
define the electric heating in the middle layer.

Very thin layers, such as paint, should be included in a neighboring layer by adjusting the thickness and
conductivity of that layer. Only the thickness must be adjusted if the thermal conductivity of the thin layer is
close to the conductivity of one of its neighbors.

Thermal coupling between flowpaths

OLGA can compute temperatures in complex configurations of pipelines in a cross section. Examples of
such configurations are bundled pipelines (pipe-in-pipe configurations) and annuli, possibly enclosed in a
surrounding solid medium. In such configurations, the temperature in one pipeline affects the temperature
in all the other pipelines. Therefore, heat transfer between the different pipelines in the cross section must
be taken into account.

When computing temperatures in cases containing fluid bundles or annuli, OLGA sets up an equations
system for all fluid and wall temperatures of all the flowpaths contained in the cross section in addition to
the axial energy transport (equation (2) in Transport Equations on page 24). The method does not
generate any additional gridding compared to solving each flowpath thermally decoupled from the others,
but the simultaneous solution of the cross sectional equation system ensures that the thermal interactions
between the different flowpaths are included. The equations used are in principle the same as the
equations for heat transfer through a single pipeline wall (see Thermal coupling to ambient), but some
additional considerations must be taken. For simplicity, this is illustrated using a pipe-in-pipe configuration
as illustrated in Figure 23.

Figure 23 One pipe (pipe A) inside another (pipe B)

For pipeline A, which is enclosed inside pipeline B, the equations describing heat transfer from a fluid
section to the ambient, are still valid. The only difference is that the ambient temperature of A is not user
given, but it is the fluid temperature of pipeline B. Replacing Tamb for pipeline A with TfB from pipeline B
couples the equations for the two pipelines. If not user given, the ambient heat transfer coefficient for
pipeline A is calculated considering natural vs. forced convection and thermal conductivity of the fluid in
pipeline B. Looking at pipeline B, the equations describing heat transfer to the ambient are valid also when
pipeline A is enclosed. However, the heat transferred from pipeline A to the fluid of pipeline B have to be
accounted for. When setting up equations for pipeline B, the heat transferred from pipe A is added as a
heat source in the energy balance equation (2).

- 79 -
OLGA User manual

Fluid bundle

For bundled pipelines, also termed fluid bundles, the flexibility regarding configurations that OLGA can
simulate is large, but some limitations exist. There are no restrictions on the number of pipelines contained
in a fluid bundle, or how they are enclosed inside each other (an example is illustrated in Figure 24).
However, pipelines contained in the same fluid bundle must have the same geometry (section lengths and
elevations), and each contained pipeline must have a constant diameter in the axial direction.

Figure 24 Fluid bundle

To invoke thermal computation for fluid bundles in which thermal interaction between the different pipelines
are taken into account, the Fluid bundle must be used, see Fluid bundle - How to use on page 81.

Annulus

The configuration of an annulus, see Figure 25, shows large similarities with a fluid bundle, cf. Figure 24.
The difference between the two is that diameters are allowed to change within an annulus, something that
is useful when modeling drilling configurations where the diameter is typically reduced as the well is drilled
deeper. Another example of use is for gas-lifted wells where gas is injected into the annulus between the
casing and tubing and recovered in the tubing together with the production fluid.

Figure 25 Example of an annulus configuration

For details on how to set up annuli, see How to use on page 81.

- 80 -
The OLGA model

Fluid bundle - How to use

To use the Bundle model, in the OLGA GUI do the following:

From the Case level, right-click and choose:

Add→ThermalComponent→FLUIDBUNDLE

In the OLGA GUI a fluid bundle consists of a carrier line enclosing one or several flow components
(flowpaths, lines, and/or bundles). The carrier line itself is either a regular flow-path or a line. To populate
the fluid bundle, the following has to be repeated for each participating flow component:

From the newly created fluid bundle, right-click and choose:

Add→BundleComponents→COMPONENT

In the Property editor for the newly created bundle component, fill out the required fields. In particular, a
reference to the flow component (FLOWPATH, LINE or FLUIDBUNDLE) have to be specified. N.B., no
new flow component is created by this procedure, and, thus, the component specified have to either exist
beforehand or be added to the case later.

The properties FROM and TO define the part of the flowpath that is enclosed in the bundle (axial
direction). They refer to position labels which must be defined under Piping for the FLOWPATH. Note that
the bundle must cover entire PIPEs.

The properties XOFFSET and YOFFSET are X- and Y-direction offsets for the component center from an
arbitrary reference point. All components contained in the same fluid bundle must have the same reference
point.

The property OUTERHVALUE may be used if the heat transfer coefficient from the outer wall surface of
the bundle component to the carrier line is known, otherwise forced/free convection will be applied.

Flowpaths that are contained within the same bundle have to have the same section lengths and
elevations. Pipe diameters must be constant in the axial direction.

The WALL or FASTWALL temperature calculation option must be specified when a fluid bundle is used in
a case.

License requirements

Fluid bundle is part of the FEMTherm module that requires a separate license.

How to use

To use the Annulus model, in the OLGA GUI do the following:

From the Case level, right-click and choose:

Add→ThermalComponent→ANNULUS

In the OLGA GUI, an annulus consists of a carrier line enclosing one or several flowpaths. The carrier line
itself is a regular flowpath. To populate the annulus, the following has to be repeated for each participating
component:

From the newly created annulus, right-click and choose:

Add→AnnulusComponents→COMPONENT

In the Property editor for the newly created component, fill out the required fields. In particular, the
FLOWPATH identifier have to be specified.

Note: No flowpath is created by this procedure, and, thus, the flowpath specified must either exist
beforehand or be added to the case later.

- 81 -
OLGA User manual

The properties FROM and TO define the part of the flowpath that is enclosed in the annulus (axial
direction). They refer to position labels that must be defined under Piping for the FLOWPATH. The annulus
must cover entire PIPEs.

The properties XOFFSET and YOFFSET are X- and Y-direction offsets for the FLOWPATH center from an
arbitrary reference point. All flowpaths contained in the same annulus must have the same reference point.

The property OUTERHVALUE can be used if the heat transfer coefficient from the outer wall surface to the
carrier line is known, otherwise forced/free convection is applied.

Flowpaths that are contained within the same annulus must have the same section lengths and elevations.
Pipe diameters can vary in the axial direction.

The WALL or FASTWALL temperature calculation option must be specified when an annulus is present in
a case.

License requirements

Annulus is part of the Wells module that requires a separate license.

- 82 -
The OLGA model

Two-dimensional heat transfer


To model detailed interactions between pipeline configurations and the surroundings when the
surroundings cannot be treated as a constant heat reservoir, solid bundles are used. Figure 26 illustrates a
buried fluid bundle. In this illustration, the fluid bundle is surrounded by a single polygon representing the
surrounding material. It should however be noted that the surroundings is not limited to a single shape,
and complex surroundings can be modeled using many different shapes. For details on the limitations that
apply to the positioning of shapes, see Figure 28 in FEMTherm - Model description on page 83. A
requirement for a solid bundle is that it must always have at least one solid shape. Several shapes can be
combined together with any number of pipelines, fluid bundles and annuli to model the system, but flow
components are restricted to have have a constant outer diameter within a solid bundle.

Figure 26 Example of solid bundle configuration representing a buried fluid bundle.

For solid bundles, two additional considerations arise; heat transport within the solid shape itself is
calculated and the thermal coupling between the outer wall surface and the shape(s) around it. For the
solid shape itself, the heat flow will in many cases be far from radial, requiring a two-dimensional
temperature field calculation. OLGA has a separate model that handles this: the FEMTherm model. See
FEMTherm - Model description on page 83 for a description of how temperatures and heat flow in the solid
shape is calculated, and how the two-dimensional temperature field in the solid shape couples to the wall
temperatures of the enclosed components.

FEMTherm - Model description

FEMTherm consists of a grid generator and a Finite Element Method (FEM) equation solver. The grid
generator makes a 2D finite element mesh in accordance with the Delaunay criterion. The finite element
equation solver determines the transient 2D temperature distribution of any user defined cross section,
which can have several shapes, that is, CIRCLES, ELLIPSES, RECTANGLES and POLYGONS. Figure 27
illustrates the grid system used for solving the 2-dimensional heat transfer equation in a rectangular cross
section with two interior pipelines. The simulation model consists of stacks of such cross sections along
the pipeline.

- 83 -
OLGA User manual

Figure 27 Cross section grid.

Multiple outer shapes as well as overlapping shapes are allowed. However, shapes inside an outer shape
are not allowed to partially overlap, or to be adjacent as shown in Figure 28. Note that the model is
constructed with the use of rectangles and circular pipes only.

Figure 28 Illustration of allowable FEMTherm/SOLIDBUNDLE configurations in OLGA.

In a FEMTherm calculation, OLGA solves the following equations in two steps:

1. Energy equation for the fluid in the pipe and the heat transfer equation for the layers of the pipe
WALL. These equations are solved for each of the pipe sections along the pipelines, giving the
profiles of the fluid temperature along the pipeline and in the pipe WALL.
2. FEMTherm establishes the thermal coupling of the pipelines and solves the 2-dimensional heat
transfer equation in the solid medium surrounding the pipe WALL, giving the temperature distribution
over the cross sections as well as the interaction between fluid temperatures in embedded pipes.

Note: FEMTherm calculations are based on linear theory, which assumes fixed geometry and material
properties. All materials are assumed to be homogeneous and isotropic. The integration in time is
performed using a fixed time step (no time step control) for the temperature distribution in the cross
section.

The combination of 1-dimensional fluid and WALL temperature equations along the pipelines and the 2-
dimensional heat transfer equations for the media in each of the cross sections along the pipeline results in
a 3-dimensional temperature field.

- 84 -
The OLGA model

Consider the pipe cross section in Figure 29.

Figure 29 Cross section grid and concentric pipe with a single wall layer.

In the situation of an incompressible fluid in the pipe visualized above, the governing equations for this
system are:

(10)

(11)

(12)

(13)

(14)

In the more general case, equations (10) and (11) are solved for each component and for each wall layer.
Equation (10) describes the energy conservation of the fluid, equation 11 the energy conservation of the
pipe WALL, and equations (12) to (14) the energy conservation with heat conduction in the interior of the
solid medium. In addition to these, a set of boundary and initial conditions are required for the calculation.
The temperature, T=T(x,y,z,t), is the central variable in FEMTherm and the parameters in the model are:

Af Area of the pipe cross section

Tf Temperature of the fluid

ρf Density of the fluid

Heat capacity of the fluid

Tw Temperature of the first wall layer

ρw Density of the first wall layer

- 85 -
OLGA User manual

Heat capacity of the first wall layer

Aw Cross sectional area of first wall layer

Flow rate of fluid

Heat transfer between fluid and first layer

Heat transfer between first layer and FEM domain boundary

Heat flux across FEM domain boundary

λ Conductivity of the solid interior of the bundle

ρ Density of the solid interior of the bundle

Cp Heat capacity of bundle

Heat flux at the FEM domain boundary

Unit outward normal at the FEM domain boundary


S Surface of the wall

The weak form of equations (12) to (14) according to classical functional analysis is:

where Ω is the interior of the FEM domain,  is the boundary subject to non-essential boundary
conditions and δT is the test function. The last term in this equation is used to impose the boundary
condition for the Newton’s law of cooling of external boundaries:

where the heat transfer coefficient, h, and the ambient temperature, Tamb, are user-defined constants.

The finite element domain is discretized using linear triangular elements, while the evolution in time is
modeled using a backward Euler scheme. By factoring out the ambient temperature, , and the
temperature in the last wall layer, , the following system of discrete equations is obtained.

This can now be used to solve the vector of nodal temperatures, , as a function of the ambient
temperature, the last wall layer temperatures of each component i and the temperature at previous time
step, . The wall layer temperatures are not yet known, and therefore the equation system in equations
(12) to (14) is coupled to and solved simultaneously with the equations for the fluid and wall temperatures
for all embedded components. The linearization needed for this coupling is derived in the following
manner:

- 86 -
The OLGA model

The 'ambient' temperature, , of the last wall layer of each component is obtained by taking the

average temperature in the FEM domain along the boundary of thei’th component, . This average
temperature of discrete nodal temperatures is defined by the function:

where

is the length of boundary i and the function TFEM is evaluated element by element along the boundary. By
the linearity of the solution, using superposition this can be written as:

where

is a vector of nodal temperatures resulting from the boundary condition at perimeter j, and

is a scaling of the nodal temperatures at timen. Given that the temperature, TFEM,within the FEM domain is
a linear function of the nodal temperatures, the constants a ij can easily be obtained from:

With the exception of the term, , these integrals are evaluated once. This is possible because
FEMTherm operates with a fixed time step, decoupled from the temperature calculations in the pipes. The
inertial term, however, must be evaluated for each section and each FEMTherm time step.

Numerical considerations

In OLGA the fluid temperature varies in the axial (z) direction only. Therefore the heat conduction in the
first WALL layer is always in the radial (r) direction. In the cross section below, two OLGA pipes are placed
within a circular cross section. The temperature of the fluid and the temperature of the pipe WALL are
solved with the OLGA model (finite difference method) on the assumption that radial heat conduction is
predominant. Thus the pipe WALL outer surface (see Figure 30) serves as an external boundary to the
finite element equation. The heat conduction in the rest of the cross section is in both spatial directions (x
and y). It is possible to include more than one radial conduction WALL layer in the model.

- 87 -
OLGA User manual

Figure 30 Two OLGA pipes in a cross section.

One needs to determine the number of nodes that is required to obtain a suitable grid and time step to
obtain numerical solutions to the heat transfer equations (equations (12) to (14)). The FEMTherm model
should be used with optimized spatial and temporal discretizations which gives a step-size independent
solution. In the figure below we see a close-up of the region between the two pipes in Figure 30 for three
examples of the spatial discretization. The numerical accuracy is strongly dependent on the number of
internal nodes (N) between external boundaries.

Figure 31 Different discretizations for the area between two OLGA pipes.

Due to the linear interpolation functions in the finite element calculation, we recommend that N should be
at least 4 to get a good approximation for the temperature field. In (a) N = 0, in (b) N = 3 and in (c) N = 4.
Thus the grid in (c) is the only acceptable grid for high precision calculations. The MESHFINENESS[*] key
in the SOLIDBUNDLE keyword sets the spatial resolution of the grid by determining the number of nodes
on the outermost shape. The number N can be checked after the simulation has been performed by
looking at the grid in FEMTherm Viewer.

Thermal calculations with the finite element method are computationally expensive and are not carried out
for every single time step in OLGA. We recommend that the time step for thermal calculations

- 88 -
The OLGA model

The key DELTAT in the SOLIDBUNDLE keyword should be below the smallest characteristic time constant
in the system. For complex pipes this constant may be difficult (if not impossible) to calculate, but a fairly
valid approximation is:

where ρ, Cp and λ are the density, specific heat capacity and thermal conductivity of a pipe layer thickness
L. Thus, one should determine this time constant for all the layers in a pipe and use a time step that is
below the smallest of these.

It should be noted that the thermal masses in the solid medium can be very large and it may require very
long simulation times to obtain thermal equilibrium when integrating the energy balance equation. To
account for this, without using the steady state pre-processor, it is possible to switch the TEMPERATURE
option from FASTWALL to WALL between restarts. This is in principle the procedure used in the steady
state pre-processor. The FASTWALL option is equal to setting the heat capacity parameter to zero and
can be used when there are no thermal transients. The increase in computational speed may be significant
when compared to using the WALL option. However, for transient analyses this option should only be used
to initialize the simulations.

The results from an OLGA simulation where the FEMTherm module has been applied can be visualized
using FEMTherm Viewer. Note that the FEMTherm code makes a triangle mesh also for the OLGA
WALLS (radial conduction layers) and the fluid within. This is for the purpose of visualization only. The
temperature is not calculated separately for these dummy nodes (e.g., the nodes in the WALL layers have
the same temperature for a given radius). See Figure 32 that shows an inner OLGA WALL with two outer
walls defined by SHAPE.

Figure 32 Left: Grid visualized in FEMTherm Viewer (the fluid in the middle will also have a mesh).
Right: Grid used in FEMTherm calculation.

The plotting frequency is determined by the key DTPLOT in the SOLIDBUNDLE keyword and should be
set judiciously. For very fine discretization and/or long bundle sections, the amount of data may become
exceedingly large for long simulations. By increasing the value of DTPLOT, the amount of data can be
limited.

[*] MESHFINENESS is the number of nodes, which are evenly distributed on the outer boundary of the
SHAPE with the longest circumference within a SOLID BUNDLE, which is not a POLYGON. The density of
nodes (nodes divided by circumference) on the SHAPE with the longest circumference determines the
number of nodes on all other non-POLYGON SHAPES to obtain a mesh with uniform node spacing.

- 89 -
OLGA User manual

FEMTherm / Solid bundle - How to use

FEMTherm is activated through the SOLIDBUNDLE keyword. To include a SOLIDBUNDLE/FEMTherm


computation in the simulation, the following must be done in the OLGA GUI:

From the Case level, right-click and choose:

Add →ThermalComponent → SOLIDBUNDLE.

A SOLIDBUNDLE consists of a collection of SHAPES, FLOWPATHS, LINES and/or FLUIDBUNDLES. In


the following these are referred to as bundle components. For each bundle component do the following:

From the newly created solid bundle, right click and choose:

Add → BundleComponents → COMPONENT.

In the Property editor for the newly created bundle component, fill out the required fields. In particular, a
reference to either a FLOWPATH, a LINE a FLUIDBUNDLE or a SHAPE must be specified. Note that no
new component is created by this procedure, and that the specified component must exist beforehand or
be added later.

The properties FROM and TO define the part of the component that is enclosed in the bundle (axial
direction). They refer to position labels.

The thermal computations are only affected by the relative position of one object to another. To give better
control of the cross section, without having to adjust the pipeline geometry, the coordinate system of the
bundle cross section is decoupled from the rest of the model. All components are by default placed
concentric around the origin and may be independently moved to its correct location with the keys
XOFFSET and YOFFSET. The only exception to this rule is for SHAPES of type RECTANGLE and
POLYGON. In this case, the x and y coordinates of the shape are given explicitly, but XOFFSET and
YOFFSET may still be used for an additional offset.

The property OUTERHVALUE may be used if the heat transfer coefficient from the outer surface of the
bundle component to the carrier line is known, otherwise forced/free convection will be applied.

The length and elevation of each section of a pipeline that is contained within a SOLIDBUNDLE must be
maintained.

A SOLIDBUNDLE/FEMTherm simulation requires that the WALL or FASTWALL temperature calculation


option is selected

For every SOLIDBUNDLE a finite element triangle mesh is generated. The fineness of the mesh is set by
the MESHFINENESS key. The value of this key denotes the number of nodes on the component with the
largest circumference. The higher the MESHFINENESS, the finer the mesh. However, the grid is not very
sensitive with respect to MESHFINENESS as the value of this parameter is being rounded off to multiples
of 32. The typical values for this key is between 128 and 640. To select this parameter wisely, it is
recommended to read about numerical considerations in Model descriptions.

The ambient conditions for the bundle may vary both in the vertical axis of the cross section and along the
length of the bundle. It is defined through the use of the AMBIENTDATA keyword.

AMBIENTDATA is not a required keyword. If it is not specified, OLGA uses the information in the
HEATTRANSFER keywords given in one of the FLOWPATHS in the bundle. However, this functionality is
mainly to ensure backwards compatibility and it is strongly recommended to specify the ambient conditions
in the bundle with the use of AMBIENTDATA. When several FLOWPATHS are included in a bundle
definition, and AMBIENTDATA is not specified, the HEATTRANSFER keyword(s) in the FLOWPATH with
the largest diameter will be used.

- 90 -
The OLGA model

License requirements

The FEMTherm model is part of the FEMTherm module that requires a separate license.

Boundary conditions
The boundary conditions define the interface between the simulated system and its surroundings, and they
are crucial to the relevance of any type of simulation. For a network of pipelines and wells there are
several options available. OLGA basically uses flow rate or pressure. In addition to temperature, the gas-
liquid ratio must be specified at each flowpath inlet and outlet boundary (at least one pressure must be
given).

The boundary conditions, for example, a pressure, can be given as time series to model a certain transient
situation.

Inflow from reservoirs to well-bores define the most important boundary in a petroleum production
networks. In addition to various well-inflow correlations and options, OLGA comes with an implicit coupling
facility to the OLGA ROCX module, which is a 3-D, 3-phase reservoir simulator, especially optimized for
wellbore - near wellbore simulations. OLGA can also be run coupled with the ECLIPSE reservoir simulator,
in which case the reservoir inflow is determined by ECLIPSE and OLGA in interaction.

Source
A source can be used to model pipeline inflow and outflow of gas and liquid. OLGA uses mass flow rate for
internal calculations, but input flow rate can also be given as volumetric flow at standard conditions.

Wells and near wells are more specialized types of modeling pipeline inflow and outflow.

Model description

Two types of sources can be specified: the mass source and the pressure driven source, which is also
known as a controlled mass source or source controlled by valve (SOVA). Each type of source can be
either positive (flow into the pipeline) or negative (flow out of the pipeline).

The upstream (for positive source) or downstream (for negative source) pressure and temperature can be
specified. When the upstream/downstream pressure is given, the expansion from the given pressure to the
pressure inside the pipe section is accounted for in the temperature calculations. A mass source need not
specify the upstream/downstream pressure, and this is then set to the pressure inside the pipe section
where the source is introduced. A SOVA must always specify the upstream/downstream pressure.

The external pressure and temperature can be constant or given as a time series.

Phase fractions can be specified in the input for a positive source. For a negative source, the phase
fractions in the connected section are used.

- 91 -
OLGA User manual

Mass source

The mass source is the simplest model and has a given mass flow rate specified by the user.

Phase fractions for gas and water can be specified, from which the oil phase fraction is calculated. The
default value for gas is -1, which means it is read from the PVT file. The default value for water is 0.

If a controller is used, the actual mass flow rate into the section (positive source) or out of the section
(negative source) is a fraction of the mass flow rate given as input, with the fraction regulated by the
controller.

Note: The mass flow node covers the functionality of a mass source in the first section after a closed
node.

Pressure driven source (SOVA)

The flow for a SOVA is calculated from a flow equation for mass flow through an orifice, where the orifice
area can be governed by a controller.

The figure below illustrates this.

Figure 33 Illustration of a pressure driven source

Controlling the flow

The flow area of the SOVA is governed by the control system, where the valve has finite opening and
closing time (stroke time) specified by the user.

Both sub-critical and critical flow is described. For sub-critical flow the flow rate is governed by the
difference between the internal and external pressures, the upstream conditions and the flow area. For
critical flow the flow rate is governed by the upstream conditions and the flow area only. The pressure
difference determines the direction of flow in or out of the pipe.

The orifice area is calculated from:

where us is the controller signal and given by the boundaries below

Valve functionality

The valve-specific functionality is further described in the Valve section.

- 92 -
The OLGA model

Calculating mass flow at standard conditions

The following equations show how the total mass flow is calculated from volumetric flow given at standard
conditions. Symbols used in the equations are given below:

wc Water cut, volume of water divided by volume of liquid at standard condition

GOR Gas oil ratio, volume of gas divided by volume of oil at standard condition

GLR Gas liquid ratio, volume of gas divided by volume of liquid at standard condition

Q Volume flow

Mass flow

 Density

Indexes:

tot Total

ST At standard condition

g Gas phase

o Oil phase

liq Liquid phase (water + oil)

w Water phase

* Equivalent phase

The density in the equations below is taken from the PVT table. The properties at standard condition must
be included in the PVT table.

If WATERCUT, GOR and volume flow of gas at standard condition ( ) are known, use:

PHASE = GAS and STDFLOWRATE =

If WATERCUT, GOR and volume flow of liquid at standard condition ( ) are known, use:

PHASE = LIQUID and STDFLOWRATE =

If WATERCUT, GOR and volume flow of oil at standard condition ( ) are known, use:

PHASE = OIL and STDFLOWRATE =

If WATERCUT, GOR and volume flow of water at standard condition ( ) are known, use:

PHASE = WATER and STDFLOWRATE =

- 93 -
OLGA User manual

If WATERCUT, GLR and volume flow of gas at standard condition ( ) are known, use:

PHASE = GAS and STDFLOWRATE =

If WATERCUT, GLR and volume flow of liquid at standard condition ( ) are known, use:

PHASE = LIQUID and STDFLOWRATE =

If WATERCUT, GLR and volume flow of oil at standard condition ( ) are known, use:

PHASE = OIL and STDFLOWRATE =

If WATERCUT, GLR and volume flow of water at standard condition ( ) are known, use:

PHASE = WATER and STDFLOWRATE =

Specified GOR or GLR shifts the values of gas mass fraction in the PVT table with the following equation
(two phase)

where

GGP,T Gas mass flow at given pressure and temperature

GGST Gas mass flow at standard condition - calculated from given GOR or GLR

GHLST Oil mass flow at standard condition - calculated from given GOR or GLR

RSP,T Gas mass fraction at given pressure and temperature - value from the PVT table

RSST Gas mass fraction at standard condition - value from the PVT table

If the equivalent gas volumetric flow rate at standard condition ( ) and the mol weight of the total flow,
Mw, are known, use:

PHASE = GAS, STDFLOWRATE = and MOLWEIGHT = Mw

The density of the equivalent gas at standard conditions is then calculated from ideal gas law, and the total
mass flow is given from the following equation on condition that GOR or GLR is greater than 10 10 (infinitely
in OLGA)

If GOR or GLR is less than 1010 the total mass flow is calculated from the equations described earlier for
PHASE = GAS with = and = .

- 94 -
The OLGA model

Note: There are limitations on how much the value of GOR/GLR can be changed when using a PVT
table. You can check the source input by plotting the volume flow rates through the source at standard
conditions (for example, QGSTSOUR). For example, if a source using default GOR/GLR has no gas at
the in-situ conditions, you cannot give a lower GOR/GLR for this source. Removal of gas that is not
present is impossible.

Steady state preprocessor

Both source types can be used with the steady state preprocessor. However, with a closed node, the sum
of all flows into the adjacent section (including contributions from all sources, wells, and nearwells) cannot
be 0.

How to use

To define a SOURCE, follow the steps described below.

 Each SOURCE must have a unique LABEL.


 The position along the branch must be given, using the POSITION key, the ABSPOSITION key, or a
combination of the PIPE and SECTION keys.
 Phase fractions can be given either directly with the GASFRACTION and
WATERFRACTION/TOTALWATERFRACTION keys or at standard conditions with the
GLR/GOR/WATERCUT keys.
 The upstream/downstream PRESSURE and TEMPERATURE can be specified. See Model
description on page 91 for more information.
 Each source type is also available for use with the compositional models (Compositional Tracking,
Blackoil, MEG, Wax).
 All input variables can be defined as time series with the TIME key.

See the keyword SOURCE (on Flowpath) on page 380 for more details.

Mass source

There are several keys available to define the mass source.

When the mass flow rate is to be specified at the source temperature and pressure without Compositional
Tracking, use the key MASSFLOW.

With compositional models the keys FEEDMASSFLOW, FEEDMOLEFLOW or FEEDSTDFLOW can be


used.

When the volumetric flow rate at the standard conditions is given, the key STDFLOWRATE should be
used.

See keyword SOURCE for more details.

Pressure driven source (SOVA)

The SOVA massflow is defined by the valve specific input data. For further descriptions, see the Valve
section.

Steady state preprocessor

Both source types can be used with the steady state preprocessor. However, with a closed node, the sum
of all flows into the adjacent section (including contributions from all sources, wells, and nearwells) cannot
be 0.

- 95 -
OLGA User manual

Well inflow and injection


The Wells module provides the possibility of building virtual wells that can be used to analyze 'What if'
case scenarios. This is especially useful for analyzing:

 Start-up and shut down of production and well testing


 Complicated production from several reservoir zones
 Reservoir injection, for example, water alternating gas injection (WAG)
 Analysing cross flow between different reservoir zones
 Water cut limit
 Flow from multilateral wells
 Flow stability
 Flow assurance (hydrates)
 Gas lift requirements
 Production optimization
 Well test equipment sizing

It also enables a full-field integrated modeling approach, where a combination of reservoir, well bore,
pipeline network and facilities simulators are used to construct an analytical model of the full field
production system.

See also reference [21] which covers different topics where the OLGA Wells module could be used.

License requirements

Production or injection flow equations other than linear, quadratic, or tabular are enabled by the Wells
module that requires a separate license.

Point contact

Several models are available for the calculation of the inflow performance relationship at a contact point.
The models vary in complexity from the relatively simple linear model, which uses a given Productivity and
Injectivity, to advanced models where the reservoir properties and inflow relationships play an important
role in the modeling. See The Wells module on page 99 for more details.

Model description

Well placement options

A well can be placed at the mid-point or the inlet (bottom) of the well section. When it is placed at the inlet,
the inlet or bottom hole flowing pressure is calculated by adding the hydrostatic pressure drop to the
pressure in the well section. If the well is placed at the mid-point of the section, the bottom hole flowing
pressure is equal to the pressure in the well section.

Phase fractions

For flows from the well section into the reservoir, the total mass flow is calculated with the gas mass flow
fraction equal to the gas mass fraction within the well section. For the flow from the reservoir into the well
section, the gas mass fraction of the oil and gas mixture of the well fluid, GASFRACTION, and water mass
fraction in the total mixture of the well fluid, WATERFRACTION (or TOTALWATERFRACTION) are given.
If GASFRACTION < 0 is given, the equilibrium gas mass fraction is used. If the water option is not used,
WATERFRACTION should be zero (default value).

- 96 -
The OLGA model

Options for calculating flow rate

Flow from reservoir into well

Two thermal options for calculating enthalpy inflow are available. The isothermal option assumes that the
fluid enters the well at the reservoir temperature, and reservoir fluid enthalpy is calculated on the basis of
reservoir temperature and well pressure. If the adiabatic option is used, the reservoir fluid enthalpy is
calculated on the basis of reservoir temperature and reservoir pressure. The fluid temperature can change
as the pressure decreases from the reservoir pressure to the pressure at the well section due to constant
enthalpy expansion and flashing.

The following three options are available for specifying the relationship between the mass flow rate and the
pressure difference (with the Wells module seven options are available.

1. Linear formula:

where Gw is the mass flow rate, pR the reservoir pressure, and pwf the bottom hole flowing pressure.
Constant B is defined as the productivity index. Constant A allows for a minimum pressure difference
required for the fluid to start to flow from the reservoir to the well and it must be less or equal to zero.

The inflow model Constant productivity index, equation (16) in the Wells module, can also be used for
linear inflow. This model is available for all users and is described in section Constant productivity
index below.

2. Non-linear formula:

where A, B and C are constants. Constant A allows for a minimum pressure difference required for
flow to start from the reservoir to the well.

3. Tabular form - see the keyword TABLE (on Library) on page 489:

The table input option is made to support gas and water coning.

The relationship between the flow rate (or other well parameters) and the pressure difference is given
by a table. If you do not give a zero flow point in the input, the program automatically adds a zero point
at zero pressure difference. For pressure differences within the range of the table, the flow rates are
calculated by a polynomial interpolation of second degree. For pressure differences larger than the
maximum value in the table, the flow rates are determined by a linear extrapolation using the tangent
to the quadratic curve at the end point of the table.

Flow from the well into the reservoir

For negative flow from the well to the reservoir, the negative enthalpy source corresponds to the pressure
and temperature conditions in the well section.

The following three options are available for specifying the relationship between the mass flow rate and the
pressure difference.

1. Linear formula:

where Gw is the mass flow rate into the reservoir and constant B is the injectivity index. Constant A
represents the minimum pressure difference required for the fluid to start to flow from the well into the
reservoir and it must be less than or equal to zero.

- 97 -
OLGA User manual

The inflow model Constant productivity index, equation (16), in the Wells module, can also be used for
linear inflow. This model is available for all users.

2. Non-linear formula:

where A, B and C are constants. A is the minimum pressure required for flow to start from the well into
the reservoir.

3. Tabular form - see keyword TABLE (on Library) on page 489:

The table input option is made to support gas and water coning.

The relationship between the flow rate (or other well parameters) and the pressure difference is given
by a table. If you do not give a zero flow point in the input, the program automatically adds a zero
pressure difference. The interpolation and extrapolation procedure is the same as for flow from the
reservoir to the well.

If equivalent pipe is used and there are wells in each parallel pipe, there are two ways to prepare the data
for these wells:

 Give input data for each individual well.


 Use a single equivalent well. Use one of the following procedures to construct data for the equivalent
well:

If the linear equation is used, the constants A and B for the equivalent well are:

where Ai and Bi are constants for each parallel well. N is number of parallel wells included in the equivalent
well.

If the non-linear equation is used, the constants A, B and C for the equivalent well are:

where Ai, Bi and Ci are the constants for each parallel well.

If the well performance is given by a table, the flow rate in the table is the sum of the flow rates of all the
parallel wells at the same pressure difference.

With the Wells module, seven new models for calculating the reservoir inflow are available. For these
models the reservoir performance can be specified through reservoir variables or from draw-down/build-up
tests from the actual well. See The Wells module on page 99 for more information.

- 98 -
The OLGA model

Dynamic Well Inflow

An option is available for simulating the dynamic characteristics of a well. For positive well flow, the
instantaneous flow rate for each phase, f, is calculated by

(15)

where qf is the instantaneous flow rate for phase f, is the steady-state flow with the bottom hole
flowing pressure at time t, and Tf is the time constant for the flow of phase f.

The steady-state flow for each phase is calculated by:

when the flowing pressure, Pwf, is less than a given threshold pressure, Plim,f. When Pwf is above Plim,f,
is set to zero. The productivity index, PIf, as well as the time constant Tf, can change with Pwf.

Numerically, equation (15) is solved by

As an option, a transport delay can be modeled by specifying a certain distance that the front of phase f
must travel before the actual inflow can be started. This distance, hf,o, is user determined.

If hf > hf,o, the flow rate into the well section is set to qf; otherwise, the flow rate into the well section is set to
zero.

The transient option is switched on if one or both of the time constants are greater than zero.

The transient option is only applied for positive flow (from the reservoir to the well section). For the
negative flow, the constants are assumed to be zero.

The Wells module

The Wells module is designed for well flow applications where the reservoir properties and the inflow
relationships play an important role in the modeling.

The Wells module is especially well suited to the following applications:

 Start-up and shut down of production and well testing.


 Complicated production from several reservoir zones.
 Reservoir injection, for example, water alternating gas injection (WAG).
 Analysing cross flow between different reservoir zones.
 Flow from multilateral wells.

- 99 -
OLGA User manual

Reservoir inflow

In the Wells module, the reservoir performance is specified through perme-ability, extension of the
reservoir, fluid properties and so on, or from draw-down/build-up tests from the actual well.

The reservoir inflow can be specified several ways, depending on the type of reservoir simulated. The
different inflow performance models are given below.

Constant productivity index

The linear form is used for the production of a typical oil reservoir, or as a first estimate when the
production curve for the well is not properly defined:

(16)

where pR is the static reservoir pressure, pwf is the flowing bottom hole pres-sure and J is the constant
productivity index given by:

Linear productivity (typical oil reservoir)

in oilfield units (stb/d/psi)

where

J Productivity index [stb/d/psi]

kh Effective permeability x net pay [mD ft]

n Oil viscosity [cP]

Bo Oil formation volume factor [Rft3/Sft3]

re Reservoir extension [ft]

rw Wellbore radius [ft]

s Mechanical skin

Forchheimer and Single Forchheimer model

When the full production curve can be estimated and a constant PI is not ap-plicable a quadratic form of
the relation between inflow and draw-down can be used, for example the Forchheimer model (see [4]):

where B and C are the linear and non-linear part of the productivity index respec-tively defined by:

- 100 -
The OLGA model

where B's unit is [psi2/(scf/d)], C's unit is [psi2/(scf2/d2)] and

T Reservoir temperature [°R] (RESTEMPERATURE)

mg Gas viscosity at reservoir conditions [cP] (VISGRES)

z Gas z-factor at reservoir conditions (ZFACT)

re Reservoir extension [ft] (RESEXT)

rw Wellbore radius [ft] (HOLES/2)

s Mechanical skin [-] (SKINS)

D Non-Darcy or turbulence skin [1/Sft3/d] (SKIND)

k Reservoir permeability [mD] (KPERM)

h Well effective net pay [ft] (HPAY)

For high pressure gas wells with limited draw down, pressure can be used instead of pressure-squared, in
which case the Single Forchheimer equation is written:

where B and C are defined by:

where B's unit is [psi/(scf/d)], C's unit is [psi/(scf2/d2)], and pav is defined as

Vogels equation

The following IPR equation, known as Vogels equation, was traditionally used for oil-well performance in
saturated oil reservoirs (see [4] ).

where q0,max is the theoretical maximum oil rate when flowing bottom hole pressure equals zero.

Note: The injection volume flow is calculated according to reservoir fluid density. That means that the
injection rate of - for example, water - is the volume rate found from Forchheimer multiplied with water
density, not the mass flow of gas in the reservoir.

- 101 -
OLGA User manual

Backpressure and normalized backpressure equations

For gas wells, the following simple equation is often used for the inflow performance (see [4]).

where C is defined by:

where C's unit is [scf/d/psi2n].

This equation is often referred to as the backpressure equation. The exponent n ranges in value from 0.5
to 1.0. A normalized form of this equation can be used for saturated oil wells:

where q0,max is the maximum oil rate when flowing bottom hole pressure equals zero.

Undersaturated oil wells

For oil wells producing from reservoirs with static reservoir pressure above the bubble point pressure, the
bottom hole flowing pressure might drop below the bubble point pressure during production. In these
cases the linear inflow relationship will not be sufficient alone to describe the inflow under varying flowing
pressures. The following two equations are therefore introduced:

for

and

for

where pb is the bubble point pressure.

Tabulated inflow performance curve

If neither of the above inflow performance curves nor the linear and non-linear option presented in this
section is applicable for the reservoir, you can specify a tabulated inflow curve. See the description at the
beginning of this section.

- 102 -
The OLGA model

Variable reservoir reference pressure

When a reservoir has been flowing for some time at high rates the reservoir pressure close to the well can
be reduced significantly. The initial static reservoir reference pressure is no longer applicable for specifying
the inflow from the zone and a reduced reference pressure is introduced.

For the model to take these local drawdown and build-up effects into account, the reservoir reference
pressure can be specified as a function of time by the user.

Injectivity index

The injectivity index is used for modeling of flow from the wellbore into the reservoir zone of gas,
hydrocarbon liquid or water. This option is, for example, used for pushing the gas back into the reservoir
during a work-over operation.

The injectivity index is adapted to specify the relation between the flow from the well into the reservoir and
the pressure build-up in the well. That is, when the bottom hole pressure exceeds the static reservoir
pressure, an inflow into the reservoir starts depending on the injectivity index.

The inflow into the reservoir can be specified on the same form as the well production, but a different
relationship can also be used. In addition, a separate linear injectivity index can be used for the oil phase
or the water phase.

Fracture pressure

When the pressure in the wellbore exceeds a certain value above the static reservoir pressure the
formation will break down. The pressure required to burst the formation is called the fracture pressure.
When the pressure inside the wellbore exceeds this pressure small fractures are created in the formation
resulting in a significant increase in injectivity, and the fluid in the wellbore flows into these fractures
instead of flowing into the reservoir matrix.

By specifying the fracture pressure, you define the maximum allowable pressure inside the wellbore. In the
Wells module, this is modeled by an 'infinite' inflow into the reservoir zone.

How to use

Standard and advanced well feature

There are two ways of specifying the data for flow between the reservoir and the well. You can either
specify the coefficients used in the inflow correlations directly, or you can specify traditional well/reservoir
variables such as permeability and net pay.

In the standard well for OLGA, the coefficients used in the inflow correlations is specified directly. Three
options are available for specifying the relationship between the mass flow rate and the pressure
difference: a linear formula, a non-linear formula and a tabular form. See Model description on page 96 for
more details.

The Wells module is designed for well flow applications where the reservoir properties and inflow
relationships play an important role in the modeling. In the Wells module, the reservoir performance is
specified through permeability, extension of reservoir, fluid properties, and so on. The well/reservoir
variables are translated into the coefficients used in the inflow correlations. The volume flow q is a function
of the bottom hole pressure pwf, the reservoir pressure pR, and the computed coefficients used in the inflow
correlations. The coefficients used in the inflow correlations can also be given directly.

There are several different inflow models implemented in the Wells module, such as Forchheimer, Vogels
and Backpressure. See Model description on page 96 for more information.

- 103 -
OLGA User manual

For advanced well inflow types, the coefficients can given directly by using the keys BINJ, CINJ, BPROD,
CPROD and EXPONENTN or by setting the reservoir variables through using some of the keys BOOIL,
BPPRESSURE, FRACPR, HOLES, HPAY, INJECTIVITY, INJPOSTFRACFACTOR,
INJPREFRACFRATOR, INJTHRESHOLD, KPERM, PHASE, PRODI, PRODPOSTFRACFACTOR,
PRODPREFRACFACTOR, QMAX, RESEXT, SKIND, SKINS, VISGRES, VISLRES and ZFACT. Which
key to use for the different well flow models is highlighted in the GUI interface.

The keys GASINJ, OILINJ and WATINJ can be used to specify the injection rate for each phase. The
specified values override the calculated injectivity for the different phases. Note that even if all the linear
phasewise injectivity keys are specified, AINJ and BINJ or INJECTIVITY must be given dummy values in
the input.

Note: The steady state pre-processor does not handle injection wells. For these cases a solution with
source close to 0 is found as input to the dynamic solver.

Input

The keyword ”WELL” is used to define required data for calculating the flow performance of wells.

Keyword dependencies: BRANCH, GEOMETRY, OPTIONS, POSITION, FEED

Required keys: LABEL, INJOPTION, PRODOPTION, RESPRESSURE, RESTEMPERATURE,


ISOTHERMAL, LOCATION (Default values can be used if specified)

You can use either the key ABSPOSITION or the key POSITION, or the keys PIPE and SECTION, to
locate the well.

The production and the injection models are specified through the keys PRODOPTION and INJOPTION
with the following values available:

 LINEAR
 QUADRATIC
 TABULAR
 FORCHHEIMER (The Forchheimer model)
 SINGLEFORCHHEIMER (Forchheimer with pressure instead of pressure squared)
 VOGELS (The Vogels equation for saturated oil reservoirs)
 BACKPRESSURE (The Backpressure equation for oil and gas wells)
 NORMALIZEDBACKPR (Normalized backpressure for saturated oil wells)
 UNDERSATURATED (Under saturated oil wells)

For advanced well inflow types the coefficients can be given directly by using the keys BINJ, CINJ,
BPROD, CPROD and EXPONENTN or by setting the reservoir variables through using some of the keys
BOOIL, BPPRESSURE, FRACPR, HOLES, HPAY, INJECTIVITY, INJPOSTFRACFACTOR,
INJPREFRACFRATOR, INJTHRESHOLD, KPERM, PHASE, PRODI, PRODPOSTFRACFACTOR,
PRODPREFRACFACTOR, QMAX, RESEXT, SKIND, SKINS, VISGRES, VISLRES and ZFACT. Which
key to use for the different well flow models is highlighted in the GUI interface.

When using the standard well in OLGA ,the key GASFRACTION, and WATERFRACTION or
TOTALWATERFRACTION, is appropriate to use because AINJ, BINJ, APROD and BPROD then are
mass based. Values from PVT table are used when GASFRACTION and TOTALWATERFRACTION is set
to -1 in the input.

With the advanced well inflow types, the key GORST and WATERCUT is appropriate to use because
AINJ, BINJ, APROD and BPROD then are volume based. WATERCUT is calculated from PVT table if set
to -1 in the input.

- 104 -
The OLGA model

If COMPOSITIONAL = ON in OPTION, either the key FEEDMASSFRACTION or FEEDMOLEFRACTION


is used.

If COMPOSITIONAL = BLACKOIL in OPTION, the key FEEDVOLFRACTION is used.

Note that you might not get as output the fractions or water cut specified for the well because this depends
on there being enough content of the specified phases in the well.

See the description of keyword WELL (on Flowpath) on page 392 for more details.

Output

The keywords TREND and PROFILE in the input file specify the output from the simulation.

The resulting trend file (*.tpl) and profile file (*.ppl) are used for plotting several Well variables (same
variables for Advanced and Standard well):

 Mass rates for each phase (gas, oil and water)


 Steady-state mass rates for each phase
 Total mass rate for the liquid phase and all phases
 Cone front for each phase
 Enthalpy for the well

See the Well Output Variables on page 605 for more details.

Zone

A zone is a region within a branch in which OLGA generates automatically inflows in each control volume,
based on a template definition.

License requirements

Zone is only implicitly affected by license requirements, that is, it is only affected by license requirements
that apply to the inflows referenced.

Model description

General

Given a start position and an end position, inflows are generated automatically in all control volumes inside
the region, based on a template. While most properties are assumed to be constant over a zone, pressure
and temperature can change. Refer to the Interpolation section below for further details.

Refer to the individual sections to get detailed information on the various references given in the ZONE
keyword.

Reservoir inflow assumptions

The inflows specified generate well-type objects where the location is assumed to be in the middle of the
control volume. Furthermore, it is assumed, that all reservoir properties except for the reservoir pressure
and the reservoir temperature remain constant throughout the zone.

Interpolation

There are three different kinds of interpolation implemented, which are described in the following.

- 105 -
OLGA User manual

No interpolation

This option (referred to as OFF in the input) means that the reservoir pressure and reservoir temperature is
assumed to be constant through the entire zone.

Vertical interpolation

This option (referred to as VERTICAL in the input) applies linear interpolation with respect to the vertical
depth between the reservoir pressure and reservoir temperature specified at the zone endpoints.

Automatic interpolation

This option (referred to as AUTOMATIC in the input) requires that the reservoir pressure and reservoir
temperature is specified at one of the zone endpoints. Given this reference pressure, p0, the pressure,
p(h), is calculated at each depth h by integrating the hydrostatic pressure of the reservoir liquid according
to

The reservoir temperature is assumed to be constant.

How to use

General

Instead of specifying WELL keywords in numerous consecutive control volumes, the ZONE keyword can
be used to simplify input. The extend of the zone is specified through the position references
STARTPOSITION and ENDPOSITION. For each control volume between the endpoints, well-type objects
are generated automatically according to a template. The template is specified using the keyword
RESERVOIRINFLOW under Library and is linked to ZONE through the reference key
RESERVOIRINFLOW.

Reservoir inflow

The keyword RESERVOIRINFLOW under Library is in most parts a duplicate of the flow-path level
keyword WELL. As compared to WELL, there is no position to be specified because the positions of each
respective inflow is generated automatically through the input given on ZONE. Furthermore, the reservoir
pressure and reservoir temperature are specified through ZONE. For detailed information, please refer to
the section on interpolation below.

Coefficient specification

One final thing to be noted is the specification of the injection and production coefficients. On WELL, these
are specified for that particular inflow object whereas their interpretation in RESERVOIRINFLOW is
depending on the COEFTYPE key on ZONE. For COEFTYPE=TOTAL, the coefficient values are
considered to correspond to the sum for all contributions within the zone. For COEFTYPE=PERMETER,
the coefficient values mustbe multiplied by a length to generate the value for each individual inflow. To
illustrate this, consider a 1,000 meter long zone. If one of the coefficients is specified to equal 50 when
COEFTYPE=TOTAL, the equivalent input using COEFTYPE=PERMETER is to specify that very same
coefficient to be 0.050.

- 106 -
The OLGA model

Interpolation

The zone has a number of options for specifying the reservoir pressure and reservoir temperature;
INTERPOLATION={[OFF],VERTICAL,AUTOMATIC}. The default option, OFF, corresponds to constant
reservoir pressure and temperature as given through PRESSURE and TEMPERATURE. A more
advanced option is vertical interpolation. Here, the reservoir pressure and reservoir temperature are
specified at the zone endpoints (STARTPRESSURE, ENDPRESSURE, STARTTEMPERATURE, and
ENDTEMPERATURE) and linear interpolation is carried out as a function of vertical depth. The third
interpolation option, automatic interpolation, uses a uniform temperature while the pressure is calculated
through integrating the hydrostatic pressure contribution in the reservoir fluid starting at the given reference
pressure.

Time series

The PRESSURE and TEMPERATURE keys in the ZONE keyword can be given as time series. Note that
the number of elements in these time series must correspond to the number of elements in the TIME key
which is used for the RESERVOIRINFLOW keyword. The same correspondence must exist if
STARTPRESSURE/ENDPRESSURE and STARTTEMPERATURE/ENDTEMPERATURE is used.

Output

When specifying output variables for zones, output is always given accumulated over the entire zone. To
get data for the individual inflows, set ZONEDETAILS=YES in the TRENDDATA keyword. By doing so,
output is generated for each individual inflow that has been automatically generated in addition to the
accumulated one.

Note: It is not possible to get data for an individual inflow. It is either all or nothing.

Near-wellbore
Conventional dynamic well flow models use steady-state IPRs (Inflow Performance Relationship) to
describe the influx of oil and gas from the reservoir, ignoring the transients in the near-wellbore area.
Furthermore, reservoir models use steady-state lift curves to represent the TPRs (Tubing Performance
Relationship), which ignores the wellbore flow dynamics. Neither the well models nor the reservoir models
can account for the dynamic wellbore/reservoir interactions.

In OLGA, the IPR is described with the WELL keyword. With this model some transient phenomena in the
well are not accurately predicted, while others are not predicted at all. To bridge this modeling gap, OLGA
can be coupled to ROCX, a near wellbore reservoir model developed by IFE, or to the ECLIPSE Industry
Reference Reservoir Simulator.

Integrated simulations of wellbore (using OLGA) and the near wellbore reservoir (using ROCX or
ECLIPSE) should be used when transient phenomena in the wellbore/reservoir are studied. Typical
examples are:

 Well Shut-in/start-up
 Onset of instability
 Dynamic gas/water coning
 Well loading and back seepage
 Cross flow

- 107 -
OLGA User manual

License requirements

To run OLGA-ROCX simulations, a ROCX Module license is required.

To run OLGA-ECLIPSE Link simulations, licenses for ECLIPSE and Open ECLIPSE are required.

Model description

To study wellbore-near wellbore reservoir interactions, OLGA can be coupled to either ROCX or ECLIPSE.
The description in this section applies to both.

During the simulation, OLGA provides the wellbore pressure to the reservoir model and the reservoir
model calculates the flow rate of each phase at the interface. The flow rates can be positive or negative
depending on the flow directions corresponding to production and injection respectively. In the case of
injection or back seepage, the phase mass fractions in the wellbore section that the reservoir model
interfaces to are converted to saturations to calculate the fractional injection rate for each phase.

The numerical coupling between OLGA and the reservoir simulator is implemented in an implicit scheme.
The concept of the implicit coupling here is that the reservoir model calculates a sensitivity coefficient for
the production rate with respect to the wellbore pressure at each time step and makes it available for
OLGA. At the next time step, OLGA uses this sensitivity coefficient to determine the new wellbore
pressure. The size of the near-wellbore domain contributing to the rate-pressure sensitivity calculation is
specified by the coupling level that can be given as a simulation input.

The principle of the implicit coupling can be summarized as follows:

1. Assuming the models have been integrated up to time step n, the wellbore model begins integration to
time step n+1 by requesting the reservoir model to calculate the sensitivity coefficients and ,
which are used in this relation:

where PP is the pressure in the wellbore, MP is the mass flow rate for each phase and the subscript p
refers to a given phase, that is, gas, oil or water.

2. The wellbore model uses the above relation as a boundary condition and solves for the complete
wellbore. The wellbore model has now completed time step n+1 and sends and to the
reservoir model.
3. The reservoir model completes its time step n+1 calculation by using the wellbore model supplied
boundary condition.

The sensitivity coefficient is calculated by

which can be analytically derived from the reservoir model equations. is simply given by

With this implicit coupling implementation, the integrated model can run simulations with relatively long
time steps while maintaining numerical stability.

- 108 -
The OLGA model

OLGA coupled with ROCX

The near-wellbore reservoir model ROCX is capable of simulating three-phase Newtonian Darcy flow in
porous media. The flow equations are solved in three dimensions, giving saturations and pressures
varying in space and time as output in addition to the flow rate of each phase at the boundary. Thermal
computation is also included. ROCX supports both radial and rectangular grids. The numerical and
physical kernel code is not affected by the choice of grid. An implicit modification of the IMPES (Implicit
Pressure Explicit Saturation) numerical scheme is used. The sensitivity coefficient is extracted from the
Jacobian matrix of the reservoir system of equations. The sensitivity coefficient that is used to determine
the implicit domain contributing to the rate-pressure sensitivity is read from the ROCX input file.

In addition to the PVT table functionality, ROCX is also equipped with a blackoil simulation functionality. In
this case the flow rate of each blackoil component is computed in addition to the phase rates.

During simulation, ROCX is considered as a plug-in to the OLGA model, and the integrated simulation is
fully controlled by OLGA.

OLGA coupled with ECLIPSE

During simulation, OLGA and ECLIPSE 300 are run as two separate processes that communicate through
Microsoft MPI. The simulation is controlled by OLGA. To further improve the numerical stability, the OLGA-
ECLIPSE link include an option to iterate if the difference between the predicted linearized flow rate (a)
differs from the flow rate computed in the reservoir simulator at the end of the time step. The tolerance for
this difference, as well as the maximum number of iterations, can be changed in the keyword
ECLIPSEOPTIONS on Case level. The size of the implicit domain can also be selected here.

Using OLGA PVT table together with ECLIPSE black oil

Using the PVT tab option in OLGA the fluid phases are tracked and the fluid phase properties and
composition of the phases are assumed to follow what is specified in the input tabulated file. When using
this option, no blackoil components are tracked in the wellbore. When interacting with the reservoir (where
a blackoil formulation is used) it is therefore important to be aware of some of the assumptions made when
fluid is entering or leaving the reservoir.

When the fluid is flowing from the reservoir, the phase volume flows are used to compute the mass flow of
each phase entering the wellbore. OLGA assumes the equilibrium as described by the PVT table file for
the entering fluid phases. This means that OLGA assumes that gas flowing into the wellbore can contain
water vapor, even if this is not the case in the reservoir model. Note that it is possible to tell OLGA to not
include water in the flash by choosing only a hydrocarbon flash.

For flow into the reservoir, a composition for the mapping of the flow onto the black oil components of
ECLIPSE is done. Water vapor in the gas is mapped onto the H2O component of ECLIPSE, where in the
reservoir water will flash to a liquid phase. The mass fraction of gas in the oil phase is computed and
passed onto ECLIPSE. A flash of the total composition that enters the reservoir is then performed by
ECLIPSE.

When using the PVT table option in OLGA, the same fluid characterization for generating the OLGA PVT
table file and the ECLIPSE black oil table should be used in order for the fluid properties to be similar.

How to use

To define a NEARWELLSOURCE, follow the steps below.

 Each NEARWELLSOURCE must have a unique LABEL.


 The position along the branch must be given, either by use of the POSITION key, ABSPOSITION, or
by a combination of the PIPE and SECTION keys.

- 109 -
OLGA User manual

For OLGA ROCX simulations

 The name of the ROCX input file must be given (key ROCX).
 A label that matches a position label defined in the ROCX input file must be given (key
RESBOUNDNAME).

ROCX reads its input from a keyword based text file. The data defined here is permeability and porosities
of the porous medium, fluid transport properties and thermal properties of the rock and fluids. Necessary
boundary and initial conditions must be given to enable simulation. As in OLGA, the boundary conditions
of the reservoir model can also be specified in time series. ROCX reserves the skin option for the situation
when the inflow deviation from its ideal cannot be properly accounted for by the reservoir model itself (for
example, the perforation skin). Standard industry file formats are used for output.

More information about how to define the input for the ROCX model can be found in the ROCX User
Manual.

For OLGA-ECLIPSE Link simulations

To specify the completion to connect to, give these keys, which must match the corresponding identifiers in
the ECLIPSE input file:

 The name of the well (key ECLIPSEWELL).


 The reservoir grid block indices of the connected block, BLOCKINDEX_I, BLOCKINDEX_J and
BLOCKINDEX_K.
 The name of the local grid refinement (key LGRNAME) that the well is completed in. The default name
is GLOB (no grid refinement).

ECLIPSE reads its input from a standard ECLIPSE 300 input file. Detailed information about how to define
the input for the ECLIPSE 300 model can be found in the standard documentation included in the
ECLIPSE installation.

Initial Conditions for OLGA ROCX

When OLGA is coupled to ROCX, the following are alternative ways to initialize the simulation.

 Each simulator is initialized as if it was run standalone. Tthat is, OLGA uses INITIALCONDITIONS for
the OLGA flow paths, and ROCX uses either manual or automatic initialization for the reservoir.
 ROCX is initialized with data from a restart record written at a certain time tb. OLGA uses
INITIALCONDITIONS for the OLGA flow paths. The start time of the ROCX simulation is set
automatically to the start time of the OLGA simulation.
 Both OLGA and ROCX are initialized from restart records. The details of this is described in the
section 'How to use the restart functionality' below.

Initial Conditions for the OLGA-ECLIPSE Link

When OLGA is coupled to ECLIPSE, the following are alternative ways to initialize the simulation

 Each simulator is initialized as if it was run standalone. That is, OLGA uses INITIALCONDITIONS for
the OLGA flow paths, and ECLIPSE uses initial values or equilibration for the reservoir.
 ECLIPSE is initialized with data from a restart record written at a certain time tb. The start time of the
ECLIPSE simulation is then automatically tb. This time (tb) must also be used as STARTTIME in the
INTEGRATION keyword of the OLGA simulation.
 Both OLGA and ECLIPSE are initialized from restart records. The details of this are described in the
section 'How to use the restart functionality' below.

- 110 -
The OLGA model

How to use the restart functionality

To run a restart simulation, the base case (in the following called B) must be set up to write restart data,
and the restart case (in the following called R) must be able to read the restart data. Two typical workflows
are described below.

1. In the base case, OLGA and the reservoir simulator are run standalone (not coupled). In the restart
run they are run coupled.
2. OLGA and the reservoir model are run coupled in the base run as well as in the restart run.

Restart for OLGA ROCX simulations

For workflow 1, the ROCX input as well as the OLGA input for the base case simulation must include
restart write instructions, so that restart records are written at the desired time. In workflow 2, a restart
record is written automatically by ROCX as well as by OLGA at the restart write times specified in the
OLGA input.

In a restart simulation, ROCX does not use the restart read time from its own input file, but uses the restart
read time set in the OLGA input (the READTIME key in the RESTART keyword). The name of the restart
data file (B.rrs) must be specified in the ROCX restart input file (R.rocx). For more information on how to
define restart input for ROCX, please refer to the ROCX User Manual.

Restart for OLGA-ECLIPSE Link simulations

For workflow 1, the ECLIPSE input as well as the OLGA input for the base case simulation must include
restart write instructions, so that restart records are written at the desired time. In workflow 2, a restart
record is written automatically by ECLIPSE as well as by OLGA at the end of the base case simulation.

Note that the OLGA simulation time must be equal to the ECLIPSE simulation time at any time throughout
the simulation. In a restart simulation, ECLIPSE uses the read time from its own input file (R.DATA).
Therefore, to ensure that OLGA and ECLIPSE reads restart data saved at the same time, you must make
sure that the restart read step number corresponds to the restart read time set in the OLGA input.

This can be achieved by the following steps.

 Open the ECLIPSE 300 file B.PRT.


 In this file, find the header for the restart record you want to start from. The 'time in seconds' in this
header must be used as STARTTIME in the INTEGRATION keyword of the OLGA restart simulation
(R.opi).
 In the same header, identify the corresponding step number.
 In the ECLIPSE 300 restart input file (R.DATA), use this step number in the RESTART specification.
 In the ECLIPSE 300 restart input file (R.DATA), the name of the base case (that is, B.DATA) must
also be given in the RESTART specification.

For more information on how to define the ECLIPSE 300 input files, please refer to the ECLIPSE
documentation in the ECLIPSE installation.

- 111 -
OLGA User manual

Notes OLGA ROCX

 OLGA ROCX is only compatible with the PVT table or blackoil tracking schemes (OPTIONS
COMPOSITIONAL=OFF or BLACKOIL).
 For three-phase simulations, ROCX uses the OLGA PVT table for looking up fluid properties.
Currently, only the three-phase fixed format OLGA PVT table can be used.
 The Steady-state preprocessor in OLGA cannot be applied for OLGA ROCX blackoil simulations. The
simulation can be initialized by initial conditions or restart files. ROCX has its own restart file with the
extension .rrs.
 Other limitations on the ROCX reservoir simulator are given in the ROCX User manual.

Notes OLGA-ECLIPSE Link

 The OLGA-ECLIPSE Link is compatible only with the PVT table or blackoil tracking scheme
(OPTIONS COMPOSITIONAL= OFF or BLACKOIL). Using the blackoil tracking scheme, exactly three
blackoil components must be used (one gas, one oil and one water component). The ECLIPSE 300
blackoil option must be used for the reservoir part.
 Only one reservoir instance can be linked with OLGA in a single simulation. However, this instance
can cover several reservoirs.
 There is no thermal computation in the reservoir, but the temperature versus depth can be input. This
is standard for ECLIPSE 300 blackoil. For the wellbore, all the temperature options in OLGA are
available.
 The Steady state pre-processor cannot be used when OLGA is coupled to ECLIPSE. The simulation
can be initialized by initial conditions, restart files or a combination of the two. Refer to the ECLIPSE
documentation for information on the input requirements for ECLIPSE 300.
 Different phases flow in the same direction in/out of a single completion. However different
completions can have different flow directions.
 There is a model difference regarding solubility in ECLIPSE blackoil compared to OLGA blackoil. The
limitations are: in OLGA oil cannot dissolve in gas, in ECLIPSE water cannot dissolve in gas.
 In general, the computational speed for small cases is comparable to the computational speed of
OLGA-ROCX. For large cases the speed is better.
 Usability limitations:
 The ECLIPSE input file cannot be generated by OLGA or any tool in the OLGA installation. GUI
support for generation of ECLIPSE input files is offered by Petrel.
 As a consequence of the previous point, there is no automatic coupling. This means that the user
input in the OLGA GUI is not used when generating the ECLIPSE input file or vice versa.
 It is the user's responsibility to assure that the PVT input in both simulators describe the same
fluid.
 The simulation start time in OLGA must be set manually to the simulation start time in ECLIPSE.
This is also required for restart simulations.
 There is no viewer in the OLGA installation for the reservoir part. Instead the reservoir output
must be viewed in standard ECLIPSE viewers such as Petrel, FloViz or Tecplot.

- 112 -
The OLGA model

Flow assurance and special modelling options

Slug tracking
In the standard OLGA model, physically sharp fronts in liquid holdup are smeared out by the numerical
scheme, a phenomenon that is more pronounced in horizontal or near horizontal high velocity transient
flow cases. In situations where slug flow is identified by the flow model, hydrodynamic slugs are accounted
for only in an average manner that does not give any information about slugs, their properties, or how they
affect the flow. However, many flow parameters are highly dependent on the slug pattern (for example, the
pressure drop in a flowpath). Thus, it is necessary to be able to account explicitly for the occurrence of
slugs.

The slug tracking model is designed to initiate, maintain, and track physically sharp fronts such as those
constituted by startup slugs and hydrodynamic slugs. Among other things, the model gives information
about position, velocity, length, and other characteristic quantities of each individual slug. In turn, this
information is used to give better estimates of the actual properties of the overall flow.

The slug tracking model have two different options initiating slugs (keyword SLUGTRACKING). These
options are:

1. Level slug initiation, which initiate slugs when changes in liquid hold-up are detected from one section
to another. The change in hold-up might be caused by a start-up situation, liquid sources, or boundary
conditions changing with time just as well as geometry effects. This option is activated through the
LEVEL key and is mainly to be used for well-defined start-up slugs.
2. Hydrodynamic slug initiation, which is the recommended slug initiation method for hydrodynamic and
terrain slugging. Hydrodynamic slugs can be initiated when OLGA predicts transitions from either
stratified or annular flow to slug flow. This option is activated by the key HYDRODYNAMIC.

In addition to these two options, there is manual hydrodynamic slug initiation. This option is activated
through the HYDRODYNAMIC key and requires that all slugs initiated are given as user input. Thus, to use
this option, detailed knowledge about the slugging is required because you have to specify the number of
slugs to set up, at which positions to set them up, and at which times.

License requirements

Slug tracking is part of the Slug tracking module that requires a separate license.

Model description

In the slug tracking approach, the fixed grid in OLGA is supplemented by a moving grid that tracks the
position of each slug front and tail. Fronts and tails are then modeled as discontinuities in the mass and
velocity fields. This enables an efficient representation of the holdup distribution with a relatively small
number of grid points. The movement of these discontinuities are governed by the closure relationships
used in OLGA.

There are two types of slugs that can be initiated in OLGA. These types are level slugs and hydrodynamic
slugs. Level slugs are often initiated at low-points where liquid has accumulated, while hydrodynamic slugs
can be initiated at any point in the pipeline provided OLGA predicts slug flow (ID = 3).

- 113 -
OLGA User manual

Initiation of level slugs

Figure 50 Schematic visualization of a pipeline shut-in situation where liquid has been
accumulated at low points. The pipeline consists of a well, a transport line, and a riser.

Level slug initiation can be carried out at any time by setting LEVEL=ON in the SLUGTRACKING keyword.
Level slugs then are initiated in the user specified time interval given by STARTTIME and ENDTIME. The
detection of level slugs is based on differences in the gas fraction. SLUGVOID is used to specify the
maximum void allowed in a slug, whereas BUBBLEVOID determines the minimum void in a bubble. When
a section is found with void less than SLUGVOID, a level slug might be initiated, all depending on the void
in the neighboring sections. If the void increases and exceeds BUBBLEVOID within two upstream
sections, a tail is initiated. If, on the other hand, the void increases and exceeds BUBBLEVOID within two
downstream sections, a front is initiated.

Initiation of hydrodynamic slugs

Figure 51 Schematic visualization of the initiation of a hydrodynamic slug.

- 114 -
The OLGA model

If the key HYDRODYNAMIC=ON in the SLUGTRACKING keyword, and OLGA predicts slug flow (ID=3) at
boundary J, a hydrodynamic slug can be initiated in section J, J-1, or over both sections, see Figure 51.
The methodology for slug initiation depends on the value of SLUGTRACKINGMODEL under the OPTIONS
keyword (see description below).

Note: Initiating a new slug implies redistribution of masses, which might lead to discontinuities in
pressure in inclined or vertical pipes. To avoid such discontinuities, the new slug is set up with an as
short slug length as possible. These short hydrodynamic slugs then grow into larger slugs as they
propagate through the pipe if the conditions are favourable.

OPTIONS SLUGTRACKINGMODEL=OLGA2015

From OLGA 2015.1, a method of stochastic slug initiation has been implemented. This enables OLGA to
simulate the irregular behavior over time that characterizes the slug initiation better. The mechanistic
model for slug initiation derives from work carried out in the HORIZON II JIP [20]. The model is based on
the conservation equation for the number density of slugs:

(20)

where N represents the density of slugs in the pipeline (1/m) and UA represents the advection velocity
(average velocity with which slugs move through the pipeline). The term B is the 'birth' rate of slugs (rate at
which new slugs are formed 1/m/s), and D is the 'death' rate of slugs (1/m/s). Equation (20) is a continuum
equation, but OLGA slug tracking models slug birth and death as discrete events. When new short slugs
form in a region of separated flow, the rate of formation, is assumed to depend on the degree of instability
in the system and the spatial density of slug precursors Np (1/m).

The slug precursor density Np is obtained by simulating the unit cell length of successive short slugs of
lengths 5 to 10 diameters. To this end, a two-phase tail profile model [2] is applied to compute the holdup
distribution in the elongated bubble zone.

The introduction of slugs is governed by the slug growth criterion, also known as the minimum slip
criterion. This criterion can be expressed in terms of the front (VF) and tail (VT) velocities of a candidate
slug. If the flow is locally separated, we consider the introduction of a candidate slug and calculate its front
and tail velocities. If VF < VT, the slug will quickly die, so a new slug should not be introduced. On the other
hand, if VF > VT, the slug will grow, so a slug can be introduced. In the latter case, the decision to introduce
a slug or not is based on an estimate of the probability of slug formation.

The birth rate B is modeled in the form:

where kB is a constant. The final factor represents the (inverse) time for a slug to grow to a length of 10
times the pipe diameter D.

Then for a pipe section of length Δz and a time interval Δt, the probability of a new slug being formed is P
= B Δz Δt. In most cases, the time step is small, so that P << 1.

New slugs can also be formed by the introduction of a short Taylor bubble in a region of bubbly flow or to
split an existing slug. This is handled in a manner analogous to the introduction of a new slug into a region
of separated flow.

The death rate of slugs is not modeled explicitly in OLGA slug tracking. Instead, the death of an individual
slug occurs when the slug tail catches up with the slug front. The number of slugs can also be reduced by
slug merging, which occurs when the front of one slug catches up with the tail of the preceding slug.

- 115 -
OLGA User manual

In addition to the new and improved slug birth model, the slug tracking model has also been revised to
improve the physical basis of the model. In essence, the slug tracking functionality solves equations for the
motion of each slug front and tail. Thus, the key components of the physical model are the closures that
affect the slug front and tail velocity. The slug tail velocity is specified by a correlation based on that of
Bendiksen [2]. This has been thoroughly tested against a wide range of experimental data and found to be
accurate. The model also contains a factor governing the dependence of the slug tail velocity on the slug
length: The flow in the front region of each slug is dominated by a recirculation zone or wake driven by the
shear layer between the fast-moving liquid in the slug front and the relatively slow-moving liquid layer
which it overtakes. If a slug is shorter than the length of the wake zone (which is of order 5 to 10 times the
pipe diameter), the tail of the slug senses the velocity field in the wake. This leads to an increase in the tail
velocity for short slugs, as first reported by Fagundes Netto et al. [10]. Figure 52 shows a plot of slug tail
velocity against the slug length; the tail velocity VT is normalized with the value V∞ corresponding to an
infinitely long slug, and the slug length LS is normalized with the pipe diameter D. The plot comes from a
CFD study by Ujang et al. [36] and includes comparison with experimental data [10] and literature
correlations, see references [7] and [11]. The dependence on slug length was revised in OLGA 2015 and
with SLUGTRACKINGMODEL=OLGA2015 this behaviour contributes to a gradual evolution in the slug
length.

Figure 52 Variation of the slug tail velocity with slug length (for details see Ujang et al. [36])

Although SLUGTRACKINGMODEL=OLGA2015 is meant to be a predictive way to model slugs, there is a


tuning capability to help the user to match data. The tuning constant SLUGFREQCONST modifies the birth
rate model and the model for the slug tail velocity. Higher values increase the initiation frequency and
favour shorter slugs.

- 116 -
The OLGA model

OPTIONS SLUGTRACKINGMODEL=OLGA6

SLUGTRACKINGMODEL=OLGA6 activates the slug functionality, which was the only option in OLGA
2014.3 and earlier versions. In this model a slug is initiated in a section if:

 OLGA predicts slug flow.


 The distance to the closest slug must exceed a minimum distance.
 The time elapsed since a slug was either generated in or passed through the section must be larger
than a specified minimum time.

The minimum distance between slugs is specified through the INITFREQUENCY key (slug initiation
frequency, Fi). Using the slug initiation frequency, the minimum distance is calculated as UB/Fi, where UB is
the bubble nose velocity of the new slug. Per default, the minimum distance is 10 pipe diameters.

The idle time required before generating a new slug at any section boundary is specified through the
DELAYCONSTANT key. The delay constant, DC, is the number of pipe diameters a slug must travel
before the slug model tries to initiate a new slug at the same boundary. Thus, the time between two
consecutive slug initiations on any given boundary or the time between a slug passes a boundary and a
new slug can be set up is given by

D = pipe diameter [m]

Ul = average liquid velocity [m/s]

The default value for the delay constant is 150.

It is possible to estimate the value of the delay constant by using the Shea correlation for slug frequency.
This correlation is given by:

D= pipe diameter [m]

L= pipeline length [m]

Usl = superficial liquid velocity [m/s]

The delay constant should be tuned such that the resulting slug frequency is in the same order of
magnitude as Fsl. Note that this correlation is based on experimental data and field data for systems
dominated by hydrodynamic slugging. Thus, if terrain effects are predominant, you should not use the
Shea correlation. The default value of 150 has been found to yield good results for a number of cases.

When tuning this model we recommended that only the DELAYCONSTANT key is varied first. If it is not
possible to achieve the slug pattern sought by varying DELAYCONSTANT alone, INITFREQUENCY can
be modified as well.

- 117 -
OLGA User manual

How to use

General

1. Add the SLUGTRACKING keyword and choose slug initiation method(s) (LEVEL and/or
HYDRODYNAMIC).
2. Add trend and profile plot variables to see differences between running the simulation with and without
slug tracking, for example,

PROFILEDATA VARIABLE=(PT, TM, ID, HOL, HOLHL, HOLWT, UL, UG)

TRENDDATA PIPE=PIPE5, SECTION=3, VARIABLE=(QLT, QLTHL, QLTWT, ACCLIQ, ACCOIQ,


ACCWAQ)

The accumulated flow rates (ACCLIQ) can be used to estimate slug sizes.

3. Add global trend to get overview of the simulation.

TRENDDATA VARIABLE=(LIQC, OILC, WATC)

TRENDDATA VARIABLE=(RMERR, VOLGBL, HT, NSLUG)

Slug identification number

When initiated, each slug is assigned a unique identification number. The first slug initiated gets
identification number, and then 1 is added for each new slug initiated. This unique number enables the
possibility to follow the development of individual slugs as they move through the pipeline. It is possible to
plot, for example, slug length, front and tail velocities. Plotting individual slug data is useful mainly when
there are few slugs is the system. When hydrodynamic slugging generates lots of slugs, it is difficult to
identify which slug to consider.

Illegal slug section

An illegal section is a section where no slugs are initialized and through which no slugs are allowed to pass
(keyword SLUGILLEGAL). A slug front may enter into the illegal section, but it will be trapped inside it until
the slug tail reaches the section and the slug is removed. The first section in a flow-path is by default an
illegal section and so is the last one. This implies that slugs cannot propagate through networks.

If stability problems are encountered when using in-line process equipment together with slug tracking, it is
recommended that illegal sections are introduced around the process equipment. Furthermore, if there are
large changes in pipe diameter, for example, when modeling a separator at the end of a pipeline as a pipe
with big diameter, instabilities can be avoided by setting illegal sections on each side of such boundaries.

With long pipelines mainly operating in the slug flow regime, the number of slugs can become very large
which in turn results in long simulation times. In such situations, it is recommended to only allow for slugs
close to the pipeline outlet, say the last 5-10 km. Yet again, this can be accomplished by using the
keyword SLUGILLEGAL. In cases where terrain effects are predominant and large slugs develop far away
from the outlet, illegal sections should not be used to prevent such slugs from developing.

Flow regime

When slug tracking is activated, the flow regime indicator (ID) should be used with caution because the
flow regime is forced to bubbly inside liquid slugs whereas it is forced to stratified in slug bubbles. Thus,
the flow regime indicator will never indicate slug flow when slug tracking is activated.

- 118 -
The OLGA model

Vertical riser at the end of a pipeline

Problems might be encountered when slug tracking is activated and the pipeline has a vertical riser at the
end. The problems are usually caused by back-flow in the riser. If such problems are encountered, the
following actions might reduce them:

 Set the gas fraction on the outlet node equal to one. Now, if back-flow occurs at the outlet, only gas
will enter the pipeline.
 Unless the flow in the riser is expected to influence slug patterns significantly, set the riser pipeline
sections to illegal (SLUGILLEGAL).
 If possible, add a couple of horizontal sections at the top of the riser.

Startup slugs not detected

If all start-up slugs are not detected, it is possible to specify the void limits used for initializing start-up
slugs. This is done by modifying the void limits given by the keys BUBBLEVOID and SLUGVOID.

Hydrodynamic slug initiation

The initiation method for hydrodynamic slugs is selected with the key SLUGTRACKINGMODEL under the
OPTIONS keyword. Default is OLGA2015.

The slug model might initiate slugs too often or too seldom as compared to the expected slug pattern.
There are keys that enable you to tune the model to mimic the expected pattern.

The key SLUGFREQCONST can be used if SLUGTRACKINGMODEL=OLGA2015. If


SLUGTRACKINGMODEL=OLGA6, DELAYCONSTANT and INITFREQUENCY can be used. See Model
descriptions for details on how to use these tuning options.

- 119 -
OLGA User manual

Profile plots, trend plots, and slug statistics

When specifying, e.g., the hold-up (HOL) in TRENDDATA or PROFILEDATA, it is important to note that
the hold-up plotted is the section average. You cannot resolve the hold-up of individual slug and bubble
regions inside sections, but these are used to calculate the section average. To visualize the hold-up of
individual slugs/bubbles, specify HOLEXP under TRENDDATA. This will show the instantaneous hold-up
at the boundary specified.

It is possible to plot properties of individual slugs using their identification number. This feature is mainly of
use when there are few slugs in the system and the slugs of interest are easily identified. In cases with
severe slugging, the large number of slugs will make it virtually impossible to single out a particular slug.
However, it might be of interest to look at a statistical sample of slugs to get an idea of the general slug
properties. The syntax for addressing individual slugs is

TRENDDATA SLUGID=1, VARIABLE=(LSL, LSB, JSLT, JSLF, USF, UST, ZFSL, ZTSL, PTJF,
PTJT)

Slug statistics

There are usually two choices to assess slug statistics in OLGA. First of all the trend plot variables
LSLEXP and LSBEXP show the length of a liquid slug or slug bubble currently residing at a given section
boundary.

TRENDDATA PIPE=PIPE-1, SECTION=10, VARIABLE=LSLEXP

Using the OLGA GUI, these variables can be used to plot slug statistics. The slug statistics is generated by
post-processing of the .tpl-file and is accessed by selecting the variables LSLEXP_STAT and
LSBEXP_STAT in the trend plot window. These two plot variables represent the statistical distribution of
slug and slug bubble lengths at the boundary considered. The properties of these plots can be set through
'Slug Statistics...' on the Edit menu.

Also for positions, where plotting of LSLEXP is defined, a summary of the slug statistics is written to the
output file (.out file) for each DTOUT. Slug statistics is written together with some other slug information.

Slugs are counted for each section, and sorted by slug length interval using number of pipe diameters as
measure (to be applicable for all pipe diameters). The table contains number of slugs per section and per
slug length interval. An additional table listing positions with LSLEXP containing position, diameter, branch,
pipe and section is also written.

The slug statistics information is reset in a restart.

Notes

The limitations to the models used in slug tracking are described in Model description.

At present, it is not possible to run slug tracking in combination with

 Pig. The combination is not allowed.


 Complex fluid. The simulation will run, but as far as slugging goes, the results will be the same as if
complex fluid had not been used.

Slug tuning

The SLUGTUNING keyword makes it possible to tune parameters in the slug model.

The SLUGTUNING keyword is used for tuning the OLGA slug tracking model to specific sets of
measurement data or sensitivity studies. SLUGTUNING should be applied with great care, as it might
cause the validation and verification of the OLGA model to no longer be valid.

- 120 -
The OLGA model

License requirements

Slug tuning is part of the Tuning module that requires a separate license.

Model description

The slug tuning coefficients are multiplied by the related values calculated by OLGA. The exception is slug
length which is interpreted directly as slug length in number of diameters.

The Taylor bubble velocity is calculated as

where

CUB1 = tuning coefficient 1 given by the key UBCOEFF1

CUB2 = tuning coefficient 2 given by the key UBCOEFF2

C0 = distribution coefficient

Umix = mixture velocity, that is, the sum of the superficial velocities

U0 = drift velocity

The slug front pressure drop is given by

where

CDP = tuning coefficient for slug front pressure drop given by key DPFACT

CDP0 = tuning coefficient for onset of slug front pressure drop given by key DPONSET

Lslug = slug length

f( l ) = additional pressure drop

Ucrit = cutoff velocity at which the slug front pressure drop is switched on

How to use

Specify the desired slug tuning coefficients and where they should be applied. See also SLUGTUNING.

Note: The slug tuning coefficients are global. It is not possible to specify different sets of tuning
parameters for different flow-paths.

- 121 -
OLGA User manual

Pig
A pig is a mechanical device which is inserted into a pipeline that moves with the flow. Such devices can
be used for, for example, inspection, internal cleaning, or pushing liquid out of the pipe. When running a
pigging operation, parameters of interest are for example

1. the pressure drop over a pig.


2. the rate and total volume of liquid pushed out of a pipeline ahead of a pig.
3. the liquid content of a pipeline before and after pigging.
4. the flow restriction caused by a pig.
5. the velocity of a pig.
6. the time for a pig to traverse a pipeline.
7. amount of wax dislodged from the wall.

License requirements

Tracking of the liquid slug in front of a pig (TRACKSLUG=ON) is part of the Slug tracking module that
requires a separate license.

Any wax related features are part of the Wax deposition module that requires a separate license.

Model description

General

When running a pigging operation, it is optional whether or not the slug-tracking framework is to be
engaged to track the liquid slug in front of the pig. These two options use a unified scheme. This implies
that differences between two such simulations should only be attributed to effects associated with the
differences between explicitly treating liquid slugs or treating them in an average manner.

Explicit tracking of the liquid slug in front of the pig yields a more stable and accurate simulation that
properly accounts for the liquid build-up downstream of the pig. If the liquid slug is not explicitly tracked,
the liquid pushed through the pipe by a pig is only treated in an average fashion and no distinct build-up of
liquid is seen. As the model allows for liquid build-up in front of the pig, it also runs at the risk of a hold-up
approaching 1.0 as the pig approaches a section boundary. Because the hold-up in front of the pig is an
average hold-up between the pig and the downstream boundary, this output variable will show large
swings in connection to pigs crossing section boundaries. This is not a physical result, but merely an
artefact of averaged hold-ups not being able to capture the actual build-up of liquid. Furthermore, as a
consequence of the hold-up reaching 1.0 downstream the pig, there will be a larger leakage due to the
numerical scheme. It should be noted that to properly capture the physics, it is necessary to explicitly track
the liquid slug forming in front of the pig.

Friction forces and pigs

The friction forces acting on a pig are described in the following sections. For effects related to wax, please
refer to separate section below.

Static friction force

The static force between the pig and the pipe wall is denoted F0. For a static pig, this is the force that
needs to be overcome in order for the pig to start moving. Thus, a pig only starts moving if the pressure
difference over the pig yields a large enough force.

- 122 -
The OLGA model

Wall friction force

The wall friction force due to contact between the pig and the pipe wall is given by

where F0 is the static friction force [N], fw is the wall friction factor [Ns/m] and Up is the pig velocity [m/s],

As the pig velocity, Up, increases, the wall friction force decreases due to less contact between the pig and
the pipe wall. This effect is approximated by the wall friction factor.

Viscous friction force — the frictional pig model

When a pig is moving, the flow of the fluid film around the pig results in a viscous friction force. This force
is calculated through

where f1 is the linear friction factor [Ns/m], f2 is the quadratic friction factor [Ns2/m2] and Up is the ig velocity
[m/s].

Leakage

There are two different types of leakage.

Pressure drop induced leakage

Due to the pressure drop over the pig, liquid can be pushed from behind the pig to in front of it. The
pressure drop induced volumetric flux is given by

where cpl is the leakage factor [-], ΔPpig is the pressure drop over the pig [N/m 2] and ρ is the density [kg/m3].

Slip induced leakage (back leakage)

Due to slip between the pig and the fluid surrounding it, some fluid ahead of the pig will not be carried
along by it but rather leaks between the pig and the pipe wall. When the gap between the pig and pipe wall
is very narrow, the effects of gravity and the pressure gradient can be neglected when calculating the flow
of the fluid film that passes around the pig. Assuming laminar flow, the average film velocity becomes

where Up is the pig velocity [m/s]. Using this, the volumetric flow rate is then given by

where D is the inner pipe diameter [m] and Dp is the outer diameter of pig [m].

By default, the gap between the pig and pipe wall is equals two times the pipe roughness. You can
override this setting by specifying the pig diameter using the key DIAMETER.

The total volumetric leakage flow rate is split over the oil, water, and gas phases. For stratified flow, the
total leakage of gas, oil, and water is proportional to the hold-up each respective phase at that position.
For all other flow regimes, gas leakage is not allowed and the total leakage is split over water and oil in
proportion to the local water and oil hold-up, respectively.

- 123 -
OLGA User manual

Pig and Wax

Wax related friction forces

When there is a wax layer on the pipe walls, an additional friction, Fwbf, occurs due to the forces required to
break the wax layer off the wall. The wax layer breaking force is modeled as

where C is the wax breaking force coefficient [-], y is the wax layer yield stress [Pa], φ is the wax porosity
[-], L is the wax layer thickness [m], d is the inner pipe diameter [m], η is the pig wax removal efficiency [-]
and Φ is the pig form factor [-].

The wax breaking force coefficient, C, can be used to account for the effective shear surface orientation. C
= 1 implies that the wax layer shear surface is normal to the wall whereas C = √2 can be interpreted as an
effective shear surface forming a 45° angle against the wall. The coefficient can also be used to tune the
yield stress if, for example, wax layer yield stress measurements or estimates are available.

If the wax layer yield stress is determined internally, it is given by:

(21)

This equation is derived from the viscosity equation (22) below.

In cases where the pig has no through-flow, a slurry or plug with high wax content is assumed to build up
in front of the pig. This affects the rheological properties of the fluid near the pig. An estimate of the friction
effects caused by the interaction between the wax plug and the pipe wall is evaluated using the following
procedure:

1. Find the wax plug friction length by searching along the pipeline for existing suspended wax (bounded
by the accumulated amount of wax stripped from the wall), accounting for the wax plug porosity. The
wax plug length depends on the pig leakage factor. If there is full flow through the pig, the wax plug
friction length is set to zero. If there is no leakage, the full length of the wax plug is used. Interpolation
is applied for any intermediate situations.
2. The wall shear stress for the wax plug is calculated by using standard correlations for Bingham
plastics [8] and the effective viscosity model by Pedersen and Rønningsen [28]. The standard
Bingham correlations are used to calculate the shear stress as a function of average velocity. The
internal effective viscosity model may be used to find the yield stress and plastic viscosity for a given
suspended wax fraction according to

(22)

where µliq is the oil viscosity with no consideration to the precipitated wax [Pa s], Φwax is the volume
fraction of precipitated wax [-], dvx/dy is the shear rate [1/s], D = 37.82, E = 83.96 and F = 8.559⋅ 106,

The plastic viscosity is found by setting the shear rate, dvx/dy = 1000 1/s whereas the yield stress is
found through equation (21) above using the porosity of the wax plug in front of the pig instead of the
wax porosity. The yield stress and plastic viscosity are then used in the Bingham related equations to
calculate the friction forces acting on the pig and wax plug.

In the transition from non-Newtonian to Newtonian turbulent flow (Hedstrøm number between 1000
and 2000), splines are used to get a smooth transition between the friction factors calculated using the
Darby and Melson formula [8] (applied for Hedstrøm number > 2000) and Haaland’s formula [39]
(applied for Hedstrøm number <1000).

- 124 -
The OLGA model

Due to the upper bound on the effective viscosity, the wax plug shear stress is taken as the maximum
of the yield stress and the shear stress from the Bingham friction calculations.

3. The resulting frictional force is applied directly to the pig because the wax plug does not enter the
model explicitly but only as an 'effective friction length.'

Note: The standard scheme for wall friction is always applied regardless of the wax plug friction length.
The standard wall friction will, however, normally be insignificant as compared to the friction generated
by the 'virtual' wax plug. Furthermore, the gravitational effects of a wax plug are assumed to be taken
into account by the standard scheme.

Wax mass transfer from wall due to pigging

When performing a pigging operation to remove wax from the pipe wall, an additional term is added to the
standard shear related wax transport term (solid wax mass transport between bulk and wall) for the section
where a pig is located. This mass transfer rate [kg/s] is given by

where Up is the pig velocity [m/s], mwxw is the average wax mass on the wall in the control volume [kg/m3],
A is the cross-sectional pipe area [m2], and η is the pig wax removal efficiency [-]. The mass removed from
the wall is added to the fluid downstream the pig.

How to use

General

A pig is added to the simulation by declaring the PIG keyword on the flow-path where it is to be inserted.

Launch and trap position of the pig

A pig is launched and trapped at the boundaries closest to the positions given by the keys
LAUNCHPOSITION and TRAPPOSITION, respectively. The trap position is optional, and if not specified,
the pig traverses through the flow-paths until it exits through a terminal node and is removed.

Routing — Pig in network

In a network with bifurcations, the pig will enter the flow-path having the largest volumetric flow unless its
routing is specified by the key ROUTING.

Note: When routing is given, the flow-path where the pig is launched has to be included in the routing.

Leakage factor

The leakage factor, cpl, used in determining the volumetric flux of liquid from behind the pig to in front of it
can be specified in three different ways to override the default value. The default value for Cpl is 0 (zero
leakage):

1. Specify the leakage factor directly through the key LEAKAGEFACTOR.


2. Specify the relative leakage opening Aleak/Apipe through the key LEAKOPENING and evaluate the
leakage factor according to

- 125 -
OLGA User manual

3. Using the pressure loss coefficient, Fpig, specified through the LEAKDPCOEFF key, the leakage factor
is given by

The pressure loss coefficient can calibrated by letting fluid flow past a stationary pig.

Tracking the liquid slug

To track the liquid slug in front of a pig, set TRACKSLUG=ON.

Pig and Wax

When using the Wax deposition module (requires separate license), a number of input keys become
available when simulating a pigging operation.

 PGWXFORMFAC: wax cutting efficiency.


 WPPLASETVISC: plastic viscosity of wax plug. Set this parameter to -1 to use internal model.
 WPPOROSITY: porosity of wax plug.
 WPYIELDSTRESS: yield stress of wax plug. Set this parameter to -1 to use internal model.
 WXBRFCOEF: wax breaking force coefficient. This can for example be used to account for effective
shear surface orientation.
 WXRMEFF: wax removal efficiency.
 WXYIELDSTR: yield stress of wax layer on wall. Set this parameter to -1 to use internal model.

Output

Pig specific plotting variables are found in the subgroup Pig of the group Basic. In addition, slug related
plotting variables (group SlugTracking or group Compositional, subgroup Slug) apply when the liquid slug
in front of a pig is tracked.

Notes

 It is not possible to simulate the melting of a hydrate plug because the pig mass is constant.
 It is not possible to simulate a pig traversing through a pipeline at the same time as slug tracking is
enabled.

Drilling
The drilling option can be used to simulate the hydraulics during operations of running in hole or pulling out
hole of the drill string.

The drilling functionality in OLGA can be used for the study of drilling hydraulics and the modeling of
wellbore pressures and temperatures during several phases of the drilling operation. Although it was built
as a general purpose functionality, it is a particularly valuable tool in drilling operations with narrow margins
between pore- and fracture pressures. Typical examples of wells with narrow margins are:

 HPHT and ultra-HPHT wells


 Deep water wells
 ERD wells with long horizontal sections
 Wells in depleted reservoirs

License requirements

The drilling option and its associates are part of the Wells module that requires a separate license.

- 126 -
The OLGA model

Model description

The network feature of OLGA is adapted to configure the flowpaths in the drilling hydraulics system. The
fluid flows from a surface flowpath to the drilling flowpath (drill string) and then return to surface in the
annulus flowpath (return line). The node that connects the surface line and the drill string is called stand
node. The node that connects the drill string and the annulus flowpath is called bit node. The inlet of the
surface line and the outlet of the annulus flowpath is connected to other types of nodes. The basic drilling
configuration is described in the How to use on page 128 section.

The running in hole (RIH) and pulling out of hole (POH) is realized by allowing the bit node to move up and
down the annulus flowpath. The speed of RIH or POH is specified either with a time series or through a
controller. The initial drilled depth and the bit depth (both are measured depth) are user inputs and they
can be at different depths. For the return line, the sections above the bit node are modeled as flow in
annulus, and the sections below the bit node and above the drilled depth are modeled as flow in pipe. The
sections below the drilled depth are not active, meaning that the flow conditions are not calculated. The
sources and wells in the return line below the drilled depth are deactivated (zero flowrate). The flowrate of
sources/wells in a partially drilled section is linearly scaled by the fraction of drilled length within the
section. Similarly, the sections of drill string above the stand node are inactive.

As the bit node is moved downwards, the length of the active part of the drill string increases. As it is
moved upwards, this length decreases. Currently, no special consideration is given for additional friction
forces due to the translation of the drill string.

Heat transfer between the drill string and the return line is modeled by the bundle feature of OLGA. The
temperature below the drilled depth is set to the ambient temperature of the outer most wall of the annulus
configuration of the drill path. For the sections of the drill string that are above the stand node, the wall
and fluid temperatures are set equal to the surface temperature specified by the SURFACEWALLTEMP
key in the BITNODE keyword.

The cutting transport can be activated by the PARTICLEFLOW key under OPTIONS keyword. The cutting
is generated only when the particle flow option is switched on. If so, cuttings will be automatically
generated according to the volume being drilled.

Rotating drill string

The rotation of the drill string has temperature and pressure effects on the surrounding fluid. The total
power of the drill string is determined by the torque (TORQUE key) and the rotational speed (ROTATION
key). When the bit is drilling into the formation, part of the total power is used to cut the rock. The
EFFICIENCY key determines the fraction of the total power that is used to cut the rock. The rest of power
is further divided into two - one part is evenly distributed along the return line, and the second part is lost
the fluid at the bit position (key FRACTIONTOBIT). When the bit is not drilling into the formation, the total
power is lost to the fluid in the return line as heat. This heat is evenly distributed along the return line from
the surface to the measured depth.

Defining POW as the total power of the drill string and using rpm as units for the rotational speed:

- 127 -
OLGA User manual

The power lost to the surrounding fluid can be calculated as follows:

Location Cutting rock Not cutting rock


Along the drill string POW*(1-EFFICIENCY)*(1-FRACTIONTOBIT) POW
At Bit position POW*(1-EFFICIENCY)*FRACTIONTOBIT 0

A special consideration is also made for the friction generated due to the rotation of the drill string,
dependent on the rotational speed.

How to use

The drilling functionality is enabled by setting DRILLING = ON in the OPTIONS keyword. Any drilling
configuration needs at least three flowpaths:

 One flowpath representing the drill string, connected to a closed node at the top and a BITNODE at
the bottom.
 One surface flowpath (termed 'surface line'). The surface line is connected to the drill string with a
STANDNODE.
 One return flowpath (termed 'annulus flowpath'). The annulus flowpath is connected to the drill string
at the bottom with a BITNODE.

Figure 53 An example of a basic drilling configuration.

The BITNODE at the end of the drill string flowpath is connected to a position in the annulus flowpath. The
STANDNODE at the end of the surface line flowpath is connected to a position in the drill string flowpath.
As the BITNODE moves down or up the annulus flowpath the position of the STANDNODE changes
accordingly such that the length of the active part of the drill string flowpath increases or decreases.

Currently, it is only possible to drill through one annulus flowpath. In other words, the BITNODE cannot
cross from one flowpath to another.

The drill string and the annulus flowpath must have the same inclination profile and discretization (section
number and section lengths).

- 128 -
The OLGA model

Initial configuration

The surface line and the drill string are connected using the DRILLSTRING key under the STANDNODE
keyword.

The heat transfer from the drill string flowpath to the annulus flowpath and from the annulus flowpath to the
walls outside the annulus flowpath is calculated by the bundle feature of OLGA (see Annulus - How to
use for more details). The entire drill path must be enclosed within one or more annulus configurations as
given in the ANNULUSLIST key.

The BITNODE is initially connected to a section of the annulus flowpath by defining the initial measured
depth of the bit node (INITBITMD). This measured depth is defined as the distance between the top of the
annulus flowpath and the position where the bit node is connected, or equivalently as the distance
between the stand node and the bit node.

From the BITNODE it is also possible to define how much of the annulus flowpath is initially drilled. This is
done using the INITDRILLEDMD key, which defines the absolute distance between the top of the annulus
flowpath and the bottom of the undrilled path.

The part of the drill string above the stand node and the part of the annulus flowpath below the initial drilled
depth are inactive and will be initially ignored (see Model description on page 127). If INITDRILLEDMD is
set equal to the length of the annulus flowpath, the entire annulus flowpath will be active throughout the
simulation and the BITNODE and STANDNODE can be used to simulate a flowpath moving inside another
for example in a Coiled Tubing operation.

Refer to the sample case for an example.

Drilling parameters

The rate at which the bit node moves is defined using the ROP key under the BITNODE keyword. Positive
ROP indicates the bit moving deeper into the annulus flowpath, while negative value means pulling the drill
string out of the system. ROP can be specified with a time series. Stepwise interpolation is used to
determine the ROP at a given time. The ROP can also be connected to a controller as a method to change
the ROP according to the depth or formation being drilled.

Several other parameters can be defined under the BITNODE keyword. Many of these are related to
thermal and pressure effects in the fluid due to the presence of the drill string, and are described under
Model description on page 127.

Output variables and plotting

Several output variables related to this functionality can be found under Drilling Output Variables on page
570.

Even though sections of the network can be inactive (undrilled parts of the annulus flowpath and parts of
the drill string above the stand node), all sections have values in the plot files. Therefore, we have included
an output variable (ACTIVE) to indicate whether a section is active or not. Plotted values for inactive
sections should be ignored.

When using an OLGA GUI compatible with the present drilling functionality, the plotting tool will filter out
values from inactive sections based on the ACTIVE plot variable. This means for example that a half-
drilled annulus flowpath will only show values for half of its sections. This may also mean empty plots if an
entire flowpath becomes inactive.When using an older plotting tool, you should make sure of always
looking at the ACTIVE output variable when analysing the results.

- 129 -
OLGA User manual

Additional information

Other models and keywords can be useful for simulating drilling scenarios:

 Include muds using the DRILLINGFLUID Library keyword.


 Use particle flow functionality to account for cuttings being generated while drilling (PARTICLEFLOW).
 Use ANNULUS keywords to specify drill string – annulus flowpath interaction

Note: If DRILLINGFLUIDs are defined, it is recommended to activate the PRESSURE key and/or the
GRADPRESSURE key under DTCONTROL to avoid pressure spikes that may appear when drilling new
sections.

Note: OLGA 5 cases cannot be converted to the current implementation.

Corrosion
The purpose is to calculate standard uniform CO2 corrosion and Top Of Line (TOL) CO2 corrosion. CO2
corrosion should be expected whenever CO2 and water is present.

License requirements

The Corrosion Module requires a separate license.

Model description

The basic chemical reactions in CO2 corrosion are:

which dissociates in two steps:

In CO2 corrosion when the concentrations of Fe2+ and CO32- ions exceed the solubility limit, they combine to
form solid iron carbonate films according to:

These films can be more or less protective for further corrosion.

Currently, three CO2 corrosion models; the NORSOK M-506 model, the de Waard 95 model and the IFE
top-of-line corrosion model have been implemented in the OLGA three-phase flow model, see references
[24], [25] [42] and [43]. Corrosion dominated by H2S is at present not covered by the corrosion module.

The NORSOK and de Waard 95 models are both regarded as conservative models as they include only
limited effects of protective corrosion films. Protective corrosion films can form especially at high
temperature (above 60°C) and at high pH (above pH5.5). The corrosion rate will increase with temperature
for both models up to a limiting temperature where formation of protective corrosion films are predicted.
Both models are tuned to a large set of experimental data, but the NORSOK model takes somewhat larger
account for protective corrosion films at high temperature and high pH than the de Waard 95 model, as
more recent high temperature data also have been used.

- 130 -
The OLGA model

The NORSOK M-506 model gives the corrosion rate as function of pH, temperature, CO 2 partial pressure
and wall shear stress:

The de Waard 95 model gives the corrosion rate according to the following formula:

where Vr is the maximum corrosion rate based on the limiting reaction rate given as a function of
temperature, CO2 partial pressure and pH:

Vmis the maximum corrosion rate based on the limiting mass transfer rate given as a function of CO 2 partial
pressure, liquid flow velocity and hydraulic diameter:

and the scale protection factor Fscale is a function of temperature and CO2 partial pressure:

In the IFE top-of-line corrosion model the top-of-line corrosion rate is limited by the amount of iron that can
be dissolved in the condensed water:

where Rcond is the water condensation rate calculated by OLGA and the solubility of iron in the condensing
water CFe is a function of CO2 partial pressure, acetic acid content (HAc) and temperature:

The effect of acetic acid is only included in the top of line corrosion calculation, not in general bottom of
line CO2 corrosion rate calculation (NORSOK M-506 and de Waard 95). The flow field at each section
along the pipeline/network is used to calculate the corrosion rate. Top-of-line corrosion is only occurring in
stratified flow.

How to use

For Top Of Line (TOL) corrosion the water condensation rate is needed. This is not available when using
the Black oil model. When using the PVT table option it is only available for a three phase table and when
specifying:

 FLASHMODEL = WATER in OPTIONS.

When using compositional tracking (COMPOSITIONAL=ON IN OPTIONS). TOL can only be used when
specifying:

 FLASHTYPE = FULLTHREEPHASE or SIMPLETHREEPHASE in COMPOPTIONS.

The NORSOK and de Waard models can be used for all PVT calculation options (Black oil, PVT table and
Compositional Tracking).

- 131 -
OLGA User manual

The input parameters for the corrosion models are specified in the keyword statement CORROSION. Input
parameters for each branch of the network are as follows:

 CO2 mole % in the gas (key: CO2FRACTION)


 Total alkalinity Bicarbonate concentration in of the water phase (BICARBONATE). The alkalinity is
typically the sum of bicarbonate + 2x carbonate + acetate + any other carboxylates.
 Total acetic acid content, which is the sum of acetic acid and acetate (TOTAL_ACETIC_ACID)
 Total ionic strength in the water (IONICSTRENGTH)
 Inhibitor efficiency (INHIBITOREFF)
 Glycol concentration in the aqueous phase (GLYCOLFRACTION)
 The water cut limit where water droplets in oil will wet the wall (WCWET). If the water cut is higher
than this value, the water droplets will wet the wall, even if no continuous water film is present. The
default value is 30 %. This parameter is only used for the water wetting test in the corrosion module. It
has no influence on the flow conditions.
 An option for calculating pH based on saturated iron carbonate concentration in water (PHSAT)
 Maximum CO2 partial pressure in single phase liquid flow (PCO2MAX)
 Bubble point pressure , from which the CO2 partial pressure for single phase liquid flow will be
calculated (PTMAX)

Currently, the total alkalinity (bicarbonate), glycol concentrations, ionic strength, total acetic acid and water
wetting limit are given as constants for a given branch. The glycol concentration can either be set manually
or be determined by the MEG tracking function if available to the user. If the manual option is used, the
glycol concentration is constant through the whole pipeline. If the MEG tracking option is used, the glycol
concentration will be diluted in accordance with water condensation rates.

The water chemistry has a significant influence on the calculated corrosion rates. Experience in CO2
corrosion evaluation is therefore important to prepare input and evaluate simulation results properly.

For both the NORSOK and the de Waard 95 models the pH value in the bulk water phase is calculated as
a function of CO2 partial pressure, temperature, bicarbonate content and ionic strength by the formulas
given in the NORSOK model. The input parameters BICARBONATE and PHSAT can be used to choose
between different water chemistry conditions when calculating the pH value:

 Condensed water without corrosion products: BICARBONATE = 0, PHSAT = OFF


 Condensed water saturated with corrosion products: BICARBONATE = 0, PHSAT = ON
 Water with specified bicarbonate content (for example, formation water): BICARBONATE > 0, PHSAT
= OFF

The pH calculation is based on the CO2 partial pressure calculated as the CO2 mole % in the gas phase
multiplied by the total pressure, with a correction by the the fugacity coefficient, which can become
important at high total pressure. For a situation with no free gas phase, the CO2 content will be constant for
pressures above the bubble point pressure. The user must then manually supply the bubble point pressure
(PTMAX), which may be found by running OLGA. The maximum CO2 partial pressure is then calculated by
the code for all pressures higher than PTMAX: CO2FRACTION * PTMAX. This is done even though free
gas is present; the code only checks if the pressure is above PTMAX or not. Alternatively, the user may set
the maximum CO2 partial pressure directly, (PCO2MAX). If no free gas exists in the pipeline at all, PTMAX
or PCO2MAX can be found from measurements or calculations in a separator or in a pipeline further
downstream where a free gas phase exists.

In the de Waard 95 model, corrosion reduction due to protective films is not accounted for when formation
water is present. For ionic strengths larger than 0.2 M, formation water is assumed and there will be no
corrosion reduction due to scaling. For ionic strengths lower than 0.2 M, condensed water conditions are
assumed, and the scaling reduction factor is then dependent on the CO2 partial pressure and temperature.

- 132 -
The OLGA model

The presence of glycol will reduce the corrosion rate. The same glycol reduction factor is used for both the
NORSOK and the de Waard 95 models. The effect of corrosion inhibitors can be specified through the key
INHIBITOREFFICIENCY.

Note: Glycol is not considered for the TOL corrosion model.

Parameters calculated by the three phase flow model OLGA, which are used by the corrosion models, are
pressure (plot variable PT), temperature (TM), water velocity or mixture water/oil velocity, wall shear
stresses in water or alternatively liquid mixture (boundary variables TAUWWT, TAUWL), water volume
fraction (BEWT), oil film volume fraction (BEHL) and the near-wall water cut (WCWALL, which is given as
a fraction). WCWALL is defined to be 1.0 if there is any continuous water film at the wall. If water is present
only as droplets in the oil film, WCWALL is equal to the liquid film water cut. The liquid film water cut can
be expressed as USLWT/(USLWT+USLHL) where USLWT is the superficial velocity of water in the liquid
film, and USLHL is the superficial velocity of oil in the liquid film.

The water wetting conditions are determined as follows:

First, the water-oil flow regime is determined by the flow model. There are mainly two flow regime
conditions of concern for the corrosion model:

1. A continuous water film exists (WCWALL = 1.0). A continuous water film may be a result of
stratification, or due to a water cut above the flow model's water-oil inversion point. The water-oil
inversion point has a default value of 0.5 (water cut = 50%), but can be changed through the keyword
WATEROPTIONS, INVERSIONWATERFRAC. The OLGA code has been verified with 0.5 as
inversion point. Note that changing this value might change the flow predictions significantly.
2. Water only existing as droplets in a continuous oil film. For such cases, the water cut must be below
the flow model's inversion point (0.0 < WCWALL < INVERSIONWATERFRAC < 1.0)

This flow information is sent to the corrosion module where tests are performed to determine if water
wetting occurs:

Condition 1 will always give water wetting of the wall.

Condition 2 will give water wetting if the water cut (and WCWALL converted to %) is above the water
wetting limit, WCWET, given in the CORROSION keyword (default value 30 %).

For slug flow (output variable ID = 3), both conditions might be occurring intermittently, that is, a passing
slug bubble might be in condition 1, while the liquid slug might be in condition 2 or vice versa. Such cases
are treated as full water wetting (condition 1).

To sum up, the case of no water wetting can only occur in condition 2 when the liquid film water cut (and
WCWALL in %) is less than the water wetting limit (WCWET). In that case, zero corrosion rate follows. Full
water wetting will always occur if WCWALL (in %) is larger than or equal to WCWET.

In addition, the corrosion rates assuming full water wetting are always calculated.

Note: The corrosion models are not valid if pH > 6.5 or if T > 150° C. In cases where corrosion control
by pH stabilization is applied, the pH value might exceed the upper pH limit of the corrosion models. The
implemented corrosion models are not suitable for such cases. The corrosion models should not be
used for CO2 partial pressures above 10 bar. In addition, the NORSOK model is presently not valid for
pH < 3.5 or T < 20° C. You must ensure that these limits are not exceeded.

- 133 -
OLGA User manual

Note: The CO2 corrosion models are not valid when the ratio between CO2 and H2S partial pressure (or
the ratio between CO2 and H2S molar fraction in the gas phase) is lower than 20. The models should not
be used when the H2S partial pressure is higher than 100 mbar. For partial pressures ratios of CO 2 and
H2S between 20 and 500, the models will give an upper bound for the corrosion rate, but can be
conservative because iron sulfide films may be formed.

Elastic walls
The purpose of the elastic wall option is to account for radial pipe flexibility in simulations involving
pressure surges due to sudden changes in liquid velocity. This pressure increase/decrease, commonly
known as water hammer, can be significantly reduced if the pipe is allowed to expand/contract. The
expansion/contraction will also reduce the propagation speed of pressure waves.

The magnitude of influence from the wall flexibility can be measured by the ratio of the fluid
compressibility, κfluid, and wall flexibility, κwall (see Model description on page 138). If κwall/κfluid << 1, the effect
of wall flexibility can safely be assumed to be small. However, if κwall/κfluid > 0.2, the simulation results based
on rigid walls may be very conservative. The following figure illustrate the effect when the compressibility
ratio is approximately 0.5. The case is a water filled 5 km horizontal pipe, with a diameter of 20.8 cm and a
9 mm thick steel wall. The fluid is flowing with a velocity of 4 m/s before a near instantaneous closing of a
valve is performed 6 seconds into the simulation. To monitor the water hammer, the pressure in the
section upstream of the valve is plotted. The simulation is performed both with and without flexible walls
(red and black curve respectively).

Figure 54 Pressure in section upstream of a near instantaneously closing valve.

- 134 -
The OLGA model

The effect of the flexible pipe is most pronounced in the instantaneous change in pressure that occur 6
seconds into the simulation. This is the actual water hammer that will be discussed subsequently. After the
initial hammer, a period of packing can be observed. In this phase, the flexible wall behaves much in the
same manner as the rigid wall. However, it should be observed that the packing phase is prolonged and
the pressure increase due to packing is actually higher in the case with flexible walls.

Theoretical comparisons

In a perfectly rigid pipe, the theoretical hammer pressure is usually derived from the Joukowsky equation:

(23)

where H is the head in meters, a is the speed of propagation of the disturbance (speed of sound), g is the
acceleration of gravity and Δc is the change in velocity. In terms of the pressure, this equation becomes:

(24)

where ΔP is the change in pressure and ρ is the fluid density.

For slow closing valve action the following equation is often used.

(25)

where ΔP is the change in pressure given in psi, v is the fluid velocity [ft/s], L is the pipeline length [ft] and t is the
valve closing time [s]. This relation assumes incompressible fluid and tends towards infinity at small t.

- 135 -
OLGA User manual

Figure 55 Water hammer calculation in OLGA vs. theoretical equations (rigid walls).

Given that the valve closing time is small enough, simulated results in OLGA without elastic walls will be
comparable to the Jukowski equation. It should be noted that the total pressure increase in the pipeline
computed by OLGA may be higher than the maximum theoretical water hammer. This is because the
momentum of the upstream fluid will continue to pack the pipeline after the valve is fully closed (see Figure
55). For longer closing times, effects such as packing of pipeline before the valve is fully closed may give
rise to an additional increase in pressure that is not accounted for in either equation (24) or equation (25).

Section length considerations

The deflection of the section wall is assumed to be uniform (uniform expansion/contraction) and the
deflection of the pipe wall in one section is assumed to have no influence on the deflection in neighboring
sections. This is a simplifying assumption that is based the fact that pipes walls are normally relatively thin,
and that section lengths are larger than the pipe diameter. To argue the validity of this approximation, we
can look at the case presented Figure 56. This illustrates a longitudinal slice of a pipe with a pressurized
section of length L, the rest of the pipe is in equilibrium with the ambient pressure Pa. The pipe is assumed
to be relatively long compared with L, the radius R and the wall thickness e.

- 136 -
The OLGA model

Figure 56 Single section with pressure not equal to ambient pressure.

The solution to this problem can be expressed in terms of the solution of the uniformly loaded and
uniformly expanding pipe and a scaling a function, w (reported by e.g. Timoshenko and Woinowsky-
Krieger). The function w has a natural length scale kL = L ( R e )-1/2, where all problems with equal kL will
have identical scaling functions. The average value of w over the length L is presented in Figure 57 as a
function of kL. In this graph, a value of 1 represents the solution given by OLGA and a value less than 1
represents a smaller change in volume. Although OLGA will overestimate the change in volume inside the
section, it is apparent that the OLGA solution give a reasonable approximation for kL >= 10, which will give
a deviation of less than 2%. Similarly, one can argue that the change in volume outside the loaded section,
not accounted for by OLGA, will rapidly diminish for increasing section lengths. We therefore recommend
using section lengths larger than 10 ( R e )1/2 when the elastic wall option is used. In normal circumstances
this will not constitute a limitation as the thickness is generally smaller than the radius; given a case with
the e = R, the section length will then have to be 5 times the pipe diameter.

Figure 57 Average deflection of section wall in Figure 56 scaled with deflection of pipe with uniform
internal pressure.

- 137 -
OLGA User manual

Model description

The solution of the full fluid-structure interaction would entail solving an additional elliptic partial differential
equation on a far smaller time scale than required by the isolated fluid flow problem. However, by
introducing some assumptions, the equations can be decoupled and significantly simplified. In the
derivation of the equations used by OLGA we will make the following assumptions:

1. Linear elastic materials


2. Small deformations of pipe wall (change in diameter << diameter)
3. Uniform radial expansion (neglecting section end effects and interaction)
4. No dynamic effects of pipe wall (no wall inertia)

It is up to the User's discretion to verify that these assumptions are valid when using the elastic wall option
in OLGA.

When simulating flexible pipes, OLGA accounts for both changes in flow area and more importantly, the
effect the flexibility has on the overall compressibility of the pipe-fluid system. In the pressure evolution
equation solved by OLGA, this amounts to using a modified compressibility, κeff:

where κfluid is the compressibility integrated over all phases:

and κwall is the change in relative pipe area, A, for a unit change in internal pressure:

(26)

The pressure equation is also modified to account for the modified area. If the initial assumptions hold, the
effect on the flow is marginal but its inclusion is mandated by the need for a consistent calculation of the
volume error. The updated area is calculated as follows:

(27)

where R0 is the given radius of the pipe and ε(P) is relative change in radius, dependent on the internal
pressure, P, and external pressure, Po:

(28)

When OLGA is used to calculate the flexibility of the pipe, the thick wall equation is used:

(29)

where i is the wall layer index and Ri is the inner radius of wall layer i. Using equations (26) and (29) along
with assumption 3, we get:

(30)

If κ is specified in the input to OLGA, equation (30) is used to compute an equivalent value for γ, which is
then used in equations (27) and (28).

- 138 -
The OLGA model

The external pressure, Po, is taken to be the pressure in each OLGA section when the simulation starts
(after steady state preprocessor or initial conditions). This leads to an initially undeformed state. To get
consistent results in restart, given that the elastic properties may change, the deformations in the previous
run are automatically converted by OLGA to an initial (constant) strain:

εinitial is the initial relative change in radius, given by the deformation in the previous run. Thus, a wall may
be deformed, but not flexible, in a restart run even if flexible walls are turned off.

How to use

The elastic wall option is activated at a global level with the key OPTIONS.ELASTICWALLS = ON/OFF. If
OPTIONS.ELASTICWALLS = OFF, all walls are treated as inflexible (infinitely rigid). However, if this key is
set to ON, individual WALLS are treated as flexible/inflexible depending on the value of the key
WALL.ELASTIC = ON/OFF. If OPTIONS.ELASTICWALLS = ON, the Young's modulus of elasticity will be
a required key for materials (MATERIAL.EMOD).

There are two methods available for the elastic properties of a wall (when WALL.ELASTIC = ON).

1. Default option: Let OLGA compute the flexibility of the wall based on the radius of the pipe and
material properties of the wall layers. If this option is used, OLGA will omit any wall layer that has a
material with a Young's modulus less than WALL.ERATIOMIN times the Young's modulus of the inner
adjacent wall layer. All subsequent wall layers will also be excluded. This is because the thickness of
the wall is assumed to be unchanged and the wall flexibility can be significantly underpredicted if the
contribution from a very rigid wall layer, placed outside a very flexible wall layer, is included (see
Figure 58).
2. User given flexibility: The wall flexibility may be specified with the key WALL.KAPPA. This option is
particularly useful when the equation used by OLGA is not valid. This may apply when the wall is
stiffened with braces, surrounded by soil or encased by a flexible medium. This may also apply if a
significant part of the wall rigidity can be attributed to axial stresses or other 2 nd order effects.

Elastic wall properties may be changed in restart runs.

- 139 -
OLGA User manual

Figure 58 Insulated pipe. If the stiffness of the steel protective casing is included, the wall flexibility
will be very conservative.

Shut-in
The purpose of the SHUTIN keyword is to enable more robust simulations when the pressure and flow in
the pipeline is dominated by hydrostatic head, phase transition and thermal effects. A typical scenario
where the SHUTIN keyword may be applied is during shut-in simulations, or at the end of depressurization
simulations.

The numerical scheme for solving the transport equations in OLGA may sometimes become unstable after
the flow in the pipeline has stopped and the phases have separated. This is usually observed as sudden
fluctuations in velocities and is generally caused by numerical issues in inclined pipes with large hold-up
gradients. This instability may result in inaccurate results due to generated pressure pulses and
subsequent inaccuracies in flash calculations. If this behavior is observed, it is recommended to activate
the SHUTIN keyword to remove or reduce such instabilities. It should be noted that by enabling SHUTIN,
the numerical scheme in OLGA is modified to better represent the situation in the pipeline when the fluid is
at rest. It is therefore not recommended to activate this key during normal production.

Model description

The SHUTIN keyword makes the following modifications of the OLGA model:

 The flow regime is fixed to stratified and annular flow


 Oil and water droplets in the gas layer are turned off
 Across discontinuities in volume fractions, the mass and pressure gradient terms are redistributed in
the momentum equations in such a way that the slip should converge to zero.

- 140 -
The OLGA model

How to use

The SHUTIN keyword can be used to stabilize the numerical behavior for shut-in like simulations in a
flowpath, selected pipes or individual sections. It can also be repeatedly activated/deactivated at specific
points in time.

SHUTIN contain the following keys:

 TIME – Defines points in time where SHUTIN can be activated/deactivated


 ACTIVATE – List that determines if SHUTIN is active/inactive at the corresponding point in time
 PIPE – List of pipes to include
 SECTION – List of sections to include

If two or more SHUTIN keywords cover the same section, the functionality will be active in that section if at
least one SHUTIN keyword is set to active when the simulation has reached a given point in time.

Notes

The SHUTIN keyword is designed to work primarily in situations where gravitational pull and the pressure
gradient are in (near) balance. It is not recommended to activate this feature when it is reasonable to
expect significant flow. The applicability of the SHUTIN keyword must be carefully considered from case to
case.

Water module - Emulsion


The purpose of the Water module is to let the user specify the parameters and model used for oil/water
dispersion viscosities and to specify the approach used to determine the water distribution between liquid
and gas phases.

Changes to the dispersion model are recommended when experimental data shows that the default
options do not give a good description of the fluid. The module may also be used for sensitivity analysis
with respect to dispersion e.g. the water volume fraction at inversion point.

Model description

Calculation of velocity difference between water and liquid hydrocarbon ("slip velocity")

Three different options can normally be used for calculating the velocity difference between liquid water
and hydrocarbon liquid (we term the latter "oil" for simplicity). This velocity difference is termed the "slip
velocity" or just "slip". The liquid droplets flowing in the gas phase are not included in this context. The
three calculation options for slip velocity are invoked by selecting WATERSLIP=ON, OFF or CONSTANT
in the WATEROPTIONS keyword.

By turning the water slip option off (WATERSLIP = OFF), the user assumes that there is no velocity
difference between the oil and water flow fields. In this case oil and water are always assumed to flow as a
homogeneous mixture with average properties. The fluid mechanical model reduces to a two-phase gas-
liquid model. However, water enthalpies are accounted for in the temperature calculations.

- 141 -
OLGA User manual

By turning the water slip on (WATERSLIP=ON), the slip velocity will be computed by the fluid mechanical
flow model. Included in this is the computation of oil droplets dispersed in the water and water droplets
dispersed in the oil. The degree of such mixing will depend on flow parameters such as flow rates,
holdups, fluid properties and flow regime. The OLGA HD flow model (OPTIONS FLOWMODEL=OLGAHD)
allows for co-existence of oil droplets in water and water droplets in oil. The OLGA flow model
(OPTIONS FLOWMODEL=OLGA) assumes that water droplets can be entrained in continuous oil if the
water cut is less than the phase inversion point, and that oil droplets can be entrained in continuous water
if the water cut is above the inversion point. Phase inversion is assumed to occur at a water cut given by
the user through the key INVERSIONWATERFRAC (default value of 0.5). The degree of mixing of oil and
water can vary from fully separated to fully dispersed for both flow models. This applies to all gas/liquid
flow regimes.

It is possible to specify a maximum fraction of water (EMAX) that can be entrained in the oil for water cuts
between a lower critical value (given by FWLOW) and the inversion point (given by
INVERSIONWATERFRAC). In that case the degree of mixing of water into oil is predicted by OLGA, but
the maximum fraction of the total water stream that can be mixed into the oil is limited by EMAX:

(Volume flow of water in oil)/(Total volume flow of water) ≤ EMAX.

With the default values of FWLOW and EMAX, 0.0 and 1.0 respectively, no such limitation is defined.

The third option (WATERSLIP=CONSTANT) allows for specification of a constant velocity difference
between oil and water. This is a special option that should only be used with great care in special cases for
tuning purposes.

Dispersion viscosities

With the dispersion viscosity option turned on (DISPERSIONVISC= ON), six different viscosity models can
be chosen: Pal & Rhodes, Rønningsen, Pal & Rhodes correlated with experimental data, Woelflin, Barnea
& Mizrahi or table based model.

The mixture viscosity for oil continuous dispersions (µhw) and water continuous dispersions (µwh) are
expressed as:

where µh [cP] is oil viscosity, µw [cP] is water viscosity and µrel [-] is relative viscosity (dispersion viscosity /
viscosity of continuous phase).

Pal & Rhodes and Pal & Rhodes correlated with experimental data:

One correlation for relative viscosities of liquid/liquid dispersions was developed based on a generalization
of Einstein’s equation to also be valid for high concentrated dispersions. The correlation was published by
Pal and Rhodes (1989) [27] and is primarily developed for dispersions where coalescence and deposition
has negligible influence on the pressure drop (and the apparent viscosity).

- 142 -
The OLGA model

The equations below show the Pal & Rhodes correlations for relative viscosity of an oil continuous
dispersion (µrel,h) and a water continuous dispersion (µrel,w):

(31)

(32)

where

is the concentration of water droplets in the oil continuous dispersion, and

is the concentration of oil droplets in the water continuous dispersion. µrel is limited upwards to 10000.

The parameter Φµrel=100 is the dispersed phase volume fraction for which the relative viscosity µrel equals
100. Based on pipe flow experiments on stable oil continuous emulsions for different crude oils and
formation waters, the parameter Φµrel=100 is set equal to 0.765 (Søntvedt et al., 1994). In the present version
of the model, this correlation and the correlation parameters are also applied for water continuous
dispersions using the analogous quantities. It is still left to investigate how to discriminate between oil and
water continuous dispersions.

With an experimental point, Φrel (Φh or Φw depending on the inversion point) and µrel (µrel,w or µrel,h) specified,
the Pal & Rhodes method in equations (31) and (32) is rearranged to calculate the Φµrel=100 value:

Equation (31) is then used to calculate the water in oil dispersion viscosity. For oil in water dispersion,
equation (32) is used. Φrel is defined with the key PHIREL, µrel with the key VISCREL, and the inversion
point with the key INVERSIONWATERFRAC.

Rønningsen:

Another correlation for relative viscosities of an oil continuous dispersion is the correlation by Rønningsen
recommended for a shear rate of 500 1/s (2003) [31]:

where µrel,h is the relative viscosity (dispersion/oil), T is the temperature (deg C) and Φw is the volume % of
water dispersed in oil.

Above the inversion point, the viscosity of the oil in water dispersion is assumed equal to the pure water
viscosity, when the Rønningsen method is applied.

The possibility to use a simple volume weighting with a tuning factor is also available.

where the tuning factor VISCMOD can be specified through input as a tabulated function of
WATERCUT (wc).

- 143 -
OLGA User manual

Woelflin:

A third option for the relative viscosity is given by

Defined by WATEROPTIONS DISPMODEL = WOELFLIN. Two parameters can be set with this model:
AWOELFLIN (default value 4.2) and BWOELFLIN (default value 2.5).

Barnea & Mizrahi:

For the Barnea & Mizrahi correlation, the relative viscosity is given by

where

Here µc and µd are the viscosities for the continuous and dispersed phases, respectively. The model is
activated with WATEROPTIONS DISPMODEL = BARNEA.

Table based model:

The final way of giving a dispersion viscosity correlation is to use the table based model. This can be
defined by WATEROPTIONS DISPMODEL = INPUTVISC. The input is used as in this example:

WATEROPTIONS DISPMODEL=INPUTVISC, \

VISCMOD=(1,1.05,1.2,1.4,1.9,2.8,2.7,1.3,1.15,1.05,1)\,

WATERCUT=( 0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1),\,

WATERFLASH=ON, WATERSLIP=ON

Note: The Table base model should use WATERFLASH=ON and WATERSLIP=ON.

Note: The WATERCUT used as input is local water fraction in the dispersion layer.

Flashing/condensation of water

With the water flash option turned on for standard simulations with PVT tables (FLASHMODEL = WATER
in the OPTIONS keyword) the amount of water that evaporate or condense is calculated by OLGA under
the assumption that the gas phase is always saturated with water vapour. The pressure and temperature
dependent mass fraction of water vapour in the gas phase at water saturation is determined from the fluid
properties table. If water properties are calculated by OLGA itself, water vapour in the gas phase is
assumed to be zero and FLASHMODEL = WATER is disregarded.

If the Inhibitor tracking module is used (which uses PVT tables), it is not assumed that the gas phase is
saturated with water vapor, that is, the gas might be dry if there is no available water. In some instances,
therefore, inclusion of the inhibitor tracking option may provide more accurate calculation of the distribution
of water between phases.

WATERFLASH has no effect on Compositional Tracking simulations, in which case flashing of water is
decided by FLASHTYPE in COMPOPTIONS.

- 144 -
The OLGA model

How to use

The following sections describe how to use the keys in the WATEROPTIONS keyword.

Calculation of velocity difference between water and liquid hydrocarbon

By default OLGA calculates the velocities of the oil and water fields separately (WATERSLIP = ON). If
WATERSLIP = OFF, oil and water are always assumed to flow as a homogeneous mixture with average
properties. Finally, the user may specify a constant velocity difference between oil and water with
WATERSLIP = CONSTANT. The velocity difference is the specified by the key VELOCITYDIFFERENCE.
This is a special option that should only be used with great care in special cases for tuning purposes.

Dispersion viscosities

The water volume fraction at inversion point is determined by the key INVERSIONWATERFRAC (default:
INVERSIONWATERFRAC = 0.5).

If DISPERSIONVISC = ON, the dispersion viscosities are calculated according to the model specified in
the DISPMODEL key. If DISPERSIONVISC = OFF, the viscosities are read from the fluid property file
directly if WATERSLIP = ON. When WATERSLIP = OFF | CONSTANT, viscosities of liquids are weighted
according to volume fraction.

If DISPMODEL = PALRHODES, PHI100 must be given (default: PHI100 = 0.765). PHIREL and VISCREL
are required for the EXPERIMENT option (default: PHIREL = 0.765 and VISCREL = 100). The default
values for the EXPERIMENT option correspond to the standard PALRHODES model.

If DISPERSIONVISC = OFF and WATERSLIP = OFF, the volume weighting calculation of viscosities can
be tuned using the keys VISCMOD and WATERCUT. WATERCUT must be given as a list ascending
values for the water cut. For each value in WATERCUT a corresponding value for the viscosity tuning
factor must exist in the VISCMOD key.

Hints and tips

Water fractions in sources, wells and at boundaries (when using PVT tables) are specified either as the
mass fraction of liquid water relative to the total mass (flow) with the keyword WATERFRACTION or as
mass fraction of total water (liquid water plus the water vapour in the gas phase) with the keyword
TOTALWATERFRACTION. The water vapour fraction of the gas phase is taken from the fluid properties
table.

If TOTALWATERFRACTION is set to -1, its actual value is taken from the fluid properties table. With
FLASHMODEL = WATER this value is split into free water and water in gas according to the water mass
fraction in gas values from the fluid table, while with FLASHMODEL = HYDROCARBON the value is
interpreted as only free water (resulting in more free water than with FLASHMODEL = WATER).

The relations between the various mass fractions and mass flow for e.g. a mass source at a specific
temperature and pressure are then by definition:

Rs = Ggas/Ghc

Rswt = Gw/Gtot

Rswv = Gwv/Ggas

Rsw = GwL/Gtot

where

Rs: gas mass fraction

Rswt: total water mass fraction (TOTALWATERFRACTION)

- 145 -
OLGA User manual

Rswv: water vapor mass fraction (always from fluid table)

Rsw: liquid water mass fraction (WATERFRACTION)

Gtot: source total mass flow rate

Ghc:ource total mass flow rate exclusive of liquid water

Gw: mass flow rate of total water (vapor + liquid)

GwL:mass flow rate of liquid water

Ggas: mass flow rate of total gas (including any water vapor)

Gwv: mass flow rate of water vapor in the gas phase

Example: Assume a flowing mixture consisting of 50 kg/s gas (saturated with water), 30 kg/s of oil and 20
kg/s of aqueous phase. Furthermore, let the saturated gas flow include 1 kg/s of water. The various mass
fractions then become:

Rs = 50/(50+30) = 0.625

Rswt = (20+1)/(50+30+20) = 0.21

Rswv = 1/50 = 0.02

Rsw = 20/(50+30+20) = 0.20

Observe that either TOTALWATERFRACTION (Rswt) or WATERFRACTION (Rsw) can be specified for
the same e.g. source. If WATERFRACTION is specified all the water in the e.g. source is considered to be
liquid water.

When modeling a three-phase mixture using PVT tables where you want to include the mass transfer
between the free water and the gas phase, the water option in OLGA must be used with FLASHMODEL =
WATER. This option is more important for gas production systems than for "normal" oil production
systems.

When using two-phase PVT tables in OLGA simulations, internal routines are used for the calculation of
water properties. The water vapour mass fraction, however, will be set to zero; all water in the calculations
will be free water. If the fluid temperature becomes sub-zero, the enthalpy and entropy are extrapolated,
meaning that the fluid is in thermal but not in chemical equilibrium (sub-cooled water, not ice).

The user should be aware that when performing standard simulations with PVT tables there is no separate
water vapour mass balance equation. For three phase simulations, the gas phase is assumed to be
saturated with water. The amount of water vapour is determined by the water vapour mass fraction from
the PVT table. Therefore, the total water mass could be in error for cases where e.g. the inlet total water
mass flow rate is not sufficient to saturate the gas at the water vapour mass fraction from the PVT table.
However, MEG tracking has a water vapour mass balance equation that makes it suitable for simulating
three phase systems where a detailed analysis of the water distribution is necessary (can be used with no
MEG).

When using Compositional Tracking, the water vapour will be taken into account depending on
FLASHTYPE in COMPOPTIONS.

For multiphase transport systems where liquid accumulation could represent a problem, it is recommended
to perform three phase flow computations with the water slip switched on.

Note: The three phase flash option is only valid when a three phase fluid property file is used.

- 146 -
The OLGA model

Drilling fluid

History - terminology

Drilling fluids were originally developed to track the flow of different fluids used in drilling operations. For
example, muds of different densities can be pumped into the well during the drilling operation. In
underbalanced drilling, Nitrogen gas (N2) can be used as lift gas to create underbalanced pressure. As the
tracking scheme was first developed for drilling operations, these fluids were named drilling fluids. The
production engineers were quick to make use of the drilling fluids to simulate dead (stabilized) oil
circulation in deep water oil production loops. In well applications, drilling fluids are used to simulate well
clean-up, well work-over and initial start-up of wells after completion.

Application areas

The drilling fluids can be used when it is desired to track one or more fluids (in addition to the production
fluid), e.g. simulating one fluid displacing another. In drilling applications, the fluids can be oil and water
based muds, or nitrogen for gas lift in underbalanced drilling.

In well operations, drilling fluid is useful for simulating gas lift of wells, well clean-up, well work over and
initial start-up of well after completion.

Typical examples from flow assurance engineering are dead (stabilized) oil circulation in deep water
production loops, gas lift of deep water risers and simulating MEG distribution networks for gas
condensate production systems.

Drilling fluids can also be used to simulate scenarios where the muds cannot be treated as inert, and
where reservoir gas can dissolve in the mud.

Computational options

Two approaches are available in describing and modeling the mixing effects of different fluids: Gas
dissolvable and non-gas dissolvable.

Note: Only a single approach and computational method can be used within an OLGA case definition.

Gas dissolvable fluids

To handle the dissolution of gas into a drilling fluid, the compositional option must be used. The mixing and
phase changes of the mixture are determined by a rigorous equation of state approach. In many scenarios
within managed pressure drilling (MPD), it is important to compute the amount of reservoir gas that
dissolves in the mud, or the amount of gas that breaks out of solution. For such cases, the compositional
approach is recommended. See Drilling fluid properties using a compositional approach for details.

Non-gas dissolvable fluids

For non-gas dissolvable fluid options, drilling fluids do not change the flashing of the production fluid. The
boiling/condensation of oil or water mud is calculated based on the saturation curve. When the mixture
temperature is higher than the saturation temperature of the mud, the mud starts to boil. When the mixture
temperature is below the saturation temperature, the boiled mud condenses back to the liquid phase. The
boiling/condensation rate is determined by the difference between the saturation and mixture temperature
and energy available. The Antoine equation is used for the saturation curve:

- 147 -
OLGA User manual

Here P and T are pressure and temperature respectively.

For oil based mud a = 23.59218 and b = 4547.8.

For water based mud a = 25.27877 and b = 5132.0.

Gas mud remain in a single phase during the entire operation envelope. Physical properties are calculated
by assuming ideal mixing with the production fluid for all mud types.

The production fluid can contain hydrate inhibitors, such as MEG or MeOH. The effects of MEG on the
production fluids (density, viscosity, phase equilibrium) are considered, see Inhibitor tracking on page 168.
There are two methods for describing/calculating the flashing and fluid properties for non-gas dissolvable
fluids:

 Interpolation in PVT tables

The drilling fluid properties can be identified through a fluid property table set in the fluid properties
file. The fluid property tables referred must contain all physical properties normally present in a fluid
property file. A drilling fluid property table set is normally generated using a standalone fluid-package,
such as the OLGA Fluid Definition Tool (see the OLGA GUI User manual). The density and viscosity
can also be modified by using the Fluid Definition Tool or the Mud Property Table application available
in the Tools menu. For further details on the drilling fluid input with use of PVT tables, see How to use
the PVT table

 Built in correlations

For this option, the density and the viscosity ranges are specified at standard conditions. Based on
these standard properties, the density and viscosity at in-situ temperatures and pressures are
calculated by correlations. Conversion units for these drilling fluid properties are supported. For
details, see How to use built-in correlations.

Special treatment of drilling fluid rheology

The non-Newtonian flow behavior of drilling fluids can be accounted for through user input of tabulated
values of rheology parameters (yield stress, plastic viscosity, consistency factor). See DRILLINGFLUID for
details.

License requirements

Drilling fluid is dependent on option drilling which is part of the Wells module. The Wells module requires a
separate license. For the compositional method, a license for the Compositional Tracking module is
required.

PVT table approach

Model description

The masses of the individual drilling fluids are tracked along the flowpaths. The physical properties of the
drilling fluids and process fluid mixture are calculated based on the assumption of ideal mixture. For the
PVT table interpolation, the solubility of the drilling fluid into other phases than the base fluid phase is
neglected. The drilling fluids do not affect the phase behavior/envelope of the process fluids.

The drilling fluid properties such as density and viscosity are tabulated as functions of pressure and
temperature, as for other standard fluid properties, see PVT Lookup table files. For modifying PVT tables
for base fluids to incorporate special fluid effects, the Fluid Definition Tool may be used, see Fluid
Definition tool in the OLGA GUI User manual.

- 148 -
The OLGA model

Each defined fluid is represented by a component when using the PVT table method. Additionally, cutting
may also be tracked as a separate component if PARTICLEFLOW = SIMPLE/ADVANCED under the
OPTIONS keyword.

An example is shown below:

FILES PVTFILE=("./case.tab", "./gasmud.tab", "./oilmud.tab", "./watermud.tab")


DRILLINGFLUID LABEL=GASMUD1, TYPE=GASMUD, FLUIDTABLE=2
DRILLINGFLUID LABEL=OILMUD1, TYPE=OILMUD, FLUIDTABLE=3
DRILLINGFLUID LABEL=WATERMUD1, TYPE=OILMUD, FLUIDTABLE=4

DRILLINGFLUID LABEL=GASMUD2, TYPE=GASMUD, FLUIDTABLE=2


DRILLINGFLUID LABEL=OILMUD2, TYPE=OILMUD, FLUIDTABLE=3
DRILLINGFLUID LABEL=WATERMUD2, TYPE=OILMUD, FLUIDTABLE=4

The tracked fluids/distinguishable materials:

Component ID Component name Description

1 HC Hydrocarbon mixture

2 H2O Aqueous mixture

3 MEG Hydrate inhibitor

7 GASMUD1 Gas mud 1

8 GASMUD2 Gas mud 2

9 OILMUD1 Oil mud 1

10 OILMUD2 Oil mud 2

11 WATERMUD1 Water mud 1

12 WATERMUD2 Water mud 2

13 CUTTING Cuttings

These components may be studied through the output keywords (TRENDDATA, PROFILEDATA, and so
on) by subscribing to the component variables. Note that it is not possible to refer to single components.
For example, it is possible to subscribe to CGHT, giving mass flow rates for all components in the oil, but it
is not possible to subscribe to CGHT only for component OILMUD1 through the GUI.

Non-Newtonian flow behavior

For the PVT table method, four non-Newtonian rheology models are available: Bingham, Power Law,
Herschel Bulkley and Robertson-Stiff (for Fann input only).

When Fann input is used, the generation of rheology parameters is done via a transformation from shear
stress/shear strain to shear stress/shear rate. These are fitted to the rheology models using a weighted
non-linear regression technique.

- 149 -
OLGA User manual

For all the non-Newtonian rheology models, the non-Newtonian influence on the turbulent, frictional
pressure drop is computed using the formalism given by Reed and Pilehvari [29] with some extensions.

The Reed and Pilehvari method is not used by the OLGA HD stratified flow model. For this model an
apparent viscosity is dynamically calculated, based on the local shear rate. This apparent viscosity is used
in the same friction factor formulae as for Newtonian fluids.

For the PVT table approach the rheology parameters may be given through the mud PVT table as well. For
details, see Fluid Definition tool in the OLGA GUI User manual.

Note: The non-Newtonian flow computation specified through selection of a Fann table (key
FANNTABLE) or a rheology table (key RHEOLOGYTABLE), only gives a correction in viscosity and not
in the wall friction for the HD flow model.

How to use drilling fluid with PVT tables

To invoke the drilling fluids, the key DRILLING in the OPTIONS keyword must be set to ON. After the
DRILLING option is activated, it cannot be deactivated in a subsequent restart from a RESTART file.
Drilling fluids are defined on Library level through use of the DRILLINGFLUID keyword. The drilling fluid
type must be set to gas, oil or water, that is, TYPE = GASMUD, OILMUD or WATERMUD. The drilling fluid
type denotes the phase of the drilling fluid.

For further info, see the keyword DRILLINGFLUID.

Interpolation in the PVT tables

The drilling fluid properties can be identified through a fluid property table in the fluid properties file. Use
the FLUIDTABLE key to refer to the file which contains the drilling fluid properties. The fluid properties
table referred must contain all physical properties normally present in a fluid property file. A drilling fluid
FLUIDTABLE is normally generated using a standalone fluid-package. A heading must be added to the
PVT file to indicate which type of the drilling fluid the PVT table is used for. The density and viscosity can
also be modified by using the Fluid Definition Tool or the Mud Property Table application available in the
Tools menu.

Non-Newtonian rheology

Non-Newtonian behavior of drilling fluids can be accounted for. For the PVT table method there are three
alternative workflows to achieve this:

1. User input of the rheology parameters yield stress or consistency factor in the mud PVT table. For oil
based muds the power law exponent or yield stress is read when the heading of the mud PVT table
contains the strings "POWEXPL" or "YIELDSTRL" respectively. For water based muds the power law
exponent or yield stress is read when the heading contains the strings "POWEXW" or "YIELDSTRW"
respectively. For both types of mud the power law exponent and/or the yield stress should then be
given in the file as function of pressure and temperature.
2. User input of FANN viscometer readings (stress-strain values) in a text file. OLGA will in this case
calculate the rheology parameter tables automatically. The FANN text file (*.fann) must be input under
the FILES keyword (use the FANNFILE key), and the keys FANNTABLE and RHEOLOGYMODEL
must be set in the DRILLINGFLUID keyword.
3. User input of a pre-calculated rheology parameter table file. This file (*.rheo) must be input under the
FILES keyword (use the RHEOLOGYFILE key), and the keys RHEOLOGYTABLE and
RHEOLOGYMODEL must be set in the DRILLINGFLUID keyword.

Four non-Newtonian rheology models are available in RHEOLOGYMODEL: Bingham, Power Law,
Herschel Bulkley and Robertson-Stiff ( the latter is only applicable when using RHEOLOGYTABLE or
FANNTABLE).

- 150 -
The OLGA model

Cuttings

Cuttings can be added to the simulation by using the particle flow functionality in OLGA (see Particle Flow
- How to use.).

Boundary conditions

Drilling fluids can be injected into the models through sources and boundary nodes (the SOURCE or
NODE keywords). For both keywords, the drilling fluid used must be identified by a label. The label must
be consistent with the label specified in the DRILLINGFLUID keyword.

Initial conditions

The initial composition can be specified using the FEEDNAME and the FEEDMASSFRACTION keys. If
these keys are not specified the following is done:

 For pipeline sections and separators: the code uses the composition of the production fluid given by
the FLUID key.
 For internal nodes and phase split nodes: the initial composition is calculated as a mixture of the
compositions in the nearest sections in the connected flowpaths.

To maintain backwards compatibility, the mass fraction of cuttings is specified using the FEED key when
DRILLING = ON, COMPOSITIONAL = OFF and PARTICLEFLOW = SIMPLE/ADVANCED. An example is
shown below:

When specifying initial conditions for a separator, the the INITOILLEVEL must be set in accordance to the
DRILLINGFLUID specified (e.g. if only oil is present INITOILLEVEL must be set to total height).

Output variables

A number of drilling mud variables can be plotted as either TREND or PROFILE variables. A
comprehensive list can be found under Drilling Output Variables on page 570.

Limitations

 A fluid PVT table can not be used simultaneously as a drilling fluid and a production fluid. If the same
fluid table is to be used in both fluids, the fluid file needs to be copied, one PVT table to create the
drilling fluid and the other as production fluid.
 The non-Newtonian flow computation specified through selection of a Fann table (key FANNTABLE)
or a rheology table (key RHEOLOGYTABLE), will only give a correction in viscosity and not in the wall
friction for the HD flow model.

Additional information

The keywords below provide useful information:

 ANNULUS to specify the annulus configuration (thermal interactions)


 POSITION to specify initial bit position and leak-to positions
 LEAK to specify TOPOSITION (useful for simulating well unloading valves)

- 151 -
OLGA User manual

Compositional approach

Model description - Drilling fluid properties using a compositional approach

The compositional method for drilling fluids utilizes OLGA's standard framework for compositional
computations. A mixture composition is computed taking all fluids into account, including the drilling fluids.
The phase properties and solubility are computed by the standard OLGA PVT package. Ideal mixing is
assumed. The drilling fluids are treated as a composite phase of external and internal fluids mixed with
weight material. This means that e.g. the oil phase of an oil based mud often consists of oil (external fluid),
water or gas (internal fluids) and weight material. It is assumed that the presence of weight material does
not influence the fluid calculations, and it is assumed that the molar ratio of internal fluid versus external
fluid is constant but limited by the amount of internal phase present.

Non-Newtonian flow behavior

Four non-Newtonian rheology models are available: Bingham, Power law, Herschel-Bulkley and
Robertson-Stiff (for Fann input only).

When Fann input is used, the generation of rheology parameters is done via a transformation from shear
stress/shear strain to shear stress/shear rate. These are fitted to the rheology models using a weighted
non-linear regression technique.

For all the non-Newtonian rheology models, the non-Newtonian influence on the turbulent, frictional
pressure drop is computed using the formalism given by Reed and Pilehvari [29] with some extensions.

The Reed and Pilehvari method is not used by the OLGA HD stratified flow model. For this model an
apparent viscosity is dynamically calculated, based on the local shear rate. This apparent viscosity is used
in the same friction factor formulae as for Newtonian fluids.

Note: The non-Newtonian flow computation specified through selection of a Fann table (key
FANNTABLE) or a rheology table (key RHEOLOGYTABLE), will only give a correction in viscosity and
not in the wall friction for the HD flow model.

Note: When using CTMUD functionality without Fann readings, the viscosity of the muds is taken as the
viscosity of the continuous phase (that is, oil-based mud has the visosity of oil).

How to use drilling fluids with the compositional option

To invoke the drilling fluids, the key DRILLING in the OPTIONS keyword must be set to ON. After the
DRILLING option is activated, it cannot be deactivated in a subsequent restart from a RESTART file.
Drilling fluids are defined on Library level through use of the DRILLINGFLUID keyword. The drilling fluid
type must be set to gas, oil or water, that is, TYPE = GASMUD, OILMUD or WATERMUD. The drilling fluid
type denotes the phase of the drilling fluid.

- 152 -
The OLGA model

A compositional computation for drilling fluids can be specified by selecting COMPOSITIONAL=ON


combined with DRILLING=ON in the OPTIONS keyword. In this case, the standard requirements for
compositional computations in OLGA must be fulfilled. In particular a FEEDFILE (.mfl) containing the
composition of the fluids in the simulation must be given under the FILES keyword. The compositional
keys must be set for each DRILLINGFLUID. The key FLUIDCOMPOSITION refers to a feed that must be
defined either in the fluid composition file, or as a user defined FEED under the COMPOSITIONAL group
in the OLGA GUI. This feed must describe the composition of the drilling fluid. The drilling fluids are treated
as a composite phase; the key TYPE defines the external phase, but internal phases and a weight material
can be specified as well. The four keys GASRATIO, OILRATIO, WATERRATIO and
WEIGHTMATERIALRATIO enable specification of the volumes that comprise the drilling fluid at standard
conditions. The unit of GASRATIO, OILRATIO, WATERRATIO and WEIGHTMATERIALRATIO must be
the same, but any volumetric unit in addition to percent or fractions can be used. The key
STDMUDWEIGHT is an alternative to using WEIGHTMATERIALRATIO. It can be used to specify the mud
weight at standard conditions.

For further info about the keyword DRILLINGFLUID, see DRILLINGFLUID.

Example: Oil Based Mud

To specify an oil based mud with water/oil ratio 20/80 (vol%) and mixture mud weight 1890 kg/m3, the
following keys (under DRILLINGFLUID) can be used:

LABEL = "Mud-1"

TYPE = OILMUD

FLUIDCOMPOSITION = "baseFluid-1"

GASRATIO = 0

OILRATIO = 80

WATERRATIO = 20

STDMUDWEIGHT = 1890 kg/m3

In the example above it is assumed that "baseFluid-1" is defined either in the .mfl file or as a user defined
feed.

Example: water based mud

A water based mud with oil/water ratio 23/77 (vol%) and mixture mud weight of 110 lb/ft3, can be specified
like this:

LABEL = "Mud-2"

TYPE = WATERMUD

FLUIDCOMPOSITION = "baseFluid-2"

GASRATIO = 0

OILRATIO = 23

WATERRATIO = 77

STDMUDWEIGHT = 110 lb/ft3

In the example above it is assumed that "baseFluid-2" is defined either in the .mfl file or as a user defined
feed.

- 153 -
OLGA User manual

Non-Newtonian rheology

Non-Newtonian behavior of drilling fluids can be accounted for. For the compositional method there are
three alternative workflows to achieve this:

1. User input of FANN viscometer readings (stress-strain values) in a text file. OLGA will in this case
calculate the rheology parameter tables automatically. The FANN text file (*.fann) must be input under
the FILES keyword (use the FANNFILE key), and the keys FANNTABLE and RHEOLOGYMODEL
must be set in the DRILLINGFLUID keyword.
2. User input of a pre-calculated rheology parameter table file. This file (*.rheo) must be input under the
FILES keyword (use the RHEOLOGYFILE key), and the keys RHEOLOGYTABLE and
RHEOLOGYMODEL must be set in the DRILLINGFLUID keyword.

Four non-Newtonian rheology models are available in RHEOLOGYMODEL: Bingham, Power Law,
Herschel Bulkley and Robertson-Stiff ( only applicable when using RHEOLOGYTABLE or FANNTABLE).

Cuttings

Cuttings can be added to the simulation by using the particle flow functionality in OLGA (see Particle Flow
- How to use).

Note: For COMPOSITIONAL = ON, PARTICLEFLOW = SIMPLE is always used.

Boundary conditions using drilling fluid

Drilling fluids can be injected into the models through sources and boundary nodes (the SOURCE or
NODE keywords). For both keywords, the drilling fluid used must be identified by a label. For the built-in
correlation method, the density and viscosity must be given as well. The label, density, and viscosity must
be consistent with the label and the density and viscosity must be within the ranges specified in the
DRILLINGFLUID keyword.

Initial conditions for the compositional method

For the compositional method, the FEEDNAME is used to initialize the flowpath with production fluid and
the DRILLINGFLUID key used to initialize the flowpath with mud. If these are not given, then:

 For pipeline sections and separators: The code uses the first feed in the .mfl file. This is consistent
with Compositional Tracking.
 For internal nodes and phase split nodes: The initial composition is calculated as a mixture of the
compositions in the nearest sections in the connected flowpaths.

For the compositional approach, the mass fraction of cuttings can be specified using the
PARTICLEFRACTION key, as usual.

When specifying initial conditions for a separator, the INITOILLEVEL must be set in accordance to the
FEED or DRILLINGFLUID specified (for example, if only oil is present INITOILLEVEL must be set to total
height).

Output variables

A number of drilling mud variables can be plotted as either TREND or PROFILE variables. A
comprehensive list can be found under Drilling Output Variables on page 570.

- 154 -
The OLGA model

Limitations

The non-Newtonian flow computation specified through selection of a Fann table (key FANNTABLE) or a
rheology table (key RHEOLOGYTABLE), only give sa correction in viscosity and not in the wall friction for
the HD flow model.

Additional information

The keywords below provide useful information:

 ANNULUS to specify the annulus configuration (thermal interactions).


 POSITION to specify initial bit position and leak-to positions.
 LEAK to specify TOPOSITION (useful for simulating well unloading valves).

Built-in correlations

Model description - Drilling fluid properties using built-in correlations

When the built-in correlations are used, and PARTICLEFLOW = SIMPLE/ADVANCED under OPTIONS,
the code uses the following sixteen components to keep track of the masses, properties and amount of
mixing of different drilling fluids:

Component ID Component name Description

1 HC Hydrocarbon mixture

2 H2O Aqueous mixture

3 MEG Hydrate inhibitor

4 GDENMIN Min gas density tracer for drilling fluid

5 GDENMAX Max gas density tracer for drilling fluid

6 GVISMIN Min gas viscosity tracer for drilling fluid

7 GVISMAX Max gas viscosity tracer for drilling fluid

8 ODENMIN Min oil density tracer for drilling fluid

9 ODENMAX Max oil density tracer for drilling fluid

10 OVISMIN Min oil viscosity tracer for drilling fluid

11 OVISMAX Max oil viscosity tracer for drilling fluid

12 WDENMIN Min water density tracer for drilling fluid

13 WDENMAX Max water density tracer for drilling fluid

14 WVISMIN Min water viscosity tracer for drilling fluid

- 155 -
OLGA User manual

15 WVISMAX Max water viscosity tracer for drilling fluid

16 CUTTING Cuttings

Components 1-3 are used to track the masses of the fluids specified in the keyword BRANCH. These
components may exist in the three fluid phases (gas, oil, and water). The physical properties for each of
the phases are calculated by interpolation from a standard fluid property P-T table set.

Components 4-7 are used to track the masses and viscosities of gas-based fluids. Gas-based fluids do not
flash to other phases. The mass ratio of component 4 and 5 determines the gas-based fluid density at the
standard conditions, while the ratio of 6 and 7 determines the fluid viscosity at the standard conditions. The
fluid density and viscosity are adjusted to in-situ temperature and pressure using built in correlations. The
in-situ density and viscosity of the gas phase are equal to the volume average of components 1-3 in the
gas phase, gas-based fluid components 4-7 and any cutting component dispersed in a gas continuous
layer and/or gas bubbles.

Components 8-11 are used to track the masses of oil-based muds. Oil-based mud does not flash to any
other phases. The mass ratio of component 8 and 9 determines the mud density at the standard
conditions, while the ratio of 10 and 11 the mud viscosity at the standard condition. The mud density and
viscosity are adjusted to in-situ temperature and pressure using built in correlations for oil-based mud. The
in-situ density and viscosity of the oil phase are equal to the volume average of components 1-3 in the oil
phase, mud components 8-11 and any cutting component dispersed in an oil continuous layer and/or oil
droplets.

Components 12-15 are used to track the masses and viscosities of water-based muds. Water-based mud
does not flash to any other phases. The mass ratio of component 12 and 13 determines the mud density at
the standard conditions, while the ratio of 14 and 15 determines the mud viscosity at the standard
condition. The mud density and viscosity are adjusted to in-situ temperature and pressure using built in
correlations for water-based mud. The in-situ density and viscosity of the water phase are equal to the
volume average of components 1-3 in the water phase, mud components 12-15, and any cutting
component dispersed in a water-continuous layer and/or water droplets.

The CUTTING component (16) is not available if PARTICLEFLOW=NO under OPTIONS.

How to use - Drilling fluid with built-in correlations

To invoke the drilling fluids, the key DRILLING in the OPTIONS keyword must be set to ON. After the
DRILLING option is activated, it cannot be deactivated in a subsequent restart from a RESTART file.
Drilling fluids are defined on Library level through use of the DRILLINGFLUID keyword. The drilling fluid
type must be set to gas, oil or water, that is, TYPE = GASMUD, OILMUD or WATERMUD. The drilling fluid
type denotes the phase of the drilling fluid.

For further info, see the keyword DRILLINGFLUID.

Built in correlations

For the built in correlations for drilling fluid, the density and the viscosity are specified using the keys
MAXDENSITY, MINDENSITY, MAXVISCOSITY and MINVISCOSITY. These keys denote the drilling fluid
density and viscosity at standard conditions, see Model description - Drilling fluid properties using built-in
correlations on page 155. Based on these standard properties, the density and viscosity at in-situ
temperatures and pressures are calculated by correlations. Units of conversions of these drilling fluid
properties are supported. Thus, a valid density unit (such as LB/FT3) or viscosity unit (such as CP) must
follow the density and viscosity specifications.

- 156 -
The OLGA model

Non-Newtonian rheology

For the built-in correlation method, the mud viscosity at in-situ conditions is computed using simple linear
correlations based on the user given viscosity at standard conditions. The user can invoke the Vogel
viscosity model for water and oil based muds. The non-Newtonian flow computation specified through
selection of a Fann table (key FANNTABLE) or a Rheology table (key RHEOLGYTABLE) can not be used
together with built in correlations.

Cuttings

Cuttings can be added to the simulation by using the particle flow functionality in OLGA (see Particle Flow
- How to use.). Note that for COMPOSITIONAL = ON, PARTICLEFLOW = SIMPLE will

always be used.

Boundary conditions using drilling fluid

Drilling fluids can be injected into the models through sources and boundary nodes (the SOURCE or
NODE keywords). For both keywords, the drilling fluid used must be identified by a label. For the built-in
correlation method, the density and viscosity must be given as well. The label, density, and viscosity must
be consistent with the label and the density and viscosity must be within the ranges specified in the
DRILLINGFLUID keyword.

Initial conditions for the built-in correlation method

The initial composition can be specified using the FEEDNAME and the FEEDMASSFRACTION keys. If
these keys are not specified the following is done:

 For pipeline sections and separators: the code uses the composition of the production fluid given by
the FLUID key.
 For internal nodes and phase split nodes: the initial composition is calculated as a mixture of the
compositions in the nearest sections in the connected flowpaths.

To maintain backward compatibility, the mass fraction of cuttings is specified using the FEED key when
DRILLING = ON, COMPOSITIONAL = OFF and PARTICLEFLOW = SIMPLE/ADVANCED. An example is
shown below:

Output variables

A number of drilling mud variables can be plotted as either TREND or PROFILE variables. A
comprehensive list can be found under Drilling Output Variables on page 570.

- 157 -
OLGA User manual

Additional information

The keywords below provide useful information:

 ANNULUS to specify the annulus configuration (thermal interactions)


 POSITION to specify initial bit position and leak-to positions
 LEAK to specify TOPOSITION (useful for simulating well unloading valves)

Complex fluid (Deprecated)

Note: The Complex fluid module will be retired after the release of OLGA 2018 and will not be included
in later versions. Existing OLGA Complex Fluid module users on active maintenance will get support on
this feature until the release of OLGA 2019.1. The functionality is replaced by the RHEOLOGY keyword.

Complex fluids are liquids with high viscosity, yield stress, or liquids being shear thinning. Such properties
might arise in waxy oils or emulsions, which often are shear thinning and have high viscosity. A slurry of
hydrate crystals in oil may have a yield stress depending on the particle concentration. Hydrate is a snow-
like substance formed by water and natural gas that might occur in hydrocarbon transport lines at ambient
temperatures well above the normal freezing point of water at elevated pressure. Fluids that are shear
thinning and have a yield stress, for example, gelled waxy crude, can be simulated using OLGA's complex
fluid model.

The presence of yield stress or shear thinning in the liquid might result in a decreasing pressure drop with
increasing production rates up to a certain point where the pressure drop is at a minimum, even for
horizontal pipes. For production rates below this minimum, unstable operation might occur depending on
the boundary conditions of the transport line. These instabilities can interact with other, more well-known,
multiphase flow phenomena such as terrain slugging and give rise to a wider range of unstable operational
conditions. The purpose of the complex fluid model is to predict such behavior.

The Complex fluid module can be used whenever a fluid exhibits significant deviation from Newtonian
behavior, either by shear thinning (for example, heavy oils) or influence of yield stress (for example, waxy
oils). For Newtonian liquids, the module should be used when modeling fluids with viscosity above 50 cP
and it has been tested up to 1000 cP. The RHEOLOGY keyword can be used for the same purpose.

License requirements

The Complex Fluid module requires a separate license.

Model description (Deprecated)

The complex fluid model utilizes the Bingham model for fluids exhibiting yield stress, while the Power law
is used for shear thinning fluids. As opposed to the complex viscosity model, the complex fluid model
includes numerous modifications to the physical models for both separated and distributed flow taking into
account the non-Newtonian behavior of the fluids. Non-Newtonian behavior can be modeled for the liquid
hydrocarbon phase, the water phase or both. The Newtonian option is included to capture the peculiarities
of higher viscosity liquids.

Bingham plastic model

where τ0 is the yield stress, µρ is plastic viscosity and is shear rate.

- 158 -
The OLGA model

Power law model

where K is consistency factor.

Newtonian fluid

where µ is viscosity.

When running standard OLGA, that is, without slug tracking activated, the use of complex fluid yields an
important improvement because the slug flow model includes the effects of the above rheologies and at
the same time as it covers the range of Reynolds numbers from laminar to turbulent flow. This affects the
bubble front velocity, and, consequently, the liquid accumulation. Furthermore, it yields a better model of
the liquid flowing below the slug bubble as well as a better prediction of the slug fraction. Using this as
basis for pressure drop predictions is a major difference from the complex viscosity model, which is very
important for more viscous liquids.

For stratified flow, the wall friction calculations should yield better results than when using an equivalent
viscosity.

How to use (Deprecated)

The Complex fluid module is activated in the FLUID keyword by setting the key TYPE = COMPLEXFLUID.
The fluid viscosity model to be used is determined by the keys CFLUML and CFLUMW for the liquid
hydrocarbon phase and water phase, respectively. Except for the default Newtonian modeling, fluid
viscosity can be modeled using either the Bingham model or the power law model.

The parameters of the viscosity models can be given in two ways. If the key FULL = YES, the fluid
viscosity parameters (yield stresses/power exponents) are read from the fluid property file as functions of
pressure and temperature. If, on the other hand, FULL = NO, the yield stresses YIELDSRL and
YIELDSTW or power exponents POWEXPL and POWEXPW have to be given if the liquid hydrocarbon or
water viscosity model is set to BINGHAM or POWERLAW respectively. For both options, the viscosity
given in the fluid file is interpreted as the plastic viscosity for Bingham fluids and as the consistency factor
for Power law fluids.

The RHEOLOGY keyword can be used for the same purpose. Note that the RHEOLOGY keyword has
extended functionality compared to the Complex fluid module.

Non-Newtonian rheology
OLGA can model fluids that are shear thinning (for example, heavy oils) or have a yield stress ((for
example, waxy oils) by using different non-Newtonian rheology models. The models available are:
Bingham, Power Law, Herschel-Bulkley and Robertson-Stiff. The parameters for these can be given in a
rheology table file as functions of pressure and temperature. Alternatively, a file with Fann readings for the
fluid can be given (see Fann table file). This Fann file is used by OLGA to calculate the rheology
parameters as a function of pressure and temperature for all the available models. The parameters can be
saved as a rheology table file (with extension .genrheo) by using the key WRITERHEOLOGYFILES under
OPTIONS.

When setting WRITERHEOLOGYFILES=YES, an additional file is also written, with the extension
.genrheofit. This file contains a summary of the calculated rheology parameters, as well as the
corresponding measured and calculated shear stresses. This file can be used to check how well a
rheology model matches measurements in the Fann table.

- 159 -
OLGA User manual

The rheology and Fann tables can be used both with production fluids and drilling fluids. For production
fluids, the RHEOLOGY keyword can be used at flowpath level to set the models for oil, gas and water
separately. The drilling fluid section gives more details on how the tables can be used with drilling fluids.

The non-Newtonian fluid models can affect the flow in two ways: they correct the viscosity of the fluid, and
they affect the flow model directly by correcting the wall friction factors. When using the HD flow model,
only the viscosity and not the wall friction will be corrected.

Model description

There are five different models that can be used in the RHEOLOGY keyword: the Newtonian model and
four non-Newtonian models (Bingham, Power Law, Herschel-Bulkley and Robertson-Stiff).

All five rheology models are characterized by the relation between the shear stress (τ) and the shear rate
( ̇).

Model Relation Parameters

Newtonian μ: viscosity

Bingham ̇ τ0: yield stress

μp: plastic viscosity

Power Law K: consistency factor

n: fluid index

Herschel-Bulkley τ0: yield stress

K: consistency factor

n: fluid index

Robertson-Stiff A,B,C: coefficients

The parameters for the correlations are user-input data as explained in How to use.

These models generally affect the calculations in two ways: modifying the apparent viscosity of the fluid,
and affecting the flow model itself (for example, by affecting the wall friction and the slug bubble rheology).
Currently, only the viscosity correction and not the flow model correction is applied when using the HD flow
model.

How to use

The rheology model for production fluids can be enabled using the RHEOLOGY keyword at flowpath level.
Properties for the gas, oil and water phases can be given separately.

- 160 -
The OLGA model

WATERRHEOLOGYDATA, OILRHEOLOGYDATA and GASRHEOLOGYDATA can be used to determine


where the rheology parameters are to be taken from. The PVT option reads the data from the PVT
property file. RHEOLOGYTABLE/FANNTABLE reads the data from a rheology/Fann table. Lastly, the
CONSTANT option enables you to input constant values manually.

The model to be applied is chosen using the WATERRHEOLOGYMODEL, OILRHEOLOGYMODEL and


GASRHEOLOGYMODEL keys.

See How to use drilling fluid with PVT tables and How to use drilling fluids with the compositional option for
more details on how the rheology models can be applied to drilling fluids.

How to convert Complex fluid input to RHEOLOGY input

In the OLGA GUI, the RHEOLOGY keyword is found under FA-models at the FLOWPATH level.

 The Complex fluid key CFLUML = NEWTONIAN is equivalent to using the RHEOLOGY key
OILRHEOLOGYDATA = PVT.
 If the Complex fluid key FULL = YES and CFLUML is set to BINGHAM (or POWERLAW), the
corresponding RHEOLOGY key values are OILRHEOLOGYMODEL = BINGHAM (or POWERLAW),
OILRHEOLOGYDATA = RHEOLOGYFILE and a RHEOLOGYTABLE must be selected. The rheology
table contains the rheology parameters as a function of pressure and temperature.
 If the Complex fluid key FULL = NO, CFLUML = BINGHAM and YIELDSTRL = x, the corresponding
RHEOLOGY key values are OILRHEOLOGYMODEL = BINGHAM, OILRHEOLOGYDATA =
CONSTANT and OILYIELDSTRESS = x. Note that also OILPLASTICVISCOSITY must be set to a
constant value.
 If the Complex fluid key FULL = NO, CFLUML = POWERLAW and POWEXPL = y, the corresponding
RHEOLOGY key values are OILRHEOLOGYMODEL = POWERLAW, OILRHEOLOGYDATA =
CONSTANT and OILEXPONENT = y. Note that also OILCONSISTENCY must be set to a constant
value.

The same type of correspondence between Complex fluid data and RHEOLOGY data exists for the water
phase.

Some extended features can be found in the RHEOLOGY keyword, that are not present in the Complex
fluid module. One is an option to use a table of FANN readings from which the rheology parameters will be
automatically computed, another is a possibility to specify non-Newtonian rheology also for the gas phase.

Special fluids and solids


There are several methods available in OLGA for describing and calculating the required fluid properties.
There are also functionality for addressing several types of fluids with special behavior. These are still
covered by the methods listed in the second row in the table below, but need additional data described in
the subsequent paragraphs.

- 161 -
OLGA User manual

Mud, drilling, completion, inert fluids

Special fluids, such as drilling, completion or other special (for example, non-flashing/inert) fluids, with or
without non-Newtonian rheology, can be described by using the DRILLINGFLUID specifications through
look-up tables or through the input file. See Drilling fluid on page 147 for details.

Particles

Particles such as sand or cuttings may be tracked by activating a special tracking option. See Introduction
to particles for details.

Inhibitors

Some inhibitors and their effects can be tracked and/or calculated in an OLGA simulation:

 Hydrate inhibitors, see details in Inhibitor tracking on page 168. Note that these inhibitors can also
have an effect on corrosion calculations.
 Corrosion model and effect of inhibitors. The corrosion model can be used together with inhibitor
tracking. See details in Corrosion on page 130 and keyword CORROSION (on Flowpath), key
GLYCOLFRACTION and Inhibitor tracking on page 168.
 Wax inhibitors: Currently, the only methods for reflecting wax inhibitors in the OLGA wax calculations
are to either modify the tabulated solubilities of waxy components in oil, or to tune the deposition rate
by using e.g. the key DIFFCOEFFMULT in the WAXDEPOSITION (on Flowpath) keyword. For details
about the wax data file and WAXDEPOSITION keyword, see Wax table file on page 614 and
WAXDEPOSITION (on Flowpath).
 Inhibitors may also be included in a simulation with full compositional tracking/dynamic
thermodynamic fluid property calculations, see Feed file for Compositional Tracking on page 615.

Hydrates

In the case of analyzing potential hydrate formation, there are two main methods of looking at this in
OLGA:

 Specifying a hydrate curve, OLGA only giving an indication if inside or outside of the pressure-
temperature region where formation occurs. See Hydrate check on page 163 for details.
 Hydrate formation with kinetics and related fluid rheology calculations. See Hydrate kinetics on page
166 for details.

- 162 -
The OLGA model

Wax

When analyzing wax precipitation effects (wall deposits, particle precipitation and non-Newtonian rheology
effects in oil flow), an additional lookup table file is required. This file describes the waxy and non-waxy
components and the waxy components' solubility in oil at given pressures and temperatures. See Wax
deposition on page 181 for details.

Steam

For steam-water-hydrocarbon mixtures, the required fluid description can be found here: SteamWater-HC
on page 175

CO2, H2O and other single component fluids

The single component description method can handle most kinds of single component fluids. Details can
be found in the following link: Single component introduction.

Stable oil-water emulsions

If a stable oil-water emulsion is expected, this can be simulated by specifying a fluid where the oil-water
mixture properties are given in the tables for the oil and water phases. In combination with this, the
WATEROPTIONS keyword can be used, setting WATERSLIP=OFF and DISPERSIONVISC=ON, using
the chosen DISPMODEL to obtain the desired apparent emulsion viscosity.

This is due to the oil-water dispersion model in OLGA only being able to handle instantaneous, velocity
dependent mixing of oil and water. Slow mixing/separation processes can thus not be handled by this
dispersion model.

Other non-Newtonian rheology models

Non-Newtonian fluids canalso be described through the FLUID keyword (complex viscosity and complex
fluid models). See FLUID (on CaseLevel) on page 354 for details. Note that the complex fluid model uses
additional rheology data from the fixed format lookup table file, see Complex fluid - Data from fluid property
file on page 639.

Hydrate

Hydrate check

Hydrate check should be used to get information on possible formation of hydrates when there is a risk of
reaching the pressure-temperature region where water can form hydrates. The user can specify hydrate
formation curves for each flowpath that should be investigated.

Model description

The program does the following:

1. For a given pressure and inhibitor concentration in a section, the temperature below where hydrate
may form is determined from the hydrate formation curve. The difference between the hydrate
formation temperature and the fluid temperature is then calculated, that is, the volume variable
DTHYD is updated.
2. For a given pressure and inhibitor concentration in a section, the pressure above where hydrate may
form is determined from the hydrate formation curve. The difference between the fluid pressure and
the hydrate formation pressure is then calculated, that is, the volume variable DPHYD is updated.

- 163 -
OLGA User manual

3. The positions and the values of the maximum temperature and pressure differences for hydrate
formation are calculated, that is, the branch variables MDPHYD, MDPPOS, MDTHYD and MDTPOS
are updated.

Interpolation and extrapolation of the hydrate curves:

An imaginary square is formed to define the limits of the hydrate curve(s).

When hydrate curves for different inhibitor concentrations (HAMMERSCHMIDT = OFF) are used, the four
sides are the highest/lowest temperature and highest/lowest pressure of the hydrate curves. All hydrate
curves are extrapolated so they reach two of the square sides as illustrated in the figure below for
INHIBCONC = 0%, INHIBCONC = 20% and INHIBCONC = 40%.

For HAMMERSCHMIDT = ON the highest/lowest pressure is defined by the hydrate curve for the inhibitor
concentration of 0%, while the highest/lowest temperature depends on the actual inhibitor concentration
(Hammerschmidt).

Figure 59 Hydrate curve square with different pressure/temperature conditions. Condition 1 and 2
has an inhibitor concentration of 40%, while Condition 3 has 0%.

When OLGA computes DPHYD and DTHYD it uses the inhibitor concentration and the pressure and
temperature in the section. See Condition 1 in the figure above.

If the Hammerschmidt equation is used (HAMMERSCHMIDT = ON), the hydrate temperature is calculated
based on the actual inhibitor concentration.

If HAMMERSCHMIDT = OFF it is checked whether the inhibitor concentration in a section is within the
range given by the hydrate curves. If it is above the highest inhibitor concentration, the hydrate curve for
the highest inhibitor concentration is used. If is below the lowest inhibitor concentration, the hydrate curve
for the lowest inhibitor concentration is used. If the inhibitor concentration in the section is between two
hydrate curves, OLGA interpolates the two hydrate curves to generate a new hydrate curve for the inhibitor
concentration in the section.

- 164 -
The OLGA model

When DPHYD is computed the temperature in the section is used to find the hydrate pressure for the given
inhibitor concentration. If the temperature in the section is inside the square and no match is found, the
highest hydrate pressure is used if the temperature is to the right of the hydrate curve (Condition 2) and
the lowest is used if it is to the left (HAMMERSCHMIDT = OFF only; hydrate pressure always defined
within the square with ON). If the temperature in the section is to the right of the square (Condition 3) the
highest pressure in the square is used as the hydrate pressure. When the temperature in the section is to
the left of the square the lowest pressure in the square is used as the hydrate pressure.

When DTHYD is computed the pressure in the section is used to find the hydrate temperature for the given
inhibitor concentration. If the pressure in the section is inside the square and no match is found, the
highest hydrate temperature is used if the pressure is above the hydrate curve (Condition 3) and the
lowest is used if it is below (HAMMERSCHMIDT = OFF only; hydrate temperature always defined within
the square with ON). If the pressure in the section is above the square (Condition 2) the highest
temperature in the square is used as the hydrate temperature. When the pressure in the section is below
the square the lowest temperature in the square is used as the hydrate temperature.

It should be noted that if the section pressure is above the highest pressure in the square the reported
DPHYD will always be a positive value that indicates hydrate formation. This can be misleading, especially
if the section temperature also is higher than the highest temperature in the square, in which case DTHYD
< 0 and the section temperature in reality may be far above the hydrate formation temperature, see
Condition 4.

To remove this source of error all hydrate curves should include both the minimum and maximum
pressure in the pipeline. That is, the hydrate curves in Figure 59 are not well defined for conditions 2, 3
and 4 (especially the hydrate curve for 0%). Also, it is recommended to always include the hydrate curve
for an inhibitor concentration of 0% to avoid underestimating the hydration formation temperature.

Using DEBUG = ON in OPTIONSOPTIONS, a warning is given the first time the fluid temperature is above
or below the maximum temperature in the 'hydrate curve' square to alert the user. This goes for pressure
above/below the square and inhibitor concentrations above/below the given values, as well.

How to use

Define the hydrate formation curves with the HYDRATECURVE keyword in the Library section.

In each flowpath, use the HYDRATECHECK keyword to specify a list of hydrate curves to apply. Each
HYDRATECURVE specified in a flowpath must have a unique inhibitor concentration (INHIBCONC).

The hydrate formation curve can be specified either with keys PRESSURE and TEMPERATURE, or from
an ASCII file where the hydrate formation curve is given.

The effect of an inhibitor on the hydrate formation temperature can be calculated. This requires the
Inhibitor tracking module or the Compositional tracking module with an inhibitor defined in the FEEDFILE.
Note that changes in the composition (except the specified inhibitor) does not affect the hydrate curve
calculations.

- 165 -
OLGA User manual

This effect can be calculated in two ways:

1. HAMMERSCHMIDT = OFF: One hydrate curve per inhibitor concentration (INHIBCONC) must be
given. OLGA will then interpolate between the curves defined in the HYDRATECHECK. One
HYDRATECURVE keyword must be defined for each curve and concentration.
2. HAMMERSCHMIDT = ON: The Hammerschmidt equation (see Inhibitor tracking on page 168) will be
used based on the hydrate curve for no inhibitor. The equation is valid for inhibitor concentrations
between 0% and 70%.

Note: For Compositional Tracking, the INHIBITOR must be defined in the FEEDFILE before it can be
selected in the HYDRATECURVE.

Hydrate kinetics

The hydrate kinetics model (CSMHYK) allows for the prediction of where and approximately where hydrate
plugs will form in oil and gas pipelines, and the transport properties of cold flow hydrate slurries. The
current version of the CSMHYK model (version 2) incorporates three distinct models for hydrate formation,
growth and transport. The KINETIC model is suitable for systems with small mass and heat transfer
resistances inside of the pipeline. The TRANSPORT model includes mass and heat diffusion through the
particle boundary layer and hydrate shell so that both heat and mass transport limitation will be taken into
account. The COLDFLOW model is intended to simulate a fully formed cold hydrate slurry system in which
only growth and possible agglomeration of already formed hydrate particles is considered.

Include the hydrate kinetics if the pipeline temperature is close to the hydrate formation temperature. If the
temperature drops sufficiently below the hydrate equilibrium temperature hydrate will be nucleated. The
formation of hydrate will affect both the temperature of the pipeline and the pressure drop due to increased
viscosity of the hydrate-oil slurry relative to oil viscosity.

License requirements

The Hydrate kinetics module requires a separate license.

Model description

The Hydrate kinetics module combines the hydrate kinetics and rheological model developed by Colorado
School of Mines with the flow equations of the OLGA model. The hydrate kinetics model determines the
amount of gas and water consumed by hydrate formation and the effective viscosity of the hydrate particle
laden oil phase. The flow model integrates the mass consumption rate to obtain the amount of hydrate
phase and uses the effective viscosity for the flow calculations. The KINETIC model only considers the
hydrate reaction kinetics themselves, and so assumes that heat and mass transfer resistances are low.
The TRANSPORT model takes heat and mass transport into account in addition to the reaction kinetics.
This model assumes that the water phase is fully dispersed in the oil phase. The COLDFLOW model
assumes that the hydrate nucleation is fully formed in the cold fluid and that only hydrate particle growth
and agglomeration is taking place.

Hydrate reaction

The model assumes that hydrate formation will commence after sufficient sub-cooling (SUBCOOLING).
The default sub-cooling is 6.5°F. Whether the nucleation is assumed independent of other thermodynamic
properties than the hydrate equilibrium temperature at the given system pressure depends on the choice of
model.

Whether hydrates with properties of SI or SII structure are formed depends on the key STRUCTURE.

- 166 -
The OLGA model

The hydrate formation reaction will by default react gas (methane) hydrocarbons with liquid water to form
hydrate particles (OILGUESTFRACTION=0 and GASGUESTFRACTION=1).

The HYDRATEOPTIONS key GASGUESTFRACTION is the mass fraction of gas available for hydrate
formation to all the gas in a section, mg, that is,

The HYDRATEOPTIONS key OILGUESTFRACTION is the mass fraction of oil available for hydrate
formation to all the oil in a section, m0.

The hydrate reaction rate is limited to the mass available to react. First the gas mass will react, then the oil
mass will react. TRANSPORT and COLDFLOW model use a file (METHANECONCFILE) containing
concentration data for methane in bulk, and in equilibrium with hydrate to calculate mass diffusion. It is
assumed that enough free gas is present so that the bulk concentration of methane in the oil does not
change.

Flow model modifications

By default the hydrate particles will flow with the oil film. That is; the hydrate velocity will be the same as for
the oil film (COIL=1 and CWATER=0, denoted Co and Cw, respectively). But it is possible to relate the
hydrate velocity to both the oil and water velocity, uof and uwf, respectively, according to

An effective hydrate oil slurry viscosity, , is calculated by the Colorado School of Mines code:
hos

It is possible to force a drift flux relation between the gas velocity, ug, and the volume average liquid
velocity, ul by using the DRIFTFLUX, VELOCITYRATIO and DRIFTVELOCITY keys:

It is also possible to increase the drag between gas and liquid by using the FOGEXPONENT key:

The FOGEXPONENT will reduce the velocity difference between gas and liquid when hydrate particles are
present.

By using the FULLDISPERSION key, no slip between oil film and water film is used in the simulation.

Notes

The model is still in the research phase, and the initial emphasis has been on flowing liquid dominated
systems with excess of water and gas for hydrate formation. Future versions will likely also address gas
dominated systems and include a deposition mechanism. Special care should be taken when using the
model because the model has only been validated against limited data sets. Further, it is not designed for
shut-in and depressurization studies.

The hydrate particles are uniformly distributed in the oil phase. The hydrate equilibrium is pre-calculated
and the kinetic model developed for methane is adapted. For TRANSPORT and COLDFLOW data for
methane is used for diffusion mass transfer.

No deposition on wall is activated. Immediate nucleation of the hydrate particles (no induction time).

- 167 -
OLGA User manual

How to use

The hydrate kinetics model is activated through the HYDRATEKINETICS keyword. HYDRATEKINETICS
keyword is a FlowPath FA-Model (Flow Assurance Model). The tuning keys for thermodynamic, intrinsic,
transport and slurry behavior is located in the keyword HYDRATEOPTIONS, which is added to the
FlowPath along with the HYDRATEKINETICS keyword if these tuning keys are to be adjusted.

The HYDRATEKINETICS references a HYDRATECHECK that describe the hydrate equilibrium


temperature, and which must be present on the same FlowPath.

Inhibitor tracking

The Inhibitor tracking module allows for tracking of the contents of a hydrate inhibitor in the pipeline. The
module allows the choice between three inhibitors; MEG (mono-ethylene glycol), MEOH (methanol) or
ETOH (ethanol).

An important application of this module within flow assurance, is using it to ensure that the amount of
hydrate inhibitor throughout the pipelines is sufficient to prevent the formation of hydrates. In the standard
three-phase model of OLGA, the pipeline may contain water and inhibitor, but information regarding the
inhibitor concentration along the line is not available.

License requirements

The Inhibitor tracking module requires a separate license.

Model description

The following assumptions are made for inhibitor tracking:

 The only properties of the aqueous phase affected by MEG are the viscosity, the density, and the
density’s derivatives.
 The water vapour content in the gas phase is adjusted by the mole fraction of MEG in the aqueous
phase.
 The mole fraction of inhibitor in gas is equal to the vapor pressure divided by the system pressure.
 There is no diffusion of MEG in the aqueous phase.
 The inhibitors do not effect flashing between gas and oil. This flash is calculated based upon the gas
mass fraction from the PVT table.
 There is no hydrocarbon component dissolved in the water.
 The Inhibitor tracking module is not aware of any special physics the user may have activated, and
hence may not work properly in combination with e.g. Wax or Corrosion. However, it should work with
all the features of basic OLGA.
 The Inhibitor tracking module must be used with a two-phase fluid table or with a three-phase fluid
table that has only H2O in the water phase.
 The active coefficients of inhibitor and H2O from UNIFAC correlations are used to calculate the
chemical potentials of MEOH/ETOH and H2O in the aqueous phase.

The Inhibitor tracking module uses a fluid of three components, namely

1. HC - Hydrocarbon in oil and gas phase.


2. H2O - Water, which can be in the gas and the aqueous phase.
3. Inhibitor - (MEG, MEOH or ETOH).

- 168 -
The OLGA model

At each time step the properties of the aqueous phase are calculated from the local pressure and
temperature, and also from the fluid composition in each section of the pipeline. The effects of the inhibitor
are included in the calculation of the density and viscosity of the aqueous phase. The method of Grunberg
and Nissan is used to calculate the viscosity of the inhibitor-water mixture, and the Hankinson-Brobst-
Thomson (HBT) technique yields an estimate of the liquid density. Descriptions and formulae for the
Grunberg and Nissan method and the HBT technique can be found in the open literature, see [30].

The effect of inhibitor can also be included in the calculation of the hydrate formation temperature. The
user can either specify a hydrate curve for each inhibitor concentration and let OLGA interpolate between
the values, or the Hammerschmidt formula for hydrate depression [14] can be used (the equation is valid
for inhibitor concentrations between 0% and 70%):

where

ΔT Hydrate depression, °F

M Molecular weight of inhibitor (MEG: 62.069 g/mol, MEOH: 32.042 g/mol, ETOH: 46.069 g/mol)

H Hammerschmidt constant, default value is 2335 delta F

W Weight per cent of the inhibitor in the liquid

TMEGCONC Calculated hydrate temperature

TMEGCONC=0 Hydrate temperature for no inhibitor

For the other properties of the aqueous phase, the effects of the inhibitor are neglected and pure water
properties from the three-phase fluid table or from OLGA are adopted.

How to use

With the Inhibitor tracking module, you can specify a hydrate inhibitor (one of MEG, MEOH, or ETOH) to
see the effect this will have on the formation of hydrates in the pipeline.

Specify the following keywords to use the Inhibitor tracking module:

 OPTIONS to set COMPOSITIONAL = MEG/MEOH/ETOH


 SOURCE to specify INHIBFRACTION in the mass source
 INITIALCONDITIONS to specify INHIBFRACTION at initial time (if STEADYSTATE = OFF in
OPTIONS)
 NODE to specify INHIBFRACTION at the boundary
 TRENDDATA/PROFILEDATA/OUTPUTDATA to print compositional variables for given components
 HYDRATECURVE and HYDRATECHECK to calculate the effect on the hydrate formation
temperature

Note that either INHIBFRACTION or TOTALINHIBFRACTION can be given. The former is the mass
fraction of the inhibitor in the total aqueous phase; the latter is the mass fraction of the inhibitor in relation
to the total aqueous phase + water vapour.

Note: Inhibitor tracking cannot be used together with Wax deposition.

- 169 -
OLGA User manual

Particle flow

Flow of solid particles in multiphase tubes and pipes is an important flow assurance issue. As well as being
a general nuisance, particles can affect the fluid flow and heat transfer significantly. They can cause
damage to equipment and pipes by erosion, and the blockage of pipes by particle deposition can cause
severe loss of production. An accurate model for solid particle transportation and deposition in multiphase
flow can help to optimize production from sand-prone reservoirs, clean-up operations and pipeline profiles.

This module should be used when it is relevant to simulate the transport and deposition of solid particles in
through the pipeline. Two models are available, which differ in complexity:

 The SIMPLE model is suitable for estimating the flow of suspended particles in transportation pipes
following one carrier phase, typically in stratified or annular flow.
 The ADVANCED model is more accurate and must be used in cases where deposition and mixing
between phases is expected.

More models can be added using extensions (see OLGA Extensibility).

Model description

There are two models available for simulating particle flow:

 The SIMPLE model considers only the axial movement of the particles. The particles remain in the
same carrier phase after they are injected into the system.
 The ADVANCED model considers formation of a bed as well as cross-sectional distribution of the
particles between the different fluid layers, in addition to the axial particle transport.

Both approaches use the same models for the velocity of the particles and the viscosity of the fluid-particle
mixture.

Slip velocity

Particles are assumed to be dispersed in the three phases (gas layer, oil layer and water). The particles
velocity is defined using a drift velocity or slippage defined as the velocity of the particles relative to the
velocity of the carrier phase. Only gravity induced slippage is considered, and therefore particles flowing
horizontally will move with the velocity of the carrier phase if no deposition is considered. The vertical
slippage between particles and fluid, Vsl, is calculated depending on the Reynolds number.
For laminar flow (Re < 3) the empirical correlation for Vsl is as follows [3]:

where ds is the particle diameter [m], ρs is the density of the solid particles [kg/m3], ρf is the density of the
fluid [kg/m3], µf is the viscosity of the fluid [kg/m3], Vsl is the slip velocity [m/s].

The Reynolds number for particles is based on Vsl and particle diameter:

For transitional flow (3 < Re < 300) the empirical correlation for Vsl is:

For fully developed turbulent flow (Re > 300) the empirical correlation for Vsl is:

- 170 -
The OLGA model

The axial slippage is given by Vsl multiplied by the cosine of the pipe angle with the gravity vector:

The particles velocity in a layer is linearly scaled down to zero when the concentration in the layer is
between 0.7 and 0.8.

Viscosity of the fluid-particle mixture

The viscosity of the fluid is corrected due to the suspended particles. For this, the Krieger-Dougherty
correction [18] factor is used:

where  is the volume fraction of suspended particles in the fluid.

SIMPLE model

Conservation equations are solved for the mass of particles in each fluid field. This determines the
particles concentration which can change with time and along the flowpath. For the simple model, the
particles when they are injected through a source or at boundary conditions, are assigned to the phase
with the highest volume, termed the carrier phase for these particles. There is no exchange of particles
between carrier phases. A consequence of this assumption is that if the flow is stopped, the particles will
tend to accumulate in the oil, water and gas layers independently, instead of accumulating on the bottom
layer, as in reality.

ADVANCED model

With this mode, conservations equations are solved for the mass of particles in two fields: the particles
suspended in the fluid layers, and the particles in the bed. The bed layer consists of two sub-layers: a
static part (called stationary bed) and a moving part (called moving bed or bed load).

For the suspension, conservation equations are solved for the total mass of suspended particles. This
makes it possible to account for mixing of particles between the oil, water and gas layers.

The entrainment and deposition rates of the particles determine the size of the bed, while the porosity of
the bed (available as user input) determines the amount of fluid trapped in the bed. We assume that the
fluid does not flow through the stationary bed.

Conditions of a bed

There are three equilibrium conditions of the particle transport mode: static bed (particles do not move at
all), bed load (some of the bed is moving but no particles entrained in the fluid layer above the bed), and
suspended load (some or all of the particles are entrained in the fluid layers).

We model the incipient condition of suspension as the point where the shear velocity at the bed surface
becomes greater than the settling velocity of the particles in the fluid in contact with the bed:

where τf is the shear stress and v* is the shear velocity of the fluid at the bed surface.

- 171 -
OLGA User manual

On the other hand, the incipient condition of bed load is calculated using doing a balance of the forces
acting on a particle:

In the figure, FL is the lift force, FD is the drag force, FB is the buoyancy force, FG is the gravity force, α is
the pipe inclination and Φ is the angle of repose, available as input. The effects of normal (Ni) and friction
(fi) forces are neglected at the initiation of the rolling of the particle.

Note: The angle of repose is defined as the steepest angle of descent or dip relative to the horizontal
plane to which a material can be piled without slumping.

For the particle to move upwards, the following condition needs to be satisfied at the contact point P1:

For the particle to move downwards, the following condition needs to be satisfied at the contact point P2:

The forces are calculated as follows:

where u is the fluid velocity in the velocity sub-layer above the bed and CD is the drag coefficient. Here, we
have used Saffman's model [16] for the lift force.

- 172 -
The OLGA model

Parameters of the moving bed

We use the correlation from Nielsen [6] to calculate the thickness and the velocity of the moving bed sub-
layer:

where δs is the thickness of the moving bed sub-layer, τw is the wall shear stress, τw,c is the wall shear
stress at incipient condition of bed load and Vb is the axial velocity of the moving bed.

The concentration of particles in the moving bed sub-layer is taken from the porosity of the bed (available
as input).

Concentration profile

The calculation of the concentration profile is based on the steady-state advection diffusion equation:

where Cs is the concentration of suspended particles. Here, we have assumed that the diffusivity is equal
to the eddy viscosity υt. This equation defines a concentration profile for the suspension. For multiphase
flow the concentration profile determines the distribution of the suspended particles in the flowing layers
and it is used to calculate the deposition rate.

The eddy viscosity used in the calculation of the particle concentration profile assumes separated flow. To
account for distributed flow regimes such as bubble and slug flow the concentration profile is calculated
with properties (such as layer heights, shear stress, density and viscosity) of the main region. The particles
are then distributed in the phases using layer heights calculated from the phase volume fractions of the
fluid mixture.

Entrainment and deposition

The deposition rate is defined as:

Where S is the length of the bed-suspension interface in a cross sectional cut, A is the pipe area, and
is the concentration of suspended particles at the bed surface. The latter is obtained by solving the
advection diffusion equation.

The entrainment rate is defined as:

Where Cb is the concentration of particles in the bed. Entrainment is only considered under the condition of
suspension.

- 173 -
OLGA User manual

Tuning

It is possible to tune the diffusivities in the ADVANCED particle model with the keys GASDIFFUSIVITY,
OILDIFFUSIVITY and WATERDIFFUSIVITY. These tuning factors are multiplied directly with the diffusivity
of the respective layer. The diffusivity tuning factor for the bottom layer is also multiplied with the shear
velocity used in the condition of incipient suspension. For separated flow setting the diffusivity to zero
results in no suspended particles in the given layer and the layers above. Note that the diffusivity tuning
factors are not taken into account by the Steady state preprocessor because bed formation is not included
and the distribution of particles in the fluid is simplified, see Particle flow- How to use.

How to use

You can include particles in an OLGA model by using the PARTICLEFLOW key under the OPTIONS
keyword. Two models are available: SIMPLE and ADVANCED, as described in Model description.

Particles can be entered into pipelines through sources or boundary nodes, and corresponding initial
conditions can be set in INITIALCONDITIONS, as well as for internal nodes, phase split nodes and
separators.

Particles can be defined both for compositional and non-compositional simulations. The SIMPLE model
can be used in both cases, while the ADVANCED model can be used only in non-compositional cases.

The particle flow functionality can be used with drilling fluids by setting DRILLING = ON under the
OPTIONS keyword to simulate drilling scenarios (see Drilling fluid for more details).

Properties

The density, diameter and heat capacity of the particles can be specified through the PARTICLES keyword
under Library. Only one type of particle can be specified for one simulation. If this keyword is not specified,
the default values are used.

Additionally, it is possible to adjust the properties of the particle bed for the ADVANCED model. The
available parameters are the angle of repose and the porosity of the bed. The corresponding input keys
can be defined using the PARTICLEOPTIONS keyword. Default values are used if this keyword is not
defined.

Boundary conditions

Particle flow can be specified by the PARTICLEFRACTION key in SOURCE or NODE. The value to enter
here is the mass of particles divided by the mass of the total mixture.

Initial conditions

An initial distribution of particles can be specified using the PARTICLEFRACTION key under the
INITIALCONDITIONS keyword.

Additionally, the initial mass fraction of particles can be given for internal nodes, separators and phase split
nodes using the PARTICLEFRACTION key in the corresponding keywords. An exception to this rule is that
the value is specified through the CUTTING component in a FEED when setting DRILLING=ON and
COMPOSITIONAL=OFF under OPTIONS (see Drilling fluid). This is to maintain backward compatibility.

Output variables

A number of output variables related to the particles are available for TREND and PROFILE plots under
the variable group ParticleFlow. A comprehensive list can be found under Particle flow Output Variables on
page 582.

- 174 -
The OLGA model

Extensions

Particle flow models can be added using extensions. These models are available in the key
PARTICLEMODEL, under PARTICLEOPTIONS. To use these, the PARTICLEFLOW=ADVANCED must
be selected. The key BEDPOROSITY will be available as a tuning parameter for the extension model.
However, the model may not take the parameter into account. Refer to the documentation of the extension
for more details..

Notes

 The Steady state preprocessor ignores the slip between the particles and fluids. It does not consider
the bed formation either.
 Only one particle size can be used for an OLGA model.
 The Steady state preprocessor with the ADVANCED model does not include bed formation and the
distribution of particles in the fluid is done according to the volumetric flowrates of the phases.
 See the Compatibility matrix for more information.

SteamWater-HC

The SteamWater-HC module is an improved way of tracking when there is a considerable amount of water
in the fluid. For such situations, this model has some benefits as compared to the table based approach:

1. The assumption in the standard table based that the gas phase is always saturated with steam (no
mass balance for steam) is lifted. This does not apply for Inhibitor Tracking and Compositional
Tracking as those models have a steam mass balance.
2. Evaporation of water does not require a pre-existing gas phase.
3. The ability to handle crossing of the saturation line in single component systems.

The second limitation is not a real limitation as there will usually be some HC gas in situations where water
is evaporating. The only situation where this limitation is real is if only water is present in the fluid and
temperature and pressure conditions are such that the saturation line is crossed.

The third limitation is related to the way the conservation equations are solved with an explicit coupling
between volume (pressure) balance and energy (temperature) balance.

This is solved by introducing time constants or delays in the evaporation/condensation process. The
difference between the saturation temperature and the fluid temperature serves as a potential for phase
mass transfer. Multiplying this temperature difference with a certain heat or energy transfer coefficient
gives a certain energy transfer rate that can be used to estimate the mass transfer rate. In that case an
asymptotic approach to equilibrium occurs. How fast this approach is depends on the size of the energy
transfer coefficient.

Also, this module gives more correct water/steam properties around the critical point and also in the
supercritical region.

The SteamWater–HC module should be used when there is a considerable amount of water in the fluid, or
when it is important to limit the rate of boiling/evaporation/condensation, e.g., when simulating drying of a
pipeline with hot gas.

License requirements

SteamWater–HC is part of the Single component module that requires a separate license.

- 175 -
OLGA User manual

Model description

The following assumptions are made in the model:

 Oil, gas, water and vapor (steam) all have the same temperature, TM.
 The pressure of the water phase is equal to the total pressure.
 The pressure of vapor is equal to the partial pressure of vapor in the gas phase and is calculated
assuming an ideal mix of vapor and hydrocarbon gas.
 Water saturation temperature, Tsatw, is calculated from the total pressure.
 Vapor saturation temperature, Tsatv, is calculated from the partial pressure of vapor.
 If the fluid temperature, TM, is higher than Tsatw, flashing or boiling of water occurs.
 If TM is higher than Tsatv but lower than Tsatw, evaporation of water occurs.
 If TM is lower than Tsatv, condensation of vapor occurs.

Note: Tsatv is always less than or equal to Tsatw.

The inner pipe wall surface may be superheated or subcooled compared to Tsatw or Tsatv. Such a situation
can lead to surface boiling or surface condensation in cases where water or vapor is in direct contact with
the pipe wall. This additional mass transfer term will not be directly included but can be accounted for by
an enhanced heat transfer due to surface boiling/condensation.

Generation of steam and water properties

The equations used to calculate the steam and water properties are taken from ref. 1.

These equations are time consuming to solve and will therefore be used only at the start of a simulation.
The properties will be calculated at pressure/temperature values corresponding to the
pressure/temperature grid points specified in the PVT table prepared for the simulation.

After the saturation points and the physical properties are calculated for all the P/T grid points that
correspond to the PVT table for the HC mixture, linear interpolation between the grid points is applied
during the simulations. For simulation cases where the pressure may cross the critical pressure, it is
important that the HC PVT table contains a grid point that is close to the critical point to obtain accurate
crossing of the saturation line.

For all the cases, a pressure interval less than 10 bar and a temperature interval less than 10 K are
recommended to maintain acceptable accuracy of the linear interpolation.

Saturation line

Below the critical point, PC and TC, (pressure and temperature), the saturation pressure, P sat (T), and
saturation temperature, Tsat (P), at a given grid point, P,T, is determined from the saturation line.

Above the critical point, PC = 221.2 bar and TC = 647.3 K, and to 676 K and 250 bar, a straight line is
used to divide the single-phase or dense-phase region into vapor and liquid. Above 676 K and 250 bar, the
boundary line between region 2 and region 3 is used as the division between vapor and liquid. The
definition of the regions is described in ref. 1.

- 176 -
The OLGA model

Physical properties

Water properties:

For pressures below 225 bar, water property equations for region 1 (see ref. 1) are used for water in the
water region.

In the vapor region, the properties for water are extrapolated from the saturation point: Enthalpy is based
on thermal capacity at saturation temperature corresponding to a given pressure and the density according
to the density derivative to pressure at the saturation pressure corresponding to a given temperature. All
the other properties are from the saturation temperature.

For pressures above 225 bar, water properties are calculated based on equations for the different regions
specified in ref. 1.

Thermal capacity and enthalpy for water is singular near the critical point. To avoid numerical problems in
region 3 the water properties from region 1 instead of those for region 3 when the pressure is below 225
bar (the equations are very similar except when you are closer than <1C and 0.1 bar). The same is done
for steam.

Vapor properties:

For pressures below 225 bar, vapor property equations for region 2 are used for vapor in the vapor region.

In the water region, the vapor properties are extrapolated from the saturation point. Enthalpy is based on
thermal capacity at saturation temperature corresponding to the given vapor pressure and the density
according to the density derivative to pressure at the saturation pressure corresponding to the given
temperature. All the other properties are from the saturation temperature corresponding to the vapor
pressure.

For pressures above 225 bar, vapor properties are calculated based on equations for the different regions.

With this procedure, the vapor and water properties are continuous across the vapor-liquid (V-L) division
line when pressure is above 225 bar.

- 177 -
OLGA User manual

Vapor pressure:

where

where

Mvap is kmoles of vapor per unit volume [m3], MHC is kmoles of HC gas per unit volume [m3], Mgvap is mass of
vapor per unit volume, MgHC is mass of HC gas per unit volume, MwH2O is molweight of vapor (18 kg/kmol)
and MwHC is molweight of HC gas.

Flashing/Condensation

The driving force for flashing of water or condensation of vapor will be the difference between the
saturation temperatures and the fluid temperature. The vapor saturation temperature will be directly related
to the partial pressure of vapor assuming an ideal mixing of HC-gas and vapor. With the presence of HC-
gas in the fluid, a gradual transfer of mass of H2O will take place as the partial pressure of vapor changes.
With no HC-gas in the fluid the partial pressure of vapor will be equal to the total pressure and no bulk
mass transfer takes place until either sub-cooled water reaches saturation temperature or superheated
steam cools down below saturation temperature.

The effect of local boiling on a hot wall surface or condensation on a cold wall surface will not be included
directly in the mass balance of water and vapor but can be accounted for through an enhanced heat
transfer at the pipe wall.

The total energy available for generating vapor or condensing vapor to obtain saturated conditions is Htotv.

where mgHC is the specific mass of HC gas [kg/m3], mlHC is the pecific mass of HC liquid [kg/m3], mlwt is the
specific mass of water [kg/m3], mgv is the specific mass of vapor [kg/m3], cpgh is the specific heat of HC gas
[KJ/kgC], cplh specific heat of HC liquid [KJ/kgC], cpwt is the specific heat of water[KJ/kgC], cpv is the specific
heat of vapor [KJ/kgC].

The total mass transfer to obtain saturated conditions is:

To reduce numerical problems it will be assumed that this mass transfer will take a certain time TPSI. The
mass transfer rate will then be:

with unit [kg/m3s].

The mass transfer per time step must not be larger than the available mass of the diminishing phase
component.

- 178 -
The OLGA model

References

1. Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water
and Steam, The International Association for the Properties of Water and Steam, Lucerne, Switzerland,
August 2007

How to use

To activate the SteamWater-HC model, the input key COMPOSITIONAL under keyword OPTIONS must
be set to STEAMWATER-HC.

TCONDENSATION, TVAPORIZATION and TBOILING in keyword COMPOPTIONS can be used to specify


the time constants for condensation, evaporation and boiling, respectively. They are available as time
series if desired by using the subkey TIME (but not for Compositional Tracking). Large values will slow
down the mass transfer leading to fairly large non-equilibrium. Small values will speed up the mass
transfer thereby reducing the thermal non-equilibrium. Too small values may however cause instabilities
and probably nonphysical results.

For initialconditions, boundaries, sources and wells, the specified water fraction will be either steam or
liquid depending on the specified temperature compared to the water saturation temperature at the
specified pressure when STEAMFRACTION is set to -1 (default). For sources without any pressure given,
the pressure of the source receiving position will be used. STEAMFRACTION can be set between 0 and 1
to give both water and steam.

New output variables for presenting vapor data have been implemented: TSAT, TSV, PSAT, PVAP (see
output variables description). Other data for vapor can be obtained by specifying compositional variables.

After the saturation points and the physical properties are calculated for all the P/T grid points that
correspond to the PVT table for the HC mixture, linear interpolation between the grid points is applied
during the simulations. For simulation cases where the pressure may cross the critical pressure, it is
important that the HC PVT table contains a grid point that is close to the critical point to obtain accurate
crossing of the saturation line.

In OPTIONS the subkey WRITEPVTFILES=[NO]/YES controls if the program will write to file the
water/steam properties that are being used. For YES, tab files (fixed format) will be written for each HC
mixture PVT table, using the same P/T grid. The name of the file(s) will be
<inputfile>_pvt_<HCfluidlabel>.tab. Also, the saturation line will be written to a file with the name
<inputile>_pvt.env. Both can be viewed in the GUI.

For all the cases, a pressure interval less than 10 bar and a temperature interval less than 10 K are
recommended to maintain acceptable accuracy of the linear interpolation.

Tracer tracking

Tracer tracking can be used to simulate a distribution in space and time of mass, age and residence time
of tracers of such small amounts that their influence on the flow is negligible. Examples of such tracers are
KHI inhibitors, corrosion inhibitors and radioactive tracers.

License requirements

Tracer tracking is part of the Inhibitor tracking module that requires a separate license.

Model description

The Tracer Tracking model in OLGA computes a distribution in space and time of tracer mass, residence
time and age (if the key AGING=ON). If aging is on, ages are divided into age groups (defined by the key
AGEBOUNDARIES), and the average age within each group is computed.

- 179 -
OLGA User manual

The computation of all these variables is based on simple conservation equations, here represented by the
equation for mass:

Here θ represents the sum of regular sources as well as the influence of entrainment and deposition of
droplets. The age- and residence time-equation has an additional source term that, in the case of aging,
accounts for the amount of time the tracer is subject to sub-cooling relative to an equilibrium temperature
(for example, the hydrate formation temperature in the case of KHI tracking).

The following assumptions are used:

 The presence of tracers is assumed to have no effect on the flow, that is, tracers usually exist in
amounts so small that the effect on the flow of the production fluids is negligible.
 The tracers/inhibitors are assumed to be carried in a carrying phase (condensate, water or gas).
Partitioning of tracers/inhibitors to phases other than the carrying phase is not included in the current
version of the model.

How to use

The following keywords and keys must be set to use tracer tracking.

In the Property editor for the keyword OPTIONS choose:

 TRACERTRACKING=ON

Specify one TRACERFEED for each tracer:

 In the OLGA GUI, at the library level right-click and choose Add > TRACERFEED.

In the Property editor for each TRACERFEED set the following keys:

LABEL Choose a label

AGING Must be set to ON to track age distribution of the tracer

CARRIERPHASE Specify the fluid phase on which the tracer is based

AGEBOUNDARIES May be specified when AGING=ON (numbers separated by comma)

LOWLOWBOUND Age below LOWLOWBOUND is not plotted

HIGHLOWBOUND Age below HIGHLOWBOUND is not plotted under certain conditions

Tracers may be fed into pipelines either via a SOURCE or via a MASSFLOW node.

In the Property editor for a SOURCE or a node of type MASSFLOW set the following keys:

SOURCETYPE: select TRACER

TRACERFEED: set the name of the tracer feed in this source/node

TRACERMASSFLOW: specify the tracer mass flow

TRACERAGE: specify the age of the tracer

TRACERRESIDENCETIME: specify the residence time of the tracer

To compute aging of a kinetic hydrate inhibitor, specify the HYDRATECHECK keyword.

Some output variables are available for plotting per tracer feed and per age group.

- 180 -
The OLGA model

Notes

 The current corrosion model and hydrate kinetics model in OLGA do not take into account the
inhibition effect of any tracer.
 Partitioning of tracers is not implemented in the current version.
 The distribution of ages (when applicable) is divided into a given number of groups. Each group has a
user given low and high bound of age. All the inhibitors within each group are assumed to have the
same age (average age).
 It is not possible to specify an initial condition (by the keyword INITIALCONDITIONS) containing
tracers, but the steady state preprocessor will compute an initial steady state tracer distribution.
 It will not be possible to specify the tracer content in negative sources. The amount of tracer going out
will be based on the concentration of the tracer in the section from which the source originates.
 Production flows from wells will not contain any tracer. The injection flows will be treated in the same
manner as negative sources.
 The tracer does not follow the water vapor phase. Any vaporization/condensation does not affect the
tracer mass, but the concentration changes. If a section is totally emptied of the carrying phase, e.g.
water, by vaporization, the remaining tracer is removed.

Tracer tracking can be combined with all other modules, but some limitations exist:

 Tracer tracking can be combined with slug tracking, but the tracer output variables are average values
for a section.
 Tracer tracking can be combined with pig tracking (which is a special version of slug tracking), but
distribution of tracer on each side of the pig might in some cases be inaccurate.
 Tracer functionality is not implemented in the near well module ROCX.

Wax deposition

The Wax deposition module allows for modeling of wax precipitation and deposition of wax on the wall.
Wax precipitation is calculated based on a pre-calculated wax table containing data on each of the wax
forming components. The format of this file is described in Wax table file. The wax file can be generated in
fluid packages such as Multiflash. Wax deposition will be calculated for all flowpaths, but different wax data
can be given for each flowpath.

Use this module when case laboratory experiments indicates the presence of wax, and the wax
appearance temperature is within the temperature envelope encountered during pipeline operation.

Example cases

1. During a system shut-in, when the temperature may fall under the wax appearance temperature and
wax solids starts to precipitate. This may cause both a reduction in effective pipe diameter and a
severe increase in oil viscosity. Gelling of the oil may occur at zero fluid velocity and sufficiently low
temperatures, making it difficult to restart the pipeline.
2. Production cases where low fluid temperatures occurs in the pipeline, where wax both deposits at the
wall and precipitates as particles suspended in the oil. Both diameter reduction due to the wax layer at
the wall and the effect of suspended wax particles on oil viscosity may significantly increase pipeline
pressure drop and thereby reduce the production capacity of a pipeline.

License requirements

The Wax deposition module requires a separate license.

- 181 -
OLGA User manual

Model description

The model takes into account the thermal-hydraulic effects of the wax in the following way:

1. Mass conservation equations are solved for:


a. Wax dissolved in oil.
b. Wax precipitated and dispersed in oil.
c. Wax deposited at wall.
2. Pipe diameter and roughness for each section is adjusted depending on the thickness of wax
deposited on the wall.
3. Heat balance for precipitation, deposition and melting of wax.
4. Volume change due to precipitation, deposition and melting of wax.
5. Wall heat transfer is adjusted to take the wax layer into account.
6. Oil viscosity is adjusted to take into account any suspended (dispersed) wax.

Wax precipitation and dissolution in bulk

Precipitation and dissolution/melting of dispersed wax are calculated from variations of the wax component
solubility with pressure and temperature. The solubility variations are taken from the wax property tables.

Transport mechanisms from bulk to wall

Wax deposition can occur in two ways, either by diffusion of dissolved wax due to a temperature difference
between fluid and wall, or by transfer of precipitated wax due to shear.

The wax deposition rate due to molecular diffusion may be described by:

Where G [kg/(cm2s)] is the mass transfer rate of wax deposited and D [cm2/s] is the molecular diffusion
coefficient. The RRR and HEATANALOGY models are using the Hayduk & Minhas correlation. The
MATZAIN model is using the Wilke & Chang correlation. mfr [-] is the mass fraction of wax components, oil
[kg/cm3] is the oil density, and L [cm] is the thickness of the boundary flow layer. The boundary layer is
calculated differently for the different models activated through the key MODEL. In the RRR model, the
laminar velocity boundary layer is used. The HEATANALOGY model uses a laminar concentration
boundary layer based on the laminar thermal layer and the ratio of thermal versus mass diffusivity (Lewis
number). The MATZAIN model uses the laminar thermal boundary layer and an adjustment constant to
enhance diffusion.

It is assumed that the precipitation rate at the wall is much quicker than the rate of wax transported to the
wall, so that all wax transported from bulk to wall immediately precipitates.

It is possible to adjust the diffusion coefficient for the wax components by using the key
DIFFCOEFFMULT. The value is directly multiplied with the diffusion coefficients calculated by the code.
The key may be applied for all deposition models.

Wax layer porosity (volume fraction of trapped oil in wax layer), φ [-], is taken into account when
calculating the wax layer thickness.

- 182 -
The OLGA model

A model for shear stripping of wax is used as a wax deposition limiting effect in the MATZAIN and
HEATANALOGY models. The shear stripping terms are taken from the Matzain model [22]. The equation
for the rate of change in wax layer thickness is as follows:

where C2 and C3 are the constants given in [22]. Values: C2 = 0.055 and C3 = 1.4. is the change

rate due to diffusion, and porosity effects. The constant C1 = 15.0 from [22] is included in for the
MATZAIN model only. NSR is a flow regime dependent Reynolds number [22]:

for single phase, stratified flow.

for bubble and slug flow.

for annular flow.

Where ρo is the oil density [kg/m3], vo is the oil velocity [m/s], δ is the wax layer thickness [m], µof is the oil
viscosity kg/(m s), ρm is the average density of the gas-oil mixture and vl is the liquid velocity.

It is possible to adjust the constants related to the shear stripping model by using the keys
SHEARMULTC2 and SHEARMULTC3. These are tuning parameters multiplied directly with C2 and C3,
respectively.

Shear deposition effects may be included by applying the key COEFSHEAR when using the RRR or
HEATANALOGY models. The deposition rate constant K* (=COEFSHEAR) determines the volume rate of
precipitated wax deposited due to shear by the following formula:

where Cwall is the volume fraction of precipitated wax in the oil at the inner wall temperature, γ is the shear
rate at the wall [1/s], A is the surface area available for deposition [m 2] and ρwax is the average density of
the wax [kg/m3].

Transport mechanisms from wall to bulk (dissolution of wax layer)

Dissolution/melting of wax deposited on the wall may be activated separately through the keys
DISSOLUTION, DISSOLPRESS, DISSOLTDIFF and DISSOLRATE for the RRR model. The melting
process is calculated by the following method:

1. The dissolved wax concentration derivative with respect to temperature is found at the cloud point for
the pressure in the section.

- 183 -
OLGA User manual

2. The dissolved wax concentration at the wall is adjusted when the wall surface temperature is above
the dissolution temperature (found by applying DISSOLTDIFF). The adjustment is as follows:

where Cwax is the concentration of wax, TWS is wall surface temperature, is the
concentration derivative with respect to temperature at the cloud point (see point 1), WDT is the
dissolution temperature:

WDT = WAP + DISSOLTDIFF

WAP is from the wax tables, while DISSOLTDIFF may be a constant or a function of the section
pressure (through the given DISSOLPRESS).

3. The adjusted Cwax,wall is used in the normal diffusion equations where

Cwax,bulk- Cwax,wall

is the driving potential of the diffusion process. When

Cwax,wall > Cwax,bulk

, melting will occur.

4. The total dissolution and diffusion rate of wax from wall to bulk, , is limited upwards by
DISSOLRATE (kg/(m2s )):

where is the mass diffusion rate based solely on the wax concentration differences between wall
and bulk (see point 3). The default value of DISSOLRATE is 1.0e+12, which means that there is no
limitation of the dissolution and molar diffusion rate. The reduction to DISSOLRATE is done so that
the mass fraction of the wax components transported by diffusion is kept constant.

Viscosity of wax/oil dispersions

Calculation of the viscosity of the wax/oil dispersion is done using the model by Pedersen and Rønningen
[28]. The apparent viscosity of oil with suspended wax particles is calculated as follows:

where ηliq is the viscosity of the oil not considering solid wax and Φwax the volume fraction of precipitated

wax in the oil-wax suspension. is the shear rate. The parameters D, E and F have the following values
(viscosities in Pa s and shear rates in s-1)

D = 37.82

E = 83.96

F = 8.559*106

It is possible to tune the wax-oil dispersion viscosity model to measurements. The tuning parameters may
be given directly as input to OLGA when using this viscosity model. Keys: VISCMULTD, VISCMULTE,
VISCMULTF. These are multiplied with the D, E and F parameters, respectively.

- 184 -
The OLGA model

The shear rate used in the equation is limited to be 10 s-1 or larger to avoid division by zero. The resulting
viscosity, η, is limited to be ηliq or larger.

Wax layer properties

You can also give information about the porosity (oil volume fraction) of the wax layer, the roughness due
to deposited wax (keys: WAXROUGHNESS and MAXROUGHNESS) and the thermal conductivity of pure
wax. The conductivity may be set manually in the input file by using CONDUCTOPT = MANUAL and set
CONDUCTIVITY, or it may be taken from the wax tables (CONDUCTOPT = TABLE).

The instantaneous porosity of wax added to the wax layer may be set as a constant (INSTPOROSITYOPT
= MANUAL, WAXPOROSITY between 0.0 and 1.0), or be calculated by the code (INSTPOROSITYOPT =
AUTOMATIC, minimum and maximum limit given by MINPOROSITY and MAXPOROSITY). The
instantaneous porosity equation used by the code is as follows [22]:

where Coil is the porosity (volume fraction of oil in the wax film), ρo is the oil density [kg/m3], vl is the liquid
velocity [m/s], dw is the inner pipe diameter including the wax layer [m] and uo,f is the oil viscosity kg/(m s).

The effect of ageing may also be included by using the keys AGEINGOPT=AGEING, AGEINGTIME,
INITPOROSITY and HARDPOROSITY. This activates a linear ageing model where the entries for
AGEINGTIME, INITPOROSITY and HARDPOROSITY are used to determine the derivative of porosity
with time. The porosity is averaged over the new layer and the old, aged layer at each time step.

The porosity of the wax layer is taken into account when calculating the thermal conductivity of the wax
layer. The conductivity is found by using the following equation [34]

Where kdep is the overall thermal conductivity of the wax film, kwax is the conductivity of pure wax
(=CONDUCTIVITY in input), koil is the conductivity of oil and is the weight fraction of solid wax in the
wax film..

How to use

Input

To use the Wax deposition module, follow the steps below;

Step 1

Generate a wax file and an OLGA fluid table in a standalone fluid package.

When generating the OLGA fluid table, multiphase flashing (gas, oil, wax) should be used. The wax phase
will, however, normally not have a significant effect on the properties of the oil phase, apart from the
viscosity of the oil/wax dispersion, which is taken into account in the model.

- 185 -
OLGA User manual

Step 2

Prepare the OLGA input using the following keywords;

 OPTIONS to set WAXDEPOSITION = ON


 OPTIONS TEMPERATURE = WALL
 FILES WAXFILE to specify the file containing the wax data

WAXDEPOSITION to specify wax specific data for each flowpath. Wax deposition may be calculated by
using one of the three following models:

 RRR model [32]


 HEATANALOGY model [15]
 MATZAIN model, as described by Matzain et al., [22]

The required model is chosen by using the key MODEL in keyword WAXDEPOSITION.

 BOUNDARY, WELL and/or SOURCE to specify WAXFRACTION. A scaling factor for determining the
amount of wax forming components relative to a HC mixture. The value must be in the range [0,1]. If
all inflow boundaries have WAXFRACTION = 1 (default value), the amount of wax in the inflow will be
according to equilibrium (specified in the wax data file).
 TREND to print wax variables for given positions to a trend plot file
 OUTPUT to print wax variables for a branch at given times to an output file
 PROFILE to print wax variables for a branch at given times to a profile file

Output

The keywords TRENDDATA, PROFILEDATA and PLOT in the input file specifies the output from the
simulation.

The trend file (*.tpl), profile file (*.ppl) and plot file (*.plt) are used for plotting several variables related to
wax deposition:

The different was deposition variables are described in Wax deposition Output Variables on page 603.

The trend file and profile file are text files that can be viewed in the OLGA GUI. The plot file is a binary file
that is viewed in a separate plotting tool called the OLGA Viewer. Due to the binary format this file can use
a shorter plotting interval and is useful for detailed analysis.

Note: The wax deposition model cannot be used together with the slug tracking, Compositional Tracking
or the Inhibitor Tracking models. The steady state pre-processor will not consider the wax phase.

User defined dispersions and plug-in framework


This framework is designed as a flexible flow assurance framework for tracking user defined dispersions
and utilizing external physical models provided by the user through a DLL.

The plug-in framework for user defined phases is designed for simulation of, for example, sand transport,
hydrate formation, wax deposition or other phenomena involving solid particle type dispersions, and where
you want to use in-house physical models coupled to OLGA.

- 186 -
The OLGA model

You can through the input define new User Defined dispersed phases (“UD phases”) inside each layer and
phase in the OLGA model as depicted above.

You can then give physical models in a user made DLL for:

1. mass transfer between phases (for example, a hydrate formation model)


2. mass transfer between layers (for example, sand deposition to a bed or wax deposition to a wall layer)
3. modification of apparent viscosity due to the presence of the dispersion
4. PVT properties of the new phase and optionally modification of the gas/oil/water properties
5. modifications of the heat transfer coefficient between the fluid and the pipe wall
6. compositional calculations

A sample DLL with some simple physical models is provided with the installation. The sample cases utilize
the models in this DLL.

Refer to the "Model, Numerics and Programmer’s Guide for the OLGA Plug-In" for a detailed description of
the use of this system.

Model description

User Defined phases (UD phases) are assumed to be either transported in one of the built-in carrying flow
layers (gas, oil and water) or being part of the stationary bed or wall layers. The formation of the UD
phases, transport between layers, models for properties of the UD phases etc. are to be given in the user
provided plug-in DLL.

The Model, Numerics and Programmer’s Guide for the OLGA Plug-In describes the methods applied in the
sample plug-in DLL provided with the installation.

How to use

Refer to the 'Model, Numerics and Programmer’s Guide for the OLGA Plug-In' for a detailed description of
how to program a DLL with physical models to be used by OLGA. Note: This document is only available
on request.

User defined dispersed phases are defined through the input groups UDPHASE and UDDISPERSION (in
the Library section), UDOPTIONS (CaseDefinition section) and UDGROUP (UDData section).

- 187 -
OLGA User manual

UDPHASE defines the dispersions to be tracked, referring to a phase recognized by the models in the DLL
UDDISPERSION defined a set of UDPHASEs, that is, for defining a “dispersion in dispersion”, as e.g. a
combination of hydrates and water
UDOPTIONS is used for overall simulation parameters (To use UDOPTIONS, OPTIONS UDPLUGIN must
be set to YES).
UDGROUP is used to define combinations of UD phases. These are then referred to by SOURCE and
NODE (for boundary conditions) or INITIALCONDITIONS (for specifying the amount of UD phases at the
start of the simulation).

Plug-in DLL

Through UDOPTIONS PLUGINDLL the user may refer to a DLL to be used by the program for handling of
dispersions. The available interfaces and functionality is presented in the Plug-in Guide.

PVT Properties

PVT properties for a UD phase may be given as input to a user defined plug-in. The file to be used is
defined under FILES UDFILE. It may be referenced by the FLOWPATH BRANCH and NODE.

Compositional UD option

The composition of a dispersed UD phase may be tracked. The option is activated through the
UDOPTIONS COMPOSITIONAL key. A separate file defining the feeds and their properties must be given
under FILES UDFEEDFILE. This file is to be used by the user defined plug-in. The feeds may then be
referenced by nodes, sources and for giving initial conditions. NOTE: This option cannot be run
simultaneously with the OLGA Compositional tracking module.

Inflow

The inflow of UD phases is defined for each SOURCE, by reference either to a UDGROUP or a UDFEED.
The latter refers to a UD phase composition that must be defined in a plug-in.

Pressure boundary

The mass fractions of UD phases at a pressure boundary are defined for each relevant NODE by
reference either to a UDGROUP or a UDFEED. The latter refers to a UD phase composition that must be
defined in a plug-in.

Initial conditions

The initial fraction of each UDGROUP in the pipeline is given by the reference to UDFEED (for
composition tracking) or UDGROUP under INITIALCONDITIONS. The values for each UDFRACTION in
the UDGROUP are used as follows:

1. If INMASSFRACTION and OUTMASSFRACTION are specified, these are used with linear
interpolation.
2. Otherwise the value in MASSFRACTION corresponding to the start time is used.

- 188 -
The OLGA model

Plotting of output

Specific output variables are available for plotting of dispersed phases. The variables are grouped under
“ParticleField” in the output variable list and cover this information for each dispersed phase:

P-ACCG : Accumulated mass flow [kg/s]

P-ACCQ : Accumulated volume flow [kg/s]

P-G: mass flow rate [kg/s]

P-HOL: volume fraction [-]

P-M: specific mass [kg/m3]

P-Q: volumetric flow rate [m3/s]

P-U: velocity [m/s]

P-US: superficial velocity [m/s]

P-H: Enthalpy of UD Phase [J/kg]

P-CP: Specific heat of UD Phase [J/kg/K]

P-RO: Density of UD Phase [kg/m3]

P-DRDP: Pressure differential of UD Phase [kg/m-N]

These variables are available for regular trend and profile plots and text output.

To enable these plot variables, one or all of PHASE, DISPERSION, and FLOWLAYER must be given.

PHASE = <UD-PHASE>

DISPERSION = <UD-DISPERSION>

FLOWLAYER = ALL, GAS, OIL, WATER, BED, WALL

At least one of these options must be given if a UD phase variable shall be plotted.

All three options can be combined.

The pre-defined phases (gas, oil, and water) are not available for plotting of UD phase variables, but will
be added to FLOWLAYER when plotting without any specified PHASE or DISPERSION.

Furthermore, cross sectional plots of particle concentration and dispersion velocity are available through
the CROSSDATA definition under OUTPUT for each FLOWPATH:

Concentration of dispersion (particles) from bottom to top of line along vertical diameter: P-CON

Volume velocity profile from bottom to top of line along vertical diameter: U-PROFILE

These data files have extension “csp” and can be plotted in the GUI. The concentration profile will be
plotted for each UD phase and the plot variables will automatically be labeled accordingly in the csp file.
The plot interval is the same as for the TREND plots.

Notes

Some default sample physical models are included in the plug-in DLL provided with the installation. These
are available for test purposes only to illustrate the use of the framework for User Defined phases (UD
phases).

- 189 -
OLGA User manual

Compatibility

The plug-in framework with tracking of User Defined phases is compatible with the following models or
modules:

Source, Valve, Loss, HeatExchanger, CheckValve, Slug Tracking

The system cannot be used in connection with the following models or modules:

Separator, Phase split node, Leak, Pump, Well, NearWellSource, Compressor, FLUID keyword,
COMPOSITIONAL=ON/MEG/… , OPTIONS DRILLING=ON, OPTIONS WAXDEPOSITION=ON,
OPTIONS TRACERTRACKING=ON

Some of these limitations may be lifted in future versions.

For further limitations, see the Model, Numerics and Programmer’s Guide for the OLGA Plug-In.

Examples

Given a case with the following UD phase definitions:

UDPHASE LABEL = "Hydrate", …

UDDISPERSION LABEL = "HydrateWater", …

Ex 1 – Plot for whole phase/dispersion

To plot for the total phase Hydrate from all layers (including bed and wall):

TRENDDATA PHASE=”Hydrate”, VARIABLE=(P_M)

To plot for the total dispersion HydrateWater from all layers (including bed and wall):

TRENDDATA DISPERSION=”HydrateWater”, VARIABLE=(P-M)

Ex 2 – Plot for phase/dispersion in layer

To plot for the phase Hydrate in the gas layer:

TRENDDATA PHASE=”Hydrate”, FLOWLAYER=GAS, VARIABLE=(P-M)

To plot for the phase Hydrate in the gas layer and in the bed layer (2 plots):

TRENDDATA DISPERSION=”HydrateWater”, FLOWLAYER=(GAS, BED), VARIABLE=(P-M)

To plot for all phases in all layers (5 plots):

TRENDDATA PHASE=”Hydrate”, FLOWLAYER=ALL, VARIABLE=(P-M)

Ex 3 – Plot for layers

To plot for the gas layer:

TRENDDATA FLOWLAYER=GAS, VARIABLE=(P-M)

To plot for all layers (5 plots):

TRENDDATA FLOWLAYER=ALL, VARIABLE=(P-M)

- 190 -
The OLGA model

Equipment and devices

Valve
Introduction

The valve models the pressure drop and critical flow constraints for flow through chokes, orifices and
valves. The primary use of the valve model is to model pressure drop and critical flow constraints in
orifices, chokes and different types of valves. For high fluid velocities in the pipeline, a fully open valve can
be used to limit the flow to critical flow by adding a choke with choke diameter equal to the pipeline
diameter. Position the valve at the section boundary of the pipe where the flow rate must be limited. The
valve model is applicable for both sub-critical and critical flow. In sub-critical flow, both upstream conditions
and downstream pressure have an impact on the flow.

The valve model is a generalized model. By combining the different valve model keys, a large range of
choke valves as well as orifices can be modeled. The type of valves that can be simulated range from:

 Multi-turn valves such as gate valves, globe valves and pinch valves.
 Quarter-turn valves, such as ball valves, butterfly valves and plug valves. Gate and isolation valves
are often operated with a fixed opening or fully open or fully closed. Control valves are dynamically
actuated to control pressure, flow, liquid level or other measurable process variables.
 Standing valves in well applications, liquid level control valves on separator liquid drains.

Valve models

There are two main valve models in OLGA: Choke model on page 194 and the Cuttings equation on
page 200. These models form the basis for the four valve model options: GASSIZING, STANDINGVALVE,
VENTURI and HYDROVALVE.

How to use on page 204 - Uses the choke model to describe the pressure drop flow rate relationship over
the choke. It includes test and limitation of mass flow rate to critical flow in the throat. In addition it is
possible to use valve sizing coefficients as input to the choke model.

Standing valve - Combines the choke model pressure drop calculation with check valve functionality.

The primary use of standing valve is in well applications in particular well clean-up simulations. The
Standing valve can also be used to model valves on liquid drains in separators where the valves are used
to hold back liquids in the separators and the throat is completely filled with liquids such that it prevents
gas to penetrate through the throat.

Venturi valve on page 205 - A choke model with the assumption of a gradual flowing area contraction
followed by a gradual flowing area expansion. This assumption is different compared to the other valve
models.

Gas sizing valve on page 207 - Uses the valve sizing equation for sub-critical and critical flow.

The valve models in OLGA enable the following valve geometries.

- 191 -
OLGA User manual

- 192 -
The OLGA model

Figure 60 Valve geometries are enabled through different options and keywords in OLGA:

 Orifice (a): vena contracta is downstream of/outside throat. Available for the Standing valve and Hydro
valve model.
 Bean (b): vena contracta is inside the throat. A built in pressure recovery from vena contracta to exit of
throat is included in the model.This recovery comes in addition to recovery from throat exit to
downstream. Available for the Standing valve and Hydro valve model.
 Venturi (c): Bernoulli equation is used from throat to downstream conditions. Available in the Venturi
model.

How to use

Position the valve at one of the section boundaries. It is only allowed to have one valve at each section
boundary. The valve cannot be placed at the first section boundary in a flowpath if it is next to a closed
node

Select model option, key MODEL

Choose between the available valve models:

 HYDROVALVE
 STANDINGVALVE
 VENTURI
 GASSIZING

Control relative valve opening

To control the valve flow in the choke, or the pressure drop over it, connect a controller to the input signal
terminal VALVESIG. When connected, VALVESIG determines the relative valve opening. If no controller is
connected to the VALVESIG terminal the key OPENING is used to specify the relative valve opening. The
given OPENING can be constant, or a function of time. Use key TIME in combination with key OPENING
to specify a time varying opening.

- 193 -
OLGA User manual

Specify valve stem travel time

It is possible to limit the rate of change in the valve position by specifying the key STROKETIME. The
stroke time for valve is defined as the time the valve uses for 100% stem travel. Stem travel of 100%
means going from fully open to fully closed or equivalent fully closed to fully open. To specify a different
opening time than closing time specify the keys OPENINGTIME and CLOSINGTIME.

How to tune the valve coefficients

It is possible to tune the choke and valve coefficients. The model provides the input signal terminal
CVTUNINGSIG. By connecting a controller to the signal terminal CVTUNINGSIG the current valve
coefficient CD, or the valve Cv/Cg. will be scaled with the output of the controller.

Theory

Choke model

Introduction

The OLGA choke model forms the basis of the following OLGA valve models:

 How to use on page 204 - The standard choke model. In addition valve sizing coefficents can be
combined with the choke model.
 Model description on page 208 - The choke model with check functionality.
 Venturi valve on page 205 - The choke model with gradual change in geometry.

Model description

The choke model in OLGA calculates the pressure drop and the critical flow rate over the choke. The
choke model uses mixture balance equations for mass, momentum and energy. Compression of gas into
the narrow throat is accounted for in the model. A circular-symmetric flow geometry and steady-state over
the choke is assumed. See Selmer-Olsen et al. for the full model description [33]. The flow through the
choke is assumed frictionless and adiabatic. The gravity terms are neglected.

There are several options in the choke model with regards to:

 Valve geometry
 Thermal and phase equilibrium
 Recovery
 Slip

Valve geometry

The geometry of the choke internals varies from the different types of chokes. It can be sudden changes in
the flowing area from upstream position to throat and a new sudden change in flowing area to downstream
position; examples are orifices and gate valves. These valves should use orifice type valve geometries.
The geometry of the choke mainly affect the choke discharge coefficient and pressure recovery.

For STANDINGVALVE and HYDROVALVE the following two circular-symmetric flow geometries are
enabled:

1. Orifice type has no spatial extension and vena contracta behind the confined area of the valve.
2. Bean type which has a spatial extension and vena contracta inside the confined area of the valve. A
built-in pressure recovery from vena contracta to exit of throat is included in the model. This recovery
comes in addition to recovery from throat exit to downstream.

- 194 -
The OLGA model

Figure 61 Orifice and bean valve geometry options

For the venturi geometry see Venturi valve on page 205.

Pressure drop calculations

The choke model describes the pressure flow relations appearing in the choke for both subcritical and
critical flow. In subcritical flow, pressure drop is a function of flow rate and choke opening. The flow rate
through a critical flow is governed by the upstream conditions and the choke opening (choke flow area).
The choke flow rate is limited to critical flow. Figure 61 shows an conceptual illustration of a choke where
fluid is flowing from position 1 through the throat t to position 2. Figure 63 shows the positioning of the
choke at section boundary J. Upstream section J-1 is equivalent to position 1 in Figure 62 and downstream
section J is equivalent to position 2 in Figure 62.

Figure 62 An illustration of a choke. Fluid is flowing from position 1 to position 2.

- 195 -
OLGA User manual

Figure 63 The choke is modeled at section boundary J.

The pressure drop from inlet to throat

By assuming frictionless flow through the choke and ignoring the gravity term the Bernoulli equation for the
fluid mixture flow from inlet (1) to throat (t) can be written as:

(33)

where

um: mixture velocity (m/s)

ρm: momentum density (kg/m3)

P: pressure (Pa)

The momentum density is a function of the flowing gas mass fraction and the gas liquid slip ratio:

(34)

where k is the slip ratio ρg is the gas density and ρl is the liquid density. The flowing gas mass fraction, x, is
defined as:

, (35)

where M is the overall mass flow through the choke and Mg is the gas flow through the choke.

The slip ratio is given by:

, (36)

where ug is the gas velocity and ul is the liquid velocity.

The steady-state continuity equation relates total mass flow rate to mixture volume flux and the flowing
area:

(37)

where A is the cross sectional area.

Recovery after throat

Combining the Bernoulli equation with the continuity equation yields the relation between pressure drop
from inlet to throat, and the flow rate and choke area. To account for pressure recovery, conversion of
kinetic energy to potential energy as the fluid expands from throat condition to downstream, the
momentum equation is used:

(38)

- 196 -
The OLGA model

The overall pressure drop over the choke is found by combining equations (33) through (38).

Note: This step is handled differently for the VENTURI model, Venturi valve on page 205.

Critical flow

The critical flow through the choke is found at the maximum of equation (33). Differentiating equation (33)
with respect to pressure and combining with equation (37) yields the following relation for the critical flow,
Mc,

The throat area, At, is corrected with the choke discharge coefficient, Cd, to find the minimum flow area.

Phase and thermal equilibrium

Three main options are available when calculating the phase fractions in the choke

1. FROZEN: Means no phase mass transfer from upstream to throat condition. By default the gas is
expanded from upstream condition to throat condition assuming constant entropy and the liquid
expansion is assumed isothermal (constant temperature only dependent on pressure), but thermal
equilibrium can be enabled. The phase properties (density, heat capacity and so on) are calculated
using the simplified fluid properties. Finally no heat transfer between the gas and the liquid is
assumed.
2. HENRYFAUSKE: Similar to FROZEN, but allows a phase change from upstream to throat conditions.
The gas fraction in throat is corrected for mass transfer in the throat t to become
where is the upstream gas fraction, and

, where

is the change in equilibrium gas fraction with pressure and N is defined as:

, and

The updates above are consistent with equation (24) and (30) in the paper [3] by Henry and Fauske.

3. EQUILIBRIUM: Full mass and thermal equilibrium is assumed in the throat. The phase properties are
calculated using the same PVT properties as the rest of the OLGA model. The flow is homogeneous,
no slip is allowed. The flow in the choke must follow an isentropic path. That is constant entropy is
assumed moving from upstream to throat condition.

Note: When using the full equilibrium model or the Henry-Fauske equilibrium model make sure that
entropy is given in the fluid file (with the word ENTROPY in the heading of the fluid file). It is required for
the full equilibrium model. For the Henry-Fauske model, the entropy (if missing in the fluid file) will be
calculated from the enthalpy and density data in the fluid tables, this might slow down the simulation.
See Calculation of entropy changes for Henry-Fauske model for more details.

- 197 -
OLGA User manual

Calculation of entropy changes for Henry-Fauske model

The entropy changes (if entropy data is missing in the fluid file) will be calculated from enthalpy, mass
fraction and density by integrating the following equation from the upstream conditions (position 1) to the
throat conditions (position 2):

The integration is performed in two steps, from P1 to P2 at T1 and from T1 to T2 at P2.

Simplified fluid property calculations

The liquid properties are calculated in position 1 and treated as constant, while the gas is
compressed/expanded isentropically. The gas density is calculated as:

where γ is the isentropic gas expansion coefficient,

If thermal phase equilibrium is enabled the isentropic expansion coefficient is calculated based on all
phases (i ∈ {gas, oil, water}):

Throat temperature

The output variable (TVALVE) is defined as the gas temperature in throat assuming an isentropic process
from upstream conditions to throat conditions:

Gas-liquid slip calculations

By default there is no slip between the gas and the liquid flowing through the choke. If slip is activated, it is
calculated from an modified Chisholm slip equation:

How to use

Basic configuration and control of the choke opening is described in Valve on page 191.

The choke area and discharge coefficient are required input to the choke model. The choke area is
determined by the choke diameter which has to be specified in the DIAMETER key. The discharge
coefficient is default set to 0.84 this value can be changed in CD key.

Note: The VENTURI model has a special geometry which requires other model parameters, see Venturi
valve on page 205 for more information.

- 198 -
The OLGA model

Note: With the HYDROVALVE model it is possible to use a table containing valve sizing coefficients vs
opening to determine the choke area instead of using the DIAMETER and CD keys. See How to use on
page 204 for more information.

The Valve model can be used to model nozzles. By using the NNOZZLES key one can specify the number
of nozzles for a given diameter. It is possible to have several nozzles with different diameters by giving a
list in the DIAMETER key and in the NNOZZLES key. For example, setting DIAMETER = (0.1, 0.2) m and
NNOZZLES = (2, 3) will define two nozzles with a diameter of 0.1 m and three of 0.2 m. The combined
area of the nozzles is used in the choke model to determine the pressure-flow relations and critical flow
limit.

Select valve geometry, key VALVEGEOMETRY:

 ORIFICE - Default, no spatial extension of the valve assumed. For example orifices and gate valves.
 BEAN - Spatial extension with vena contracta inside the confined area of the valve.

See Valve geometry for details.

Note: VALVEGEOMETRY cannot be set if VENTURI is chosen as model, see Venturi valve on page
205 for more information.

Select equilibrium model, key EQUILIBRIUMMODEL:

 FROZEN: Default. Should be used when there is single phase flow through the valve. For valves with
no practical pressure drop, valves that are operated fully open or closed such as isolation valves and
when the valve is used for routing the flow.
 EQUILIBIRUM: Full mass and thermal gas/liquid l equilibrium. For models using two and three phase
fluids and for valves with considerable pressure drop causing the fluid to flash from upstream to throat
or downstream condition. It is not possible to combine with the slip model because it is a homogenous
equilibrium model. Might slow down the simulation.
 HENRYFAUSKE: Partial equilibrium. For models using two and three phase fluids and for valves with
considerable pressure drop causing the fluid to flash from upstream to throat or downstream condition.

Enable thermal phase equilibrium between gas and liquid in throat, key THERMALPHASEEQ.

For the FROZEN and HENRYFAUSKE equilibrium model it is possible to turn on thermal equilibrium:

 NO: Default. Gas is expanded isentropic to throat while liquid is isothermal. For isolation and routing
valves, single phase valves and control valves with moderate pressure drop.
 YES: Thermal equilibrium between gas and liquid. For chokes and valves with large potential pressure
drop such as pressure relief and depressurization valves.

See Phase and thermal equilibrium for model details.

Select slip model, key SLIPMODEL:

 NOSLIP: Default. For valves with large pressure drop, narrow throat opening/throat area compared to
pipe area no slip can be assumed. This includes pressure letdown and depressurization valves.
Control valves at separator and liquid outlets no slip can be assumed.
 CHISHOLM: For isolation valves, fully open/fully closed valves it is generally wise to use Chisholm slip
model. That is, whenever it is reasonable to assume gas and liquid has different velocities.

See Gas-liquid slip calculations for model details.

- 199 -
OLGA User manual

Enable recovery, key RECOVERY:

 OFF: Default. For valves and nozzles with geometries that include abrupt changes in flowing area or
diameter.
 ON: Generally recovery is advisable if there is a gradual change in geometry from throat to
downstream the valve. Typical examples are the geometry of venturi nozzles and valves that
resembles these geometries.

Note: RECOVERY cannot be turned off if VENTURI is chosen as model, see Venturi valve on page 205
for more information.

Valve sizing equation

Introduction

In the valve model the pressure drop and critical flow are calculated according to a valve sizing equation.
The valve model is used directly by the GASSIZING model and can be combined with the choke model by
using the HYDROVALVE with table input.

Model description

The valve model uses a table (keyword TABLE) that contains the valve sizing coefficients, Cv or Cg, versus
valve opening.

It is possible to give a table representing the valve sizing coefficients either for gas flow or for liquid flow. It
is not possible to give a table for two/three-phase flow. The sizing coefficients are tabulated as functions of
the relative valve opening. The liquid valve sizing coefficient can also be given as a function of both
relative valve opening and pressure drop over the valve.

Note: The input data for the valve sizing coefficients must be consistent with the units specified together
with the valve sizing equations below.

The orifice equation describes the relation between pressure drop over the orifice, pipe flow area, orifice
area, total mass flux and the velocities in the fields:

where:

Wtot Total mass flux

αi Volumetric fraction of mass field i

Ui Velocity of mass field i

A Pipeline area

Ao Orifice area

Cd Orifice discharge coefficient

ΔPo Orifice pressure drop

- 200 -
The OLGA model

for single phase fluids the orifice equation reduces to:

(39)

If defining nozzles, the orifice area Ao is calculated as the sum of the areas of the nozzles. From the orifice
equation relations between pressure drop, valve sizing coefficient and the volumetric flow rate can be
derived.

Liquid valve sizing equation

The liquid sizing equation describes the relationship between pressure drop, valve sizing coefficient and
the volumetric flow rate (note the inherent units):

where:

Q Flow rate (gal/min.)

1/2
Cv Valve sizing coefficient (gal/min / psi )

G Specific gravity (-). Water = 1.

3
ρref Water density at 39°F/4°C and 1 atmosphere (998.84 kg/m )

ΔP Pressure drop (psi)

Gas valve sizing equation

The gas sizing equation describes the relationship between pressure drop, gas sizing coefficient Cg and
mass flow rate (note the inherent units):

where:

Qm Mass flow rate (lb/hr.)

ρg Gas density (lb/ft3)

P1 Upstream pressure (psi)

Cg Gas sizing coefficient (lb/hr / (psi × lb/ft3)1/2)

ΔP Pressure drop (psi)

Cf Coefficient ratio, Cg/Cv

- 201 -
OLGA User manual

Critical flow

The valve model checks against critical flow conditions and limits the flow to critical as an upper limit. In
critical flow only upstream conditions has an impact on the flow. That is the flow through the valve; choke
or orifice is independent of downstream condition (pressure) when critical flow occurs. When critical flow
occur the fluid velocity is identical to the speed of sound for the fluid in the flowing conditions (upstream
pressure and temperature). The speed of sound for a fluid is dependent on the amount of gas, oil and
water. The speed of sound for the pure single phases (gas and liquid) is much higher than the speed of
sound for a mixture of gas and liquid. In fact, the speed of sound drops steeply when adding small
amounts of gas to a fluid of single phase liquid. Similarly the speed of sound for the fluid drops a lot when
adding small amounts of liquid to a single phase gas fluid. Figure 64 below attempts to illustrate how the
speed of sound for a mixture of gas and liquid depends on the gas/liquid fraction. The effect of gas liquid
ratio on the sonic velocity is incorporated in the model.

Figure 64 Sonic velocity as a function of void fraction

Introduction

The Hydro valve model option allows the use of the standard choke model described in Choke model on
page 194. It is also possible to combine valve sizing coefficients with the choke model this is described
here.

Model description

In the valve model the pressure drop and critical flow are calculated according to a valve sizing equation.
In OLGA two types of valve sizing equations are available a liquid sizing equation and a gas sizing
equation. The liquid sizing equation describes the relationship between pressure drop, valve sizing
coefficient and the volumetric flow rate (note the inherent units):

(40)

- 202 -
The OLGA model

where:

Q Flow rate (gal/min.)

1/2
Cv Valve sizing coefficient (gal/min / psi )

G Specific gravity (-). Water = 1.

3
ρref Water density at 39°F/4°C and 1 atmosphere (998.84 kg/m )

ΔP Pressure drop (psi)

The gas sizing equation describes the relationship between pressure drop, gas sizing coefficient Cg and
mass flow rate (note the inherent units):

(41)

where:

Qm Mass flow rate (lb/hr.)

ρg Gas density (lb/ft3)

P1 Upstream pressure (psi)

Cg Gas sizing coefficient (lb/hr / (psi × lb/ft3)1/2)

ΔP Pressure drop (psi)

Cf Coefficient ratio, Cg/Cv

The sizing coefficients ( Cg/Cv) are tabulated as functions of the relative valve opening.

Conversion between valve sizing coefficient and orifice area

As an example the method for converting liquid valve sizing coefficients is described here. By assuming
the liquid to be incompressible the orifice equation (equation (39) in Valve sizing equation on page 200),
can be written as:

(42)

where ρ is fluid density and Q is volumetric flow rate. Rearranging and using:

- 203 -
OLGA User manual

the volume flow can be expressed as:

. (43)

By comparing with the valve liquid sizing equation (40) and assuming the same units are used in the orifice
equation and the sizing equation the following relations between Cv and Ao can be obtained:

Converting to SI units:

and inserting the reference water density yields the following equation:

Note: OLGA uses the discharge coefficient to modify the flow area in equation (42). A common
definition in the industry is to use the discharge coefficient to modify the flow, that is, the is
multiplied outside the square brackets.

To convert between the discharge coefficient, Cd, used to modify the flow:

to the definition used in OLGA ,Cd,OLGA, the following conversion is needed:

The multiphase valve flow rate is calculated using the choke model in OLGA, see Choke model on page
194. The choke flow area, Ao, is used in the choke model. Critical flow is determined by the choke model.
For conversion of gas valve sizing coefficients the gas sizing equation (41) is used in the same manner as
the liquid valve sizing equation (40). The gas sizing equation is used to find the choke (orifice) flow area,
Ao, from the tabulated gas valve sizing coefficient, Cg, and by combining equations (42) and (41). The
upstream gas density is used in the calculation.

How to use

The available options and required input to the HYDROVALVE are the same as in the CHOKE model, with
the exception that valve sizing coefficients are used instead of specifying diameter and discharge
coefficeient. Because data sheets for Cv and Cg most often includes the recovery effect it is not possible to
activate recovery if valve sizing coefficients are used in the HYDROVALVE model.

1. Select the HYDROVALVE option in the MODEL key.


2. Use the TABLE key to select a TABLE keyword containing valve characteristics,valve sizing
coefficients (Cv or Cg) tabulated versus valve opening.

- 204 -
The OLGA model

Choose valve sizing equation, key PHASE

 LIQUID - The Liquid sizing equation. For liquid flow, near incompressible gas flow and two/three-
phase flow. The liquid valve sizing coefficient can also be given as a function of both relative valve
opening and pressure drop over the valve.
 GAS - The Gas sizing equation. For compressible gas flow. The ratio of gas sizing coefficient and
valve coefficient has to be set in the key CF.

Venturi valve

The Venturi model assumes a gradual flowing area contraction followed by a gradual flowing area
expansion. The gradual change in the valve geometry is manufactured to minimize the losses/ maximize
the recovery.

Model description

The Venturi valve uses the OLGA choke model for pressure drop flow calculation. The OLGA choke model
includes test against critical flow. The differences between the Venturi model and the choke model are:

1. The Venturi model uses the Bernoulli equation to calculate the recovery from throat to outlet condition,
where the choke model uses the momentum equation.
2. The Venturi model includes loss terms in the Bernoulli equation both for the pressure drop calculation
from inlet to throat and the recovery from throat to outlet, where the choke model uses the discharge
coefficient to account for losses.

Figure 65 Schematics showing Venturi valve in OLGA.

The model uses the Bernoulli equation with a loss term for the area contraction from inlet (1) to throat (2),
see Figure 65.

(44)

where

um mixture velocity (m/s)

ρm momentum density (kg/m3)

P pressure (Pa)

kl,i loss coefficient for the inlet/entry, key KLOSSENTRY

- 205 -
OLGA User manual

Equation (44) above replaces equation (1) in the choke model. The main difference between the Venturi
valve and the Hydro valve when integrating from 1 to 2 is the loss term and the loss coefficient kl,i.

When considering the recovery from throat (2) to downstream (3) the choke model uses the momentum
balance. However in the Venturi valve model, the Bernoulli equation with a loss term for the area
expansion is used also from throat (2) to outlet (3)

(45)

where

um mixture velocity (m/s)

ρm momentum density (kg/m3)

P pressure (Pa)

kl,o is the loss coefficient for the outlet/exit, key KLOSSEXIT

In the Hydro valve model, losses (equivalent to kl,i and kl,o) is lumped together and accounted for in a
multiplicative manner in terms of the discharge coefficient Cd. The relation between the loss coefficient kl,i
and the discharge coefficient Cd is

(46)

The rest of the equations are equal to the choke model, see Hydro valve.

Figure 66 Valve characteristic of Hydro valve (black curve) and Venturi (red curve) valve models

Figure 66 shows the valve characteristics of valve models Hydro valve and Venturi. The valves are sized
and parameterized to be comparable. The y-axis shows the total mass flow rate through the valve and the
x-axis shows the pressure downstream of the valve, with increasing downstream pressure along the axis.
The upstream pressure is kept constant at 30 bar.

- 206 -
The OLGA model

Note: The Hydro valve goes out of critical flow slightly before 20 bar downstream pressure. The Venturi
valve goes out of critical flow around 24-24.7 bar downstream pressure. The discharge coefficient Cd in
the Hydro valve is set according to equation (46) above:

so that the critical flow rate for Hydro valve equals the critical flow rate of the Venturi valve. The Venturi
valve is more energy efficient with smaller losses. The Bernoulli equation from throat to downstream
condition, equation (45), conserves the energy differently than the momentum equation. Thus, the Hydro
valve goes out of critical flow rate at a lower downstream pressure than the Venturi valve.

How to use

To use the Venturi valve model, you must:

1. Select the VENTURI option in the MODEL key.


2. Specify inlet and throat diameter with the keys INLETDIAMETER and THROATDIAMETER.
3. Specify the loss coefficients with the keys KLOSSENTRY and KLOSSEXIT (the default value is 0.01).

Gas sizing valve

Uses the gas sizing equation for sub-critical and critical flow. The gas sizing valve should be used when
the flow through the valve is compressible and data for the gas sizing coefficient Cg is available.

Model description

The gas sizing equation is used to calculate the relation between flow rate and pressure drop for both sub-
critical and critical flow:

where:

Qm Mass flow rate (lb/hr.)

ρg Gas density (lb/ft3)

P1 Upstream pressure (psi)

Cg Gas sizing coefficient (lb/hr / (psi × lb/ft3)1/2)

ΔP Pressure drop (psi)

Cf Coefficient ratio, Cg/Cv

The upstream gas density is used in the calculation.

Critical flow rate is obtained by setting the sine-term to 1.

- 207 -
OLGA User manual

How to use

To use the gas sizing valve model you must:

1. Select the GASSIZING option in the MODEL key


2. Specify Cg vs. relative valve opening in a table
3. Specify the Cf, ratio between gas and liquid sizing coefficient

Check valve

A check valve allows flow in only one direction and prevents the total flow from flowing in the opposite
direction.

Model description

The check valve closes if the total volume flow is in the wrong direction. Thus, there can be a negative flow
of liquid and positive flow of gas through the check valve. A check valve remains closed until the pressure
difference across it is sufficiently large to give flow in the desired direction.

How to use

Position the check valve at any section boundary in the pipeline. If ABSPOSITION is used, the check valve
is moved to the closest section boundary.

Set the allowed flow direction in the DIRECTION key.

Standing valve

The standing valve model combines the default OLGA choke model with check valve functionality. The
check valve opens when the pressure upstream the valve is larger than downstream the valve. The
standing valve model also allows an optional back pressure valve to be added on the same section
boundary as the standing valve. With the optional back pressure valve, negative mass flow through the
section boundary appear provided that downstream pressure is larger than the upstream pressure plus a
threshold value. In contrast the Check valve on page 208 only prevents the flow from flowing in an
undesirable direction and doesn't include any pressure drop calculations, critical flow limitation or back
pressure valve.

Model description

The standing valve uses the OLGA choke model for pressure drop flow calculation. The default OLGA
choke model includes test against critical flow. In addition, counter current flow can occur in the throat with
the default OLGA choke model. With counter current flow one consider two phases to flow in opposite
directions, often gas in one direction and liquid in the other direction. The standing valve model does not
allow counter current flow in throat.

- 208 -
The OLGA model

Figure 67 Schematics showing standing valve in OLGA.

Consider the schematics of a standing valve shown in Figure 67, if upstream pressure PU is larger than
down stream pressure PD the ball will be lifted from the seat and fluid is free to flow through the valve.
Throat is the opening between the ball and the wall where the ball is sliding. In OLGA the throat is
represented at the section boundary. The fluid velocity around the ball will be high and prohibit back flow.
The pressure flow characteristics of a standing valve is in Figure 68.

- 209 -
OLGA User manual

Figure 68 Pressure flow characteristics of standing valve with constant upstream pressure PU= 14
bara and increasing downstream pressure PD

The schematics of a standing valve with a back pressure valve is shown in Figure 69. The standing valve
and back pressure valve are located at the same section boundary. The spring on the back pressure valve
represents the back pressure threshold value PT.

Figure 69 Schematics showing standing valve in combination with back pressure valve in OLGA.

- 210 -
The OLGA model

Depending on the pressure conditions it will flow through the standing valve FS > 0, the back pressure
valve FB < 0 or no flow at all. The conditions can be summarized:

The pressure flow characteristics of the standing valve combined with back pressure valve is shown in
Figure 70.

Figure 70 Pressure flow characteristics of standing valve combined with back pressure valve,
constant upstream pressure PU = 14 bara and increasing downstream pressure PD, back pressure
threshold PT= 0.25 bar.

How to use

To use the standing valve model you must:

1. Select the STANDINGVALVE option in the model key.


2. Specify the flow direction through the standing valve with the key FLOWDIRECTION.
3. To include a back pressure valve set the key BACKPRESSUREVALVE to YES, then the following
input is needed:
a. Set the back pressure valve port size with the BPVDIAMETER key.
b. Set the back pressure valve differential pressure threshold with the BPVDELTA key.

- 211 -
OLGA User manual

GLV

In the gas lift process, either continuous or intermittent, relatively high pressure gas is injected downhole
through a gas lift valve (GLV) into the production string to lift the fluid to the surface. The bottom hole
pressure after shut-in is often much higher than the bottom hole pressure at normal production conditions.
Several gas lift valves (unloading valves) are spaced along the depth of the well to lower the compressor
discharge pressure required during the startup phase of gas lift after a shut-in operation. Properly spaced
and designed, these unloading valves should close one after the other from top to bottom as the lift gas
reaches the deeper valves. The unloading valve opens or closes depending on the casing pressure and
tubing pressure. The opening pressures are affected by downhole temperature as the temperature
changes the forces acting on the valve stem.

The characteristics of a GLV can be given by several sets of curves where each curve shows the gas
injection rates at different production pressures at a constant injection pressure. The keyword TABLE
provides the channel for users to specify such GLV characteristics. Another available option is computation
of the GLV response from correlations, using parameters from the Valve Performance Clearinghouse TM
(VPCTM) database.

The keyword LEAK allows you to specify the lift gas injection position, select the method for computation of
the GLV response, and specify parameters for the selected method.

As many leaks can be given as the actual gas lift well configuration requires.

Combining the functions that are provided by the keywords LEAK, ANNULUS and (possibly) TABLE, it is
possible to simulate different gas lift configurations and various operations such as startup, shut-in, and
steady-state operation. Gas lift distribution systems and production networks of wells can be simulated
with the network capability of OLGA.

Use this valve whenever the gas-lifted well contains unloading valves of which the opening depends on the
production and injection pressure. Such a model can be used to:

 Dimension and space the unloading valves along the wellbore.


 Calculate compressor discharge pressure required to unload the well.
 Check the possibility of flow instability such as casing heading, density wave instability. The GLV
dynamics have major impact on the flow stability of gas lift systems.
 Trouble shoot problems such as interference of unloading valves during normal operation
(simultaneous gas injections through more than one GLV).
 Find various remedies to flow instability.

License requirements

The GASLIFTVALVE and GASLIFTTABLE options under the keyword LEAK are part of the Wells module
that requires a separate license.

Model description

A gas lift valve (GLV) is used to inject gas into the tubing from the annulus/casing. Typically more than one
GLV is placed after each other down the annulus. The intention is that the GLV closest to the wellhead
opens first, and as the tubing pressure decreases this GLV will close and the next GLV open (this might
already be open depending on the response curve). This cycle is repeated until the injected gas reaches
the operating GLV (lowermost active GLV). When the gas lift gas reaches the operating GLV, gas is
continuously injected through this GLV and stable production is optimized by regulating the optimum
amount of gas (injection gas rate). At constant injection pressure (casing pressure), all GLVs above the
operating GLV should be closed. If the tubing pressure is increased for any reason (for example, choke
back production at the wellhead, a big liquid slug coming from the productive formation), this can cause the
opening of some GLVs. This opening is the automatic response of the GLVs to stabilize the flow. The
injection of gas reduces the liquid head pressure in the tubing until the GLVs are closed again.

- 212 -
The OLGA model

Figure 71 shows an example of these 'response curves' where tubing pressure is along the x-axis,
standard volume gas rate along the y-axis, and there is one curve for each casing pressure.

Figure 71 Example of GLV Response Curves

The GLV is constructed to respond on both the casing pressure and tubing pressure, see Figure 72. The
casing and tubing pressure work together to open the valve, while the gas (typically nitrogen) charged
dome works in the opposite direction. The curve for the casing pressure of 730 psig illustrates the
behavior. For low tubing pressures the combined force is not enough to open the valve (Pt < 330 psig). For
tubing pressures above the 'opening pressure' of 330 psig the valve starts to open; the 'Throttling region'
from 330 to approximately 600 psig is where the valve goes from closed to fully open. For a tubing
pressure approaching the casing pressure the flow decreases as the differential pressure decreases, and
above 730 psig (Pt > Pc) there is no flow as there is a check valve that stops the flow going from the tubing
to the casing.

In the input to OLGA, the terms injection pressure and production pressure is used instead of casing
pressure and tubing pressure respectively, because the injection gas may be injected in the tubing instead
of the casing, and the well fluid flows up the casing. The intention of the GLV is to allow flow from the
injection to the production side, so using the terms injection/production makes the input more general.

- 213 -
OLGA User manual

Figure 72 Sketch of typical casing (injection) pressure operated GLV (with gas charge)

The GLV in Figure 72 is characterized as an Injection or Casing Pressure Operated GLV because the
injection/casing pressure works on the large part of the bellows (AINJ) while the tubing pressure works on
the small part (APROD). The force balance for the point where the GLV starts to open is then:

(47)

where R = ASEAT/ABELLOWS. PINJ and PPROD switch places in the equation for a Production or Tubing Pressure
Operated GLV.

Calculation of flow for valve type GASLIFTTABLE

The standard volume gas rate through the GLV is found by linear interpolation in the response curves
using the calculated injection pressure (upstream the GLV) and production pressure (downstream). The
response curves must be defined in the TABLE keyword and referred to in the LEAK keyword in the gas
Lift Table input group.

First, the code finds the two response curves with injection pressures that are closest (higher and lower) to
the current injection pressure. One gas rate is found for each curve by interpolating using the current
production pressure, and then the resulting gas rate is found by interpolating between these two rates
using the current injection pressure. If the current injection pressure is below the lowest given injection
pressure, the curve for the lowest injection pressure is used directly and vice versa for injection pressure
above the highest given injection pressure. That is, no extrapolation for injection pressures.

Extrapolation is performed in the direction of decreasing production pressure to find the opening
production pressure, if not given (allowed with a negative extrapolated value, as would be the case for the
injection pressure of 790 psig in Figure 71). It is required that the last point in a response curve (the point
with highest production pressure) has a gas rate of 0. It is possible to create a curve with only one point for
which this is not a requirement (a way to specify constant standard volume flow for all production
pressures below the injection pressure).

- 214 -
The OLGA model

Associated liquid (in case of liquid on the injection side) through the GLV is calculated by setting the total
mass flux WTOT [kg/(m2s)] as:

where WG is the gas mass flux derived from the response curves, G is the gas density and mix the volume
averaged density. For each phase, P, (gas, oil, water, and so on) the mass flux through the GLV is:

where xP is the mass fraction of the phase upstream the GLV (in the section where the GLV is placed).

Temperature effect for valve type GASLIFTTABLE

In the case of a gas charged dome (a GLV might have a spring instead) the pressure in the dome will
increase with increasing temperature as the gas is contained in the dome. This means that the required
force from the production and injection side to open the GLV also increases with increasing temperature.

According to Winkler and Eads [38] the increased pressure in a nitrogen charged dome/bellows (based on
reference temperature TREFof 60 °F) is expressed like:

(48)

For nitrogen 60 °F base pressure less than 1238 psia:

(49)

For nitrogen 60 °F base pressure from 1238 to 3000 psia:

(50)

where TBis the bellows temperature, and the pressures and temperature are given in psia and °F. These
equations have been implemented in OLGA, but with a user given reference temperature. That is, it has
been assumed that the equations give reasonable results also for other reference temperatures than 60
°F.

The bellows temperature will depend on the production temperature, injection temperature, flow conditions,
geometry of GLV, placement of GLV, and so on. The user must give a parameter α where the bellows
temperature is a linear interpolation between the injection and production temperature:

From the force balance equation (47) we get the following expressions for the increase in required
production pressure to open the GLV (assuming constant injection pressure):

(51)

(52)

where ΔPB is calculated in equations (48) to (50).This effect can be significant. For a sufficiently high
temperature above the given reference temperature the GLV might never open:

- 215 -
OLGA User manual

In OLGA this effect is included with a right-shift of all the response curves associated with the GLV. The
point with maximum gas rate (for each of the curves) is identified, and the points to the left of this
maximum point are shifted with the calculated ΔPPROD. The new response curve will then consist of the
adjusted left side of the curve, the original right side of the curve, and a new maximum point where they
cross each other.

This procedure is a simplification of how the response curves are affected in the dynamic region; only the
opening point is correctly calculated (except for the uncertainty in using in equations (48) to (50) for a
reference temperature different from 60 °F). For example, the curve for a casing/injection pressure of 850
psig in Figure 71 will not be affected by temperature with this procedure. This is not physically correct.

Calculations for valve type GASLIFTVALVE

In this case the flow is computed using data from the Valve Performance Clearinghouse TM(VPCTM)
database. For documentation of the calculations used for this method we refer to this paper: [41].

Notes

 For valve type GASLIFTTABLES, the temperature effects on the opening/closing of a GLV are mainly
uncertainties in using the GLV characteristics. The average of the temperatures on the production and
injection side is used as temperature inside the valve body. In reality, the temperature distribution
within the valve is more complex because of interaction between the production string and the
injection string, the expansion of lift gas through the valve, and axial heat transfer along the pipes.
 It is also assumed that the maximum flow rate point of the GLV performance curve corresponds to the
flow rate of a fully opened valve. For the curves which do not have the maximum point, the effects of
temperature on the closing of the valve are not considered.
 For valve type GASLIFTVALVE, the demo database provided with the OLGA installation is only
intended for demo purposes, it is not suitable for engineering use.

How to use

Use the keyword LEAK to specify the gas injection position, the method for computation of the GLV
response, and the parameters for the selected method.

Two methods are available for simulation of GLVs: GASLIFTTABLE and GASLIFTVALVE.

 GASLIFTTABLE allows for reference to several sets of curves where each curve defines the gas flow
rate as a function of production pressure at a constant injection pressure. Use the keyword TABLE to
specify the curves.
 GASLIFTVALVE allows for computation of the GLV response by correlations, using data from the
Valve Performance ClearinghouseTM (VPCTM) database.

A demo database is provided with the OLGA installation to illustrate the use of the correlation based GLV
computation.

To use the VPC database change the VPCFILE key under the FILES keyword to show the file path to your
database. An empty entry means that OLGA will use the demo database.

Note that the VPC database is not a part of OLGA and must be bought separately.

When the valve type GASLIFTVALVE is selected in the OLGA GUI, the valves for which data is available
are automatically read from the database and presented in a drop-down list.

When a specific valve is selected, lists of port size, choke size and correlations are automatically obtained
and presented as drop-down lists as well.

The test rack opening pressure, the liquid volume in the dome, the measured load rate and the maximum
allowed stem travel must also be specified.

- 216 -
The OLGA model

Use the ANNULUS keyword to configure the injection and production strings.

Pumps
Pressure boost

Use the Pressure boost keyword to give a pressure increase in the pipe without knowing the details of the
pressure boosting equipment.

The PressureBoost pump is to be used in the design phase before the actual pump is selected to include a
pressure increase in the pipeline.

Model description

The PressureBoost pump increases the pressure between two sections in OLGA. The maximum pressure
increase of the pump is set in the DELTAPRESSURE key (ΔPMax). The actual pressure increase (ΔP) is
calculated from ΔPMax and the pump input signal DPSIG:

P = DPSIG · ΔPMax

DPSIG is limited upwards and downwards:

0 < DPSIG < 1

The heat added to the fluid (WFluid) is calculated from the heat of an isentropic compression (WIsentropic) from
upstream pressure (PUp) to PUp + ΔP:

Where ηIsentropic is an user given isentropic efficiency.

How to use

 Add a PressureBoost pump the pipeline, and define the pressure increase in the DELTAPRESSURE
key.
 Combine the PressureBoost pump and a flow controller to achieve the desired flow through the
pipeline

Notes

 The defined pressure increase is independent of the flow.


 No bypass or recycle line is available for this Multiphase pump module.

Simplified Pump

The SIMPLIFIEDPUMP keyword is used to model simplified centrifugal pump.

If the inlet pressure of a pipeline is too low to drive the fluid to the outlet of the pipeline, or if we want to
increase the oil production, a pump can be installed to increase the flow rate in the pipeline.

Use the Simplified pump to roughly simulate multiphase transient ΔP and efficiency with only three
algebraic coefficients, as either constant or linearly sensitive to transient fluctuations in speed, flowrate,
and void fraction.

License requirements

No license is required for Simplified pump module.

- 217 -
OLGA User manual

Model description

Theory and multiphase dynamics

The simplified centrifugal pump in OLGA is intended for quick, approximate modeling. It models a
linearized approximation to the local behavior of a real centrifugal pump, and is therefore only accurate for
use across small excursions from its specified local operational point (where the tangent to the real
nonlinear operating curve does not change significantly).

These simple algebraic expressions are used to calculate the pressure increase over this simplified pump,
as well as its pump efficiency:

where:

ΔPo Pump pressure increase at rated density ( bar )

ΔP Pump pressure increase ( bar )

N Pump speed ( rpm )

Q Flow rate ( m3/s )

a Gas volume fraction

η Pump efficiency ( adiabatic )

ρ Specific density ( kg/m3 )

D1,2,3 Input coefficients for pressure increase

E1,2,3 Input coefficients for efficiency

Subscripts: r = rated

The power to the fluid is calculated in the following manner:

1. Inlet enthalpy (Hs) (J/kg) and entropy (Ss) are found from the fluid file. The enthalpy at discharge
pressure is found assuming isentropic conditions (H--iso). The actual enthalpy change is then calculated
by following formula:

- 218 -
The OLGA model

2. Outlet enthalpy is calculated from:

3. The power input to the fluid is calculated from:

where Wfluid is in W, and GT is the total mass flow in kg/s.

Total shaft power:

Pump torque:

Pump hydraulic torque:

where

ω = 2 π N / 60, and ηM the pump mechanical efficiency.

Modeling in OLGA

Note that by setting the coefficients D1,2,3 and E1,2,3 = 0.0, a pump with a constant pressure increase is
simulated. If you want to obtain a certain flow rate in a simple way, you can either iterate on the input value
for ΔPr or assume some value for D1 and let a controller determine the necessary speed.

Energy balance

The total power input to the fluid is:

where TH is the pump hydraulic torque, ω the pump speed and ηM the pump mechanical efficiency.

How to use

General setup

1. Add the SIMPLIFIEDPUMP keyword to the desired flowpath.


2. Specify pump location by one of ABSPOSITION (length), PIPE & SECTIONBOUNDARY, or
POSITION (an alias)
3. Choose any applicable means of controlling the pump speed.

Simplified Centrifugal setup

In addition to the General Setup above, you must specify DPRATED, FLOWRATED, SPEEDR, and
MAXSPEED. Also override the (900 kg/m3) default of the required DENSITYR with your actual rated liquid
density, if significantly different.

You can also specify related sensitivity of pump DP to varying speed, flowrate, and void fraction via the
linear departure coefficients DCOEFF1 - DCOEFF3. NOTE: Without these optional user inputs, the OLGA
simplified centrifugal pump defaults to a constant DP = DPRATED regardless of any transients.

- 219 -
OLGA User manual

You can also override the default (0.5) adiabatic efficiency by entering EFFRATED, then make that
efficiency sensitive to speed, flowrate, and void fraction if desired by also entering ECOEFF1 - ECOEFF3.

Note: Adiabatic efficiency of the Simplified Centrifugal Pump affects OLGA calculations for fluid heating,
hydraulic horsepower, total shaft horsepower and torque, through the relations documented in Simplified
Pump - Model description.

If more accurate estimation of Total Shaft Power is also required, you can also override the default (0.7)
EFFIMECH.

Note: Pumps cannot be positioned at the first or last section boundary of a flowpath.

Pump battery

Pump battery is a positive displacement pump of piston type typically used for liquid systems, for example,
drilling applications.

Pump battery is suitable when accurate measures of, for example, liquid volumetric flow rates against
pump capacity are required. This is achieved by specifying a linear dependence between the total
volumetric flow rate and the operating speed of the pump battery.

Note: The volumetric flow rates are subjected to the control limits imposed by the restrictions specified
for minimum and maximum flow rates as well as maximum hydraulic horsepower and outlet pressure.

The volumetric efficiency can also be accounted for.

License requirements

Pump battery requires the Wells Module.

Model description

Theory and multiphase dynamics

The total volumetric flow rate of the pump battery is proportional to the rate of pump strokes. The volume
delivered by the pump at a given pump rate is defined through a proportionality factor for the volume
delivered at a certain pump rate according to:

where

QP Volume delivered by the pump battery

PFAC Pumping factor

SPES Strokes per time unit

- 220 -
The OLGA model

The pump rate is subject to limitations on:

 maximum hydraulic horsepower allowed.


 maximum pump rate.
 minimum pump rate.
 maximum pump pressure allowed.

If any of these limitations are in play, the pump rate is automatically adjusted. Additional limitations can be
imposed, for example, based on fluid rate and inflow rate.

The total hydraulic horsepower, HHP, is calculated from the following definition:

where

Qinj pump injection rate (bbl/min)

WHP pump injection pressure (bara)

Energy balance

The calculation of the total power input to the fluid, QPt, is based on the isentropic compression work from
inlet pressure to outlet pressure.

Volumetric efficiency

To handle gas-liquid systems, the volumetric efficiency of the pump needs to be taken into account. The
volumetric efficiency is defined as the ratio between the net volume induced into the chamber at inlet
conditions, V, and the swept volume, VS, calculated according to

where VC is the clearance volume and v is ratio between the volume of the fluid mixture at the outlet
pressure and the inlet pressure assuming incompressible liquid, as given by

where

volume fraction of gas at inlet pressure

pi inlet pressure

po outlet pressure

k adiabatic gas constant

The ratio between the clearance volume and the swept volume, VC/VS, is denoted the clearance ratio and
is given through the input key CLEARANCERATIO.

- 221 -
OLGA User manual

How to use

General setup

Add PUMPBATTERY to the desired flowpath and specify its position.

The required input keys MAXSPEED, MINCAPACITY, MAXCAPACITY, MAXPRESSURE, and HPMAX
together with the optional input key MINSPEED are used to specify basic limitations on horsepower, flow
rates, and pressure.

Choose any applicable means of controlling the pump speed.

The key CLEARANCERATIO can be used to impose a volumetric efficiency to account for the effects of
the compressibility of gas in a gas-liquid mixture.

Note: Pumps can neither be positioned at the first nor the last section boundary of a flowpath.

Displacement pump

The DISPLACEMENTPUMP keyword is used to model positive displacement (volume) pumps.

If the inlet pressure of a pipeline is too low to drive the fluid to the outlet of the pipeline, or if you want to
increase the oil production, a pump can be installed to increase the flow rate in the pipeline.

Use the displacement pump to rigorously model the real nonlinear transient operation of a particular
multiphase positive displacement pump (including recycle and bypass). OLGA calculations are based on
either built-in nonlinear curves for a 'typical' pump, or detailed manufacturer's curves expressing that
multiphase displacement pump's internal backflow rate as a five-dimensional tabular function of speed, dP,
multiphase void fraction, inlet pressure, and liquid-phase viscosity.

License requirements

The displacement pumps are part of the Multiphase pump module that requires a separate license.

Model description

Theory and multiphase dynamics

For the displacement pump, the pump flow rate is the theoretical flow rate minus the backflow through the
pump. The theoretical flow rate is a function of the pump speed and the characteristics of the pump,
expressed through the specific flow rate. The backflow rate is a function of several parameters and is
tabulated in a backflow table. This can be summarized as follows:

(53)

- 222 -
The OLGA model

where

Q0 theoretical flow rate

Qb back flow rate

Qspc pump specific flow rate

N pump speed

ΔP pressure increase across the pump

αI void fraction at the pump inlet

vI liquid kinetic viscosity

PI pressure at the pump inlet

Modeling in OLGA

For a given displacement pump, the specific flow rate Qspc is a constant. Qb is tabulated in the backflow
table as a function of N, ΔP, aI, nl and PI.

A default implementation of the backflow table is implemented in the displacement pump (and also
documented in an external file that is linked to the example displacement pump in the pump.opi sample
case installed with OLGA). Other backflow tables may be given by using the TABLE keyword.(See Pump
Data Table for Displacement Pumps.)

The OLGA displacement pump model also includes embedded numerical models for typical recycle and
bypass lines, including user-specified orifices that can be linked to OLGA controllers. For more detail, see
the heading Pump Bypass And Recycle below.

Energy balance

The total power input to the fluid is calculated by summing the mechanical work on the fluid and the
different losses as follows.

The power used for mechanical work on the fluid, QPM, is calculated as the isentropic compression work
from inlet pressure, PI, to outlet pressure PI + ΔP.

Mechanical friction loss:

Viscous friction loss:

- 223 -
OLGA User manual

where

a experiment coefficient for mechanical friction loss

b experiment coefficient for viscous friction loss

Nref pump reference speed

QPmf,ref mechanical friction loss at the pump reference speed

QPvis,ref viscous loss at the pump reference speed

Then, the total power input to the fluid is calculated as:

How to use

General setup

1. Add the DISPLACEMENTPUMP keyword to the desired flowpath.


2. Specify pump location by one of ABSPOSITION (length), PIPE & SECTIONBOUNDARY, or
POSITION (an alias).

Choose any applicable means of controlling the pump speed.

Pump setup

The OLGA Displacement Pump requires significantly different types of inputs from the Centrifugal or
Simplified Pumps. For example, none of DENSITYR, FLOWRATED, HEADRATED, SPEEDR, or TORQR
are used.

You must enter SPECAPACITY (the total specific volume displaced per revolution or displacement cycle).
as well as MAXSPEED. OLGA then multiplies these two inputs to determine the (gross) theoretical
volumetric flowrate displaced (before subtracting internal bypass).

The OLGA Displacement Pump runs without any further inputs, although equipment manufacturers or
others with detailed knowledge might want to override the defaults of one or more of ACOEFFICIENT,
BCOEFFICIENT, MDISSIPATION, VDISSIPATION, and so on, to tune the model precisely.

You can optionally enter custom transient displacement pump backflow (performance) curves to precisely
represent the exact transient response surface for your actual pump. However, note that the required input
format is a complex five-dimensional matrix of internal backflow rates as a function of pump speed, head,
void fraction, inlet pressure, and liquid viscosity - information normally only available from the
manufacturer's experts, perhaps even requiring new experimental work on a prototype pump for your
particular fluid and operating conditions. For more specific information about the theoretical basis of these
special OLGA input requirements, consult the theory section in Model description.

As for the Centrifugal pump, this PUMPTYPE also supports additional provisions for simple 'branch-less'
bypass and recycle modeling to further increase the realism of OLGA's transient responses for typical
pump packages. The setup procedures and modeling assumptions for these built-in bypass and recycle
features are described in Pump Bypass And Recycle.

- 224 -
The OLGA model

Notes

 The recycle flow and bypass flows around the OLGA displacement pumps are considered as flows
through controlled chokes. Each flow is calculated with the given pressure difference between the two
sides of the choke and the choke upstream conditions. The pipeline effect of the recycle flowline and
bypass flowline is not considered. However, you can make a separate recycle flow line and bypass
flows line, which is connected to the pump upstream pipeline and downstream pipeline.
 The recycle flow can only flow from the pump downstream section to the upstream section, and the
bypass flow can only flow from the pump upstream section to the downstream section. You cannot
insert any component in the recycle flowline or bypass flowline, because no pipeline is considered.
 Pumps cannot be positioned at the first or last section boundary of a flowpath.

Bornemann pump

The BORNEMANNPUMP keyword is used to model Bornemann pumps. It is based on a displacement


pump model as described by Bornemann.

If the inlet pressure of a pipeline is too low to drive the fluid to the outlet of the pipeline, or if you want to
increase the oil production, a pump can be installed to increase the flow rate in the pipeline.

Use the Bornemann pump to rigorously model the transient operation of a particular multiphase
Bornemann twin-screw pump. OLGA calculations are based on specific data from the manufacturer for
each pump model type.

License requirements

The Bornemann pumps are part of the Multiphase pump module that requires a separate license.

Model description

For the Bornemann pump, the pump flow rate is the theoretical flow rate minus the backflow through the
pump. The theoretical flow rate is a function of the pump speed and the characteristics of the pump. The
backflow rate is a function of several parameters. This can be summarized as follows:

- 225 -
OLGA User manual

Where,
3
m /h
Overall capacity of the pump
3
m /h Theoretical capacity of the pump without any loss
3
m /h/rpm Geometrical capacity of the pump
3
m /h Backflow
3
m /h/bar Reference backflow for water

N rpm Rotational speed


bar Pressure difference over the pump
3
kg/m Fluid density
Pa.s Fluid dynamic viscosity
2
m /s Fluid kinematic viscosity

The reference properties are set to,

= 1000 kg/m3

= 10–3 Pa.s

= 2 m3/h/bar

Modeling in OLGA

The geometrical capacity (volume) of the Bornemann pump is specified in the GUI by selecting a pump
model and a pitch.

Energy balance

The total power input to the fluid is calculated by summing the hydrodynamic power on the fluid and the
hydrodynamic losses as follows:

- 226 -
The OLGA model

Where:

W Total shaft power (added to fluid)

W Hydrodynamic power

W Hydrodynamic losses

aperf - Performance factor depending on pump type

m3/h Theoretical capacity of the pump without any loss

bar Pressure difference over the pump

W Friction loss depending on pump type

N rpm Rotational speed

rpm Reference rotational speed

m2/s Fluid kinematic viscosity

Pa.s Fluid dynamic viscosity

kg/m3 Fluid density

The reference properties are set to

= 1000 kg/m3

= 10–3 Pa.s

= 1450 rpm

How to use

General setup

Add the BORNEMANNPUMP keyword to the desired flowpath.

Specify pump location by one of ABSPOSITION (length), PIPE & SECTIONBOUNDARY, or POSITION
(an alias).

See Bornemann Pump - Introduction for OLGA module license requirements.

Choose any applicable means of controlling the pump speed.

Pump setup

You must select a MODEL and a PITCH, and then the corresponding VOLUME.

You can enter a PREFSPEED which is used without controller, and a MAXSPEED which is used as a limit
for the speed when controlled by a speed signal. The resulting pump speed is the product of the speed
signal (between 0 and 1) with the MAXSPEED.

- 227 -
OLGA User manual

You do not need to enter power parameters because power loss calculations are based on specific
parameters for each Bornemann pump model. For the theoretical basis of these input requirements, see
the Bornemann pump theory topic in the Bornemann Pump - Model description section.

Notes

 Bornemann pump modeling in OLGA is mainly about the transfer function, which is defined by the fluid
transport and the change in process conditions (temperature and pressure at inlet and outlet). OLGA
does not model what happens inside the pump with regard to separation and liquid circulation (neither
recycle nor bypass flow).
 Pumps cannot be positioned at the first or last section boundary of a flowpath.
 Currently, Bornemann pumps are not implemented for the steady-state preprocessor.

Centrifugal pump

The CENTRIFUGALPUMP keyword is used to model rotodynamic pumps.

If the inlet pressure of a pipeline is too low to drive the fluid to the outlet of the pipeline, or if we want to
increase the oil production, a pump can be installed to increase the flow rate in the pipeline.

Use the Centrifugal pump to rigorously model the real nonlinear transient operation of a particular
multiphase centrifugal pump (including recycle and bypass). OLGA calculations are based on either built-in
nonlinear curves for a typical pump, or user input of special dimensionless OLGA curves for a particular
pump that must usually be derived from given dimensional curves before OLGA entry.

License requirements

The centrifugal pump are part of the Multiphase pump module that requires a separate license.

Model description

Theory and multiphase dynamics

For a generalized multiphase centrifugal pump, the pressure increase over the pump, ΔP, is dependent on
the flow rate Q, pump speed N, inlet gas volume fraction aI, and the pump inlet pressure PI:

For the liquid (assuming incompressible), the specific work delivered from the pump into the fluid is:

where PO is the pump outlet pressure, PI is the pump inlet pressure and l is the liquid density. For a
compressible gas, and assuming a polytropic process, the work done by the pump is:

Where n is the polytropic constant and ρg,I the gas density at pump inlet.

The work input to the gas is equal to the increase in the gas enthalpy. When the gas is assumed to be
ideal Win can be written as:

- 228 -
The OLGA model

The polytropic efficiency is defined as the ratio of the work done by the pump divided by the work input to
the gas. If the adiabatic constant k for the gas and the compressor efficiency ηp are given, the polytropic
constant n can be calculated.

For a two-phase mixture, the pump power to the fluid is weighted by mass fractions (αm = gas mass
fraction) as follows:

(54)

With W calculated from the pump characteristics, equation (54) can be solved for PO/PI. The relationship
between head H and specific work W is W = gH = ghHR, where HR is rated head and h is the head ratio.

For a two-phase mixture (except for very high gas fractions) an isothermal compression of the gas may be
assumed (that is, n=1.0) to account for rapid vapor-phase heat loss to all of the associated liquid, the
pump impeller / case, and the surroundings. Assuming n = 1.0, equation (54) can then be rewritten by a
series expansion to:

Modeling in OLGA

The centrifugal pump model in OLGA calculates the pump performance, head and torque, for the entire
possible operating range of a centrifugal pump (including non-standard operating regimes such as
backflow and negative speed) by interpolating flow rate, pump speed and gas volume fraction (GVF) in
tables. Pump performance data is typically only available for the normal pump zone, where pump speed,
flow rate, head and torque are positive. See Figure 73 and Figure 74 for examples of typical pump
performance data.

Figure 73 Example of centrifugal pump characteristics at GVF = 0%

- 229 -
OLGA User manual

Figure 74 Example of centrifugal pump characteristics at GVF = 70%

To simulate certain transients, such as start-up and shut-down, pump performance data for the non-
standard operating regimes are needed. To effectively provide for the entire operating range the pump is
assumed to be homologous. The homologous scaling laws states that two operating situations reduces to:

(55)

Where H is head, T is torque, Q is volumetric flow rate and N is pump speed. With these relations one can
express the pump performance for the entire operating range using four (because both N and Q can be
zero) dimensionless homologous curves defined in Table 1 and Table 2.

Table 3 Definition of the homologous head curves.

Curves Range Independent variables Dependent variables

1 q/ω h/ω2

ω > 0,

2 ω/q h/q2

q > 0,

3 ω/q h/q2

q < 0,

4 q/ω h/ω2

ω < 0,

- 230 -
The OLGA model

Table 4 Definition of the homologous torque curves.

Curves Range Independent variables Dependent variables

1 q/ω β/ω2

ω > 0,

2 ω/q β/q2

q > 0,

3 ω/q β/q2

q < 0,

4 q/ω β/ω2

ω < 0,

where:

: head ratio

: flow ratio

: speed ratio

: torque ratio

subscript R refers to the rated value.

Figure 75 Single phase homologous head curves

- 231 -
OLGA User manual

A more convenient way of expressing the homologous relations is to use Suter curves, one for head (WH)
and one for torque (WB):

With the Suter format the homologous relations are preserved and the curves are well defined for the
entire range of q and ω (with the exception of q and ω being zero at the same time), such that only two
curves are needed instead of eight.

The centrifugal pump model in OLGA has tabulated pump performance data in Suter format and only the
rated values of the pump is needed as input, alternatively you can give the complete pump performance
data in homologous format or a combination of pump data (typically for the normal range) and the built-in
data can be used.

Single phase performance

The homologous scaling laws, equation (55), is valid for two operating conditions for the same pump, but
the pump performance curves tend to have the same shape for geometrically similar pumps. The most
common parameter for describing the geometry of a pump is the specific speed defined as:

where NR is given in rpm, QRin m3/s and HRin m. OLGA has three sets of built-in
single phase Suter curves, for specific speed 25,147, and 262 (radial, mixed and axial pump). For
pumps with specific speed between these values linear interpolation is used to determine built-in
head and torque Suter curves for the given pump.

Two phase performance

The pump performance depends on the gas volume fraction (GVF) . A typical centrifugal pump degrades
with increasing GVF until it reaches fully-degraded two-phase conditions around 60–70% GVF. The pump
head H and hydraulic torque TH in OLGA under two-phase conditions are determined by using two-phase
mulitpliers:

where HS and THS are the single phase (liquid) head and torque, HT and THT are the fully-degraded two-
phase head and torque, HM and TM are the two-phase head and torque multiplier and α the gas volume
fraction at the pump inlet. OLGA has one set of default curves for fully degraded two-phase conditions and
multipliers.

In calculating the hydraulic torque, TH, the difference between actual fluid density and rated density must
be corrected as:

- 232 -
The OLGA model

Energy balance

The total power input to the fluid from the OLGA centrifugal pump is:

where TH is the pump hydraulic torque, ω the pump speed and ηM the pump mechanical efficiency.

The OLGA centrifugal pump model also includes embedded numerical models for typical recycle and
bypass lines, including user-specified orifices that may be linked to OLGA controllers. For more detail, see
Pump Bypass And Recycle.

How to use

General setup

Add the CENTRIFUGALPUMP keyword to the desired flowpath.

Specify pump location by one of ABSPOSITION (length), PIPE & SECTIONBOUNDARY, or POSITION
(an alias).

Choose any applicable means of controlling the pump speed.

Pump setup

The OLGA Centrifugal Pump requires DENSITYR (same 900 kg/m3 default, or specified), FLOWRATED,
SPEEDR, HEADRATED and TORQR as a minimum, to scale the general transient response surface of
either the built-in default or user-specified Homologous Centrifugal Pump Curves to your actual pump.

You can optionally enter custom transient centrifugal pump performance curves to precisely represent the
exact transient response surface for your actual pump. However, note that most manufacturers do not
publish pump curves directly in this format, and it may also be difficult to obtain degraded multiphase
performance curves up to the maximum degraded Gas Volume Fraction (GVF) for your particular
hardware and application (often somewhere in the range of 30 - 70% vapor volume).For more specific
information about the theoretical basis of these special OLGA input requirements, consult Table 3, Table 4
and Figure 73 in Model description.

The OLGA Centrifugal Pump will run without any further inputs, already representing a much more realistic
transient modeling upgrade to the Simplified Centrifugal Pump model at only slightly greater modeling cost
in setup time and runtime.

This pump also includes additional provisions for simple 'branch-less' Bypass and Recycle modeling to
further increase the realism of OLGA's transient responses for typical pump packages. The setup
procedures and modeling assumptions for these Built-in Bypass and Recycle features are described in
detail in Pump Bypass And Recycle.

Notes

 The recycle flow and bypass flows around the OLGA centrifugal pumps are considered as flows
through controlled chokes. Each flow is calculated with the given pressure difference between the two
sides of the choke and the choke upstream conditions. The pipeline effect of the recycle flowline and
bypass flowline is not considered. However, you can make a separate recycle flow line and bypass
flows line, which is connected to the pump upstream pipeline and downstream pipeline.
 The recycle flow can only flow from the pump downstream section to the upstream section, and the
bypass flow can only flow from the pump upstream section to the downstream section. It is impossible
to insert any component in the recycle flowline or bypass flowline, because no pipeline is considered.
 Pumps can not be positioned at the first or last section boundary of a flowpath.

- 233 -
OLGA User manual

OneSubsea pump

The OneSubseaPUMP keyword is used to model a OneSubsea Helico-axial pump, which can operate
from 0-100% gas volume fractions.

Use the OneSubsea pump when the design contains a OneSubsea Helico-axial pump system or when
such a pump system is to be used.

License requirements

The OneSubsea pump is part of the Multiphase pump module that requires a separate license.

Model description

OneSubsea multiphase pump module

The OneSubsea pump module in OLGA is a system model of a complete multiphase pumping system. The
module includes all the elements given in Figure 76 below, integrated with OneSubsea standard control
system. This represents a typical OneSubsea subsea multiphase pumping system.

Figure 76 The OneSubsea multiphase pump layout

Multiphase pump

The OneSubsea multiphase pump is a Helico-axial design that can operate from 0–100% gas volume
fractions. The figure below is a typical operation envelope with all limitations included. The operation
envelope is dynamic and dependent on the operation inlet conditions as suction pressure, gas volume
fraction and densities.

- 234 -
The OLGA model

Flow mixer

The OneSubsea flow mixer is a static device that provides a homogenous flow to enable stable operation
for the multiphase pump during slugging. Below is an example of a typical flow mixer characteristic. The
characteristic gives flow mixer outlet gas volume fraction dependent on liquid level. The characteristic is
dynamic and dependent on operation conditions.

- 235 -
OLGA User manual

Recirculation choke

The recirculation valve is used to protect the pump from minimum flow operation and to extend the
operation envelope. The recirculation choke is a standard choke and choke equations are applied. The
figure below gives the predefined choke curve defined in the model that can be scaled by giving the
maximum CV of the specified choke.

Figure 77 Default CV for recycle valve

- 236 -
The OLGA model

Control system

The control system is divided into two main functions. Pump protection control and pump operation control.
The control system has two independent control loops that regulates on pump speed and recirculation
choke position.

Pump speed control

The pump speed is manipulated to meet the specified inlet pressure setpoint. A tolerance of +/-1 bar is
applied internally in the pump model. The inlet pressure setpoint is given by the PRESSURESETPOINT
key or the PRESSURESETPOINT signal.

The change in pump speed is limited to a change rate (SPEEDRATE). The speed of the pump can be
controlled setting SPEEDSETPOINT or the SPEEDSETPOINTSIG signal.

Figure 78 Speed control ramp example (SPEEDRATE=25 rpm/s)

Recycle choke control

The recycle choke is controlled to keep the pump above the minimum flow limit of the pump. To avoid too
frequent changes in the choke opening, a dead band (CHOKEDEADBAND) is used. After the dead band,
the choke movement is restricted to a user given rate of change (CHOKERATE). To improve controllability
of the choke flow, the minimum position of the choke can be set (CHOKEMINOPENING).

- 237 -
OLGA User manual

Figure 79 Recycle choke ramp and dead band example (CHOKERATE=0.01 1/s and
CHOKEDEADBAND=10 s)

Pump trip

A trip can be caused by an internal violation in the model or by a user defined trip.

The model trips if the following parameters are trespassed

 Minimum flow
 Maximum thrust load
 TRIPMODE is set to 1.

The default behavior, TRIPMODE=0, is to ignore the trip signal. PUMPTRIP output tells if the pump should
have tripped

If TRIPMODE=-1, the pump trips if a trip signal is received from the internal protection system.

If TRIPMODE=1, a trip is initiated by the user.

TRIPTIME key specifies a time series when TRIPMODE is changed.

When we have a trip situation, the following happens:

 The pump stops. (The speed spins down to zero rpm.)


 The bypass line is opened. (BYPASSSIG is overridden.)
 When the pump speed is zero, the inlet valve is closed. (VALSIG is overridden.)

Bypass and inlet valve

The inlet valve and bypass valve, uses a simplified choke flow calculation. The flow is calculated with a
given pressure difference between the two sides of the choke, DPch, and the choke upstream conditions.
The flow, GR, can be regulated by a controller.

where Cd is the choke discharge coefficient and Ach the choke opening area. If a CV vs. opening table is
given instead of the choke area, the CV is converted to area and used in the equation.

- 238 -
The OLGA model

How to use

General setup

Add the OneSubseaPUMP keyword to the desired flowpath.

Specify pump location by one of ABSPOSITION (length), PIPE & SECTIONBOUNDARY, or POSITION
(an alias).

Note: Pumps cannot be positioned at the first or last section boundary of a flowpath.

Model description

Parallel operation of multiple pumps is possible through an integer input, NPUMP. The NPUMP key does
affect the inlet valve or bypass line. Default valve is 1 and means single pump. When you specify the
parallel pumps, the recirculation line defined, applies per pump.

The MAXDP key is the user defined limit on differential pressure for the pump. The pump characteristic file
also includes a maximum DP that is always the absolute maximum.

The MAXPOW key is the user defined limit on shaft power. If not set, an infinite number is used. The input
is per pump if parallel pumps are selected

Control parameters

The OneSubsea pump module is a model that includes all control loops as for a standard OneSubsea
system. The control loops are separated into protection control and pump performance control. In this
chapter, the control parameter set points for pump performance control are presented. The protection
control algorithms alway have priority. For further description, see Model description.

The pump performance control system consists of two independent control loops: pump speed control and
recirculation choke control.

Pump speed controller

The pump speed controller can be set by using the SPEEDSETPOINT key to regulate to a fixed speed set
point. Normal operation of OneSubsea pumps is to control the speed by a suction pressure set point to
minimize process variations. This controller is set by using the PRESSURESETPOINT key. One set point
must be defined and PRESSURESETPOINT has priority if both are defined. PRESSURESETPOINT
controller is blocked by setting the key to -1. The controller selection can be determined by using the
CONTROLMODE key. By setting CONTROLMODE to default the selection behaves as mentioned above.

The speed controller is defined with the time series key SPEEDTIME.

The SPEEDRATE key specifies the ramp of the speed controller. For further description, see Model
description.

The pump speed controller can also be set by connecting OLGA controllers to the OneSubsea module.
The set points defined by these controllers have priority, but the SPEEDRATE defined limits the maximum
pump speed change.

- 239 -
OLGA User manual

Recirculation choke controller

The recirculation choke is mainly used for protection purposes, see Model description.

The recirculation choke is controlled to keep the pump outside the minimum flow limit of the pump. To
avoid too frequent changes in the choke opening, a dead band (CHOKEDEADBAND) is used. After the
dead band, the choke movement is restricted to a user given rate of change (CHOKERATE). To improve
controllability of the choke flow, a minimum opening of the choke can be set (CHOKEMINOPEN).

In addition to the minimum flow controller, the choke can be adjusted by two separate controllers: either
the relative flow controller (RELFLOWCONTR) or a manual choke controller (CHOKEPOSSET). These
controllers cannot be used at the same time. If both are specified, RELFLOWCONTR has priority.

The RELFLOWCONTR key gives a set point to the relative flow controller. This controller is used to adjust
the recirculation choke position to an optimum area in the operation envelope. The RELFLOWCONTR key
is related to the relative pump differential pressure with reference to minimum and maximum flow. Hence if
RELFLOWCONTR is set to 1 the choke tries to fully close. If set to zero the choke fully opens. If set to 0.5
the choke opens/closes to an operating point approximately in the middle of the pump operation envelope.
The controller is disabled with a value of -1.

The CHOKEPOSSET key gives a set point to the manual choke controller. This controller is used to
manually adjust the recirculation choke position. The controller is disabled with a value of -1.

All choke control parameter set points are defined with the time series key CHOKETIME.

Trip

By default the pump does not trip when the TRIPMODE key is equal to zero. The pump reports a trip
situation, that is, minimum flow or maximum differential pressure limits are trespassed.

To enable pump tripping, the TRIPMODE key must be set -1.

To initiate a pump trip the TRIPMODE key must be set to 1.

The TRIPTIME key sets the time series where the different TRIPMODEs are initiated. See Model
description for details on pump trip.

Initial conditions

Initial conditions can be specified for pump speed and recirculation choke. These values are used when
both the steady state preprocessor is active, and when initial conditions are used. The initial speed of the
pump is set using the INITIALSPEED key. The initial recirculation valve position is set using the
INITIALCHOKEOPEN key.

Reporting

A set of guidance parameters are given that give useful information related to pump operation.

 The GPTHRUST gives the pump differential pressure related to the maximum differential pressure of
the pump.
 The GPMINFLOW gives the pump differential pressure to the differential pressure at minimum flow.
 The GPPOW gives the pump power to the available shaft power.
 The GPRECFLOW giver the recirculation rate related to the pump inlet flow rate.

For flow mixer operation, the liquid level in flow mixer (LLM) output parameter gives useful information. If
the liquid level in the flow mixer is not drained or does not fill up during slugging, the mixer provides stable
operation conditions for the pump.

- 240 -
The OLGA model

System components

Multiphase pump

The characteristic of the OneSubsea multiphase pump is defined through a data file. A list of 13 standard
OneSubsea pumps is available in PUMPCHAR keyword. See Table 5. It is also possible to use
characteristic files for other configurations using the PUMPFILE keyword. These data files must be
prepared by OneSubsea Engineering.

Table 5 Library of OneSubsea pump characteristics

Pump name Impeller diameter Nominal flow rate Max. differential pressure
[mm] (inlet conditions) [bar]
[Am3/h]

OneSubsea-HX360-1800-38 360 1800 38

OneSubsea-HX360-1500-38 360 1500 38

OneSubsea-HX360-1200-38 360 1200 38

OneSubsea-HX310-1100- 310 1100 120


120

OneSubsea-HX310-1100-45 310 1100 45

OneSubsea-HX310-900-45 310 900 45

OneSubsea-HX310-800-120 310 800 120

OneSubsea-HX310-700-45 310 700 45

OneSubsea-HX310-600-120 310 600 120

OneSubsea-HX310-500-180 310 500 180

OneSubsea-HX310-500-45 310 500 45

OneSubsea-HX310-400-180 310 400 180

OneSubsea-HX310-250-180 310 250 180

- 241 -
OLGA User manual

Pump file settings

The following values are the default settings in the standard pump files:

Table 6 Default settings

Pump file setting Default setting

Dead band for CHOKEPOSSET 0.01 s

Dead band for RELFLOWCONTR 0.1 s

Dead band for PRESSURESETPOINT 1 bar

Minimum speed 1500 rpm

Max speed 4600 rpm

Spin down rate 230 rpm/s

Start-up rate 46 rpm/s

Flow mixer

The characteristics of the flow mixer can be defined in the same manner as the multiphase pump using the
MIXERCHAR (one general OneSubsea flow mixer characteristic) and MIXERFILE.

The inlet flow mixer is either configured by an input file (MIXERFILE) or by a reference to a generic
OneSubsea flow mixer for initial simulations. The volume of the mixer, given by the characteristics file, can
be overridden for sensitivity simulations using the MIXERVOLUME key.

Recirculation line

The recirculation choke is defined by CHOKECV or a CV-opening curve, CHOKECVTABLE. When using
the CHOKECV, a default CV-opening curve will be used where the CHOKECV key is the maximum CV of
the choke and used to scale the default curve, see Figure 80.

- 242 -
The OLGA model

Figure 80 Default CV for recycle valve

Bypass valve

The bypass line is defined by BYDIAMETER and BYCD or BYCVTABLE. You can connect a bypass
controller using the BYPASSSIG signal. By default, the bypass line is closed. To add a check valve in the
bypass line, set BYCHECK to YES. The opening/closing time of the bypass choke is set by the
BYSTROKETIME key.

Inlet valve

The inlet valve is defined by DIAMETER and CD or CVTABLE. The opening/closing time of the inlet valve
is set by the STROKETIME key.

Notes

 The recirculation flow and bypass flows around the OneSubsea pump are considered as flows through
controlled chokes. Each flow is calculated with the given pressure difference between the two sides of
the choke and the choke upstream conditions. The pipeline effect of the recirculation line and bypass
line is not considered.
 The recirculation flow can only flow from the pump downstream section to the upstream section, and
the bypass flow can only flow from the pump upstream section to the downstream section. You cannot
insert any component in the recirculation line or bypass line, because no pipeline is considered.

Note: Heat loss in the recirculation line is accounted for in the model.

ESPump (ESP)

The ESPUMP keyword is used to model single- or multistage electric submersible pumps (ESPs) for use in
single- or multi-phase flow.

If the inlet pressure of a well is too low to drive the fluid to the outlet of the pipeline, or if you want to
increase the oil production, an electric submersible pump (ESP, keyword ESPUMP) can be installed to
increase the production rate.

- 243 -
OLGA User manual

Use the ESP to model the transient operation of a single- or multi-stage ESP for single or multiphase flow.
OLGA calculations are based on the pump characteristics of a given ESP taken from either a default or a
user-specified pump characteristics database. These pump characteristics are used for the normal
operation range. Built-in nonlinear curves for a typical pump, handling speed ranges outside the database
range and multi-phase behavior are applied to complete pump data required by a transient OLGA
simulation.

License requirements

The ESP is part of both the Wells module and the Multiphase pump module that requires a separate
license.

Model description

Theory and multiphase dynamics

Each stage of an ESP is using the pressure increase relations as for a centrifugal pump. See the
centrifugal pump for details.

The pump characteristics data for a single stage, single phase flow are taken from a database (either
internal or user-specified) for the normal operation range. These are combined with internal data for the
operation ranges not covered by the normal operation database, and also internal data for multiphase
degradation are applied.

For a multiple-stage ESP, the same pump characteristics are applied for each stage, adding up the
pressure increase and power consumption for each stage to get the total pressure increase and power
consumption over the ESP. For multi-phase flow, the gas volume flow is adjusted according to the
differences in local pressures between the stages by using isothermal, ideal gas compression. It is
assumed that the gas fraction is sufficiently low to make the temperature increase due to compression
negligible.

Viscosity correction method for ESP and Centrifugal pump

Hydraulic Institute viscosity correction method

The model computes correction factors for head, flow and efficiency based on the performance data for
pure water, fluid viscosity and the pump speed [40].

Given the pump speed (N) (rpm) and the best efficiency point for flow rate and head, when the fluid is pure
water, , and the current volume flow (Q) through the pump,we can
compute the scalars that scales the water performance curves to account for a given fluid
viscosity (cSt).

The power correction factor can be expressed as:

The method is an empirical method constructed from experimental data from many typical pumps but does
not claim to be accurate for particular pumps. The type of pumps and the operational region must fall into
the limits of the method.

- 244 -
The OLGA model

Limitations of the HI method stated in [40] are:

 Viscosities must be less than 4000 cSt. For viscosities lower than the water viscosity, the water curve
is used.
 The specific speed of the pump must be less than 60, where the specific speed is defined as

The method can be selected by the keyword

VISCMETHOD = OFF/HI [default: OFF]

Liquid viscosity in the pump

The inlet viscosity of the fluid is used where a volume fraction average is used to calculate one value for
the combined oil and water phase.

Where

Kinematic viscosity used to modify pump performance (cSt)

Volume fraction of oil in the liquid phase (oil and water)

Oil dynamic viscosity (cP)

Oil density (kg/m3)

Water dynamic viscosity (cP)

Water density (kg/m3)

How to use

General setup

1. Add the ESPUMP keyword to the desired flowpath.


2. Specify pump location by one of ABSPOSITION (length), PIPE & SECTIONBOUNDARY, or
POSITION (an alias)
3. Choose any applicable means of controlling the pump speed.

Pump setup

The OLGA ESP requires a pump model to be chosen through the key PUMPMODEL. The model is taken
from either a default internal pump characteristics database or from a user-defined database specified
through the key FILES ESPDBFILE. A PUMPMODEL draw-down menu showing the pump model names
contained in the database is available through the GUI.

The number of required stages can be specified through the key NSTAGES.

- 245 -
OLGA User manual

Controlling the ESP speed

The following options are available for controlling the pump speed:

1. Pump speed regulated by controller:


1. Controlled manually by specifying time and speed series in the controller definition.
2. Regulated by a physical parameter. The speed is calculated by:

N = u*Nop

where Nop is the speed defined by the normal operation speed given in the database and u the
signal from the controller.

Note: It is not possible to model recycle or bypass flows with the ESP model. If such models are
required, the centrifugal pump can be used.

Note: ESPs cannot be positioned at the first or last section boundary of a flowpath.

Jet pump

The purpose of the Jet pump is to convert a flow of high pressure/low velocity into a flow of low
pressure/high velocity, and thereby create suction that can draw fluid from another low pressure flowpath.
The combined fluids flow through a mixing tube and a venturi type diffuser, where the velocity is reduced
and the pressure is recovered.

The Jet pump connects three flowpaths: the high pressure (power fluid) flowpath, the low pressure (suction
fluid) flowpath and the outlet (mixture fluid) flowpath. Single-phase and multi-phase fluids can be used in
either flowpath.

Use the Jet pump model to simulate the ability to create suction, and thereby pump the (low pressure)
suction fluid to the surface/outlet. The simulation includes the effect of the jet pump on the flow dynamics
of the entire flow network.

Model description

The Jet pump connects three flowpaths: the high pressure (power fluid) flowpath, the low pressure (suction
fluid) flowpath and the outlet (mixture fluid) flowpath. Potential energy (pressure) in the power fluid is
converted to kinetic energy at the exit of the nozzle (low pressure and high velocity). Kinetic energy is
converted back to potential energy in the mixing tube and the diffuser.

- 246 -
The OLGA model

The power fluid enters at position (1) in the figure. Upon entering, the pressure is high and the velocity low.
The power fluid then flows through a nozzle. Downstream of the nozzle at point (3) the pressure is low and
the velocity high. This creates a suction which draws fluid from the low pressure flowpath. The combined
power- and suction-fluids then flow through the mixing tube and the Venturi type diffuser where pressure
recovery takes place.

As the fluids flow through the different parts of the Jet pump, four pressure changes can be distinguished.
One of these is the pressure drop as the suction fluid flows from point (2), where the diameter is Ds to
point (3) where it experiences a flow area equal to

The second pressure change is the pressure drop in the power fluid as it flows from point (1), where the
diameter is Di, to point (3), where the diameter is Dn. The last two pressure changes (pressure recovery)
are experienced by the mixture of power and suction fluid as it flows through the mixing tube and the
diffuser respectively.

The pressure drop calculations for the suction and the nozzle make use of the same calculation method as
the standard OLGA choke model. Frozen equilibrium (no mass transfer between phases) is assumed.
These two pressure drops are available as output variables called DPSUCTION and DPPOWER,
respectively. Critical flow may occur in these parts of the Jet pump, and critical velocities and flow rates are
therefore available as output variables (UCSUCTION, UCPOWER and GCSUCTION and GCPOWER).
More details about the standard OLGA choke model and how critical flow is computed and handled can be
found in Hydro valve.

The calculation of the pressure recovery for the mixture fluid as it flows through the mixing tube is
calculated based on conservation of momentum.The recovery part of the standard OLGA choke model is
used. The pressure recovery in the diffuser is calculated using the Bernoulli equation in the same way as
for a Venturi Valve. Refer to Venturi valve for details. The pressure changes in the mixing tube and the
diffuser are available as output variable DPMIXTUBE and DPDIFFUSER respectively.

The input keys in the Geometry group of the JETPUMP keyword relate to the figure in the following
manner:

 DINLET is Di in the figure.


 DSUCTION is Ds in the figure.
 DNOZZLE is Dn in the figure.
 DTHROAT is Dt in the figure.
 DOUTLET is Do in the figure.

The input keys in the Loss Coefficient group of the JETPUMP keyword enter the model in the manner
described in the following.

KNOZZLE relates to the discharge coefficient used in the pressure drop calculation for the nozzle

KSUCTION relates to the discharge coefficient used in the pressure drop calculation for the suction

KTHROAT relates to the discharge coefficient used in the pressure change calculation for the mixing tube

- 247 -
OLGA User manual

KDIFFUSER relates to the recovery tuning coefficient used in the pressure recovery calculation for the
diffuser

The JETLOSS key represents a different effect compared to the other loss coefficients. It relates the
pressure at the outlet of the nozzle (P3n) to the pressure at the suction inlet (P2) and the pressure in the
entrance of the throat (P3).

The JETLOSS can be interpreted as including the effect of how the nozzle outlet is positioned relative to
the mixing tube entrance. JETLOSS=0 represents that the nozzle ends inside the mixing tube and
JETLOSS=1 represents that the nozzle ends upstream of the mixing tube entrance as shown in the figure
below.

How to use

Input

The Jet pump has three flow connection terminals: Jet, Suction and Outlet.

 Connect the outlet of the high pressure flowpath to the Jet terminal.
 Connect the outlet of the low pressure flowpath to the Suction terminal.
 Connect the inlet of the flowpath where the mixture fluid is flowing in to the Outlet terminal.

The Jet pump has two groups of input keys in addition to the LABEL key. The two groups are the
Geometry group, which contains diameters, and the Loss Coefficients group, which contains loss
coefficients. Refer to Model description for a description of these keys and how they are used in the model.

Output

The Jet pump has its own set of output variables.

Notes

 The pressure drops in the Jet pump are calculated assuming that no mass transfer takes place (frozen
equilibrium).
 Counter current flow is disabled in the Jet pump. This means that different fluid phases must flow in
the same direction through the Jet pump.
 Tracer tracking cannot be used with the Jet pump.
 Plug-in cannot be used with the Jet pump.

- 248 -
The OLGA model

Optional Built-In Bypass and Recycle

The bypass and recycle line is included for the:

 Centrifugal pump
 Displacement pump
 OneSubsea pump

To activate OLGA's simplified Bypass feature, specify BYDIAMETER or BYCVTABLE, and connect a
bypass controller of your choice. Use BYCHECK to enable/disable a check valve in bypass line.
BYSTROKETIME sets the valve opening/closing time. (Only the OneSubsea pump supplies -
BYCVTABLE, BYCHECK and BYSTROKETIME).

To activate OLGA's simplified Recycle feature for any Centrifugal or Displacement Pump, specify at least
RECDIAMETER and MAXRECYCLE, plus any non-default values for RECPHASE, MINRECYCLE, and
ACCECOEFF. Then connect a recycle controller of your choice. The OneSubsea recycle is required, and
is specified with CHOKECV or CHOKEVTABLE.

Further details about the internal workings of these simplified Bypass and Recycle features are provided in
the following text, equations, and block flow diagrams.

A common multiphase transportation system with pump is shown in Figure 81.

Figure 81 Multiphase Transportation System with Pump

Within OLGA, this system is simplified as shown in Figure 82. Note that in this implementation the pump is
abstracted into a volume-less element on the section boundary J between section J-1 and section J. The
recycle flow is out of section J and into Section J-1, and the bypass flow out of section J-1 and into section
J.

No-slip flow is assumed for all of gas, liquid, and droplets moving through section boundary J, as:

OLGA also enables you to add a separate VALVE keyword at the same section boundary where a
centrifugal pump or OneSubsea pump is located. You can then close that optional OLGA Valve to block
any possible backflow transients (that might otherwise occur due to higher downstream pressure at any
moment when the centrifugal pump is shut down).

- 249 -
OLGA User manual

Figure 82 Multiphase Transportation System modeled in OLGA

The centrifugal pump model requires a pump table with the characteristics of the pump. The displacement
pump model requires a backflow table. The pump manufacturers usually characterize their pumps by
pump operating characteristics. There is a default implementation of such tables in OLGA. If other tables
are needed, they should be given with the TABLE keyword. Each of the characteristics is assigned a label,
which is referred to in the PUMP keyword.

You can choose the recycle flow as gas only, liquid mixture, water only, or fluid mixture.

Recycle and bypass flow

Recycle and bypass flows are only defined for centrifugal (not simplified) and displacement pumps. The
recycle flow, GR, is considered as the flow through a controlled choke. The flow is calculated with a given
pressure difference between the two sides of the choke, ΔPch, and the choke upstream conditions. The
choke upstream condition is taken from the pump downstream section (pump pressure side). The choke
flow can be regulated by a controller.

If the recycle flow is in subcritical condition, GR is calculated by:

where Cd is the choke discharge coefficient and Ach the choke opening area.

If the mass flow through the choke exceeds the critical flow rate, critical flow conditions is used. The flow
rate through a critical choke is governed by the choke upstream conditions and the choke opening. No
forward flow is allowed in the recycle loop.

The bypass flow, Gb, is controlled by a choke and calculated in the same way as for the recycle flow. If the
bypass flow line is opened, the fluid flows from the pump inlet to the pump outlet in the normal pumping
flow direction without going through the pump. Back flow is not allowed through the bypass line.

- 250 -
The OLGA model

Controlling the pump speed

The following options are available for controlling the pump speed:

1. Pump speed regulated by controller (All pump models(*) except PressureBoost):


1. Controlled manually by specifying time and speed series in the controller definition.
2. Regulated by a physical parameter. The speed is calculated by:

where Nmax is the maximum pump speed (defined by user), Nmin is the minimum pump speed
(defined by user) and u the signal from the controller.

2. Controlled by an override controller (only for centrifugal and displacement pumps):

To adapt the pump to the production change (because the recycle flow is at upper or lower limits), the
pump speed is changed automatically according to the required speed variation (speed acceleration).
The speed variation can be given in form of:

where A is a constant pump speed variation rate (acceleration). The speed variation stops when the
recycle flow is within a defined range below MAXRECYCLE and above MINRECYCLE.

3. If the maximum pump torque has been given by users (only for centrifugal and displacement pumps):

The effective pump torque is calculated from the total power input to the fluid, QPt :

where TQpump is given in [N/m], QPt is the total power input to the fluid. If the pump shaft torque is over
the limit ,the pump speed is reduced, and a warning message is given in the output file.

(*) The OneSubsea pump model has built in speed control, and input speed changes are restricted by a
speed rate change.

Compressor
A compressor is included to increase the pressure of the gas. The compressor is described by compressor
characteristics that give the pressure and temperature increase over the compressor as a function of flow
through the compressor and the rotational speed of the compressor. The compressor characteristics also
give information about the minimum inlet flow (surge flow) on which the compressor can operate. If the
inlet flow drops below the surge flow multiplied by a safety factor, a recirculation loop around the
compressor is opened. The recirculation loop secures stable conditions for the compressor. A heat
exchanger (cooler) can be included in the recirculation loop.

Model description

The compressor is modeled as a flow-dependent and rotational-speed-dependent pressure jump and


energy source. Any recirculation around the compressor is treated by a source into the section upstream of
the compressor, and a sink out of the section downstream of the compressor, as OLGA cannot handle
recirculation directly.

The compressor characteristics and the surge volume flow are given in the form of tables. The compressor
surge volume flow is the lowest volume flow the compressor can operate on without becoming unstable.
Compressor data needed for the model are found by linear interpolation in the compressor tables.

- 251 -
OLGA User manual

Pressure increase and derivatives of pressure increase are calculated from the pressure characteristics
and are used for setting new coefficients in the momentum equations. Temperature increase is calculated
from the temperature characteristics and is used for setting new coefficients in the energy equation.

The compressor speed and the recirculation around the compressor are governed by the control system.
In addition, the compressor speed is limited by a user-specified range. The surge volume flow calculated
from the compressor tables is used together with an optional security factor to establish a set point for the
controller that controls the recirculation around the compressor.

It is assumed that during operation the control system keeps the compressor within the bounds of validity
of the characteristics.

Compressor pressure step evaluation

The compressor pressure characteristics give compressor pressure ratio as a function of reduced
rotational speed and reduced mass flow, equation (56) below.

(56)

where л (-) is the pressure ratio, p1 (N/m2) is the inlet pressure, p2 (N/m2) is the outlet pressure, R (kg/s) is
reduced inlet mass flow and S (rpm) is reduced rotational speed. R and S are defined as

(57)

where G (kg/s) is the mass flow, Θ (-) is the normalized inlet pressure and δ (-) is the normalized inlet
temperature and r (rpm) is rotational speed. Θ and δ are defined as

where T1 is the inlet temperature given in Kelvin.

where P1 is the inlet pressure given in Pascal.

- 252 -
The OLGA model

Figure 83 shows a typical compressor characteristic diagram.

Figure 83 Compressor characteristic diagram

The pressure increase over the compressor is calculated from the compressor pressure characteristics.

For calculation of the operating point, the compressor speed is necessary. The speed is governed by the
control system and is limited by a user-specified range. The range is normally determined by the speed
range in the compressor tables.

(58)

where r is the compressor speed, and u is the signal from the control model. u is in the range from 0 to 1,
where u equal to 1 means that the compressor speed is at its maximum.

Compressor temperature calculation

To calculate gas temperatures, the power supplied by the compressor, PWc, is added as an enthalpy
source to the enthalpy balance for the pipe section following a compressor boundary. The temperature
resulting from this balance is used for calculating fluid properties, while the compressor outlet temperature
is only used for informative purposes.

Polytropic compression is assumed. The enthalpy source due to the compressor is:

where W is the mass flux through the compressor and Δz is the section length of the section downstream
of the boundary where the compressor is located.

For an inlet at pressure p1 and a density of r1, the power required for compression to an outlet pressure p2
is:

- 253 -
OLGA User manual

The relation between pressure ratio, temperature and the polytropic exponent n is:

The compressor temperature characteristics are also given in the form of tables, and the temperature ratio
is found by linear interpolation.

The polytropic factor (n-1)/n is calculated from pressure ratio and temperature ratio using equation (59).

(59)

Calculation of surge volume flow

The surge flow is in the form of tables, with reduced surge mass flow as a function of reduced compressor
speed, see Figure 83. The surge volume flow is used together with an optional security factor to establish
a set point for the anti-surge controller (ASC) that controls the recirculation around the compressor,
preventing unstable compressor operation. Reduced surge mass flow as a function of compressor speed
is found by linear interpolation.

For a compressor the surge volume flow is calculated as follows:

Recirculation flow modeling

Recirculation flow around a compressor is modeled as a set of negative and positive sources, because
OLGA cannot handle recirculation directly. The flow is controlled by a choke with the choke opening
governed by the control system.

The recirculation is between two neighboring sections with a compressor on the common boundary, see
Figure 84. Only gas is allowed to flow in the recirculation loop. The recirculation flow is treated as a source
into the section volume ahead of the compressor boundary, and a source out of the section volume after
the compressor boundary.

Figure 84 Recirculation loop

The pressure drop across the restriction is equal to the pressure difference between the sections
downstream and upstream of the compressor.

The recirculation flow is restricted by the critical pressure difference. If the pressure difference between the
section upstream and downstream of the compressor is higher than the critical value, the critical value is
used.

The pressure drop over the restriction is:

- 254 -
The OLGA model

Solving for W:

where the positive sign relates to a positive source, and the negative sign relates to a negative source. W
is the mass flux, ρg is the gas density in the section it is flowing out of (section after the compressor), D is
the diameter of the section with the source, and Do is the orifice diameter of the controlled choke.

For subcritical flow through the controlled choke the pressure difference between the section upstream and
downstream of the compressor is used in equation (i). For critical flow through the controlled choke, the
critical pressure difference is used for calculating the recirculation flow. Critical pressure difference is
based on single phase gas flow with constant specific heat ratio, γ = cp/cv. Specific heat ratio of 1.3 is used.

where pcrit is critical pressure ratio, p is the pressure in the section it is flowing out of and Δpch, crit is critical
pressure difference.

The energy leaving the section downstream of the compressor and entering the section upstream of the
compressor through the recirculation loop is calculated as follows.

hg is the specific gas enthalpy in the compressor downstream volume, Wrec,g is the mass flux based on the
section area of the section with a source and Δz is the section length of the section with a source.

A heat exchanger can also be included in the recirculation loop. The aim of the heat exchanger is to
extract energy to obtain a desired heat exchanger outlet temperature. In this case, the temperature of the
recirculation source entering the section upstream of the compressor has to be specified. The heat
exchanger is modeled as an ideal heat loss.

The energy source entering the upstream section in a situation with a heat exchanger in the recirculation
loop is calculated as:

is specific gas enthalpy based on the desired heat exchanger outlet temperature and pressure in the
section where the source is entering. Δhhex is specific enthalpy decrease in the heat exchanger. The
energy extracted through the heat exchanger is limited by the heat exchanger capacity.

The orifice opening of the controlled choke is governed by the control system. The control model also
takes care of the stroke time of the controlled choke. The orifice opening is calculated as:

where u is the signal from the control model, and is in the range from 0 to 1. u equal to 1 means that the
controlled choke is fully open.

- 255 -
OLGA User manual

How to use

To use a compressor, you must add a compressor and two controllers (speed controller and anti-surge
controller). There must be one compressor table for each compressor.

Note: The compressor cannot be positioned at the first or last section boundary of the pipeline. In that
position, the controlled bypass is unrealizable because it is defined as going from the downstream
section to the upstream section.

Note: It is recommended to avoid liquid flow through the compressor. Numerically, the compressor
model works with liquid phase present but the results make no sense.

Controlling rotational speed

You can specify the compressor minimum rpm, MINRPM, and maximum rpm, MAXRPM. These two
parameters determine the operating range of the compressor and they must be within the rpm range of the
com-pressor tables. A controller can be used to regulate the speed within the operating range. The speed
is calculated by equation (58) in Model description on page 251. If the speed controller is omitted, the
controller signal is zero and the compressor uses its minimum speed.

Note: If the controllers are omitted, the speed is kept at minimum speed (MINRPM) and the recycle loop
is closed.

Recycle loop

The anti-surge security factor, SECURITYFACTOR, determines the anti-surge con-trol line. To protect the
compressor against surge conditions, always select a security factor > 1. A typi-cal value for security factor
is from 1.1 to 1.3. A security factor of 1.2 means that the control valve in the recirculation loop starts to
open at a compressor inlet flow that is 20% higher than the surge flow speci-fied in the compressor tables.

The anti-surge controller (ASC) should be configured as a PI controller. The ASC is a kind of non-linear
controller that have two amplification factors, AMP1 and AMP2. AMP1 is used if the inlet flow to the
compressor is less than the surge flow, and AMP2 if the inlet is greater than the surge flow. Both AMP1
and AMP2 have to be negative, and the absolute value of AMP1 should be higher than the corresponding
absolute value of AMP2 to rapidly open the recycle valve and to impose an inertia to close it again. A short
stroke time for the recycle valve should also be selected. Select also the controller initial output signal
(BIAS), equal to zero. To send information from the compressor to the ASC about surge flow, connect the
OUTSIG_n out-signal from the compressor to the MEASRD input-signal of the controller. Then select
QGSURGE as the measured variable.

If the anti-surge controller is omitted, the controller signal is zero, which causes the recycle choke to be
closed, that is, there is no flow in the recycle loop.

To add a cooler to the recirculation loop, set COOLER=ON and also set the COOLCAPACITY.

Only gas flows in the recirculation loop. Critical flow calculations are based on single-phase gas flow with a
constant specific heat ratio of 1.3. If the pressure in the section upstream of the compressor exceeds the
pressure in the section downstream of it, the recirculation flow is set to zero.

- 256 -
The OLGA model

Phase split node


The phase split node is based upon the functionality of an internal node (NODE TYPE = INTERNAL), but
the phase fractions can be specified in the outgoing branches. For a normal internal node, the composition
flowing out of each terminal connected is equal to the total composition in the node itself, but for a phase
split node there will be different distributed phase flows through each of the outgoing branches according
to the actual type of terminal chosen. The behavior of the phase split node can be seen as a simple type of
network SEPARATOR, where there are no level controls and no internal separator efficiencies included.

The phase split node is recommended to be used in a finger type separator and in nodes where the in/over
pipe connections where the phases tend to have an uneven split.

Model description

The phase split node has an arbitrary number of inlets/outlets. It has six different types of terminals: GAS,
OIL, WATER, LIQUID, DRYGAS and MIXTURE.

Terminal = GAS - gas +droplets

Terminal = OIL - oil bulk

Terminal = WATER - water bulk

Terminal = LIQUID - oil and water bulk

Terminal = DRYGAS - gas only

Terminal = MIXTURE - all phases within the node itself(default)

When the volume fraction of the connected phase(s) is sufficiently low(0.01), the flow in the outgoing
branch will be as from an internal NODE.

How to use

Input

Connections to external pipelines

The following connections are defined:

 MIXTURE_1, … MIXTURE _N inlets and outlets


 GAS_1, … GAS_N outlets
 OIL_1, …OIL_N outlets
 WATER_1, …WATER_N outlets
 LIQUID_1, ... LIQUID_N outlets
 DRYGAS _1, … DRYGAS _N outlets

Internal volume

If the volume is not given, it is by default assigned a value by OLGA. In some cases it might be more
useful to give a larger value for the key VOLUME to get more stable node conditions during the
simulations.

Output

All of the output variables specified under section 'VOLUME VARIABLES' that are available for the internal
NODE are also available for the phase split node.

- 257 -
OLGA User manual

Notes

The phase split node is not intended for design purposes. It only distributes the phase fractions in the
outgoing branches according to the user defined type of terminals chosen:

 The phase split node is only treated as a simple volume tank with no internal separation equipment.
 There are no level controls and no separator efficiencies.

Separator
The network separator is not intended to accurately model separation phenomena, but is meant to include
the influence of a separator on transient pipeline dynamics. The behavior of the separator is based mainly
upon user given input for the separation efficiency (gas/liquid, oil/water), and set critical levels for oil and
water drainage.

You are recommended to use the separator model whenever a 'real' separator is present in the flow
network and the effect of the downstream flow pattern is of interest. If it is only interesting to look at the
upstream flow pattern, it sometimes is appropriate to replace the separator with an ordinary pipe with large
diameter to stabilize the boundary conditions and in that way avoid the need for more a complex
specification of outgoing pipes, valves and controllers linked up to the separator.

It can also be useful to employ a separator as a downstream boundary condition for controlling the
boundary pressure. This can reduce unwanted flow oscillations in the network compared to using a
constant pressure boundary condition.

Model description

Separator type

The separator can be two-phase or three-phase and the geometry orientation is horizontal, vertical or table
specified.

Connections to external pipelines

The separator has an arbitrary number of inlets/outlets. Two phase separators must have connected at
least one inlet, one gas-outlet and one oil-outlet to pipes. Three phase separators must in addition also
have one water-outlet connected.

Valves/controllers

The separator has no internal valves and controllers, so they have to be specified on the outgoing pipes.

Level control

The separator levels are controlled by the valves and controllers in the outlet pipes. For a three-phase
separator, the water level limit for when the water will be drained together with the oil can be specified in
the separator keys:

 HHWATHOLDUP
or
 HHWATLEVEL

- 258 -
The OLGA model

Separation efficiencies

1. Liquid carryover in gas outlet.

The gas-liquid separation efficiency is defined as one minus the volume fraction of the liquid droplets
in the gas outlet stream. By default, the gas-liquid separation efficiency is equal to one, that is, no
liquid carryover in the gas outlet. You can, however, specify a constant gas-liquid separation
efficiency, effg by the key EFFICIENCY in the keyword SEPARATOR. The liquid droplet volume
fraction in the gas stream is then equal to one minus the value assigned to EFFICIENCY.

For three phase flow the liquid droplet volume fraction is distributed to water and oil droplet volume
fractions according to the water and oil volume fractions in the settled liquid in the separator.

To prevent instabilities in the separator when the liquid holdup becomes very large, it is possible to
specify two input keys, EFFLOW and EFFHIGH, to assure a continuous transition from effg =
EFFICIENCY to effg = 0.0. EFFLOW is the liquid volume fraction when efficiency is being reduced
and EFFHIGH is the liquid volume fraction when efficiency becomes zero and the gas outlet is treated
as a normal flowpath. The gas-liquid separation efficiency, effg is modified by the following set of
rules:

The liquid volume fraction, αl ≤ EFFLOW:

αl > EFFLOW and αl < EFFHIGH:

αl ≥ EFFHIGH:

2. Oil in water drain.

The oil volume fraction in the water drain is determined by the following relation for separation
efficiency:

where Kso is the time constant, OILTCONST, for separating oil from water and Trsp is the residence
time which is defined as the separator liquid volume / liquid volume flow into the separator.

The oil volume fraction in the water drain is then 1 - eff0.

3. Water in oil drains.

The water volume fraction in the oil drains is determined by an equation similar to the one above:

where Ksw is the time constant, WATTCONST, for separating water from oil. If the water level is above
a certain limit, HHWATHOLDUP or HHWATLEVEL, the water above this limit is assumed to be
drained together with the oil and the separation efficiency for separating water from oil is modified as
follows:

- 259 -
OLGA User manual

where Hof is the ratio of the water layer height above the limit to the liquid height above the same limit.

The water volume fraction in the oil stream is then 1eff w.

Heat transfer

The heat transfer, qtr into the separator or out from the separator is given by:

where U is the overall heat transfer coefficient, A is the surface area, Tsep is the separator temperature and
Tamb is the ambient temperature. If adiabatic temperature option is given for the total flow network, U is set
to zero for all separators in the network.

How to use

Figure 85 An illustration of a three-phase separator

Input

Connections to external flowpaths

For a two phase separator, the following connections are defined:

 INLET_1, …INLET_N inlets


 GAS_1, … GAS_N outlets (Use GAS_2 to model flare outlet)
 OIL_1, …OIL_N outlets(Use OIL_2 to model emergency outlet)

For a three phase separator, the following connections are defined:

 INLET_1, …INLET_N inlets


 GAS_1, … GAS_N outlets (Use GAS_2 to model flare outlet)
 OIL_1, …OIL_N outlets(Use OIL_2 to model emergency outlet)
 WATER_1, …WATER_N outlets(Use WATER_2 to model emergency outlet)

Initial conditions

 Key INITTEMPERATURE gives initial value for the separator temperature


 Key INITPRESSURE gives initial value for the separator pressure
 Key INITWATLEVEL gives initial value for the water level
 Key INITOILLEVEL gives initial value for the oil level

- 260 -
The OLGA model

The feed or drilling fluid given to the separator must be consistent with the initoilevel and initwaterlevel.
That is, if the initial level says there is gas, the feed must have the gas phase when flashed at the
separator P and T. The same applies for other phases. If a test case contains only oil, the initoilevel must
be set to be equal to the separator height.

Geometry

There are two methods to specify the geometry of the separator. One method is to specify the separator
length, LENGTH and the separator diameter, DIAMETER. The surface area and volume is then calculated
by using the knowledge of the cylindrical form. The other method is to define a specific level table
LEVELTABLE, a set of user defined values giving the volume as a function of the level (height). Using this
method the surface area, SURFACEAREA also has to be given.

Separator valves/controllers

The separator has no internal valves and controllers. All valves must be defined on the outgoing pipes and
might be positioned at the first section boundary of the pipes. The controllers are connected to the valves
and must also be defined outside the separator. It is recommended that the water valve opening is
controlled by a water level controller, the oil valve opening is controlled by an oil level controller and the
gas valve opening is controlled by a separator pressure controller.

Output

Many of the plot variables specified under Volume Output Variables on page 554 are available for the
separator. In addition, a number of separator specific plot variables are available:

 Mass flow rates for each mass field for each pipe connection.
 Separator levels (oil, water).
 Separator efficiency.

Notes

The network separator is not intended for design purposes. It only simulates a predefined behavior of a
'real' separator.

 The separator is only treated as a simple volume tank with no internal separation equipment.
 The separator efficiencies are user given.
 No wall temperatures are calculated.
 There are no time restrictions for calculation of the flash contributions. The total mass internally is
taken into account and treated as at equilibrium. Due to the internal geometry of the separator, this
might give incorrect results if the separator pressure or temperature suddenly changes.

Heat exchanger
A heat exchanger is included to raise or lower the temperature in the fluid. There are two different types of
heat exchangers in OLGA: 'Setpoint Heat Exchanger' and 'Controlled Heat Exchanger'. Both can be
configured to give practically the same results, but each is configured differently and this allows for
different usages.

When a heat exchanger is used in the anti-surge recirculation loop of a compressor, it is specified through
the keys of the COMPRESSOR keyword (keys COOLER and COOLCAPACITY). Otherwise, use this
HEATEXCHANGER keyword to create a heat exchanger.

- 261 -
OLGA User manual

Model description

The setpointheat exchanger is an idealized heat source/sink, and no descrip-tion of the real heat transfer
process is included. It simply provides a way of specifying a temperature at the heat exchanger outlet,
consistent with the energy equation in OLGA. In the setpoint heat exchanger, a heat source/sink is
estimated that gives the specified fluid temperature for a particular section. More specifically, the heat
exchanged is equal to the enthalpy difference corresponding to the difference between the inlet
temperature and the specified outlet temperature of the heat exchanger.

The controlled heat exchanger has a simpler model. In the controlled heat exchanger, the effect of the
heat exchanger is determined by the controller system. The heat source/sink is not estimated as the heat
exchanger has no knowledge of any target temperature. The CONTROLLER for the heat exchanger
knows the current temperature and the target temperature and adjusts the effect of the heat exchanger to
obtain the target temperature.

How to use

To select between a setpoint heat exchanger and a controlled exchanger, simply set the TYPE.

To use a setpoint heat exchanger, specify the position, an outlet temperature and an upper limit of the heat
source, the capacity.

To use a controlled heat exchanger, specify the position and the capacity, but instead of setting the outlet
temperature, connect the heat exchanger to a controller. The controller typically measures the temperature
at a specified position along the pipeline and compare the measured temperature to a setpoint. Based on
the difference between the setpoint and the measured temperature, the controller delivers a signal to the
heat exchanger that determines how large a fraction of the heat exchanger’s capacity is applied. Different
types of controllers can be used, making the input of a controlled heat exchanger more flexible than that of
the setpoint heat exchanger. For example, you can measure the average temperature over several
sections by using a Linear Combination Controller.

Note: A heat exchanger can not be positioned at the first or last section boundary of a pipeline.

Leak
Leak provides a means to let mass to escape from a pipe based on the difference between the pressure
inside the pipe and an outside pressure. The mass escaping through a leak either can be removed from
the system altogether, or can be re-injected into another part of the system modeled. Thus, a leak can
serve both to model leaks/pipe ruptures as well as, for example, gas lift and unloading valves.

Model description

The flow rate through a leak is calculated from the flow equations of a valve/choke. Both sub-critical and
critical flow is supported in OLGA. For subcritical flow, the flowrate depends on both the upstream and the
downstream pressure of the leak. For critical flow, the flow rate is independent of the downstream
pressure. The leak flow is always limited to critical flow.

There are five different types of flow equations to choose from. Depending on the flow equation type
selected, the flow is either removed from the system (external leak) or is routed to any pipe section in any
branch by using the subkey TOPOSITION (internal leak). For an external leak, only flow out of the system
is allowed. For an internal leak, depending on the flow equation type, a check valve function can be
switched on or off. When the check valve function is on, the flow can be only from the position where the
leak is defined to the destination position. When the check function is off, the flow can be in both
directions.

- 262 -
The OLGA model

The following types of flow equations are available.

 OLGA choke model. The flow is calculated, based on the opening area and discharge coefficient, by
the OLGA choke model. The option can be applied for an internal and an external leak. For an internal
leak, the check valve function can be applied. The opening of the leak is regulated by a controller. For
details of the choke model, see the description of the OLGA Hydro valve model.
 OLGA venturi model. The flow is calculated, based on the opening area and loss coefficients for the
entry- and exit-cones, by the OLGA venturi valve model. The option can be applied for an internal and
an external leak. For an internal leak, the check valve function can be applied. The opening of the leak
is regulated by a controller. For details of this model, see the description of the OLGA venturi valve.
 CV table of the valve. The flow is calculated by the valve sizing equation. The option is applicable to
both an internal and an external leak. For an internal leak, the check valve function can be applied.
The opening of the valve is regulated by a controller. See the description of the flow equation based
on the Cv table.
 Gas lift valve (GLV) performance curves in a tabular form. The flow is calculated based on the gas lift
performance given in tables. This option is only applicable for internal leaks. The check valve function
is always on. The opening is controlled by the casing and tubing pressure. See the description of GLV
performance.
 GLV performance from the correlations licensed through the Valve Performance Clearinghouse TM
(VPCTM). The method is similar to the third option, but the flow is calculated based on the correlations
licensed through VPCTM. This option is only applicable for internal leaks. The check valve function is
by default on, but you can switch it off. The size of the valve opening is determined by the correlations
from the data base. See the description of GLV performance.

Remark:

The fluid upstream of the leak is assumed to be well mixed, that is, the phase mass fractions flowing
through the leak equal the phase mass fractions of the section the leak is connected to.

How to use

Position the leak. Leaks can be placed anywhere along the pipeline. A LEAK has two main functions:

1. It can be used to model a valve or rupture where the mass out of the pipe is removed from the
simulated system, that is, the mass is lost to the surroundings (requires the key BACKPRESSURE).
2. It can also be used to model interconnections in the model, where the mass out of one section is
transferred to mass into another section (requires the key TOPOSITION). BACKPRESSURE cannot
be defined in this case as the back pressure is equal to the pressure in the section defined in
TOPOSITION.

Back flow is not allowed for functionality 1, that is, there is no back flow if the section pressure is lower
than the back pressure.

For the second function, five valve types are available: GASLIFTTABLE, GASLIFTVALVE, CVTABLE,
OLGAVALVE and OLGAVENTURI.

Back flow is not allowed for valve type GASLIFTTABLE. Back flow is allowed for valve types CVTABLE,
OLGAVALVE, OLGAVENTURI and GASLIFTVALVE.

 If valve type is GASLIFTTABLE, gas lift tables, which define the GLV response curves, must be
referred to.
 If valve type is GASLIFTVALVE, the GLV response is computed by correlations, using parameters
which are read from a database. This allows for use of the Valve Performance ClearinghouseTM
(VPCTM) database.

- 263 -
OLGA User manual

 If valve type is CVTABLE, OLGAVALVE or OLGAVENTURI, the flow area can be manipulated by a
controller. Connect a controller to the leak input signal terminal VALVESIG. If no controller is
connected to the leak, the entire flow area is used. See Valve - Purpose for details.

Note: All valve types can be used for functionality 1. See Gas Lift Valve (GLV) for more information.

Signal connections

The LEAK has one optional input terminal, VALVESIG. VALVESIG scales the LEAK flow area.

Remark:

Leaks are discarded in the steady state preprocessor.

Related keywords:

LEAK (on Flowpath) on page 457, POSITION (on Flowpath) on page 442

Loss
Loss provides a generic means to account for pressure losses not intrinsically included in OLGA, for
example, pressure losses associated with bends, local contractions/expansions, or other type of
obstructions encountered.

Loss - Model description

A generic loss is modeled in terms of a loss coefficient, k, according to

where ρ is the density and U is the fluid velocity. The model provides two pressure loss coefficients, one
for positive flow and one for negative flow, to allow for asymmetric pressure losses depending on flow
direction.

How to use

1. Add a loss to the flowpath.


2. Position the loss, see Position on page 36.
3. Define the loss coefficients. POSCOEFF is the loss coefficient used for flow in the positive flow
direction along the flowpath while NEGCOEFF is used for flow in the opposite direction.

Related keywords

LOSS (on Flowpath) on page 460, POSITION (on Flowpath) on page 442

- 264 -
The OLGA model

Control systems

Controller introduction
Controllers are, in OLGA terms, a network component labeled 'signal component', which means that they
can communicate with other network components by sending and receiving signals. Other network
components can be other signal components or flow components (that is, a branch). Controllers are typical
signal components but also other types of network components can be signal components.

All controllers have one common key; LABEL, which is used to identify the controller.

There are 13 different types of controller:

 Algebraic controller on page 270


 ASC controller on page 271
 Cascade controller on page 273
 ESD controller on page 275
 Manual controller on page 278
 Override controller on page 278
 PID controller on page 280
 PSV controller on page 286
 Scaler controller on page 288
 Selector controller on page 289
 STD controller on page 291
 Switch controller on page 292
 Table controller on page 293

Both analog and digital controllers can be simulated in OLGA (see Analog vs. digital controllers for further
details).

A controller can be set to one of five different modes operation, either by using time series in the MODE
sub-key or by hooking a defined controller up to the MODE terminal (see Controller modes for further
details).

In addition to implementing the possibility to switch the controller mode, the current version of OLGA also
implements the possibility to 'activate' and 'deactivate' the controllers by hooking an external controller up
to the ACTIVATE terminal (see controller activation/deactivation for further details).

The controller output is constrained; see Constraining the controller output for further details.

The most advanced use of the OLGA controllers utilizes the possibilities of interconnecting controllers by
the use of terminals. A description to the different terminals is given in controller details.

- 265 -
OLGA User manual

Controller details
Figure 86 below shows a block diagram of how different inputs and outputs relate to different parts of the
controller implementation.

Figure 86 Overall block diagram for controller implementation.

In Figure 86 above and Figure 87 below:

 Inputs in terms of sub-keys are given in boxes framed by an orange line.


 Inputs given through terminals are given in boxes framed by a green line.
 Internal calculation boxes are framed by a black line and gray background color.

The larger block Controller function + Controller mode in Figure 86, implements:

 the controller functionality given by the controller type


 the controller modes
 the controller activation deactivation

Output A from the Controller function + Controller mode block represents the unconstrained output. The
unconstrained output is checked against sub-keys MAX/MINSIGNAL and forms the constrained output B.
Finally, output B is checked against a rate of change constrains (OPENINGTIME and CLOSINGTIME) to
form the final constrained output CONTR.

Note: The additional outputs SATURATED and RATELIMITED are used to signal saturation and rate of
change limitation to other controllers.

- 266 -
The OLGA model

Figure 87 Implementation of controller modes and activation/deactivation mechanisms.

Figure 87 shows the implementation of modes and activation/deactivation mechanisms. Depending on the
controller type, the controller function block might need the Setpoint sub-key. Controller type PID is an
example of a controller type that makes use of the Setpoint sub-key, whereas controller type OVERRIDE
does not use the Setpoint sub-key. The controller function block can also use additional terminals and sub-
keys not shown in Figure 87. If the mode is AUTOMATIC (mode value one), the Setpoint is taken from the
sub-keys and if mode is EXTERNALSETPOINT (mode value four), the Setpoint is connected to the
Setpoint terminal. This is illustrated by the upper left switch in Figure 87.

The lower left switch in the figure determines how MODE is set. This switch cannot be changed during run-
time. If a controller is connected to the MODE terminal, its value is obtained through the terminal that
determines the mode of the controller, irrespective of what is set in the MODE sub-key. If no controller is
connected to the MODE terminal, the MODE sub-key determines the mode of the controller.

 If MODE is AUTOMATIC or EXTERNALSETPOINT, the output of the controller function (CF) block is
routed through the larger switch in the figure (position one or four at the input of the switch) and the
corresponding setpoint is connected to the controller function.
 If MODE is MANUAL, the manual output signal is routed through the switch (position two at the input
of the switch).
 When the MODE is EXTERNALSIGNAL, the SIGNAL TERMINAL is connected to the output of the
switch (position three at the input of the switch).
 When MODE is FREEZE, the lower memory block is connected to the output of the switch (position
five at the input of the switch). The memory blocks hold the previous output value. Thus the output is
frozen (kept constant).

The activation/deactivation mechanism is illustrated by the switch with two inputs and memory block on the
right in the figure.

 If the controller is activated (ACTIVATE = true, or value greater or equal to 0.5), the activate switch is
in position two connecting the controller to the output A.
 If the controller is deactivated (ACTIVATE = false, or value less than 0.5), the activate switch is in
position one connecting the output A to the previous value, thus the output is frozen (kept constant).

- 267 -
OLGA User manual

Controller mode
A controller in OLGA can be set in one of the five different modes:

Automatic

In MODE = AUTOMATIC, the controller behaves according to the controller function as specified for the
different controller types. For those controllers that make use of setpoint, the value in MODE =
AUTOMATIC is taken from the SETPOINT key.

Manual

In MODE = MANUAL, the controller function is bypassed and the controller output is set according to the
time series definition of key MANUALOUTPUT.

External signal

In MODE = EXTERNALSIGNAL, the controller function is bypassed and the controller output is set
according to the external controller connected to the SIGNAL terminal.

External setpoint

The controller MODE = EXTERNALSETPOINT is similar to MODE = AUTOMATIC, except that the
setpoint is taken from the controller connected to the SETPOINT terminal.

Freeze

In MODE = FREEZE, the controller function is bypassed and the controller output is kept constant (equal
to the previous output value).

The controller MODE can be manipulated either by time series or by another controller. To manipulate the
mode of a controller by time series, specify the sequence in the MODE sub-key. The predefined literals:

AUTOMATIC value 1

MANUAL value 2

EXTERNALSIGN value 3
AL

EXTERNALSETP value 4
OINT

FREEZE value 5

are used when specifying the MODE through MODE sub-key in the GUI and input file. The MODE sub-key
is interpreted together with the TIME sub-key.

When you use the terminal to change the mode of a controller you must connect an external controller to
the MODE terminal. For example, to manipulate the mode of controller A by a controller labeled A.MODE
connect controller A.MODE to the MODE terminal of controller A. The mode of controller A id the
dependent on the output value of A.MODE

A.MODE < 1.5 gives AUTOMATIC

1.5 <= A.MODE < 2.5 gives MANUAL

- 268 -
The OLGA model

2.5 < = A.MODE < 3.5 gives EXTERNALSIGNAL

3.5 < = A.MODE < 4.5 gives EXTERNALSETPOINT

4.5 < = A.MODE gives FREEZE

All controllers except Table and Scaler have MODE implemented.

The definition on MODE through the use of the MODE terminal overrules the definition of MODE given by
the MODE sub-key.

Controller activation/deactivation
In addition to implementing the possibility to switch the controller mode, the current version of OLGA also
implements the possibility to 'activate' and 'deactivate' the controllers by hooking an external controller up
to the ACTIVATE terminal.

A controller A might be deactivated and activated by connecting an external controller A.ACTIVATE to the
ACTIVATE terminal of controller A. Then controller A is active if the output of A.ACTIVATE is greater or
equal to 0.5. When a controller is 'deactivated' (A.ACTIVATE < 0.5) the controller function is bypassed and
the controller output is kept constant (equal to the previous output value). When a controller is activated
the output is calculated according to the controller function and any specification of MODE.

The deactivation of controllers takes precedence over controller function and mode. For further details see
the description of the controller details.

Actuator time of controlled device

There are no restrictions on the rate of change of the out-put from the controller algorithms. The output
from the controller frequently changes faster than the device is cap-able of following. This situation is taken
care of by passing all output from the controllers through an actuator filter that computes a 'real' output (as
observed by the devices) according to the rule:

or

where

tact,open The actuator time when increasing U

tact,close The actuator time when decreasing U

Δt The time step

old The previous output signal from the controller

U The output signal from the controller

Umax The maximum output signal from the controller

Umin The minimum output signal from the controller

- 269 -
OLGA User manual

The actuator time is specified as the stroke time or the time required to open/close. You specify the
minimum and maximum controller output signal, Umin and Umax. These two parameters determine the
operating range of the controller. Usually, the operating range is from 0 to 1, that is, an output of 0 from a
controller operating on a valve means that the valve is closed, whereas an output of 1 means that the
valve is fully open.

Analog vs. digital controllers

For all the controller types, the digital controller option can be selected by using the key SAMPLETIME.
The difference between analog and digital sampling in an OLGA simulation is as follows:

The analog controller collects input and gives a corresponding output at each simulation time step. The
MAXCHANGE sub-key specifies the maximum allowed change in controller output from one time step to
the next. The default value is 0.2. The automatic integration time step mechanism ensures that the relative
change in the output signal of the controller from one time step to the next never exceeds MAXCHANGE.
The digital controller collects input and generates a corresponding output at time points separated by time
intervals given in sub-key SAMPLETIME. There can be one or more OLGA integration time steps in
between each sample time point. The automatic time step control assures that a simulation time point
always agrees with a sample time point (to the accuracy specified in the MAXCHANGE sub-key). The
output signal from the controller is kept constant during the sample time interval.

Constraining the controller output


The controller output is constrained in two steps. First, the controller output is checked against signal
constrains. Second, the controller output is checked against rate of change constraints.

The signal constraints are specified in the keys MAXSIGNAL and MINSIGNAL.

If the controller output is greater than or equal to MAXSIGNAL, then the output signal is set equal to
MAXSIGNAL and the SAUTRATED output is set equal to 1.0 to signal 'high saturation'.

If the controller output is less than or equal to MINSIGNAL, then the output is set equal to MINSIGNAL and
the SATURATED output is set equal to -1.0 to signal “low saturation”.

If the rate of change in the controller output violates the OPENINGTIME (or STROKETIME), the controller
output is set equal to the maximum allowed output, satisfying the rate of change constraint and the
RATELIMITED variable is set equal to 1.0 to signal a 'high rate of change saturation'. If the rate of change
in the controller output violates the CLOSINGTIME (or STROKETIME), the controller output is set equal to
the minimum allowed output satisfying the rate of change constraint and the RATELIMITED variable is set
equal to -1.0 to signal a 'low rate of change saturation'.

Algebraic controller
The algebraic controller is used when algebraic equations and logical expressions are required to
manipulate the input signals into a desired controller output. The algebraic controller issues a control signal
to a device (for example, a valve) or as an input signal to other controllers. Examples of use are:

 Valve opening depending on more than one signal and an algebraic expression.
 Valve opening depending on a logical expression.
 Activation/deactivation of controllers based on a logical expression.
 Non-linear transformation of a measured signal.

- 270 -
The OLGA model

Model description

The algebraic controller takes a number of input signals and combines these according to the specified
VARIABLEFUNCTION key.

The computed output signal is affected by maximum, minimum constraints and by rate of change
constraints (opening, closing time or stroke time). See Constraining the controller output and Actuator time
of controlled device.

How to use

Connect the required input signal(s) to the INPSIG_1..N terminal(s). Specify the operators to act on the
input signal(s) in the VARIABLEFUNCTION key. Connect the controller output signal CONTR_1..N to a
device variable.

The figure below shows how multiple controller blocks can be combined in one algebraic controller.

ASC controller
The main purpose of the ASC unit, is to prevent a compressor from operating to the left of the surge line in
a compressor performance map. For more information, see the following figures: Figure 83 Compressor
characteristic diagram, Figure 84 Recirculation loop and Figure 88 Anti Surge Controller.

Model description

An ASC should be able to open the recirculation valve very fast to prevent a dangerous surge condition.
This can be achieved by choosing a high amplification factor for the ASC and selecting a recycle valve with
a short stroke time. But the ASC must also be capable of managing a situ-ation where the compressor inlet
or discharge is closed. The high amplification factor could give excessive compensation, which would
cause the recirculation valve to hunt between open and closed position and aggravate the surge due to

- 271 -
OLGA User manual

pressure and flow pulsation. Therefore, it is necessary to have a controller that can operate on a non-linear
control algorithm. In essence, the controller applies one level of amplification and integral action to a
positive error input signal and a different level of amplification and integral action to a negative error input
signal. In this way, the recycle valve can be opened rapidly while an inertia is imposed when it is closed
again.

The ASC unit uses a standard PID controller formula, except that it allows for two different controller
amplifications (AMP1 and AMP2) that are necessary when operating on a non-linear control algorithm.
AMP1 is used when the deviation parameter (e, see equation (61) in PID - Model description) is negative
(left of anti surge control-line in the compressor performance map) and AMP2 when it is positive. The anti
surge control-line is the setpoint for the ASC unit and is calculated by multiplying the compressor surge
flow at different RPM's with a constant security factor specified by the user through the compressor input
group, COMPRESSOR (that is, a security factor of 1.2 means that the set point for the ASC unit is 20%
higher than the surge flow). The surge flow at different RPM's, is specified in the compressor data file. The
surge flow increases with increasing RPM, which means that the setpoint for the ASC unit is not constant.

By using a large AMP1 and a (corresponding) small AMP2, the anti surge control valve is forced to a rapid
opening whereas the closing operation is more relaxed. Figure 88 shows the ASC application.

Figure 88 Anti Surge Controller

The cascade controller uses the PID algorithm, see Proportional Integral Derivative (PID) Algorithm. The
ASC controller has the same functionality as the PID controller, in addition to the functionality described in
this section. See PID controller.

How to use

1. Connect the compressor output (QGSURGE) to the ASC controller setpoint (SETPOINT). (Connect
the compressor CONTR to the ASC setpoint and specify QGSURGE as variable.) This is the volume
flow (default unit m3/s) at predicted surge multiplied with a security factor. The security factor is given
in the compressor SECURITYFACTOR key.
2. Put a transmitter at the same section boundary as the compressor. Connect the gas volume flow QG
to the ASC controller measurement terminal (MEASRD). Make sure that QG and QGSURGE have the
same units. The MEASRD terminal must be connected.
3. Connect the ASC controller output to the Compressor ASVSIG input terminal.

- 272 -
The OLGA model

Figure 89 shows the connection possibilities of the ASC controller.

Figure 89 ASC controller connection terminals

Cascade controller
The purposes of a cascade control loop are to:

1. reduce the effects of some disturbances


2. improve the dynamic performance of the control loop

Cascade control is used when there are disturbance associated with the manipulated variable, or when the
final control element exhibits nonlinear behavior. To achieve this, cascade control utilizes multiple
feedback loops.

Examples of use:

Level control in a separator. The separator holdup changes are slow compared to flow dynamics. See
Figure 90 Cascade control.

Temperature control when two fluid flows are heat exchanged. The temperature dynamics are slow
compared to the flow dynamics.

Model description

As illustrated below in Figure 90, a cascade control uses two (or more) controllers with the output of the
primary controller changing the setpoint of the secondary controller. The output of the secondary controller
regulates the control device, here the drain valve.

Figure 90 Cascade control

The OLGA cascade controller represents the inner loop. That is, the secondary controller shown in Figure
90. The cascade controller uses the PID algorithm, see Proportional-Integral-Derivative (PID) Algorithm.
See also the PID Controller Model description on page 280. The Cascade controller has the same
functionality as the PID controller, in addition to the functionality described in this section.

- 273 -
OLGA User manual

The cascade controller can be in normal or extended mode. The difference between the two is how the
setpoint of the secondary controller is determined.

For the normal cascade controller, the setpoint of the secondary controller is determined by the output of
the primary controller:

where S is the setpoint of the secondary controller, Smin is the minimum setpoint, Smax is the maximum
setpoint and Cp is the output from the primary controller.

For the extended cascade controller, the setpoint is calculated differently:

where

if

if

Sn setpoint of the secondary controller at the current time point

Sn-1 setpoint of the secondary controller at the previous time point

Cp output from primary controller

Cp,min minimum of output from primary controller

Cp,max maximum of controller output from primary controller

Ps setpoint of the primary controller

dt numerical time step (tn - tn-1)

PM moving averaged of the primary controller variable P

Tav user defined (moving) averaging time period

C constant that can take two different values

C1 user defined constant

C2 user defined constant

Cswitch user defined constant

For the level control as illustrated above, suppose the separator pressure increases. The pressure drop
over the drain valve is larger, so the liquid flow increases. With a single level controller, the drain flow rate
is not corrected until the increased drain flow decreases the liquid level. Thus, the separator pressure
disturbs both the liquid level and the liquid drain rate.

- 274 -
The OLGA model

With the cascade control loop, the flow controller (secondary controller) immediately sees the change in
the flow rate and correct the valve opening to return the drain flow rate to the setpoint set by the level
controller. Thus it gives a better control on the liquid level and a smoother liquid drain rate.

How to use

The cascade control loop is built as two separate PID controllers, where the output from the primary
controller is used as a setpoint of the secondary controller.

The cascade controller requires that the measurement terminal (MEASRD) and the setpoint terminal
(SETPOINT) are connected.

Figure 91 shows the connection possibilities of the Cascade controller.

Figure 91 Cascade controller connection terminals

Note: Secondary loop process dynamics should be at least four times faster than primary loop process
dynamics.

ESD controller
Emergency-Shut-Down (ESD) logics are used to avoid damage on the process equipment and the
pipeline. As an ESD controller closes, output goes from 1 to 0, when a measured process variable rises
above (or fall below) a safety limit.

The ESD controller is used to model safety control systems.

Example of use

Shutdown of a pump downstream a separator. If the liquid level in a separator becomes too low, gas might
flow in the pump feed. Gas in the feed might damage the pump.

Model description

Under normal operation the ESD controller output is set to the maximum value (fully open), as opposed to
PSV where the output is set to the minimum value (closed) in normal operation. The purpose with the ESD
controller is then to drive the controller output to the minimum value within the controller stroke time when
a certain situation occurs. Normally, the controller is connected to an emergency shutdown valve and then
the result of the controller action is to close the valve.

If the key OPENMODE is set to ABOVE, the controller monitors the measured variables and compares
them to the corresponding setpoint variables. If one or more measured variable goes above the setpoint,
the ESD controller performs its action and drives the output to the minimum value specified in key
MINSIGNAL. If key RESET is specified, the ESD controller resets its output to the value specified by the

- 275 -
OLGA User manual

key MAXSIGNAL, when all measured variables become less than the reset value (that is, the controller
opens the valve connected to the controller). Figure 92 shows the behavior of the ESD controller when key
OPEMMODE is set to ABOVE, SETPOINT is 80 and RESET is 30. The measured variable (controller
input) is shown in red and the corresponding controller output is shown in black.

Figure 92 SD with opening mode above, setpoint equal to 80 and reset equal to 30.

If the key OPENMODE is set to BELOW, the controller monitors the measured variables and compares
them to the corresponding setpoint variables. If one or more measured variable goes below the setpoint,
the ESD controller performs its action and drives the output to the minimum value specified in key
MINSIGNAL. If key RESET is specified, the ESD controller resets its output to the value specified by the
key MAXSIGNAL, when all measured variables become greater than the reset value (that is, the controller
opens the valve connected to the controller). Figure 93 shows the behavior of the ESD controller when the
key OPEMMODE is set to BELOW, SETPOINT is 30 and RESET is 80. The measured variable (controller
input) is shown in red and the corresponding controller output is shown in black.

- 276 -
The OLGA model

Figure 93 ESD with opening mode below, setpoint equal to 30 and reset equal to 80.

Note: To obtain the desired hysteresis effect built into the controller, the value given in the key
SETPOINT should be greater than RESET when opening mode (OPENMODE) is above. When opening
mode (OPENMODE) is below, the value given in the key RESET should be greater than SETPOINT to
obtain hysteresis effect.

The controller output signal is limited with stroke time. See Actuator time of controlled device.

How to use

1. Connect the measured value (for example, a pressure). The MEASRD terminal must be connected.
2. The ESD output is typically connected to some process equipment or a pressure driven source/leak.
3. Set the setpoint where the controller should close. If the controller must open automatically, enter a
reset value.
4. Include sufficient hysteresis for the reset value compared to the setpoint value. In this way, a situation
where the ESD output oscillates is avoided. That is, a situation where the ESD closes in one time
step, opens the next, closes again in the next, and so on.

Note: To obtain the desired hysteresis effect built into the controller, the value of SETPOINT must be
greater than RESET when the opening mode (OPENMODE) is set to above. When opening mode
(OPENMODE) is below, RESET should be greater than SETPOINT.

- 277 -
OLGA User manual

Figure 94 shows the connection possibilities of the ESD controller.

Figure 94 ESD controller connection terminals

Manual controller
The manual controller is used to simulate the actions of an operator. The manual controller issues a
control signal to a device (for example, a valve).

Model description

The manual controller takes a setpoint as an internally defined time series, or as a input signal. The
changes in setpoint are applied immediately. That is, the setpoint changes in a step wise manner.

The input signal is filtered through with stroke time limitations. This can be avoided by setting a low stroke
time. See Actuator time of controlled device.

How to use

Give the required setpoint changes, and connect to a device variable.

The manual controller does not require any of the signal terminals to be connected. Figure 95 shows the
possible connections of the manual controller.

Figure 95 Manual controller connection terminals

Override controller
The Override controller acts as a minimum or maximum operator on its input. It can be configured to select
the lowest or highest value among several inputs.

Model description

The override controller can be a low select or high select operator. The override controller requires one or
more input signals. The input signals can come from any other output terminal. In low select mode, the
minimum input signal is selected as the final output signal from the unit. A typical application of the
controller unit in a process model is shown in Figure 96.

- 278 -
The OLGA model

Figure 96 Double PID controller used as a turbine speed controller

Here the output signal from two pressure controllers (PC) is connected as input to the override controller.
One of the pressure controllers is controlling the suction pressure before the first compressor stage, and
the other is controlling the pressure downstream of the second compressor stage. In normal oper-ation,
the speed is controlled by the suction pressure controller, but in situations where the outlet pressure
approaches the maximum operating pressure, the speed is controlled by the high pressure controller.

Figure 97 shows a typical application of the override controller (OC) with input signal from three controllers
in a process model. The override controller is in low select mode. The flow controller (FC) is controlling the
flow downstream of the control valve (choke), while the pressure controllers (PC) are controlling the
pressures upstream and downstream of the control valve. In normal operation, the valve is controlled by
the flow controller. In situations where the pressure downstream of the control valve approaches the
maximum operating pressure (set-point for downstream pressure controller), the valve is controlled by the
high-pressure controller. In situations where the pressure upstream of the control valve approaches the
minimum operating pressure (set-point for upstream pressure controller), the valve is controlled by the low-
pressure controller.

Figure 97 Triple PID controller used as flow regulator

The output signal is limited with stroke time. See Actuator time of controlled device.

- 279 -
OLGA User manual

How to use

Select the mode of operation by setting SELECTIONMODE. Connect the signals the override controller
should operate on.

The Override controller requires that at least one input terminal is connected.

Figure 98 shows the connection possibilities of the Override controller.

Figure 98 Override controller connection terminals

Note: When there are fewer variables to manipulate than there are variables to control, the controllers
(or measurements) of the controlled variables must share the manipulated variables.

PID controller
The main function of a PID controller is to maintain process parameters within specified bounds by
controlling process equipment parameters such as valve opening and compressor speed.

A typical application of a PID controller in a process model is to control a separator level (Figure 99) and it
is then called a level controller. The input process parameter is the liquid level in the separator and the
output signal from the controller is used to control the opening of a drain valve. The controller can
alternatively have flow, pressure, and so on, as input signal, and is then called a flow controller, a pressure
controller and so on.

Figure 99 PID controller used as a level controller

Model description

The PID controller uses the Proportional-Integral-Derivative (PID) Algorithm, see below.

The PID controller limits the output with the stroke time of the connected device (for example, Valve). See
Actuator time of controlled device on page 269.

The controller uses anti-windup. When the controller reaches maximum or minimum output (saturates), the
integral is kept to a proper value so that the controller is ready to resume action, as soon as the control
error changes. The anti-windup used is a tracking/back calculation scheme.

Transfer between setpoint modes are made bumpless. When the setpoint mode change, the integral term
is corrected to remove a sudden jump in the controller output.

- 280 -
The OLGA model

If the PID controller output is connected to a Selector or an Override controller, it might become inactive.
See Selector controller on page 289 and Override controller on page 278. There are four different modes
for the controller when it becomes inactive. The Selector or Override controller automatically sets the PID
controller in an active/inactive state.

Actions taken when the controller becomes inactive (keyword INACTIVEMODESUBC):

 ONHOLD

Restore old values, everything is on hold.

 INTERLOCK

The PID controller get feedback on the output signal used (uused) from the connected controller (Selector or
Override). If the PID controller becomes inactive, it uses uused to back-calculate its integral error.

 DEFAULTINPUT

Compute output signal based on default input, given in key DEFAULTINPUT.

 NORMAL

No action for normal mode.

Proportional Integral Derivative (PID) Algorithm

A PID algorithm can be formulated mathematically as:

(60)

(61)

where x is the input process parameter (pressure, level, and so on),  is the time constant, u is the output
signal from the controller, t is the time and bias the initial value. The subscript 'stp' is the set point (or
reference point), i is the integral, d is the derivative and '0' is the time at start of simulation.

The amplification factor Kc is a dimensioned quantity. If the option with normalized amplification factor is
used, the program will calculate Kc using the range given with the following expression:

For non-linear controllers, Kc, i, d can be given in tabular form as a function of the error signal e. An error
e is then given as a vector (keyword input). The PID parameters keys for K c, i and d must be specified as
vectors with the same dimension as e. The controller parameters are found by linear interpolation in the
actual controller error, e. The non-linear controller option is activated when the PID parameters are given
as vectors, and not as single values.

By using this general formula, simpler controllers as P and PI controllers can be defined by giving proper
values to the time constants in the PID formula. The table below shows time constants for simpler
controllers.

- 281 -
OLGA User manual

Table 7 Time constants for P, PI and PD controllers

Time constants d i

P controller 0.0 109

PI controller 0.0 < 108

PD controller > 0.0 109

This controller formula is frequently referred to as a standard PID controller in the manual.

How to use

The PID controller requires a measurement value to be connected to the controller. (Signal terminal
MEASRD). The setpoint must be given in the key SETPOINT, or connected to the SETPOINT input
terminal.

Figure 100 shows the connection possibilities of the PID controller.

Figure 100 PID controller connection terminals

PID controller example

Three parameters are at our disposal for tuning a PID controller: Kc, d and i. However, for petroleum
applications  d is rarely used (d = 0), because there is usually quite a lot of noise on the input process
signal. This results in rapid oscillations in the derivative of the signal, and if the derivative term in the
controller equation were included this would result in oscillations in the controller output, which is not
desirable.

We have the following relation between the symbols used in this description and the OLGA input variables
in the CONTROLLER keyword:

Kc AMPLIFICATION

d DERIVATIVECONST

i INTEGRALCONST

bias BIAS

x VARIABLE

xstp SETPOINT

- 282 -
The OLGA model

Note: The stroke-time of the controller valve (defined through STROKETIME) does not directly influence
the controller output as discussed here. However, the opening and closing speed of the controller valve
is limited by the stroke-time. That is, if the stroke-time is given as 100 s, the opening of the valve at
maximum changes by 1% per second.

Level control

A typical application of a level controller is shown in Figure 99 PID controller used as a level controller.
The change in the liquid volume fraction in the vessel is given by

where Qin [m3/s] is the liquid volume flow into the vessel, Qout [m3/s] is the liquid volume flow out of the
vessel and V [m3] is the volume of the vessel. The flow out of the vessel can be written

where Qmax is the maximum flow when the controller is fully open.

For the current case, the error (equation (61) in Model description on page 280) is defined as liquid volume
fraction minus the volume fraction at the setpoint, and the derivative time constant is set to zero. Taking
the time derivative of the above two equations with the use of the control equation (equation (60) in Model
description on page 280), the following differential equation is obtained

Where f(t) is a disturbance that the control system should compensate for. Casting it into the standard form

we get the time constant of the control loop

and the damping coefficient

Kc must be positive for p and z to be real numbers. The figure below shows the performance of control
loop for different damping constants for a step disturbance at t = 0 (f(t) has a step increase). This could, for
instance, be that the setpoint of the level control is changed.

- 283 -
OLGA User manual

Figure 101 Response of level control to step disturbance.

From this figure, you can see that a damping coefficient from 0.5–0.7 gives satisfactory results for level
control. Therefore, you can use the following procedure to select the parameters for level control:

1. Size the drain valve so that it can deliver Qmax = two times the normal drain rate for the pressure
difference between separator pressure and backpressure of the drain valve.
2. Set Kc < 2 and choose i (the integral time constant) to make the damping coefficient between 0.5 and
0.7.

Flow control

Assuming constant upstream and downstream pressure over the valve, the flow rate can be written as:

where:

F = flow rate (mass or volumetric flow rate)

Fmax = max flow rate through the fully open valve at the given pressure drop

u = output signal from controller

- 284 -
The OLGA model

Taking the time derivative of the above equation and using the control equation we obtain

or

For the solution to be stable, Kc must be negative. The time constant of the solution is

Figure 102 shows the response of the flow to a step change in, for example, setpoint (f(t) has a step
increase).

Figure 102 Response of flow control to step disturbance.

The shorter the time constant, the faster the response goes to the setpoint. One could use the following
procedures to select the controller parameters for flow control.

1. Estimate the upstream and downstream pressure over the control valve at the design flow rate. If the
pressure difference is less than, for example 0.2 bar, adjust the upstream or downstream pressure so
that the difference is at least 0.2 bar. This is considered a convenient pressure drop over a valve
being used for flow control.
2. Size the valve so that it can deliver maximum flow rate = 2 times the designed value for the same
pressure drop over the valve.

3. Set with A ranging from 1 to 10.


4. p can be selected from the above chart, depending on how fast you want the flow rate to reach e.g.
90% of the set point. When p has been chosen i is found from the definition of p.
5. By choosing a different A, the same p can be obtained for a different i.

- 285 -
OLGA User manual

PSV controller
A Pressure-Safety-Valve (PSV) typically opens fast when the pressure rises above a defined value. When
the valve is opened, the pressure is relieved. The safety valves are included to avoid damage on the
process equipment and the pipeline.

The PSV controller and a valve (or source) simulates the behavior of the Pressure-Safety-Valve.

Model description

Under normal operation, the PSV controller output is set to the minimum value (closed), as opposed to
ESD where the output is set to the maximum value (fully open) in normal operation. The purpose with the
PSV controller is then to drive the controller output to the maximum value within the controller stroketime
when a certain situation occurs. Usually, the controller is connected to a pressure safety valve and then
the result of the controller action is to open the valve.

If the key OPENMODE is set to ABOVE, the controller monitors the measured variables and compares
them with the corresponding setpoint variables. If one or more measured variable goes above the setpoint,
the PSV controller performs its action and drives the output to the maximum value specified in key
MAXSIGNAL. If key RESET is specified, the PSV controller resets its output to the value specified by the
key MINSIGNAL, when all measured variables become less than the reset value, that is, the controller
closes the valve connected to the controller. Figure 103 shows the behavior of the PSV controller when
key OPEMMODE is set to ABOVE, SETPOINT is 80 and RESET is 30. The measured variable (controller
input) is shown in red and the corresponding controller output is shown in black.

Figure 103 PSV with opening mode above, setpoint equal to 80 and reset equal to 30.

- 286 -
The OLGA model

If the key OPENMODE is set to BELOW, the controller monitors the measured variables and compares
them with the corresponding setpoint variables. If one or more measured variable goes below the setpoint,
the PSV controller will perform its action and drive the output to the maximum value specified in key
MAXSIGNAL. If key RESET is specified, the PSV controller will reset its output to the value specified by
the key MINSIGNAL, when all measured variables become greater than the reset value, e.g. the controller
will close the valve connected to the controller. Figure 104 shows the behavior of the PSV controller when
key OPEMMODE is set to BELOW, SETPOINT is 30 and RESET is 80. The measured variable (controller
input) is shown in red and the corresponding controller output is shown in black.

Figure 104 PSV with opening mode below, setpoint equal to 30 and reset equal to 80. To obtain the
desired hysteresis effect built into the controller, the key SETPOINT must be greater than RESET
when opening mode (OPENMODE) is above. When opening mode (OPENMODE) is below, RESET
must be greater than SETPOINT to obtain hysteresis effect.

The controller output signal is limited with stroke time. See Actuator time of controlled device.

How to use

1. Connect the measured value (for example, a pressure). The MEASRD terminal must be connected.
2. Connect the PSV controller output to a valves, pressure driven sources or leaks.
3. Set the setpoint where the controller should open. If the controller should automatically close, enter a
reset value.
4. Include sufficient hysteresis for the reset value compared to the setpoint value to avoid a situation
where the PSV output oscillates. That is, a situation where it opens in one time step, closes the next,
opens again in the next, and so on.

Note: To obtain the desired hysteresis effect built into the controller, the key SETPOINT must be
greater than RESET when opening mode (OPENMODE) is above. When opening mode
(OPENMODE) is below, RESET must be greater than SETPOINT.

- 287 -
OLGA User manual

5. Change the default OPENMODE to BELOW if the controller must open when the measurement falls
below the setpoint.

Figure 105 shows the connection possibilities of the PSV controller.

Figure 105 PSV controller connection terminals

Scaler controller
The scaler controller is used to scale input signals linearly from an input range to an output range. The
scaler controller issues a control signal to a device (for example, a valve) or as an input signal to other
controllers. The scaler controller can be used to

 scale controller output signal from range 0 - 100% to input valve signal range 0–1.
 scale signal from transmitter range to controller input range.
 limit transmitter signal to stay in configured range.

Model description

The scaler controller scales the input signal linearly from the input range (LOWLIMIT to HIGHLIMIT) to the
output range (MINSIGNAL to MAXSIGNAL).

u = (MAXSIGNAL-MINSIGNAL) / (HIGHLIMIT - LOWLIMIT) * (y - LOWLIMIT) + MINSIGNAL

where

y: measured variable

u : unconstrained output

The computed output signal is affected by maximum, minimum constraints and by rate of change
constraints (opening, closing time or stroke time), see Constraining the controller output and Actuator time
of controlled device.

How to use

Connect the required input signal to the MEASRD terminal. Specify input range and the output range by
setting LOWLIMIT, HIGHLIMIT and MINSIGNAL, MAXSIGNAL keys. Connect the controller output signal
CONTR_1..N to a device variable.

- 288 -
The OLGA model

The figure below shows transformation of input to output through a scaler controller C.

Selector controller
A SELECTOR controller is a controller that uses two sub-controllers that are selected based on the value
of selected variables relative to low and high limits of these variables. The controller operates as a kind of
hysteresis controller, selecting the signal from one of the sub-controllers, and using this sub-controller until
the low (or high) variable limit is reached. Then the controller selects another sub-controller, and keeps it
until the high (or low) variable limit is reached.

Model description

The controller algorithm is best described by an example:

Figure 106 shows a system that consists of a pipeline with a separator. The separator has liquid and gas
valves attached to it, in addition to an emergency liquid drain valve. In addition, there is a separator inlet
valve having a fixed opening. Upstream of the separator, at some distance from it, is a gamma
densitometer used for measuring the local liquid volume fraction.

- 289 -
OLGA User manual

Figure 106 Separator using SELECTOR controller to control the liquid outlet valve.

We want to control the separator level by controlling the liquid level in the separator with a level PID
controller. As long as the liquid level is below a given value, we want the controller to act slowly /
moderately fast. If a liquid slug arrives, we want the level control on the separator liquid outlet to be faster
to prevent the level from increasing to very high levels. This means that for normal operation we have a
moderately fast PID level controller, and for transient operation (when a slug arrives) we have a fast PID
operation.

In addition, a gamma densitometer is placed at some distance from the separator inlet. When the time-
averaged signal from the meter reaches a certain limit, a slug is expected to arrive. We also want this to
trigger a faster operation of the separator liquid valve.

Our control structure for the separator liquid outlet valve is then:

Normal operation:

1. Slow separator liquid level controller used to control the liquid outlet valve.
2. If the separator liquid level reaches a given high level, or the time averaged gamma densitometer
signal becomes higher than a given limit, the fast separator liquid outlet valve controller takes over.

Transient operation:

1. The fast liquid valve controller that is controlled by the separator liquid level is acting.
2. If the separator liquid level drops below a given low limit, the slow / normal separator liquid level
controller starts controlling the liquid outlet valve. The operation is back to normal.

There is no restriction on the number of variables that can be used for switching between the sub-
controllers. The variables and their low and high limits are given as input to OLGA.

If the sub-controllers are PID controllers, the integral term of the non-acting controller can be saved
(interlocked), reset to zero, or still be integrated. You can determine this in the input to the OLGA sub-
controllers.

- 290 -
The OLGA model

How to use

1. Connect one or more limit signals (HIGHLIMITSIG/LOWLIMITSIG).


2. Define the controller used at start of simulation (keyword INITIALCONTROLLER).
3. Define the limits where the Selector controller changes its output (LOWLIMIT, HIGHLIMIT).
4. Connect the controller used below LOWLIMIT (SUBCONLOW), and the controller used above
HIGHLIMIT (SUBCONHIGH).

Figure 107 shows the connection possibilities of the Selector controller.

Figure 107 Selector controller connection terminals

Note: When there are fewer variables to manipulate than there are variables to control the controllers
(or measurements) of the controlled variables need to share the manipulated variables.

STD controller
The controller converts mass flow rate to volumetric flow rate at standard conditions.

Model description

The controller converts mass flow rate to volumetric flow rate at standard conditions.

Fluid properties are calculated from the given fluid table (FLUID), or composition (FEEDNAME) at standard
conditions.

Note: Standard conditions; pressure = 1 atm and temperature = 60 °F (~15.5 °C).

If neither of GOR/CGR/WGR/WATERCUT/MOLWEIGHT is given, the fluid table/composition phase


distribution at standard conditions will be used to calculate the overall mass flow rate.

- 291 -
OLGA User manual

How to use

To convert from mass flow at to volumetric flow rate at standard conditions:

1. Set correct phase in PHASE key.


2. Specify the fluid in the FLUID or FEEDNAME keys.
3. Specify the wanted GOR/CGR/WGR/WATERCUT/MOLWEIGHT, and the volumetric flow rate at
standard conditions are calculated.

Switch controller
The main purpose of the switch controller is to switch between alternative inputs values. The output of the
controller is selected based on the setpoint in MODE = AUTOMATIC or SETPOINT terminal if MODE =
EXTERNALSETPOINT.

Model description

The output of the switch controller is selected based on the setpoint in MODE = AUTOMATIC or
SETPOINT terminal if MODE = EXTERNALSETPOINT.

SP < 1.5 unconstrained output A is set equal to controller at terminal INPSIG_1

1.5 <= SP < 2.5 unconstrained output A is set equal to controller at terminal INPSIG_2

2.5 <= SP < 3.5 unconstrained output A is set equal to controller at terminal INPSIG_3

(N-0.5) <= SP unconstrained output A is set equal to controller at terminal INPSIG_N

Where N is the number of connected input terminals INPSIG_1..N

The computed output signal is affected by maximum, minimum constraints and by rate of change
constraints (opening, closing time or stroke time).

See Constraining the controller output and Actuator time of controlled device.

How to use

1. Connect the required input signal(s) to the INPSIG_1..N terminal(s).


2. Specify the SETPOINT key or connect the SETPOINT terminal.
3. Connect the controller output signal CONTR_1..N to a device variable.

The figure below shows how INPSIG_1..4 is connected to CONTR.

- 292 -
The OLGA model

Table controller
The table controller makes it possible to tabulate a relation between the controller input and the controller
output, for example, when there is a non-linear relation for a process variable.

Model description

A table controller uses the input variables as lookup variable, x, in a table, u = f(x). The controller output is
u.

It is possible to use nested tables, that is; u = f(g(x)). This is done in the table definition, where one table
can reference another. The result from interpolating one table is used to interpolate in another.

How to use

1. Define a table, with XVARIABLE and YVARIABLE set to NOTGIVEN. Reference the table in the
controller definition.
2. Make the input signal available from a transmitter with the correct units, and connect to the controller.
The table controller requires that the input signal (INPSIG) terminal is connected.

Figure 108 shows the connection possibilities of the table controller.

Figure 108 Table controller connection terminals

Note: The table controller is limited to one variable tables. It is only possible to calculate u = f(x 1), and
not u = f(x1,x2) and so on.

Transmitter
Transmitters are used to provide measured values from flowpaths, process equipment, nodes, separators
and phase split nodes to be used together with controllers. All output signals, apart from output signals
from controllers, need to be defined using transmitters.

Model description

The transmitter creates a trend object and update the signal terminal every time step. That implies that
every variable available for trending is available from a transmitter.

The signal is converted to user specified units. If no unit is given, the value is given in SI units.

One transmitter can measure only one variable. However, it can transmit to an arbitrary number of
controllers (from a single position).

How to use

The transmitter is positioned on a flowpath, node, separator or a phase split node. Make the connection
between the transmitter, and the receiving signal terminal. The variable and unit are defined in the
transmitter keyword.

After making a connection from the transmitter (ex. OUTSIG_1), a new terminal is made available (ex.
OUTSIG_2) that transmits the same signal.

Note: One transmitter can only transmit one variable.

- 293 -
OLGA User manual

OLGA extensibility
OLGA enables you to use extensions to expand the catalog of models available. OLGA extensions are
managed by the OLGA GUI, as described in the OLGA GUI User manual.

The extensibility framework of OLGA enables you to deploy the following types of models:

 Flow models to be used by the steady-state preprocessor


 Particle flow models

Extensions integrate seamlessly to OLGA, both in use and performance. As for any other model, they can
be used both from the OLGA GUI and through the OLGA key file. The compatibility of the extensions
corresponds to the compatibility of the module they are extending.

To enable you to create OLGA Extensions, a Software Development Kit (SDK) is provided. The OLGA
SDK can be installed as a custom step when installing OLGA, as explained in the OLGA Installation guide.
More information on how to create extensions is provided in the SDK.

Note: The extensibility framework that is described here is not directly related to the plug-in interface
module described in OLGA Plug-in framework. However, in future the functionality available in the plug-
in interface module will be ported to the new extensibility framework.

How to use
When an extension is installed and enabled, it appears for you to select in any OLGA case. When an
extension is used, this is indicated in the output files generated. In particular, a watermark is shown when
you create plots using these files. This is to make it clear that the results obtained can have been
influenced by an extension.

Extensions are identified by the company name, the extension name, and the version number. This is used
as reference in the input (when choosing a model), as well as to identify any error or message coming from
the extension.

Any issues related to an extension must be addressed to the creator of the extension. You can access
more information about the extension developer and the extension model through the extension details in
the OLGA GUI.

Details about how to use Point Model type of extensions are given in Steady State Processor - How to
Use, while for Particle Flow extensions details are given in Particle Flow - How to Use.

- 294 -
The OLGA model

REFERENCES
[1] O. Baker and W. Swerdloff. Calculation of Surface Tension 6 - Finding Surface Tension of
Hydrocarbon Liquids. Oil & Gas Journal, 2 Jan. 1956.

[2] K.H. Bendiksen. An experimental investigation of the motion of long bubbles in inclined tubes. Int. J.
Multiphase Flow, 10(4):467-483, 1984. doi:10.1016/0301-9322(84)90057-0.

[3] A.T. Bourgoyne Jr., K.K. Millheim, M.E. Chenevert, and F.S. Young Jr. Applied Drilling Engineering.
SPE Textbook Series, Vol. 2. Society of Petroleum Engineers, Second Printing, 1991. ISBN 1-55563-001-
4.

[4] H.B. Bradley. Petroleum Engineering Handbook. Society of Petroleum Engineers, 1987. ISBN 1-
55563-010-3.

[5] J.M. Campbell. Gas Conditioning and Processing, Volume 1: The Basic Principles. Campbell
Petroleum Series, 1984. ISBN 9-99500-821-1.

[6] H. Chanson. Hydraulics of Open Channel Flow: An Introduction. Elsevier Butterworth Heinemann,
Second Edition, 2004. ISBN 0-75065-978-5.

[7] M. Cook and M. Behnia. Slug length prediction in near horizontal gas-liquid intermittent flow. Chem.
Eng. Sci., 55(11):2009-2018, 2000. doi:10.1016/S0009-2509(99)00485-6.

[8] R. Darby and J. Melson. How to predict the friction factor for flow of Bingham plastics. Chemical
Engineering, 28:59-61, 28 Dec. 1981.

[9] D. Biberg, G.,Staff, N. Hoyer, and H. Holm. Accounting for flow model uncertainties in gas-condensate
field design using the OLGA High Definition Stratified Flow Model. 17th International Conference on
Multiphase Technology, pp. 375-387. 10-12 June 2015, Cannes, France. ISBN: 978-1-85598-147-8

[10] J.R. Fagundes Netto, J. Fabre, P. Grenier, and L. Peresson. An experimental study of an isolated
long bubble in a horizontal liquid flow. 3rd Int. Conf. Multiphase Flow, Lyon, 8-12 June, Paper 654, 1998.

[11] J.R. Fagundes Netto, J. Fabre, L. Peresson, and P. Duchet-Suchaux, P. Evolution of the flow
structure in a horizontal two-phase slug flow. Two-phase Flow Modelling and Experimentation, Celata, G.
P., Di Marco, P. and Shah, R. K. (Eds.), Edizioni ETS, Pisa., II-723, 1999.

[12] Ø. Glasø. Generalized Pressure-Volume-Temperature Correlations. The Journal of Petroleum


Technology, 32(5):785-795, May 1980. doi:10.2118/8016-PA.

[13] R.E. Henry and H.K. Fauske. The Two-Phase Critical Flow of One-Component Mixtures in Nozzels,
Orifices, and Short Tubes. Journal of Heat Transfer, 93(2):179-187, May 1971. doi:10.1115/1.3449782.

[14] E.G. Hammerschmidt. Gas Hydrate Formations: A Further Study on Their Prevention and Elimination
from Natural Gas Pipe Lines. GAS, 15(5):30-35, May 1939.

[15] F.P. Incropera and David B. Dewitt. Fundamentals of Heat and Mass Transfer. Wiley, Fourth Edition,
1996. ISBN 0-471-30460-3.

[16] R.W. Johnson. The Handbook of Fluid Dynamics. CRC Press, First Edition, 1998. ISBN 3-540-
64612-4

[17] D.L. Katz, D. Cornell, J.A. Vary, R. Kobayashi, J.R. Elenbaas, F.H. Poettmann, and C.F. Weinaug.
Handbook of Natural Gas Engineering. McGraw-Hill Book Company, 1959. ISBN 0-07033-384-X.

- 295 -
OLGA User manual

[18] I.M. Krieger and T.J. Dougherty. A Mechanuism for Non-Newtonian Flow in Suspensions of Rigid
Spheres. Transactions of The Society of Rheology, 3(1):137-152, March 1959. doi:10.1122/1.548848.

[19] J.A. Lasater. Bubble Point Pressure Correlation. The Journal of Petroleum Technology, 10(5):65-67,
May 1958. doi:10.2118/957-G.

[20] C.J. Lawrence, J. Nossen, R. Skartlien, O. Sendstad, O. Skjaeraasen, J. Hua, L. Liu, K. Hald, T. Sira,
E. Holm, B. Hu, D. Biberg, P. Andersson, G. Staff, L. Wollebaek, J. Henriksson, T. Wangensteen, and Z.
G. Xu. Mechanistic models for three-phase stratified and slug flows with dispersions. 16th Int. Conf.
Multiphase Production Technology, pp. 283-196. 12-14 June 2013, Cannes, France. ISBN: 978-1-62993-
295-8

[21] J.C. Mantecon. The Virtual Well: Guidelines for the Application of Dynamic Simulation To Optimise
Well Operations, Life Cycle Design, and Production. Society of Petroleum Engineers, SPE-109829-MS.
SPE Annual Technical Conference and Exhibition. 11-14 Nov. 2007, Anaheim, California, U.S.A.
doi:10.2118/109829-MS.

[22] A. Matzain, A.S. Apte, H.-Q. Zhang, M. Volk, C.L. Redus, J.P. Brill, and J.L. Creek. Multiphase Flow
Wax Deposition Modeling. Proceedings of ASME ETCE Petroleum Production Technology Symposium. 5-
7 Feb. 2001, Houston, Texas, U.S.A.

[23] W.D. McCain. The Properties of Petroleum Fluids. PennWell Corp., Second Edition, 1990. ISBN 0-
878-14335-1.

[24] M. Nordsveen, R. Nyborg, and L. Hovden. Implementation of CO2 corrosion models in the OLGA
three-phase flow code. BHR Group. 9th International Conference, Multiphase '99, pp. 279-292. 16-18 June
1999, Cannes, France. ISBN 1-86058-212-5.

[25] R. Nyborg, P. Andersson, and M. Nordsveen. Implementation of CO2 Corrosion Models in a Three-
Phase Fluid Flow Model. NACE International, NACE-00048. CORROSION 2000. 26-31 March 2000,
Orlando, Florida, U.S.A.

[26] S. Olsen and A. Dugstad. Corrosion under Dewing Conditions. NACE. CORROSION/91, Paper No.
472. 11-15 March 1991, Cincinnati, U.S.A.

[27] R. Pal and E. Rhodes. Viscosity/Concentration Relationships for Emulsions. Journal of Rheology,
33(7):1021-1045, Oct. 1989. doi:10.1122/1.550044.

[28] K.S. Pedersen and H.P. Rønningsen. Effect of Precipitated Wax on Viscosity - A Model for Predicting
Non-Newtonian Viscosity of Crude Oils. Energy & Fuels, 14(1):43-51, 2000. doi:10.1021/ef9901185.

[29] T.D. Reed and A.A. Pilehvari. A New Model for Laminar, Transitional, and Turbulent Flow of Drilling
Muds. Society of Petroleum Engineers, SPE-25459, 1 Jan. 1993. doi:10.2118/25456-MS.

[30] R.C. Reid, J.M. Prausnitz, and B.E. Poling. The Properties of Gases and Liquids. McGraw-Hill,
Fourth Edition, 1989. ISBN 0-071-00284-7.

[31] E. Eng Johnsen and H.P. Rønningsen. Viscosity of ’live’ water-in-crude-oil emulsions: experimental
work and validation of correlations. Journal of Petroleum Science and Engineering, 38(1-2):23-36, May
2003.

[32] O.B. Rygg, A.K. Rydahl, and H.P. Rønningsen. Wax deposition in offshore pipeline systems. BHR
Group. 1st North American Conference on Multiphase Technology, pp. 193-205. 10-11 June 1998. Banff,
Canada. ISBN 1-86058-139-0.

- 296 -
The OLGA model

[33] S. Selmer-Olsen, H. Holm, K. Haugen, P.J. Nilsen, and R. Sandberg. Subsea Chokes as Multiphase
Flowmeters. BHR Group. 7th International Conference on Multiphase Production, pp. 441-466. 7-9 June
1995, Cannes, France. ISBN 0-85298-974-1

[34] Probjot Singh, Ramachandran Venkatesan, H. Scott Fogler, and Nagi Nagarajan. Formation and
aging of incipient thin film wax-oil gels. AIChE Journal, 46(5):1059–1074, May 2000.
doi:10.1002/aic.690460517.

[35] R.M. Turian, F.-L. Hsu, and T.-W. Ma. Estimation of critical velocity in pipeline flow of slurries.
Powder Technology, 51(1):35-47, June 1987.

[36] P.M. Ujang, L. Pan, P.D. Manfield, C.J. Lawrence, and G.F. Hewitt. Prediction of the translational
velocity of liquid slugs in gas-liquid slug flow using computational fluid dynamics. Multiphase Science and
Technology, 20(1):25-79, 2008. doi:10.1615/MultScienTechn.v20.i1.20.

[37] M.U. Vazquez and H.D. Beggs. Correlations for Fluid Physical Property Prediction. The Journal of
Petroleum Technology, 32(6):968-970, June 1980. doi:10.2118/6719-PA.

[38] H.W. Winkler and P.T. Eads. Algorithm for More Accurately Predicting Nitrogen-Charged Gas-Lift
Valve Operation at High Pressures and Temperatures. Society of Petroleum Engineers, SPE-18871-MS.
SPE Production Operations Symposium. 13-14 March 1989, Oklahoma City, Oklahoma, U.S.A.
doi:10.2118/18871-MS.

[39] F. White. Fluid Mechanics. McGraw-Hill Book Company, Second Edition, 1986. ISBN 0-070-66525-7.

[40] Hydraulic Institute. Effects of Liquid Viscosity on Rotodynamic (Centrifugal and Vertical) Pump
Performance. ANSI/HI 9.6.7-2010. ISBN 978-1-935762-04-01

[41] K.L.Decker (Otis Engineering Corp.) Gas-Lift Valve Performance Testing and Data Correlation. SPE
2544. 8(2) May 1993.doi:10.2118/22789-PA

[42] R. Nyborg, A. Dugstad, Top of line corrosion and water condensation rates in wet gas pipelines,
CORROSION/2007, paper no. 07555. Houston, Texas: NACE International, 2007. ISBN 0-7555-2007 CP

[43] G. Svenningsen, R. Nyborg, Modeling of top of line corrosion with organic acid and glycol,
CORROSION/2014, paper no. 4057. Houston, Texas: NACE International, 2014.

[44] S. D. Joshi, Horizontal Well Technology, PennWell, 2001.

[45] D.K. Babu and Aziz S. Odeh, Productivity of a Horizontal Well, SPE Reservoir Engineering 1989.

- 297 -
OLGA User manual

Server

OLGA OPC server


To consume data an OPC server, an OPC client is required. OLGA comes with a customized OPC client
for viewing and accessing data on the OLGA OPC server called OLGA Namespace Explorer (ONE). This
tool can be accessed from the OLGA Tools menu. In addition, several third- party vendors provide OPC
clients that can be used to access OPC servers such as the OLGA OPC server.

By default you need administrator privileges to run OLGA using the OPC server. In the OLGA installer,
there is an option to pre-install five OPC servers that can be run by non-administrator users. For more
information, see the OLGA Installation guide.

See the OLGA OPC server guide located in the Documentation folder in OLGA for more information.

Submodelling

Introduction
OLGA submodeling allows for greater flexibility when it comes to engineering of large scale models
covering a scope from well inflow to processing facilities. Typically, engineering of the different parts of a
production system is done by different engineering teams. Examples of such teams are; well engineering,
flow assurance and process engineering. When modeling and simulation of these subsystems have been
done by separate teams, the submodeling and scheduling functionality provides an efficient method for
integrating such models into larger models covering the full production system.

A great advantage with submodeling is that it can also lead to a faster execution of the OLGA simulation
compared with putting such models in one large OLGA case.

Example: You have a Well model and a Pipeline model. The Pipeline model has more sections and a
coarser grid (longer section lengths) than the Well model. This means that the Well model requires a
smaller time step than the Pipeline model (CFL-criteria). If you put the models in one large OLGA model,
all the sections in the Pipeline model are run at a small time step. This slows down the simulation. When
running submodeling, the individual models run on separate time steps enabling faster simulation
execution of the total model scope.

See the OLGA Submodeling guide located in the Documentation folder in OLGA for more information.

- 298 -
Reference manual

Reference manual

Keywords

CaseDefinition
ANIMATE (on CaseLevel)

This keyword generates the data needed by OLGA 3D Plot. The OLGA 3D Plot displays the liquid holdup
for two or three phases in a three dimensional view.

Key Type Parameter Description


set
Unit:( )
Default:[ ]

DTPLOT Real (s) Time interval between subsequent data printouts. DTPLOT should only be
given once in the input file, if given more than once, OLGA will use the last
value given.

CASE (on CaseLevel)

This keyword defines information about a simulation.

Key Type Parameter set Description

Unit:( ) Default:[ ]

AUTHOR String Author of the input file.

DATE String Date.

INFO String General information about the case.

PROJECT String Project name.

TITLE String Case title.

- 299 -
OLGA User manual

DTCONTROL (on CaseLevel)

This statement defines switches for stability control.

See time step control for more information.

Key Type Parameter set Description

Unit:( ) Default:[ ]

CFL Symbol [ON] The Courant-Friedrichs-Lewy (CFL) criterion based on the


flow velocity.

CFLFACTOR Real [0.8] Tuning factor for the CFL time-step criterion.

ENERGY Symbol <None> | ON | Time-step control based on change in energy from one time
[OFF] step to the next.

ENERGYFACTOR Real [0.05] Tuning factor for energy change time-step criterion.

GRADPRESSURE Symbol <None> | ON | Time-step control based on the first-order derivative of


[OFF] pressure w.r.t. time.

MASS Symbol <None> | ON | Time-step control based on change in mass from one time
[OFF] step to the next.

MASSFACTOR Real [0.05] Tuning factor for mass change time-step criterion.

PREFACTOR Real [0.8] Tuning factor for pressure time-step criterion.

PRESSURE Symbol [OFF] Time-step control based on the second-order derivative of


pressure w.r.t. time.

RHEOLOGY Symbol <None> | ON | Time-step control based on change in viscosity from one
[OFF] time step to the next.

RHEOLOGYFACTOR Real [0.5] Tuning factor for viscosity change time-step criterion.

SOUND_CFL Symbol [OFF] Time-step control based on the speed of pressure waves.

VELFRONT Symbol <None> | ON | Time-step control based on propagation of velocity change


[OFF] in section from one time step to the next.

VELFRONTFACTOR Real [0.05] Tuning factor for propagation of velocity change time-step
criterion.

- 300 -
Reference manual

Signal connections - Input

Name Description

CFLFACTOR

ENERGYFACTOR

MASSFACTOR

PREFACTOR

RHEOLOGYFACTOR

VELFRONTFACTOR

ECLIPSEOPTIONS (on CaseLevel)

ECLIPSEOPTIONS contains options related to the coupling of OLGA with the ECLIPSE reservoir
simulator.

The keys are only active if OPTIONS RESERVOIRMODEL=ECLIPSE.

Note: The keys affect the numerical properties of the wellbore-reservoir interaction only, they have no
effect on the numerical solution of the reservoir equations solved internally in ECLIPSE.

Key Type Parameter Description


set
Unit:(
) Default:[ ]

COUPLINGLEVEL Integer [2] Size of the reservoir implicit region. Minimum value allowed=1,
maximum=10. A large value can improve the numerical stability
but will require more computational time than a smaller value. A
typical value is between 1 and 5.

MAXRESFLOWITER Integer [3] Maximum number of iterations on flow between reservoir and
wellbore. Minimum value allowed=1, maximum=10.

TOLRESFLOW Real [0.5] Tolerance (in bara) to use in the computation of flow sensitivities.
Minimum value allowed=0.001, maximum=1.

- 301 -
OLGA User manual

EVENTLOGGING (on CaseLevel)

Key Type Parameter set Description

Unit:( ) Default:[ ]

EVENTFILE String File with previously recorded events to play back.

EXPOSE SymbolList States which keys should be made available as input


variables on the OPC server. Only keys that are
explicitly set can be exposed. To use the default
value, you must define this explicitly..

PLAYEVENTS Symbol ON | [OFF] Enables or disables the playback functionality

RECORDEVENTS Symbol <None> | ON | Turns on or off logging of external inputs to the


USERINPUTONLY | simulator. Must be ON or USERINPUTONLY if later
[OFF] playback for reproducibility of simulation results
should be possible. OFF: Nothing is logged.
USERINPUTONLY: External user input is logged
(excluding input from an OLGA scheduler). ON: All
external input is logged (including input from an OLGA
scheduler).

FILES (on CaseLevel)

This statement defines the additional input files, e.g., PVT lookup table files for fluid properties, pump
data table files, compressor table files, feed file for the Compositional Tracking model and wax file for
the wax deposition model.

Several files can be listed for COMPRESSORFILE, PUMPFILE and PVTFILE.

For definition of a restart file, click here.

If drilling fluids are used and the fluid properties are given in files, these are specified as additional files in
the PVTFILE key.

Key Type Parameter Description


set
Unit:( )
Default:[ ]

COMPRESSORFILE StringList Name of COMPRESSOR file(s). The files can contain several
compressors each.

ECLIPSEFILE String Name of ECLIPSE input file

ESPDBFILE String Name of ESP (Electric Submersible Pump) database file. One
file can contain multiple pumps.

FANNFILE StringList Name of the file containing Fann readings.

- 302 -
Reference manual

FEEDFILE String Name of FEED file (used by Compositional Tracking). Select a


file with extension .mfl for the Multiflash PVT package. Note
that only one file may be specified.

PUMPFILE StringList Name of PUMP file(s). Each file can contain only one pump.

PVTFILE StringList Name of the file(s) containing fluid properties.

RHEOLOGYFILE StringList Name of the file containing the rheology table.

UDFEEDFILE String Name of User Defined (UD) feed file (used by the Plug-in
module). Note that only one file can be specified. The file can
contain several feeds.

UDPVTFILE StringList Name of User Defined (UD) property file (used by the Plug-in
module)

VPCFILE String Name of VPC (Valve Performance Clearinghouse) database


file

WAXFILE String Name of the file containing the WAX table. Note that only one
wax table can be specified.

INTEGRATION (on CaseLevel)

This statement defines the start and end times of the simulation. It also defines the start value, the
maximum value and the minimum value of the time step.

A controller can be used to setup a conditional stop of the simulation before the specified end time. The
simulation stops when the signal from the controller is zero.

Key Type Parameter set Description

Unit:( ) Default:[ ]

DTSTART Real (s) Initial time-step.

ENDCONTROLLER Symbol PIDCONTROLLER | ASCCONTROLLER Label of the controller


| PSVCONTROLLER | determining conditional
MANUALCONTROLLER | termination of the simulation.
OVERRIDECONTROLLER | Note that the simulation
SELECTORCONTROLLER | stops when the signal equals
CASCADECONTROLLER | 0 (zero).
ESDCONTROLLER |
LINEARCOMBINATION |
TABLECONTROLLER |
SCALERCONTROLLER |
SWITCHCONTROLLER |

ENDTIME Real (s) Simulation end time.

- 303 -
OLGA User manual

EXPOSE SymbolList States which keys should be


made available as input
variables on the OPC server.
Only keys that are explicitly
set can be exposed. To use
the default value, you must
define this explicitly.

INITTIME String Initital time offset for


simulation. The string must
be formatted as "YYYY-MM-
DD hh:mm:ss".

MAXDT RealList [1.0] Largest time-step allowed.


(s)

MAXLAGFACT Real [0.3] Maximum lagging factor (see


LAGFACT output variable) to
allow before the output
variable LAGIND is set to 1.

MAXTIME RealList [0.0] Timetable for changing


(s) MAXDT.

MINDT RealList [0.001] Smallest time-step allowed.


(s)

MINTIME RealList [0.0] Timetable for changing


(s) MINDT.

NSIMINFO Real [-1] Number of times to print


simulation progress
information to standard
output. Set -1 to use default
settings. These depend on
the values set for the
OPTIONS.DEBUG key.

RUNTIMESTEPAGAIN Symbol <None> | FALSE | [TRUE] Select whether or not to


recompute the time-step if
the first-stage solution is
unsatisfactory.

- 304 -
Reference manual

SIMULATIONSPEED Real [0] Simulation speed relative to


real-time. Zero means
simulate at highest possible
speed. Any other positive
number means that the
simulator will slow down the
simulation so it matches the
factor given relative to real
time.

STARTTIME Real (s) Simulation start time.

OPTIONS (on CaseLevel)

This statement specifies the different calculating options to be applied in the simulation.

OPTIONS is a required keyword.

Key Type Parameter set Description

Unit:( ) Default:[ ]

COMPOSITIONAL Symbol <None> | ON | MEG | MEOH OFF: No compositional tracking, just


| ETOH | BLACKOIL | use the fluid table. ON: Enable
STEAMWATER-HC | compositional tracking.
SINGLE | | [OFF] MEG/MEOH/ETOH: Use Inhibitor
tracking with the given component.
BLACKOIL: Use Black oil model.
STEAMWATER-HC: Use steam model.
SINGLE: Use single-component model

CONSOLELOG Symbol <None> | ON | [OFF] Turn on or off writing of console output


to log file

DEBUG Symbol <None> | ON | LIMITED | Turn on or off printing of time step


[OFF] information to standard output. DEBUG
= OFF reports only essential warnings.
DEBUG = ON will report all informative
messages and can slow down
simulation significantly. DEBUG =
LIMITED will be more silent about fluid
table warnings and some informative
messages, but otherwise report the
same as DEBUG = ON.

- 305 -
OLGA User manual

DEBUGINFO SymbolList ALL | FLOWPATH | NODE | Select the information to print. The
CONTROLLER | FLUID | possible values refers to different sets
INTEGRATION | INPUT | of modules or functionality in OLGA.
OUTPUT | SERVER | For example, if SERVER is chosen,
STATE | SCHEDULER | information related to the OLGA server
OPC | SUBMODEL | functionality is printed. The default
[DEFAULT] behavior is to print any information
except some information related to the
OPC server (STATE and SERVER).

DRILLING Symbol <None> | ON | [OFF] Set it to ON for simulation drilling


process

ELASTICWALLS Symbol <None> | ON | [OFF] Turn on or off the use of the effect of
expanding/contracting walls.

FLASHMODEL Symbol <None> | HYDROCARBON Mass transfer model. WATER: Mass


| [WATER] transfer between gas-oil and gas-
water. HYDROCARBON: Only mass
transfer between gas-oil.

FLOWMODEL Symbol OLGA | [OLGAHD] The type of flow model to use for
dynamic flow.

HYDSLUG Symbol <None> | OFF | [ON] This key (HYDSLUG) makes it possible
to turn off the distributed flow regimes
(hydrodynamic slug flow and dispersed
bubble flow). HYDSLUG OFF will
enforce stratified or annular flow (both
including liquid droplets).

MASSEQSCHEME Symbol <None> | 2NDORDER | Discretization scheme used for solving


[1STORDER] the mass equations.

NOSLIP Symbol <None> | ON | [OFF] OFF: Slip between phases is


calculated (recommended). ON:
Should only be used for sensitivity
simulations. The gas and liquid (oil and
water) is treated as one single
homogenized phase in the pressure
drop and momentum calculations. The
other calculations, mass conservation,
mass transfer, etc, will be as for a
normal simulation with slip. The no-slip
option is implemented in both the
steady state pre-processor and the
dynamic code.

PARTICLEFLOW Symbol <None> | SIMPLE | SIMPLE: Simulate flow of suspended


ADVANCED | [NO] particles. ADVANCED: Simulate
particle transport including entrainment
and deposition effects.

- 306 -
Reference manual

PHASE Symbol [THREE] Define the number of phases to be


simulated. In OLGA 6 the only option is
THREE.

RESERVOIRMODEL Symbol <None> | ECLIPSE | The model to use for the near well
[ROCX] reservoir calculation

SLUGTRACKINGMODEL Symbol <None> | OLGA6 | The type of slugtracking model to use


[OLGA2015] for hydrodynamic slug initiation and
slug evolution.

SLUGVOID Symbol <None> | AIR | [SINTEF] Select correlations for determining gas
volume fraction in liquid slugs.

SSFLOWMODEL Symbol Extension_PointModel | The flow model to use for the steady-
[DEFAULT] state preprocessor. Only models from
enabled extensions can be selected. If
not given or no extensions are
installed, the model specified in
FLOWMODEL is used.

STEADYSTATE Symbol <None> | OFF | NOTEMP | Turns off the initial value (steady state)
[ON] pre-processor or only turn off the
temperature calculation in the pre-
processor.

TABLETOLERANCE Symbol OFF | ON | UNLIMITED | Define the upper and lower limits of
[<default>] pressure and temperature allowed in
the simulation. OFF: The limits will be
the ones specified in the fluid tables
(recommended). ON: This option
should only be used when old PVT files
with too narrow pressure/temperature
ranges cannot be reproduced and
improved. UNLIMITED: This option will
remove the upper an lower limits of
temperature and pressure and will use
the end values in the table outside the
table range without extrapolation. Use
with extreme care. When
DRILLINGFLUIDs are defined
UNLIMITED is <default>. For other
fluid table based configurations OFF is
<default>

- 307 -
OLGA User manual

TEMPERATURE Symbol <None> | ADIABATIC | Specify the desired temperature


UGIVEN | OFF | FASTWALL calculation option. OFF: No
| [WALL] temperature calculation, initial values
are used. ADIABATIC: No energy
exchange with the walls. Adiabatic flow
is assumed. UGIVEN: Total heat
transfer coefficient for the pipe-wall is
given. No wall temperatures are
calculated. WALL: Heat transfer on wall
inside and outside, wall heat
conduction and heat storage is
accounted for. FASTWALL: Same as
option WALL except that heat storage
is neglected. This option is used for a
fast approach to steady state thermal
conditions.

TRACERTRACKING Symbol <None> | ON | [OFF] Switch for using tracertracking

UDPLUGIN Symbol <None> | ON | [OFF] Set to ON to use User Defined phases


and a plugin dll

WAXDEPOSITION Symbol <None> | ON | [OFF] Switch wax deposition model on or off.

WRITEPVTFILES Symbol <None> | YES | [NO] For STEAMWATER-HC and SINGLE


only. YES: PVT table file(s) and
saturation line file are written for steam
and single component properties.

WRITERHEOLOGYFILES Symbol <None> | YES | [NO] YES: A rheology file is stored for each
FANNFILE given on the FILES
keyword. NO: A rheology file is created
and used but not stored. If YES, a file
with extension ".genrheofit" is also
created where the fitted parameters
and the calculated shear stresses are
stored

RESTART (on CaseLevel)

The restart statement defines a restart of the program from a previous run. The restart file contains data
necessary to restore the state of the simulation engine from a previous run. OLGA will not contain a
complete snapshot of the in-memory data structures. This means in particular that the original input file has
to be read to get information about e.g. the pipe line, sources, walls, time integration, and output
information. The content of the restart file can be thought of as specialized initial conditions, but with more
information than the standard user specified initial conditions.

Note that it is not allowed to change any geometry data in a restart run. For example, all pipes must have
the same number of sections, section lengths, elevations and diameters. Nodes must have the same
connections. Walls and materials must be the same. The setting for component tracking (keyword
OPTIONS, key COMPOSITIONAL) cannot be changed.

- 308 -
Reference manual

By default, without using the RESTART keyword, a restart file is written at the end of the simulation. To
save restart files generated at other times, either of the keys DTWRITE or WRITETIME can be used.

Several actions, such as activate/deactivate SLUGTRACKING, change valve openings, modify controller
settings etc. may be performed in a restart.

Discrepancies between the original and the restart case will be reported as info messages when the restart
case is started. Watch out for these to catch any unintended effects in the restart run (e.g. a missing
source or something else that will influence results).

For the READTIME key, note that the MAXDT value is added to the READTIME value to account for any
restart point written at a timestep which not exactly matches the given READTIME.

The RESTOREPOLICY key is primarily intended for server cases where certain settings is to be ignored
from the restart file. The key specify which type of settings to ignore. The default option is to include all
settings when reading the restart file.

Example:

You have a case (Case B) that you want to restart from the conditions at 1 hour from a previous simulated
case (Case A). The restart file (*.rsw) for Case A contains the restart properties for the following points in
time: 0 s, 3603 s, 7201 s. In Case B you want to start the simulation from the conditions at 1 hour, so you
do the following: In the RESTART keyword you define:

READFILE = Case A.rsw

READTIME = 1 hour

When Case B is run, OLGA looks for the restart properties from Case A by use of the following criteria:
Case A’s restart point in time is greater than or equal to READTIME in Case B + MAXDT in Case B.

If MAXDT = 2 s in Case B - Case B starts simulating from the conditions written at time 0 s

If MAXDT = 5 s in Case B - Case B starts simulating from the conditions written at time 3603 s

Key Type Parameter set Description

Unit:( ) Default:[ ]

DTWRITE Real (s) Define the time interval at which to write


restart data to file.

FILE String The name of the restart file from which to


restart the simulation.

READFILE Symbol <None> | ON | [OFF] ON: Enable reading of the restart file. OFF:
Restart is disabled.

READTIME Real (s) Time from previous simulation where the


state is read for the restart of the current
simulation. Only one time point is allowed.
Note that the MAXDT value is added to the
READTIME value to account for any restart
point written at a timestep which not
exactly matches the given READTIME.

- 309 -
OLGA User manual

RESTOREPOLICY SymbolList USESTARTTIME | Restart restore policy. RESTOREALL: The


IGNORETIME | time variables and the simulation speed
IGNORESIMULATIONSPEED | are read from the restart file and applied to
[RESTOREALL] the case when doing a restart.
USESTARTTIME: The value given in
INTEGRATION.STARTTIME is used (or
zero if not given) as the new simulation
time after loading the restart.
IGNORETIME: The variable TIME is
unaltered, SIMTIME is set equal to the time
of the CPU clock, and INITTIME is set so
that SIMTIME=INITTIME + TIME.
IGNORESIMULATIONSPEED: The
simulation speed from the restart file is
ignored, the SIMULATIONSPEED variable
is not modified by loading the restart.

WRITE Symbol <None> | APPEND | OFF | OVERWRITE: Replace any existing restart
[OVERWRITE] file with the current data. APPEND: Add
data to an existing restart file. OFF: No
restart data is written to file.

WRITETIME RealList A specific time or time series when restart


(s) data is written to the restart file.

SERVEROPTIONS (on CaseLevel)

This statement activates and specifies the different settings for the OLGA OPC Server.

Key Type Parameter set Description

Unit:( ) Default:[ ]

MODELNAME String The model or submodel name.

MODULENAME String [Sim] OLGA namespace name. This is the name of the total
model. All submodels are logically attached beneath this
name. OPC-wise this means the naming hierarchy is:
SERVERNAME.MODULENAME.MODELNAME.*

SERVERNAME String [OLGAOPCServer] The OPC server name. The server name should be a
single word, with no spaces (' ') or dots ('.').

SIMULATORMODE Symbol <None> | Simulator mode. 'Simulator' means a free-running


EXTERNAL | simulator operating on its own. 'External' means that the
[SIMULATOR] simulator will try to keep synchronized with the ticking of
the external clock - it will halt the execution when it
catches up with the external clock and start execution
again when the external clock is increased to a new time.

- 310 -
Reference manual

STOPATENDTIME Symbol ON | [OFF] Specify if the server should follow the ENDTIME setting on
the INTEGRATION keyword. Default is OFF which means
that the server case will continue running until explicitly
stopped.

SCHEDULER (on CaseLevel)

Key Type Parameter set Description

Unit:( ) Default:[ ]

LABEL String [Scheduler] The model name to use for the scheduler.

MAJORTIMESTEP Real The initial synchronization interval for the attached


(s) submodels. This also represent the initial time increment
for the external clocks in the attached submodels. Typically
the value of MAJORTIMESTEP should be larger than the
time steps of the submodels. A suggested initial value is 10
seconds.

SIMULATORCLOCK Symbol <None> | Simulator mode. INTERNAL means the scheduler operates
EXTERNAL | as the master clock and locks all connected submodels to
[INTERNAL] its own internal clock. EXTERNAL means that the
scheduler follows a clock operated externally and will wait
whenever it catches up with the external clock.

STARTUPSTATE Symbol <None> | The startup state for the scheduler. If set to PAUSED, all
PAUSED | scheduler controlled modules will be paused initially.
[RUNNING]

SUBMODELTIMEOUT Real [60] The time for the scheduler to wait for submodels to start.
(s)

UDFEED (on CaseLevel)

This keyword contains only a label key. The label is used to refer feeds recognized by the plug-in dll.

To use UDFEED, UDOPTIONSCOMPOSITIONALmust be set to ON. UDFEEDs can also be defined


through the UDFEEDFILE. OLGA parses the file looking for the following strings: <Number of
compositions> and <Composition labels>

If <Number of compositions> is found the next line will be read as number of feeds (Nfeeds).

If<Composition labels> are found theNfeedslines followingwill be read and added to the list of UDFEEDs.

Example:

<Number of compositions>

<Composition labels>

FEED-1

- 311 -
OLGA User manual

FEED-2

Will add the FEED-1 and FEED-2 to the list of UDFEEDs available in SOURCE UDFEED etc.

Key Type Parameter set Description

Unit:( ) Default:[ ]

LABEL String [UDFEED] Name of user defined feed recognized by plug-in.

UDOPTIONS (on CaseLevel)

UDOPTIONS contains options for simulation of user defined dispersions such as hydrates and sand.

To use UDOPTIONS, OPTIONS UDPLUGIN must be set to YES.

Component tracking of user defined phases can be activated by setting COMPOSITIONAL = ON. This
option is not compatible with the standard Compositional tracking module activated through OPTIONS
COMPOSITIONAL = ON. To run this option, a plug-in DLL describing the components and containing the
proper interfaces must be provided. These interfaces are described in the 'Model, Numerics and
Programmers Guide for the OLGA Plug-In'. Furthermore a file describing the composition is needed and
must be referred to with FIELD UDFEEDFILE.

When running with a user defined plug in, the name of the plug-in DLL should be given through the key
PLUGINDLL.

The PLUGINMODEL key allows definition of a model type that is transported to the plug-in and can be
stored for easy selection of different plug-in models by the plug-in programmer.

Key Type Parameter set Description

Unit:( ) Default:[ ]

COMPOSITIONAL Symbol <None> | ON | Turn on component tracking (can not be combined with
[OFF] OPTIONS COMPOSITIONAL)

PLUGINDLL String Name of PlugIn dll, used to calculate flashing,


entrainment/deposition and PVT properties.

PLUGINMODEL String The plug-in model to use. Will be sent to the plug-in.

Compositional
BLACKOILCOMPONENT (on CaseLevel)

This statement defines a component (gas, oil or water) for the black oil options.

Key Type Parameter set Description

Unit:( ) Default:[ ]

APIGRAVITY Real [30] API gravity. API = 141.5/(oil specific gravity)–131.5.


Cannot be given if OILSPECIFICGRAVITY is given.

- 312 -
Reference manual

CO2MOLEFRACTION Real (-) [0.0] Mole fraction of CO2 in gas at standard conditions.
CO2MOLEFRACTION has to be less than 10%.

GASSPECIFICGRAVITY Real [0.64] Gas specific gravity (gas density/air density).


GASSPECIFICGRAVITY has to be larger than 0
(0.55 is pure methane).

H2SMOLEFRACTION Real (-) [0.0] Mole fraction of H2S in gas at standard conditions.
H2SMOLEFRACTION has to be less than 10%.

LABEL String [BOCOMP] Name of the blackoil component.

N2MOLEFRACTION Real (-) [0.0] Mole fraction of N2 in gas at standard conditions.


N2MOLEFRACTION has to be less than 10%.

OILSPECIFICGRAVITY Real [0.876] Oil specific gravity (oil density/water density). Cannot
be given if APIGRAVITY is given.

TYPE Symbol <None> | OIL | Define if the component is an oil, Gas or water
GAS | WATER component.
|

WATERSPECIFICGRAVITY Real [1.0] Water specific gravity (water density/fresh water


density). Used in order to include density effect on
water due to components other than salt, e.g. MEG.

BLACKOILFEED (on CaseLevel)

This statement defines a black oil feed.

Key Type Parameter set Description

Unit:( ) Default:[ ]

GASCOMPONENT Symbol BLACKOILCOMPONENT Ref. to blackoil component label of type


| gas.

GLR Real Gas/liquid ratio. Alternative to GOR.


(Sm3/Sm3)

GOR Real Gas/oil ratio. Alternative to GLR.


(Sm3/Sm3)

LABEL String [BOFEED] Blackoil feed label.

LGR Real Liquid/gas ratio. Alternative to GLR (to be


(Sm3/Sm3) used for gas feeds).

OGR Real Oil/gas ratio. Alternative to GOR (to be


(Sm3/Sm3) used for gas feeds).

- 313 -
OLGA User manual

OILCOMPONENT Symbol BLACKOILCOMPONENT Ref. to blackoil component label of type


| oil.

WATERCOMPONENT Symbol BLACKOILCOMPONENT Ref. to blackoil component label of type


| water.

WATERCUT Real (-) [0.0] Watercut.

BLACKOILOPTIONS (on CaseLevel)

This statement defines the black oil options.

Key Type Parameter set Description

Unit:( ) Default:[ ]

APIGRAVITY Real [] API gravity. API = 141.5/(oil specific gravity)–


131.5. Cannot be given if OILSPECIFICGRAVITY
is given.

BUBBLEPRESS Real (Pa) Bubble pressure at a given temperature.

BUBBLETEMP Real (C) [] The temperature corresponding to the bubble


pressure.

GASSPECIFICGRAVITY Real [] Gas specific gravity (gas density/air density).


GASSPECIFICGRAVITY has to be larger than 0.5
(0.55 is pure methane).

GOR Real Gas/oil ratio. The GOR should not be larger than
(Sm3/Sm3) 1000 Sm3/Sm3.

GORMODEL Symbol <None> | Correlation used to calculate the gas/oil ratio.


STANDING |
BEGGS |
GLASO |
[LASATER]

OILSPECIFICGRAVITY Real [] Oil specific gravity (oil density/water density).


Cannot be given if APIGRAVITY is given.

OILVISC Real (N- Measured oil viscosity at a given pressure and


s/m2) temperature.

OILVISC-TUNING Symbol <None> | ON | Enable tuning of oil viscosity.


[OFF]

- 314 -
Reference manual

RSGO_BP-TUNING Symbol <None> | ON | Activate this key to tune relevant parameters in the
[OFF] selected blackoil correlation to match given GOR
at standard conditions and given bubble point. (I.e.
BUBBLEPRESS and corresponding temperature
BUBBLETEMP.)

VISCPRESS Real (Pa) [] The pressure at which the viscosity is measured.

VISCTEMP Real (C) [] The temperature at which the viscosity is


measured.

COMPOPTIONS (on CaseLevel)

This statement specifies the different options used in the PVT routines for calculating material properties
and flashing terms in the Compositional tracking on page 58 model.

The FLASHTYPE key specifies the type of flash calculations to use. TWOPHASE is the simplest
calculations and is the default value if no aqueous components (H2O, MEG, etc) are part of the feed.
SIMPLETHREEPHASE is the default value if there are at least one aqueous component.
FULLTHREEPHASE is the most time-consuming option, but provides full mixing in all phases. This option
must be used if any salt components are defined in the feed.

The TCONDENSATION/TVAPORIZATION keys are non-equilibrium delay constants for the mass transfer
from liquid phase to gas phase and vice versa. The keys can be introduced for each component specified
with theCOMPONENT key. The equilibrium state reached in the flash calculations will then be delayed for
the specified components. The default value is no delay.

The DENSITYLIMIT key can be used to specify the limit for the dense phase region density. In the dense
phase region, where there are no good criteria to distinguish gas from oil, a fluid with higher density than
the given value is defined as liquid and a fluid with lower density is defined as gas.

Key Type Parameter set Description

Unit:( ) Default:[ ]

COMPONENT SymbolList Components to specify delay constants for


(defined in feed file).

DENSITYLIMIT Real Used in the dense phase region. A fluid with a


(kg/m3) density higher than this limit is defined as a liquid
and a fluid with lower density is identified as gas.
If used, it should preferably be set equal to the
fluid density at the critical point. If not used,
internal routines will decide the phase (may
cause instabilities when crossing bubble/dew
point).

- 315 -
OLGA User manual

FLASHTYPE Symbol TWOPHASE | Algorithm used in flash calculations. TWOPHASE


SIMPLETHREEPHASE | is <default> if no aqueous components are part
FULLTHREEPHASE | of the feed file. SIMPLETHREEPHASE is
[<default>] <default> if there is at least one aqueous
component in the feed file. FULLTHREPHASE is
<default> if there are salt-components in the feed
file.

GASCOMPONENT Symbol ComponentData | Component for gas phase properties in sections


with only water.

OILCOMPONENT Symbol ComponentData | Component for oil phase properties in sections


with only water.

PVTPACKAGE Symbol [MULTIFLASH] The PVT package used in Compositional


Tracking simulations. Currently the Multiflash
package from Infochem is available.

TBOILING RealList [1.0] Time constant for mass transfer from liquid phase
(s) to gas phase due to boiling for components in
COMPONENT. (Non-equilibrium delay constant).
Only for STEAMWATER-HC.

TCONDENSATION RealList Time constant for mass transfer from gas phase
(s) to liquid phase (Non-equilibrium delay constant).
When COMPOSITIONAL=ON, the default value
is no delay and each value must have a
corresponding component in COMPONENT.
When COMPOSITIONAL=STEAMWATER-HC,
TCONDENSATION may be defined as a time
series and the default value is 1 s.

TIME RealList [0.0] Time points for which TBOILING,


(s) TVAPORIZATION and TCONDENSATION
changes. Only for STEAMWATER-HC.

TVAPORIZATION RealList Time constant for mass transfer from liquid phase
(s) to gas phase (Non-equilibrium delay constant).
When COMPOSITIONAL=ON, the default value
is no delay and each value must have a
corresponding component in COMPONENT.
When COMPOSITIONAL=STEAMWATER-HC
TVAPORIZATION may be defined as a time
series and the default value is 1 s.

FEED (on CaseLevel)

This keyword defines a feed, which is a fluid composition that can be used in a source or at a boundary.
The components used in the feed must be defined in the OLGA case. Components are defined differently
for the different fluid-modules. For Blackoil and correlation based Drillingfluid, components are defined in
OLGA. However for Compositional Tracking and table based Drilling, the components are are defined in
the fluid files (FEEDFILE and PVTTABLE)

- 316 -
Reference manual

Key Type Parameter Description


set
Unit:( )
Default:[ ]

COMPONENT SymbolList Components in feed. For COMPOSITIONAL=ON the


components are defined in the feed file. Else, for DRILLING=ON
available components are HC, H2O, MEG/MEOH/ETOH and
MUD components (a CUTTING component is available if
PARTICLEFLOW=SIMPLE/ADVANCED).

LABEL String [FEED] Name of feed.

MASSFRACTION RealList Mass fractions of the components of the feed.

MOLEFRACTION RealList Mole fractions of the components of the feed.

SINGLEOPTIONS (on CaseLevel)

This statement defines options for simulation of single component systems in OLGA, turned on by
specifying COMPOSITIONAL=SINGLE in keyword OPTIONS.

There are three single component systems that can be specified. These are H2O, CO2 and OTHER, and
is specified by key COMPONENT in SINGLEOPTIONS. For COMPONENT equal H2O and CO2 most
physical parameters are implemented in OLGA, while for COMPONENT=OTHER the user needs to
specify these parameters in SINGLEOPTIONS.

Key Type Parameter set Description

Unit:( ) Default:[ ]

COMPONENT Symbol <None> | H2O | Name of single-component.


CO2 | OTHER |

CPIC RealList Coefficients in equation for specific heat. Only for


SINGLECOMPONENT=OTHER.

MAXPRESSURE Real Maximum pressure for PVT table generated.


(Pa)

MAXTEMPERATURE Real (C) Maximum temperature for PVT table generated.

MINPRESSURE Real Minimum pressure for PVT table generated.


(Pa)

MINTEMPERATURE Real (C) Minimum temperature for PVT table generated.

MW Real Molecular weight. Only for


(g/mol) SINGLECOMPONENT=OTHER.

OMEGA Real Accentric factor. Only for


SINGLECOMPONENT=OTHER.

- 317 -
OLGA User manual

PC Real Critical pressure. Only for


(Pa) SINGLECOMPONENT=OTHER.

TBOILING RealList [1.0] Time constant for mass transfer from liquid phase to gas
(s) phase due to boiling for component. (Non-equilibrium
delay constant).

TC Real (C) Critical temperature. Only for


SINGLECOMPONENT=OTHER.

TCONDENSATION RealList [1.0] Time constant for mass transfer from gas phase to liquid
(s) phase for the component. (Non-equilibrium delay
constant).

TIME RealList [0.0] Time points for which TBOILING and TCONDENSATION
(s) changes.

VISX Real [1.0] Viscosity tuning factor. Only for


SINGLECOMPONENT=OTHER.

VOLX RealList [0.0] Volume tuning factor. Only for


SINGLECOMPONENT=OTHER.

Controller
AlgebraicController

The controller type ALGEBRAIC can combine signals from other controllers using a defined set of
operators, see below. The controller loops over all operators given in VARIABLEFUNCTION key. The
number of operands is defined by the operation. The operators are applied to the current result (result from
previous operation) as the first operand and additional operands in terms of input signals terminals
(INPSIG_i). The initial current result (result from previous operation) is input signal one (INPSIG_1).

The following unary operator has been implemented:

ABS – Take the absolute value of the current result

The following binary operators have been implemented:

ADD – Add next input signal (INPSIG_i) to the current result

SUB – Subtract next input signal (INPSIG_i) from the current result

MUL – Multiply the current result with the next input signal (INPSIG_i)

DIV – Divide the current result with the next input signal (INPSIG_i)

GT – Compare current result with the next input signal (INPSIG_i), return value one if current result is
greater than next input signal, value zero otherwise

LT – Compare current result with the next input signal (INPSIG_i), return value one if current result is less
than next input signal, value zero otherwise

GE – Compare current result with the next input signal (INPSIG_i), return value one if current result is
greater than or equal to the next input signal, value zero otherwise

LE – Compare current result with the next input signal (INPSIG_i), return value one if current result is less
than or equal to the next input signal, value zero otherwise

- 318 -
Reference manual

EQ – Compare current result with the next input signal (INPSIG_i), return value one if current result is
equal to the next input signal, value zero otherwise.

NEQ – Compare current result with the next input signal (INPSIG_i), return value one if current result is not
equal to the next input signal, value zero otherwise.

Controller type Algebraic makes use of the following signal terminals:

INPSIG_1..N (Required input)

MODE (Optional input)

SIGNAL (Optional input)

ACTIVATE (Optional input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

BIAS Real [0.0] Initial output signal.

CLOSINGTIME Real (s) [0] Time required to change valve settings or


compressor speed from maximum to
minimum value.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

MAXCHANGE Real [0.2] Maximum allowed change in controller


output signal from one time-step to the next.
This restriction is used by the time-step
control. If the change in output exceeds this
value, OLGA will go back to the previous
point in time and integrate with a shorter
time-step.

MAXSIGNAL Real [1.0e10] Maximum output signal.

MINSIGNAL Real [-1.0e10] Minimum output signal.

- 319 -
OLGA User manual

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
FREEZE | [AUTOMATIC] given by key MANUALOUTPUT.
EXTERNALSIGNAL: The controller output
is given by the controller connected to the
SIGNAL terminal. EXTERNALSETPOINT
the setpoint is given by the controller
connected to the SETPOINT terminal.
FREEZE the controller output is frozen (kept
constant).

OPENINGTIME Real (s) [0] Time required to change valve settings or


compressor speed from minimum to
maximum value.

STROKETIME Real (s) [0] Stroke or actuator time. Time required to


change valve settings or compressor speed
from minimum to maximum value or vice
versa.

TIME RealList Time series for the MANUALOUTPUT key.


(s)

TIMESTEPCONTROL Symbol <None> | ON | [OFF] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less
than DTMIN the time step control is also
bypassed.

VARIABLEFUNCTION SymbolList ADD | SUB | MUL | DIV | For use when one or more variables are
POW | MOD | GT | LT | GE specified. The values of the variables are
| LE | EQ | NEQ | SQRT | subject to the operator specified. The first
ABS | EXP | LN | LOG10 | operator is used on the first
COS | SIN | TAN | ACOS | operand(s)=INPSIG terminal(s). The second
ASIN | ATAN | SGN | HSF | operator is used on the result for the first
CEIL | FLOOR | RAND | operation and possibly any additional
INPSIG terminal.

Signal connections - Input

Name Description

INPSIG* When connected, these terminals define the input signals to the
controller.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

- 320 -
Reference manual

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

MEASVAR When this output signal is connected, it provides the measured


variable to an external device.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

ASCController

The main purpose of the Anti Surge Controller (ASC) is to prevent a compressor from operating to the left
of the Surge Line in a compressor performance map.

The controller uses a non-symmetrical PID algorithm. Two amplification constants must therefore be given.
One amplification for positive and one for negative controller error.

The ASC controller has the following signal terminals:

MEASRD (Required input)

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

AMP1 Real Anti Surge Controller amplification


(proportional term). Used for negative
deviation from setpoint.

AMP2 Real Anti Surge Controller amplification


(proportional term). Used for positive
deviation from setpoint.

BIAS Real Initial output signal.

- 321 -
OLGA User manual

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to
minimum value.

DELAY Real (s) [0.0] Time from when the measured value is read
to when it is used by the controller.

DERIVATIVECONST Real (s) [0.0] Coefficient in front of the derivative term of a


PID controller.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

INTEGRALCONST Real (s) [1.0E+10] Coefficient in front of the integral of PID


controllers. It represents a characteristic
time. N.b., it is the inverse of the coefficient
which appears in the expression for the
output signal. If the non-linear option is
chosen, this is an array as a function of the
ERROR array.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change


in controller output signal from one time-step
to the next. This restriction is used by the
time-step control. If the change in output
exceeds this value, OLGA will go back to the
previous point in time and integrate with a
shorter time-step. Digital controller:
Maximum discrepancy between the instance
a sample should be taken and the actual
time in the simulation in terms of a fraction of
the sample time interval. (E.g., with
SAMPLETIME=2.0s and MAXCHANGE=0.2,
the maximum discrepancy will be ±0.4s.)

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList AUTOMATIC | MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
FREEZE | given by key MANUALOUTPUT.
[EXTERNALSETPOINT] EXTERNALSIGNAL: The controller output is
given by the controller connected to the
SIGNAL terminal. EXTERNALSETPOINT the
setpoint is given by the controller connected
to the SETPOINT terminal. FREEZE the
controller output is frozen (kept constant).

- 322 -
Reference manual

NORMRANGE Real For normalized controllers (used together


with AMPLIFICATION). Indicates measuring
range for input to controller.

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to
maximum value.

SAMPLETIME Real (s) Time interval between each sampling of


input. Activates digital controller option.

SETPOINT RealList Setpoint values.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to


change valve settings or compressor speed
from minimum to maximum value and vice
versa.

TIME RealList Time series for the SETPOINT key.


(s)

TIMESTEPCONTROL Symbol <None> | OFF | [ON] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less
than DTMIN the time step control is also
bypassed.

Signal connections - Input

Name Description

MEASRD* When connected, these terminals define the controller measured variable
signal.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

SETPOINT When connected, this terminal defines the controller external setpoint
signal.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

- 323 -
OLGA User manual

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

CascadeController

A cascade controller (normal or extended) is a PID controller. The cascade controller is used in the inner
loop of a cascade control. The output of the primary controller changes the setpoint of the secondary
(cascade) controller.

A cascade controller has the following terminals:

MEASRD (Required input)

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

AMPLIFICATION RealList PID amplification factor. If the non-linear option is


chosen, this is an array as a function of the
ERROR array.

AVERAGETIME Real (s) For use with EXTENDED CASCADE controller.


Average time for the moving averaging function of
the primary controller variable.

BIAS Real Initial output signal.

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to minimum
value.

CONSTONE Real (1/s) For use with EXTENDED CASCADE controller:


Constant C1.

CONSTSWITCH Real For use with EXTENDED CASCADE controller:


Switching value for using C1 and C2.

CONSTTWO Real (1/s) For use with EXTENDED CASCADE controller:


Constant C2.

- 324 -
Reference manual

DEFAULTINPUT Real Setpoint for INACTIVEMODE=DEFAULTMODE.

DELAY Real (s) [0.0] Time from when the measured value is read to
when it is used by the controller.

DERIVATIVECONST RealList [0.0] Coefficient in front of the derivative term of PID


(s) controllers. If the non-linear option is chosen, this
is an array as a function of the ERROR array.

ERROR RealList [0.0] Activate the non-linear option for the PID.
Coefficients are given as an array of values
representing each value in ERROR. Error is the
deviation.

EXPOSE SymbolList States which keys should be made available as


input variables on the OPC server.

EXTENDED Symbol <None> | ON | [OFF] Select ON to use the EXTENDED CASCADE


controller.

INACTIVEMODE Symbol <None> | ONHOLD | Specifies how the controller acts when it is
INTERLOCK | deactivated by a selector or override controller.
DEFAULTINPUT | ONHOLD: Keeps output value from before the
[NORMAL] controller was deactivated. INTERLOCK: The
cascade controller gets feedback on the output
signal calculated by the connected controller.
When the cascade controller is deactivated, it
back calculates its integral error to match the
output signal of the connected controller.
NORMAL: Computes controller output signal (PID
action) based on set point and measured values.
DEFAULTINPUT: Computes controller output
signal (PID action) based on set point value and
measured value given by key DEFAULTINPUT.

INITIALSETPOINT Real Initial setpoint for extended cascade.

INTEGRALCONST RealList [1.0E+10] Coefficient in front of the integral of PID


(s) controllers. It represents a characteristic time.
N.b., it is the inverse of the coefficient which
appears in the expression for the output signal. If
the non-linear option is chosen, this is an array as
a function of the ERROR array.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

- 325 -
OLGA User manual

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change in


controller output signal from one time-step to the
next. This restriction is used by the time-step
control. If the change in output exceeds this value,
OLGA will go back to the previous point in time
and integrate with a shorter time-step. Digital
controller: Maximum discrepancy between the
instance a sample should be taken and the actual
time in the simulation in terms of a fraction of the
sample time interval. (E.g., with
SAMPLETIME=2.0s and MAXCHANGE=0.2, the
maximum discrepancy will be ±0.4s.)

MAXSETPOINT Real Maximum setpoint for secondary controller in


cascade control loop.

MAXSIGNAL Real [1.0] Maximum output signal.

MINSETPOINT Real Minimum setpoint for secondary controller in


cascade control loop.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is given
FREEZE | by key MANUALOUTPUT. EXTERNALSIGNAL:
[AUTOMATIC] The controller output is given by the controller
connected to the SIGNAL terminal. FREEZE the
controller output is frozen (kept constant).

NORMRANGE Real For normalized controllers (used together with


AMPLIFICATION). Indicates measuring range for
input to controller.

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to maximum
value.

SAMPLEDT Real (s) For use with EXTENDED CASCADE controller.


Logging time interval for the primary controller
variable.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to change
valve settings or compressor speed from minimum
to maximum value or vice versa.

- 326 -
Reference manual

TIME RealList Time series for the MANUALOUTPUT key.


(s)

TIMESTEPCONTROL Symbol <None> | OFF | [ON] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less than
DTMIN the time step control is also bypassed.

Signal connections - Input

Name Description

MEASRD* When connected, these terminals define the controller measured variable
signal.

SETPOINT* When connected, this terminal defines the controller external setpoint
signal.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

ERRVAR When this output signal is connected, it provides the error signal to an
external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

INTGVAR When this output signal is connected, it provides the controller integral
value to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

MEASVAR When this output signal is connected, it provides the measured


variable to an external device.

PMCAS

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

- 327 -
OLGA User manual

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SETPVAR When this output signal is connected, it provides the controller


setpoint signal to an external device.

ESDController

ESD - Emergency shutdown controller. The ESD controller sends a signal intended to close a valve when
the measured variable is above or below (depending on the OPENMODE key) the setpoint value. The
setpoint is given as a signal or a key. The valve is opened again if RESET is given, and if the measured
variable is below or above (depending on the OPENMODE key) the setpoint value.

The ESD controller has the following signal terminals:

MEASRD_1..N (Required input)

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to
minimum value.

DELAY Real (s) [0.0] Time from when the measured value is read
to when it is used by the controller.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output. Set by time series.

- 328 -
Reference manual

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change


in controller output signal from one time-step
to the next. This restriction is used by the
time-step control. If the change in output
exceeds this value, OLGA will go back to the
previous point in time and integrate with a
shorter time-step. Digital controller: Maximum
discrepancy between the instance a sample
should be taken and the actual time in the
simulation in terms of a fraction of the sample
time interval. (For example, with
SAMPLETIME=2.0s and MAXCHANGE=0.2,
the maximum discrepancy will be ±0.4s.)

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
EXTERNALSETPOINT | given by key MANUALOUTPUT.
FREEZE | [AUTOMATIC] EXTERNALSIGNAL: The controller output is
given by the controller connected to the
SIGNAL terminal. EXTERNALSETPOINT the
setpoint is given by the controller connected
to the SETPOINT terminal. FREEZE the
controller output is frozen (kept constant). Set
by time series.

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to
maximum value.

OPENMODE Symbol <None> | BELOW | Either ABOVE or BELOW depending on


[ABOVE] whether the valve is to close when the signal
goes above or below the setpoint.

RESET RealList The valve closes if the input variable gets


below or exceeds the reset value depending
on OPENMODE. The list refers to the list of
measured signals.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

SETPOINT RealList Setpoint values. The list refers to the list of


measured signals.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to


change valve settings or compressor speed
from minimum to maximum value or vice
versa.

- 329 -
OLGA User manual

TIME RealList Time series for MODE and MANUALOUTPUT


(s) keys.

TIMESTEPCONTROL Symbol <None> | OFF | [ON] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less
than DTMIN the time step control is also
bypassed.

Signal connections - Input

Name Description

MEASRD* When connected, these terminals define the controller measured variable
signal.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

RESET When connected, this terminal defines the controller external reset signal.

SETPOINT When connected, this terminal defines the controller external setpoint
signal.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SETPVAR When this output signal is connected, it provides the controller


setpoint signal to an external device.

- 330 -
Reference manual

ManualController

The manual controller simulates an operator. It provides a valve opening directly from a user specified
series, only dependent on time. The user specified series is given in the setpoint key, or as a setpoint
signal. The manual controller limits the setpoint with STROKETIME or CLOSINGTIME/OPENINGTIME.

A manual controller has the following signal terminals:

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

CONTR..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to
minimum value.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

HTEXT Real (s) [-1] External time step limitation. If HTEXT is less
than or equal to zero, external timestep
limitation is disabled.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change


in controller output signal from one time-step
to the next. This restriction is used by the
time-step control. If the change in output
exceeds this value, OLGA will go back to the
previous point in time and integrate with a
shorter time-step. Digital controller: Maximum
discrepancy between the instance a sample
should be taken and the actual time in the
simulation in terms of a fraction of the sample
time interval. (E.g., with SAMPLETIME=2.0s
and MAXCHANGE=0.2, the maximum
discrepancy will be ±0.4s.)

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

- 331 -
OLGA User manual

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
EXTERNALSETPOINT | given by key MANUALOUTPUT.
FREEZE | [AUTOMATIC] EXTERNALSIGNAL: The controller output is
given by the controller connected to the
SIGNAL terminal. EXTERNALSETPOINT the
setpoint is given by the controller connected
to the SETPOINT terminal. FREEZE the
controller output is frozen (kept constant).

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to
maximum value.

RANGECHECK Symbol <None> | ON | [OFF] If RANGECHECK=ON MINSIGNAL and


MAXSIGNAL will be used to limit the output
signal.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

SETPOINT RealList Setpoint values.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to


change valve settings or compressor speed
from minimum to maximum value or vice
versa.

TIME RealList Time series for the SETPOINT key.


(s)

TIMESTEPCONTROL Symbol <None> | OFF | [ON] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less
than DTMIN the time step control is also
bypassed.

Signal connections - Input

Name Description

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

SETPOINT When connected, this terminal defines the controller external setpoint
signal.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

- 332 -
Reference manual

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SETPVAR When this output signal is connected, it provides the controller


setpoint signal to an external device.

OverrideController

An override controller is a low select or high select operator. An override controller uses any number of
input signals. The input signals are compared, and the minimum/maximum (depending on the
SELECTIONMODE key) input signal is chosen as the output signal from the override controller.

An override controller has the following signal terminals:

MODE (Optional input)

SIGNAL (Optional input)

ACTIVATE (Optional input)

INPSIG_1..N (Required input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to minimum
value.

EXPOSE SymbolList States which keys should be made available as


input variables on the OPC server.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

- 333 -
OLGA User manual

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change in


controller output signal from one time-step to the
next. This restriction is used by the time-step
control. If the change in output exceeds this
value, OLGA will go back to the previous point in
time and integrate with a shorter time-step. Digital
controller: Maximum discrepancy between the
instance a sample should be taken and the actual
time in the simulation in terms of a fraction of the
sample time interval. (E.g., with
SAMPLETIME=2.0s and MAXCHANGE=0.2, the
maximum discrepancy will be ±0.4s.)

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
FREEZE | given by key MANUALOUTPUT.
[AUTOMATIC] EXTERNALSIGNAL: The controller output is
given by the controller connected to the SIGNAL
terminal. FREEZE the controller output is frozen
(kept constant).

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to maximum
value.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

SELECTIONMODE Symbol <None> | HIGH | An override controller selects either minimum or


[LOW] maximum of the signals from all the
subcontrollers. Key SELECTIONMODE
determines the selection of minimum or maximum
signal.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to change
valve settings or compressor speed from
minimum to maximum value or vice versa.

TIME RealList Time series for the SETPOINT key.


(s)

TIMESTEPCONTROL Symbol <None> | ON | [OFF] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less than
DTMIN the time step control is also bypassed.

- 334 -
Reference manual

Signal connections - Input

Name Description

INPSIG* When connected, these terminals define the input signals to the
controller.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

PIDController

PID (Proportional-Integral-Derivative) controllers are designed to maintain a specified value (given by a


setpoint signal or key) for a measured flow variable (given as an input signal).

The user can specify if the controller is linear or non-linear. If a controller is non-linear, the user has to give
tables for specifying the amplification factors, integral time constants, and derivative time constants as
functions of the error input.

The PID controller has the following signal terminals:

MEASRD (Required input)

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

WINDUP (Optional input)

- 335 -
OLGA User manual

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

AMPLIFICATION RealList PID amplification factor. If the non-linear option


is chosen, this is an array as a function of the
ERROR array.

BIAS Real Initial output signal.

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to minimum
value.

DEFAULTINPUT Real Setpoint for


INACTIVEMODE=DEFAULTMODE.

DELAY Real (s) [0.0] Time from when the measured value is read to
when it is used by the controller.

DERIVATIVECONST RealList [0.0] Coefficient in front of the derivative term of PID


(s) controllers. If the non-linear option is chosen,
this is an array as a function of the ERROR
array.

ERROR RealList [0.0] Activate the non-linear option for the PID.
Coefficients are given as an array of values
representing each value in ERROR. Error is
the deviation.

EXPOSE SymbolList States which keys should be made available as


input variables on the OPC server.

INACTIVEMODE Symbol <None> | ONHOLD | Specifies how the controller acts when it is
INTERLOCK | deactivated by a selector or override controller.
DEFAULTINPUT | ONHOLD: Keeps output value from before the
[NORMAL] controller was deactivated. INTERLOCK: The
PID controller gets feedback on the output
signal calculated by the connected controller.
When the PID controller is deactivated, it back
calculates its integral error to match the output
signal of the connected controller. NORMAL:
Computes controller output signal (PID action)
based on set point and measured values.
DEFAULTINPUT: Computes controller output
signal (PID action) based on set point value
and measured value given by key
DEFAULTINPUT.

- 336 -
Reference manual

INTEGRALCONST RealList [1.0E+10] Coefficient in front of the integral of PID


(s) controllers. It represents a characteristic time.
N.b., it is the inverse of the coefficient which
appears in the expression for the output signal.
If the non-linear option is chosen, this is an
array as a function of the ERROR array.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

MAXCHANGE Real (s) [0.2] Analog controller: Maximum allowed change in


controller output signal from one time-step to
the next. This restriction is used by the time-
step control. If the change in output exceeds
this value, OLGA will go back to the previous
point in time and integrate with a shorter time-
step. Digital controller: Maximum discrepancy
between the instance a sample should be
taken and the actual time in the simulation in
terms of a fraction of the sample time interval.
(E.g., with SAMPLETIME=2.0s and
MAXCHANGE=0.2, the maximum discrepancy
will be ±0.4s.)

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
EXTERNALSETPOINT | given by key MANUALOUTPUT.
FREEZE | EXTERNALSIGNAL: The controller output is
[AUTOMATIC] given by the controller connected to the
SIGNAL terminal. EXTERNALSETPOINT the
setpoint is given by the controller connected to
the SETPOINT terminal. FREEZE the
controller output is frozen (kept constant).

NORMRANGE Real For normalized controllers (used together with


AMPLIFICATION). Indicates measuring range
for input to controller.

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to maximum
value.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

SETPOINT RealList Setpoint values.

- 337 -
OLGA User manual

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to


change valve settings or compressor speed
from minimum to maximum value or vice versa.

TIME RealList Time series for the SETPOINT key.


(s)

TIMESTEPCONTROL Symbol <None> | OFF | [ON] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less
than DTMIN the time step control is also
bypassed.

Signal connections - Input

Name Description

MEASRD* When connected, these terminals define the controller measured variable
signal.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

SETPOINT When connected, this terminal defines the controller external setpoint
signal.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

WINDUP When connected, this terminal defines the controller windup signal.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

ERRVAR When this output signal is connected, it provides the error signal to an
external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

INTGVAR When this output signal is connected, it provides the controller integral
value to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

MEASVAR When this output signal is connected, it provides the measured


variable to an external device.

- 338 -
Reference manual

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SETPVAR When this output signal is connected, it provides the controller


setpoint signal to an external device.

PSVController

A Pressure Safety Valve controller (PSV) opens a valve when the pressure at a specified position (given
by a measured signal) is above or below (depending on SETPOINTMODE) the setpoint value. The
setpoint can be given as a key or as an input signal. The PSV controller closes the valve when the
pressure is below or above (depending on SETPOINTMODE) a specified RESET value.

The PSV controller has the following signal terminals:

MEASRD_1..N (Required input)

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to
minimum value.

DELAY Real (s) [0.0] Time from when the measured value is read
to when it is used by the controller.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output. Set by time series.

- 339 -
OLGA User manual

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change


in controller output signal from one time-step
to the next. This restriction is used by the
time-step control. If the change in output
exceeds this value, OLGA will go back to the
previous point in time and integrate with a
shorter time-step. Digital controller: Maximum
discrepancy between the instance a sample
should be taken and the actual time in the
simulation in terms of a fraction of the sample
time interval. (E.g., with SAMPLETIME=2.0s
and MAXCHANGE=0.2, the maximum
discrepancy will be ±0.4s.)

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
EXTERNALSETPOINT | given by key MANUALOUTPUT.
FREEZE | [AUTOMATIC] EXTERNALSIGNAL: The controller output is
given by the controller connected to the
SIGNAL terminal. EXTERNALSETPOINT the
setpoint is given by the controller connected
to the SETPOINT terminal. FREEZE the
controller output is frozen (kept constant). Set
by time series.

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to
maximum value.

OPENMODE Symbol <None> | BELOW | Either ABOVE or BELOW depending on


[ABOVE] whether the valve is to open when the signal
goes above or below the setpoint.

RESET RealList The valve closes if the input variable gets


below or exceeds the reset value depending
on OPENMODE. The list refers to the list of
measured signals.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

SETPOINT RealList Setpoint values. The list refers to the list of


measured signals.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to


change valve settings or compressor speed
from minimum to maximum value or vice
versa.

- 340 -
Reference manual

TIME RealList Time series for MODE and MANUALOUTPUT


(s) keys.

TIMESTEPCONTROL Symbol <None> | OFF | [ON] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less
than DTMIN the time step control is also
bypassed.

Signal connections - Input

Name Description

MEASRD* When connected, these terminals define the controller measured variable
signal.

ACTIVATE When connected, this terminal defines the controller activate signal.

MODE When connected, this terminal defines the controller MODE.

RESET When connected, this terminal defines the controller external reset signal.

SETPOINT When connected, this terminal defines the controller external setpoint
signal.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SETPVAR When this output signal is connected, it provides the controller


setpoint signal to an external device.

- 341 -
OLGA User manual

ScalerController

The main purpose of a SCALER controller is to scale the measured signal from range
LOWLIMIT..HIGHLIMIT to range MINSIGNAL..MAXSIGNAL. Output U is set:

U = (Y -LOWLIMIT)/(HIGHLIMIT - LOWLIMIT)*(MAXSIGNAL-MINSIGNAL) + MINSIGNAL

where Y is the measured signal, value at the MEASRD terminal.

A scaler controller has the following terminals:

MEASRD (Required input)

CONTR_1..N (Optional output)

Key Type Parameter Description


set
Unit:( )
Default:[ ]

BIAS Real [0.0] Initial output signal.

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or compressor
speed from maximum to minimum value.

DELAY Real (s) [0.0] Time from when the measured value is read to when it is
used by the controller.

EXPOSE SymbolList States which keys should be made available as input


variables on the OPC server.

HIGHLIMIT Real High limit for measured signal.

LABEL String [CONTR] Identification label for this controller.

LOWLIMIT Real Low limit for measured signal.

MAXCHANGE Real [0.2] Maximum allowed change in controller output signal from
one time-step to the next. This restriction is used by the
time-step control. If the change in output exceeds this
value, OLGA will go back to the previous point in time and
integrate with a shorter time-step.

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

OPENINGTIME Real (s) [10.0] Time required to change valve settings or compressor
speed from minimum to maximum value.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to change valve
settings or compressor speed from minimum to maximum
value or vice versa.

- 342 -
Reference manual

TIMESTEPCONTROL Symbol <None> | If TIMESTEPCONTROL=OFF the time step control is


ON | [OFF] bypassed. If STROKETIME is less than DTMIN the time
step control is also bypassed.

Signal connections - Input

Name Description

MEASRD* When connected, these terminals define the controller measured variable
signal.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

MEASVAR When this output signal is connected, it provides the measured


variable to an external device.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SelectorController

The selector controller has two sub controllers, SUBCONLOW and SUBCONHIGH. The selector controller
switches between these sub-controllers depending of the low and high limits given as input through the
HIGHLIMITSIG and LOWLIMITSIG signal terminals. A sub-controller that is active due to a limit being
reached stays active until another limit is reached. Then another sub-controller takes over, and stays
active until yet another limit is reached.

Any number of limits (HIGHLIMITSIG/LOWLIMITSIG) can be given.

A selector controller has the following signal terminals:

SUBCONLOW (Required input)

SUBCONHIGH (Required input)

HIGHLIMITSIG_1.. Required input)

LOWLIMITSIG_1..N (Required input)

MODE (Optional input)

SIGNAL (Optional input)

ACTIVATE (Optional input)

- 343 -
OLGA User manual

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to minimum
value.

EXPOSE SymbolList States which keys should be made available as


input variables on the OPC server. Only keys
that are explicitly set can be exposed. To use the
default value, you must define this explicitly.

HIGHLIMIT RealList HIGHLIMIT is compared with the HIGHLIMITSIG


signal input. If the signal from SUBCONLOW is
used, the controller will switch to the
SUBCONHIGH signal if HIGHLIMITSIG >
HIGHLIMIT. If multiple
HIGHLIMIT/HIGHLIMITSIG is given, the
controller will loop all connections and test if
HIGHLIMITSIG_i > HIGHLIMIT[i]

INITIALCONTROLLER Symbol <None> | Active sub-controller at the start of the


SUBCONHIGH | simulation. Has to refer to a SUBCON terminal.
SUBCONLOW |

LABEL String [CONTR] Identification label for this controller.

LOWLIMIT RealList LOWLIMIT is compared with the LOWLIMITSIG


signal input. If the signal from SUBCONHIGH is
used, the controller will switch to the
SUBCONLOW signal if LOWLIMITSIG <
LOWLIMIT. If multiple LOWLIMIT/LOWLIMITSIG
is given, the controller will loop all connections
and test if LOWLIMITSIG_i < LOWLIMIT[i].

MANUALOUTPUT RealList Manual output.

MAXCHANGE Real [0.2] Analog controller: Maximum allowed change in


controller output signal from one time-step to the
next. This restriction is used by the time-step
control. If the change in output exceeds this
value, OLGA will go back to the previous point in
time and integrate with a shorter time-step.
Digital controller: Maximum discrepancy between
the instance a sample should be taken and the
actual time in the simulation in terms of a fraction
of the sample time interval. (E.g., with
SAMPLETIME=2.0s and MAXCHANGE=0.2, the
maximum discrepancy will be ±0.4s.)

- 344 -
Reference manual

MAXSIGNAL Real [1.0] Maximum output signal.

MINSIGNAL Real [0.0] Minimum output signal.

MODE SymbolList MANUAL | AUTOMATIC: The setpoint is defined on the


EXTERNALSIGNAL | controller. MANUAL: The controller output is
FREEZE | given by key MANUALOUTPUT.
[AUTOMATIC] EXTERNALSIGNAL: The controller output is
given by the controller connected to the SIGNAL
terminal. FREEZE the controller output is frozen
(kept constant).

OPENINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from minimum to maximum
value.

SAMPLETIME Real (s) Time interval between each sampling of input.


Activates digital controller option.

STROKETIME Real (s) [10.0] Stroke or actuator time. Time required to change
valve settings or compressor speed from
minimum to maximum value or vice versa.

TIME RealList Time series for the SETPOINT key.


(s)

TIMESTEPCONTROL Symbol <None> | ON | [OFF] If TIMESTEPCONTROL=OFF the time step


control is bypassed. If STROKETIME is less than
DTMIN the time step control is also bypassed.

Signal connections - Input

Name Description

SUBCONHIGH* When connected, this terminal defines the high sub-controller.

SUBCONLOW * When connected, this terminal defines the low sub-controller.

ACTIVATE When connected, this terminal defines the controller activate signal.

HIGHLIMITSIG When connected, this terminal defines the high limit signal.

LOWLIMITSIG When connected, this terminal defines the low limit signal.

MODE When connected, this terminal defines the controller MODE.

SIGNAL When connected, this terminal defines the controller output signal in
MODE = EXTERNALSIGNAL.

*
Required signal.

- 345 -
OLGA User manual

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

GETMODE When this output signal is connected, it provides the controller mode
signal to an external device.

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

STDController

The STD Controller converts mass flow rate to volumetric flow rate at standard conditions.

Set correct phase in PHASE key. Specify the fluid in the FLUID or FEEDNAME keys. Specify the wanted
GOR/CGR/WGR/WATERCUT/MOLWEIGHT, and the overall mass flow rate will be calculated.

Connect the STD Controller output terminal Contr to an PID controller Measrd terminal.

Key Type Parameter set Description

Unit:( ) Default:[ ]

CGR Real Condensate-gas ratio. The default value is


(Sm3/Sm3) the equilibrium value from PVT data.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

FEEDMASSFRACTION RealList (-) Mass fraction of each feed.

FEEDMOLEFRACTION RealList (-) Mole fraction of each feed.

FEEDNAME SymbolList Label of feeds feeding to terminal nodes.


Requires COMPOSITIONAL=ON or
BLACKOIL under the OPTIONS keyword.

FEEDVOLFRACTION RealList (-) Volume fraction of each feed given in


FEEDNAME for choke model (only for
Blackoil model).

- 346 -
Reference manual

FLUID Symbol PVTData | Label or number of fluid table to apply for the
specific branch. If a keyword based pvt-file is
used, FLUID must be the same as the
LABEL given in the pvt-file, i.e., numbering is
not valid for this format.

GLR Real Gas/liquid volumetric flow ratio at standard


(Sm3/Sm3) conditions.

GOR Real [-1.0] Gas/oil volumetric flow ratio at standard


(Sm3/Sm3) conditions. By default, the GOR from the
PVT table is used.

LABEL String [STD] Identification label for this controller.

MOLWEIGHT Real Molecular weight of equivalent gas (total


(kg/kmol) flow). By default, the gas density at standard
conditions from the PVT table is used to
determine the molecular weight.

OUTPUTUNIT Symbol <None> | Sm3/h | Unit of controller output.


Sm3/d | scf/d | MMscf/d
| STB/d | STB/M | scf/s |
scf/h | MSm3/d | Mscf/d
| [Sm3/s]

PHASE Symbol <None> | GAS | OIL | The phase for which the volumetric flow rate
WATER | LIQUID | ALL | is specified.

UDPVTFILE Symbol SlurryPvtData | Name of User Defined property file used by


the plug-in module.

WATERCUT Real (-) [-1.0] Water volume fraction in oil/water mixture.


With a value of -1.0 the total water fraction is
taken from the fluid table.

WGR Real [-1.0] Ratio between water (including water in gas


(Sm3/Sm3) phase) and gas.

Signal connections - Input

Name Description

INPSIG* When connected, these terminals define the input signals to the controller.

*
Required signal.

Signal connections - Output

Name Description

CONTR When this output signal is connected, it defines the value of a key in
the external device.

- 347 -
OLGA User manual

ISACTIVE When this output signal is connected, it controls if the external device
is active or not.

RATELIMITED When this output signal is connected, it provides the controller rate
limited signal to an external device.

SATURATED When this output signal is connected, it provides controller saturated


signal to an external device.

SwitchController

The main purpose of the switch controller is to switch between alternative inputs values. The output of the
controller is selected based on the setpoint in MODE = AUTOMATIC or SETPOINT terminal if MODE =
EXTERNALSETPOINT.

SP < 1.5 unconstrained output A is set equal to controller at terminal INPSIG_1

1.5 <= SP < 2.5 unconstrained output A is set equal to controller at terminal INPSIG_2

2.5 <= SP < 3.5 unconstrained output A is set equal to controller at terminal INPSIG_3

….

(Ni-0.5) <= SP unconstrained output A is set equal to controller at terminal INPSIG_N

Where Ni is the number of connected input terminals INPSIG

A switch controller has the following terminals:

INPSIG_1..Ni (Required input)

MODE (Optional input)

SIGNAL (Optional input)

SETPOINT (Optional input)

ACTIVATE (Optional input)

CONTR_1..N (Optional output)

Key Type Parameter set Description

Unit:( ) Default:[ ]

BIAS Real [0.0] Initial output signal.

CLOSINGTIME Real (s) [10.0] Time required to change valve settings or


compressor speed from maximum to
minimum value.

EXPOSE SymbolList States which keys should be made available


as input variables on the OPC server.

LABEL String [CONTR] Identification label for this controller.

MANUALOUTPUT RealList Manual output.

- 348 -
Reference manual