OLGA 2015
Version 2015.1
Table of contents
Table of contents
Copyright notice ... 4
Sample cases ... 5
Basic case ... 8
Basic network case ... 9
Empty Case ... 10
Blackoil ... 11
Compositional mud tracking ... 13
Compositional tracking ... 15
Tracer tracking ... 17
MEG tracking ... 19
Compositional - Single-CO2 ... 20
H
2O tracking (Single component) ... 22
Compositional - Steam/Water-HC ... 23
Drilling ... 25
Advanced well ... 26
Corrosion ... 28
Drilling fluid ... 30
Hydrate kinetics ... 32
Network ... 34
Particle flow ... 36
2
nd-order scheme ... 37
Water options ... 40
Wax deposition ... 41
Backpressure IPR ... 42
Well Forchheimer IPR ... 43
Linear IPR ... 44
Normalized backpressure IPR ... 45
Quadric IPR ... 46
Single Forchheimer IPR ... 47
Tabular IPR ... 48
Undersaturated IPR ... 50
Vogels IPR ... 51
Network server ... 52
PID-net-gainsched-normrange-server ... 53
Server demo with OPC... 56
Source, leak and choke ... 85
Well ESP ... 87
Well-GLV ... 91
Well-pressure boost ... 93
Pump battery ... 95
Centrifugal pump ... 97
Displacement pump ... 99
Simplified pump ... 101
OneSubsea pump ... 103
OneSubsea pump - Start-up procedure ... 106
OneSubsea pump - Trip procedure ... 108
Hydrodynamic slugging ... 109
Start-up slug ... 111
Submodelling ... 113
Fluid bundle ... 115
Solid bundle ... 117
Valve model ... 120
Critical two-phase valve flow ... 122
Subcritical valve flow of a flashing liquid ... 123
Valve recovery ... 124
Valve slip ... 125
Thermal equilibrium in valve flow ... 126
Gas lift well casingheading ... 127
Gas well liquid loading... 129
Well clean-up ... 131
Table of contents
OLGA Sample cases manual
The complete program documentation includes:
OLGA Release notes
OLGA user manual
OLGA GUI user manual
OLGA Sample cases (this document)
Well editor user manual
OLGA Viewer user manual
Pipeline editor user manual
Profile generator user manaul
FEMTherm editor user manual
OLGA OPC server guide
OLGA Submodelling 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 x.x.- Documentation).
The OLGA User manual is also available from the Help menu in the GUI. User Manuals for other tools included with the installation (e.g. FEMTherm, Rocx, OLGA Namespace Explorer, etc.) are available from the Help menus in the tools.
Release information
Please 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.
Operating system
The program is available on PCs with Microsoft Windows operating systems (Windows Vista, Windows 7, Windows 8, Windows Server 2008 and 2012). Several versions of OLGA may be installed in parallel.
Copyright notice
Copyright © 2015 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.
An asterisk (*) is used throughout this document to designate a mark 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.
Sample cases
Sample cases
The OLGA installation includes a set of sample cases. They can be accessed from the New page in the GUI.
The sample cases are organized in projects as follows:
Basic projects Basic case
Basic network case Basic empty case
Compositional projects Blackoil
Compositional tracking Compositional mud tracking Tracer tracking
MEG tracking
CO2 tracking (Single component) H2O tracking (Single component) H2O tracking (Steam/Water–HC)
Drilling projects Drilling FA-Models project Advanced well Corrosion Drilling fluid Hydrate kinetics Network Particle flow 2nd-order scheme Water options Wax deposition IPR projects
OPC server projects Network server PID controller
Server demo with OPC
Pigging projects
Pigging (with and w/o tracking of slug and with and w/o Compositional Tracking)
Plug-in projects
Plug-in hydrate formation Plug-in_sand in water
Process projects
Compressor control
Compressor manual control Jet pump
PID controller Process equipment ESP
Separator
Single separator 3-phase compressor Source, Leak and Choke
Well GLV
Well and Pressure Boost
Pump projects Pump battery Centrifugal pump Displacement pump Simplified pump OneSubsea pump
OneSubsea pump: Start-up procedure OneSubsea pump Stop procedure OneSubsea pump: Trip procedure
Slug tracking projects
Hydrodynamic slugging (with and w/o Compositional tracking) Start-up slug (with and w/o Compositional tracking)
Submodelling projects Submodelling
Thermal Advanced projects Fluid bundle
Sample cases
Valve project Valve samples
Well project
Gas lift well casing heading Gas well liquid loading Well Clean-up
Basic case
This sample case generates a complete basic case - ready for simulation. The case consists of a single flowpath with a closed inlet node and a pressure outlet node. A source is defined in the first section of the pipeline.
Basic network case
Basic network case
This sample case generates a simple network case consisting of two flowpaths leading into an internal node which again is connected to a third flowpath. There are no sources, instead the inlet nodes are massflow nodes.
Empty Case
The OLGA Empty case sample is used to create new case with no predefined content. All information must be given from scratch.
Blackoil
Blackoil
The case Blackoil.opi demonstrates the Blackoil model. The case comprises of a single branch with one ascending pipe. The pipeline is 400 meters long and has an elevation of 10 meters. The pipeline is divided into 10 sections.
Case comments
CaseDefinition
OPTIONS: To activate the Blackoil model, the key COMPOSITIONAL has to be set to BLACKOIL.
INTEGRATION: The simulation end time is set to 100 seconds. The maximum and minimum time steps
are 5 s and 0.01 s, respectively.
Compositional
BLACKOILCOMPONENT: One gas component and one oil component is defined. The oil component is
defined by a specific gravity of 0.8 whereas the gas component is defined by a specific gravity of 0.7. The gas component is given a CO2 mole fraction of 0.1, and an N2 mole fraction of 0.02.
BLACKOILFEED: The BLACKOILFEED combines the two BLACKOILCOMPONENTs. The two
components are combined to give a GOR of 200 Sm3/Sm3 at standard conditions.
FlowComponent
FLOWPATH — Boundary&InitialConditions — HEATTRANSFER: A constant ambient temperature of
6°C and an ambient heat transfer coefficient of 6.5 W/m2K is used.
FLOWPATH — Boundary&InitialConditions — SOURCE: The source has a constant flow rate
throughout the simulation. The name of the fluid (feed) is given by the key FEEDNAME. The flow rate is set to 1000 STB/d (in the FEEDSTDFLOW keyword).
FLOWPATH — Output — TRENDDATA: Pressure, volumetric oil holdup and volumetric water holdup are
plotted at the first and last section of the pipe. The overall content of oil, and overall content of water are plotted. The content is given as cubic meters for the entire pipeline.
FLOWPATH — Output — OUTPUTDATA: Pressure, temperature, volumetric holdup, gas mass flow and
overall mass flow are written to the output file.
TREND: Trend variables are plotted every 15 seconds.
PROFILE: Profile variables are plotted every 5 minutes.
PROFILEDATA: Pressure, temperature, liquid holdup, overall mass flow and gas mass flow are plotted.
Compositional mud tracking
Compositional mud tracking
The sample case CompositionalMudTracking.opi simulates a gas kick in a well filled with oil based mud. Activating the compositional option allows for modelling of the partial dissolution of gas in the mud. The system consists of a 3000 m deep well and two sources near the bottom of the well. The bottom most source S-OBM produces a stable flow of oil based mud. The other source, S-KickGas, releases a gas flow in a given period.
Operation scenario:
The Steady state preprocessor is run with flow of mud only, and then the dynamic simulation is started with the same stable flow of mud. In the period 3-6 minutes after start, gas is released through a separate source to simulate a kick. The simulation continues until the gas has reached the surface. The transport of the kick gas as partially free gas and partially dissolved gas can be seen by inspecting the PROFILE plot variables CGG_METHANE and CGHT_METHANE, respectively.
Case comments
CaseDefinitionOPTIONS: The Steady state preprocessor is applied. In order to have a compositional description of mud
and reservoir fluids, the drilling and compositional options are activated.
FLOWPATH — Piping: The well consists of a 3000 m vertical pipe with inner diameter 0.12 m.
FLOWPATH — Output — PROFILEDATA: Component mass flow rates in gas and oil phases are plotted NODE: The inlet node is closed, while the outlet node is defined with a pressure of 1 atm.
Output
TREND: Trend variables are plotted every 10 seconds. PROFILE: Profile variables are plotted every minute.
Compositional tracking
Compositional tracking
The sample case CompTrack.opi comprises one branch with ascending and descending pipes. Initially the pipeline is filled with live crude and the fluid is under-saturated throughout the pipeline.
After 20 hours, the system is shut-in and cooled down due to a low ambient temperature. Then, gas pockets are generated at the highest points of the pipeline. After 50 hours, oil is injected at the inlet. This fluid is the same as the one the pipeline was filled with initially. The gas is dissolved in the under-saturated oil. After 51 hours all the gas has disappeared and the system returns to the original steady state.
Schematic view of the pipeline geometry.
Case comments
CaseDefinitionOPTIONS: To activate Compositional Tracking, the key COMPOSITIONAL has to be set to ON.
FILES: A feed file generated with Multiflash has be specified using the key FEEDFILE. The feed file
contains information about the fluids and the components used in the simulation.
INTEGRATION: The simulation end time is set to 70 hours. The maximum and minimum time steps are
20 s and 0.01 s, respectively.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
NODE: The inlet node is closed since there is a mass source at the inlet producing at varying flow rate. At
the outlet, a constant pressure condition is applied. The same fluid is used at both nodes (given by the key FEEDNAME).
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file every hour.
TREND: Trend variables are plotted every three minutes.
Tracer tracking
Tracer tracking
The sample case KHI-TracerTracking.opi demonstrates how OLGA can be used to model an inhibitor tracer tracking case.
The system consists of a well tubing pipeline with a 1875 m true vertical depth (TVD) and a 2725 m measured depth (MD), a 150 m long wellhead pipe, a 3150 m pipeline leading up to a 391.2 m vertical riser and a 100 m long horizontal topside pipe. The KHI inhibitor is injected into the first section of the wellhead pipe. A wellhead choke and a check vale are placed at the wellhead pipeline downstream of the KHI injection position. The total production is controlled by the wellhead choke. A sketch of the model is shown below.
Operation scenario
The well is a gas well. The fluid temperature may be below the hydrate temperature in the flow line. Therefore, a KHI tracer is injected at the wellhead to prevent hydrate formation. The KHI flow rate and mass fraction in the water phase can be checked for different KHI age groups along the pipeline.
Case comments
Library
HYDRATECURVE - Definition of hydrate curve used by HYDRATECHECK.
TRACERFEED - Definition of the tracer feed TR-KHI.
temperature along the tubing. In the flow line and riser, the ambient temperature is 4°C. The heat transfer coefficient on outer wall is set to 500 W/m2K. The minimum heat transfer coefficient on inner wall is set to 10 W/m2K.
FLOWPATH — Boundary&InitialConditions — WELL --The reservoir pressure is 200 bara and reservoir
temperature 50°C. Production and injection type is LINEAR. AINJ=APROD=0, BINJ=10-7 kg/s/Pa and
BPROD=2.5·10-6 kg/s/Pa.
FLOWPATH — Boundary&InitialConditions — SOURCE - The tracer source injects tracer at a rate of
1 kg/s.
FLOWPATH — FA-models — HYDRATECHECK - Hydrate checking is activated in all flowpaths.
FLOWPATH — Output — TRENDDATA - Tracer variables are plotted.
FLOWPATH — Output — PROFILEDATA -Tracer variables are plotted.
FLOWPATH — Output —SERVERDATA - Server variables are available for plotting in interactive
simulations.
NODE - The outlet pressure held constant at 30 bara and the temperature is 20°C.
Output
ANIMATE - 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT - OLGA variables are printed to the output file every 10 hours.
TREND - Trend variables are plotted every 10 seconds.
MEG tracking
MEG tracking
The sample case Meg-Tracking.opi demonstrates the features of the Inhibitor tracking module. A horizontal pipeline with a source at the inlet is used to show that the concentration of MEG can be changed during the simulation and how this can be tracked through the pipeline.
Case comments
FA-models
WATEROPTIONS: Water flash and water slip are turned on.
CaseDefinition
OPTIONS: To activate MEG tracking, the key COMPOSITIONAL has to be set to MEG.
FlowComponent
FLOWPATH — Boundary&InitialConditions — SOURCE: A mass source with constant mass flow is
placed at the inlet. The MEG concentration in the aqueous phase changes from 60% to 30% after 1.5 hours.
FLOWPATH — Piping: The branch consists of 11 pipes.
FLOWPATH — Output — TRENDDATA: The mole fractions of all three components in the gas and water
phases are plotted.
FLOWPATH — Output — PROFILEDATA: The mole fraction of MEG in the water phase is plotted.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
NODE: A closed node is placed at the pipe inlet. A constant pressure is applied at the outlet.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
Compositional - Single-CO2
Case: Single-CO2.opi
Purpose: "Walk around" the critical point.
Fluid: 100% CO2
The transient starts in the gas region, T=5°C and P=30 bar. After 60 seconds, the inlet temperature is increased and reaches 50°C after 120 seconds. A corresponding increase in outlet temperature follows. A temporary small increase in outlet flow rate occurs due to the lower density of gas at the increased temperature. The lower gas density leads to an increase in volumetric flow rate.
After 10 minutes, the outlet pressure is increased to 80 bar, thereby moving into the dense phase region on the gas side. A temporary increase in outlet temperature occurs due to compression of the gas and a temporary reduction in outlet flow rate can also be seen.
After 20 minutes, the inlet temperature is reduced to 5°C, thereby moving into the liquid side of the dense phase region. This leads to condensation of gas which slows down the reduction in outlet temperature (release of heat due to condensation). The outlet flow rate of gas shows an oscillatory behavior and finally goes to zero when all the vapor is either condensed or has left the pipe.
After half an hour, the outlet pressure is reduced to 30 bar, thereby crossing the saturation line from the liquid side to the gas side. A temporary drop in outlet temperature down to about saturation temperature occurs due to the evaporation of water. There is also an overshoot in gas flow rate due to the volume increase.
Case comments
CaseDefinition
OPTIONS: The Single component module is activated by setting COMPOSITIONAL=SINGLE.
TEMPERATURE=ADIABATIC (no heat exchange with walls)
Compositional
SINGLEOPTIONS: CO2 is activated by setting COMPONENT=CO2. Time constants are set: TCONDENSATION=1.0, TBOILING=1.0.
FlowComponent:
FLOWPATH — Boundary&InitialConditions — SOURCE: Liquid source delivering 2 kg/s. Temperature
and pressure varies with time.
FLOWPATH — Piping: 100 m horizontal pipe, diameter=0.12 m, 20 sections
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
Compositional - Single-CO2
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file every 600 seconds.
TREND: Trend variables are plotted every second.
PROFILE: Profile variables are plotted every 5 minutes.
PROFILEDATA: Pressure, temperature, liquid holdup, overall mass flow and gas mass flow are plotted.
H
2O tracking (Single component)
Case: Single-H2O.opi
Purpose: "Walk around" the critical point. Fluid: 100% H2O
The transient starts in the gas region, T=360°C and P=150 bar. After 60 seconds the inlet temperature is increased and reaches 450°C after 120 seconds. A corresponding increase in outlet temperature follows. A temporary small increase in outlet flow rate occurs due to the lower density of gas at the increased temperature.
After 10 minutes, the outlet pressure is increased to 227 bar, thereby moving into the dense phase region on the gas side. A temporary increase in outlet temperature occurs due to compression of the gas and a minor reduction in outlet flow rate can also be seen.
After 20 minutes, the inlet temperature is reduced to 360°C, thereby moving into the liquid side of the dense phase region. This leads to condensation of gas which slows down the reduction in outlet
temperature. The outlet flow rate of gas shows an oscillatory behavior and finally goes to zero when all the vapor is either condensed or has left the pipe. During the oscillations in outlet flow of vapor negative values can be seen, which is due to the oscillations being of numerical nature. The conditions are quite close to the critical point where the behavior of the fluid properties is highly nonlinear.
After half an hour, the outlet pressure is reduced to 150 bar, thereby crossing the saturation line from the liquid side to the gas side. A temporary drop in outlet temperature down to about saturation temperature occurs due to the evaporation of water. There is also an overshoot in gas flow rate due to the volume increase.
Case comments
CaseDefinition
OPTIONS: The Single component module is activated by setting COMPOSITIONAL=SINGLE.
TEMPERATURE=ADIABATIC (no heat exchange with walls)
Compositional
SINGLEOPTIONS: H2O is activated by setting COMPONENT=H20. Time constants are set: TCONDENSATION=1.0, TBOILING=1.0, TVAPORIZATION=1.0
FlowComponent:
FLOWPATH — Boundary&InitialConditions — SOURCE: Water source delivering 2 kg/s. Temperature
and pressure varies with time.
FLOWPATH — Piping: 100 m horizontal pipe, diameter=0.12 m, 20 sections.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
Compositional - Steam/Water-HC
Compositional - Steam/Water-HC
Case: SteamWater-HC.opi
Purpose: "Walk around" the critical point. Fluid: 100% H2O
The transient starts in the gas region, T=360°C and P=150 bar. After 60 seconds the inlet temperature is increased and reaches 450°C after 120 seconds. A corresponding increase in outlet temperature follows. A temporary small increase in outlet flow rate occurs due to the lower density of gas at the increased temperature.
After 10 minutes, the outlet pressure is increased to 227 bar, thereby moving into the dense phase region on the gas side. A temporary increase in outlet temperature occurs due to compression of the gas and a minor reduction in outlet flow rate can also be seen.
After 20 minutes, the inlet temperature is reduced to 360°C, thereby moving into the liquid side of the dense phase region. This leads to condensation of gas which slows down the reduction in outlet
temperature. The outlet flow rate of gas shows an oscillatory behavior and finally goes to zero when all the vapor is either condensed or has left the pipe. During the oscillations in outlet flow of vapor negative values can be seen, which is due to the oscillations being of numerical nature. The conditions are quite close to the critical point where the behavior of the fluid properties is highly nonlinear.
After half an hour, the outlet pressure is reduced to 150 bar, thereby crossing the saturation line from the liquid side to the gas side. A temporary drop in outlet temperature down to about saturation temperature occurs due to the evaporation of water. There is also an overshoot in gas flow rate due to the volume increase.
Case comments
CaseDefinition
OPTIONS - The Steam\water–HC module is activated by setting COMPOSITIONAL=STEAMWATER-HC.
TEMPERATURE=ADIABATIC (no heat exchange with walls)
Compositional
COMPOPTIONS - Time constants are set: TCONDENSATION=1.0, TBOILING=1.0,
NODE - A closed node is placed at the pipe inlet. The outlet is a pressure boundary.
Output
ANIMATE - 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT - OLGA variables are printed to the output file every 600 seconds.
TREND - Trend variables are plotted every seconds.
Drilling
Drilling
The sample case Drilling.opi gives an example of a simple drilling case. The configuration includes the minimum configuration (three flowpaths) as described in the Drilling fluid - How to use section in the OLGA user manual. In this case, we have also included an internal node to connect the annulus to a return line.
The case is configured to start drilling from the top. After it reaches the bottom, the drill string is pulled up again. An oil-based mud is injected from the top, while the two wells at the bottom start producing as the corresponding sections are activated.
Case comments
In order to couple the STANDNODE to the drill string, DRILLSTRING = DrillString1 is set under the STANDNODE keyword.
Two ANNULUS components are defined for this case: one going from the top to the middle of the drill string geometry (ANNULUS_1), and another one going from the middle to the bottom (ANNULUS_2). It is worth remembering that Annulus1 and DrillString1 have equivalent geometries, and that the corresponding positions in Annulus1 have been used to define the ANNULUS components.
Advanced well
The sample case AdvancedWell.opi demonstrates some of the features in the advanced well functionality. A 3500 m vertical well is producing from a gas reservoir through a 5.5" ID tubing. The formation has a permeability of 500 mD and the Forchheimer inflow correlation is applied. This is a typical inflow correlation for a gas reservoir where the non-linear behavior between the produced gas rate and flowing bottom hole pressure is important.
A wellhead choke is placed at the last section boundary of the branch.
Case comments
CaseDefinition
OPTIONS: The steady state pre-processor is deactivated. The heat transfer number outside the wall have
to be given.
INTEGRATION: The case is simulated form 0 to 5 hours with a maximum time step of 2 seconds. The
minimum time step is set to 0.001 seconds.
FlowComponent:
FLOWPATH — Boundary&InitialConditions — HEATTRANSFER: A linear ambient temperature profile
is used for the well. An overall heat transfer coefficient of 10 W/m2K has been used.
FLOWPATH — Boundary&InitialConditions — INITIALCONDITIONS: The pipeline is initialized with gas
at 30°C. The mass flow is set to zero throughout the pipeline. The pressure is set to 400 bar at the inlet, 300 bar at the outlet, and is interpolated vertically in between.
FLOWPATH — Boundary&InitialConditions — WELL: A gas well with reservoir pressure of 412 bara
and reservoir temperature of 43.5°C is placed at the branch inlet. The well production is calculated using the Forchheimer model and the linear model is used for injection. The reservoir permeability is 500 mD and the net pay from the zone is 14 m. The mechanical skin is 3, and a turbulent non-Darcy skin of 0.01 1/mmscf/d is used.
FLOWPATH — ProcessEquipment — VALVE: A wellhead choke with 10% opening is placed at the
outlet.
NODE: The inlet node is closed and the inlet flow is specified with a productivity correlation based on
physical reservoir properties (see WELL). The outlet node is of type pressure. The boundary conditions are constant through the simulation.
FLOWPATH — Piping: The 3500 m long vertical well is described by 9 pipes.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
Advanced well
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file every 10000 seconds.
TREND: Trend variables are plotted every 100 seconds.
PROFILE: Profile variables are plotted every 6000 seconds.
Corrosion
The sample case Corrosion.opi is an example illustrating the use of the corrosion model. The main pipeline starts with a 3.3 km long horizontal pipe ending in a 90 m riser followed by a short horizontal pipe. The inner diameter of the pipe is 0.41 m. Heat transfer through pipe walls is calculated. The fluid
composition is of a gas condensate type. The water cut is about 80%.
Case comments
Library
WALL: The pipe walls consist of steel (two layers) covered by one layer of insulation.
CaseDefinition
OPTIONS: The full heat transfer calculation option with heat transfer through pipe walls is used.
INTEGRATION: The simulation runs for five hours using a minimum time step of 0.01 s and a maximum
one of 10 s. The initial time step is set equal to the minimum one.
FA-models:
WATEROPTIONS: Water flash and water slip are turned on.
FlowComponent
FLOWPATH — Boundary&InitialConditions — SOURCE: The inlet boundary condition is a constant
mass source with mass flow of 34.181 kg/s and temperature of 60°C. The mass fraction of free water is set to 0.3. Since water flash is active, see WATEROPTIONS keyword, there is additional water in the vapor phase given by the water vapor mass fraction in the PVT table. By default, the equilibrium is used to determine the gas source at the inlet.
FLOWPATH — FA-models — CORROSION: Both Model1 (NORSOK) and Model3 (de Waard 95) are
activated on flow path B-INLET. The CO2 fraction, i.e., the ratio of CO2 partial pressure to total pressure in the gas, is set to 5%. The fraction of glycol in the glycol/water mixture is set to 50% and the inhibitor efficiency is set to 90%. The presence of glycol yields a reduction factor of the corrosion rate. The effect of a second inhibitor is given directly though the key INHIBITOREFFICIENCY. For the NORSOK model, only the largest of these two factors is multiplied with the corrosion rate while for the de Waard 95 model, both factors are multiplied with the corrosion rate.
FLOWPATH — Piping: The pipeline is 3.3 km long. The total number of pipes, including topside, is 9. The
pipes are divided into 58 sections. The pipe walls consist of steel (two layers) covered with a layer of insulation.
FLOWPATH — Output — PROFILEDATA: Pressure, temperature, overall mass flow, gas velocity, and oil
and water hold-up and velocities are profile plotted for all pipelines.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
Corrosion
NODE: The inlet node is closed. The outlet boundary condition is to a constant pressure of 24 bara and a
temperature of 26°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file at the start and end of the simulation.
TREND: Trend variables are plotted every 10 seconds.
Drilling fluid
The sample case DrillingFluid.opi demonstrates how OLGA models drilling fluid in a well clean-up case.
The system consists of a well tubing pipeline with 1875 m TVD and 2725 m MD and a 150 m long wellhead pipe. A source injects water based drilling mud from the well bottom hole to fill-in the well tubing. The well production will push the drilling mud out of the tubing and start normal production. A sketch of the model is shown below.
Operation scenario:
Water based drilling mud is injected from the well bottom hole during the first hour in order to fill-in the well tubing. The mud is then reduced to zero over half an hour. The well production will push the drilling mud out of the tubing and start normal production.
Trend plots of the total mass flow rate at topside (GT), the total well flow rate (GTWELL), and mud source mass flow rate (GTSOUR) show the flow rate changing. Profile plots of the mass fraction of mud
(MFAMUD), liquid density (ROL) and hold-up show changes in the amount of mud and liquid in the pipeline.
Case comments
Library
DRILLINGFLUID: The drilling fluid, DRFL_LIQ_1, is defined with TYPE=WATER,
MINDENSITY=600 kg/m3, MAXDENSITY=2400 kg/m3, MINVISCOSITY=10-4 Ns/m2 and
MAXVISCOSITY=1 Ns/m2
CaseDefinition
OPTIONS: The full heat transfer calculation option with heat transfer through the pipe walls is used. The
Drilling fluid
FlowComponent:
FLOWPATH — Boundary&InitialConditions — HEATTRANSFER: The ambient temperature is vertically
interpolated from 80°C at the bottom of the borehole to 20°C at the wellhead. The heat transfer coefficient on outer walls is set to 500 W/m2K. The minimum heat transfer coefficient on inner walls is set to
10 W/m2K.
FLOWPATH — Boundary&InitialConditions — SOURCE: The mass source injects water based mud at
the well bottom hole at a rate of 60 kg/s over the first hours. Over the next half an hour, the rate is reduced to zero.
FLOWPATH — Boundary&InitialConditions — WELL: The reservoir pressure is 200 bara and reservoir
temperature 80°C. Production and injection type is LINEAR. AINJ=APROD=0, BINJ=10-8 kg/s/Pa and
BPROD=3.5·10-6 kg/s/Pa.
FLOWPATH — Output — TRENDDATA: The mass fraction of mud is plotted.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
NODE: The outlet pressure held constant at 30 bara and the temperature is 4°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file every 10 hours.
TREND: Trend variables are plotted every 10^#160;seconds.
Hydrate kinetics
The sample case HydrateKinetics.opi demonstrates how the hydrate kinetics model can be used in an OLGA simulation. The hydrate kinetics model enables approximate predictions of where hydrate plugs might form in oil and gas pipelines.
The system consists of a well tubing pipeline with a 1875 m true vertical depth (TVD) and a 2725 m measured depth (MD), a 150 m long wellhead pipe, a 3150 m pipeline leading up to a 391.2 m vertical riser and a 100 m long horizontal topside pipe. The total production is controlled by the wellhead choke. A sketch of the model is shown below.
Operation scenario:
The well is a gas well. The fluid temperature may be below the hydrate temperature in the flow line. In order to avoid hydrate plugs, regions where the conditions might cause hydrate plugs to form can be detected.
Case comments
Library
Hydrate kinetics
CaseDefinition
OPTIONS: Temperature calculations use heat transfer on the inside and outside of pipe walls as well as
heat conduction, but no heat storage is accounted for. The initial conditions are generated by the steady state pre-processor.
FlowComponent:
FLOWPATH — Boundary&InitialConditions — HEATTRANSFER: The inlet ambient temperature of the
well is 50°C and outlet ambient temperature is 4°. The code will do a vertical interpolation on ambient temperature along the tubing. In the flow line and riser, the ambient temperature is 4°C. The heat transfer coefficient on outer wall is set to 500 W/m2K. The minimum heat transfer coefficient on inner wall is set to 10 W/m2K.
FLOWPATH — Boundary&InitialConditions — WELL: The reservoir pressure is 200 bara and reservoir
temperature 50°C. Production and injection type is LINEAR. AINJ=APROD=0, BINJ=10-7 kg/s/Pa and
BPROD=2.5·10-6 kg/s/Pa.
FLOWPATH — FA-models — HYDRATECHECK: Hydrate checking is activated in all flowpaths.
FLOWPATH — FA-models — HYDRATEKINETICS: The hydrate kinetics model is applied for all
flowpaths.
FLOWPATH — Output — TRENDDATA: Hydrate variables are plotted.
FLOWPATH — Output — PROFILEDATA: Hydrate variables are plotted.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
NODE: The outlet pressure held constant at 50 bara and the temperature is 20°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file every 10 hours.
TREND: Trend variables are plotted every 10 seconds.
Network
The sample case Network.opi is a network case. Five wells merge into two different wellheads. The fluid is transported through two pipelines, one from each wellhead, to a processing platform. Here, the flow merge into a common header and then flows through some horizontal piping before reaching the outlet.
Two wells merge at the first wellhead and the other three wells at the second one.
Two slightly different geometries are used for the wells. The boundary conditions vary between given pressure, given mass flow, and well productivity index.
The two pipelines have identical geometries.
Schematic view of the network.
Case comments
CaseDefinition
OPTION: Temperature option "ADIABATIC" has been chosen. No heat transfer through the pipe walls is
assumed.
INTEGRATION: The simulation end time is set to 3 hours. The maximum and minimum time steps are
10 seconds and 0.01 seconds, respectively.
FlowComponent
FLOWPATH — Boundary&InitialConditions — SOURCE: Branches 1 and 5 use constant mass
sources. N.B., for Branch 1, the mass flow is specified in terms of volumetric flow rate of liquid at standard conditions.
FLOWPATH — Boundary&InitialConditions — WELL: The reservoir pressure and temperature are
given together with a linear productivity index for gas and liquid flow at the midpoint of the first section in branch 3.
Network
FLOWPATH — ProcessEquipment — VALVE: The wellhead choke in Branch 3 is fully open during the
entire simulation.
FLOWPATH — Piping: The number of pipes and their coordinates are defined for each branch, x and z
represent horizontal coordinates whereas y is the vertical axis. As a verification of the input, the user may note the length and inclination of each pipe section as printed to the output file at the end of the
initialization. Toward the end of the flow lines, the section lengths are gradually reduced to the values in the riser.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
NODE: Branches 1, 3 and 5 have closed nodes at the inlets. Branches 2 and 6 have constant pressure
nodes at the inlets. Branches 4 and 7 are connected to internal nodes and have no terminal nodes. Branch 8 has a constant pressure node at the outlet.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds.
OUTPUT: OLGA variables are printed to the output file at the end of the simulation.
TREND: Trend variables are plotted every 30 seconds.
Particle flow
The sample case ParticleFlow.opi demonstrates how OLGA simulates particle deposition and entrainment in a horizontal pipeline.
The case consists of a horizontal pipeline with a fixed outlet pressure. A source injects water, oil, gas and particles at the inlet. The mass flow is initially reduced. Consequently, a bed is formed. After some time, the mass flow is increased again, entraining the particles from the bed and making the latter disappear.
Case comments
Library
PARTICLES:
Default values are used for the properties of the particle phase.
CaseDefinition
OPTIONS: We set PARTICLEFLOW=ADVANCED to enable bed formation.
FA-models
PARTICLEOPTIONS: We set BEDPOROSITY=0.3 and leave the default value for the rest.
FlowComponent:
FLOWPATH — Boundary&InitialConditions — SOURCE: The mass source injects oil, water, gas and
particles. The mass flow rate is reduced linearly from 18 kg/s to 2 kg/s in 800s and then increased again to 18kg/s with the same slope. The mass fraction of particles being injected is kept constant at one percent.
NODE: The outlet pressure held constant at 50 bara and the temperature is 22°C.
Output
OUTPUT: OLGA variables are printed to the output file every 1 hour.
TREND: Trend variables are plotted every 15 seconds.
2nd-order scheme
2
nd-order scheme
The sample case Second-order-MEGsteps.opi illustrates the improved accuracy that can be achieved by applying a 2nd-order scheme when solving the mass equations.
The pipeline is 100 m long with a 50 m gain in elevation. Initially, the first 100 m of the pipe is filled with oil whereas the rest of the pipe is filled with water. Within the water, there are three regions with various amounts of MEG, see See " Initial MEG fractions." on page 37. As the simulation starts, oil is injected at the inlet, pushing the water out of the pipeline. What should be noted are the differences in results when running the case using a 2nd-order scheme for the mass equations as compared to a 1st-order scheme. While numerical diffusion rapidly smears out the MEG using the 1st-order scheme, pronounced peaks are preserved throughout the simulation using the 2nd-order scheme, see See " MEG fractions 85 s into the simulation. The black curve is using a 1st-order scheme for the mass equations whereas the red curve illustrates the use of a 2nd-order scheme." on page 38.
Initial MEG fractions.
MEG fractions 85 s into the simulation. The black curve is using a 1st-order scheme for the mass equations whereas the red curve illustrates the use of a 2nd-order scheme.
Case comments
CaseDefinition
OPTIONS: The discretization scheme applied when solving the mass equations is determined by the key
MASSEQSCHEME.
FlowComponent:
FLOWPATH — Boundary&InitialConditions — INITIALCONDITIONS: The first 100 m of the pipe is
filled with oil whereas the rest of the pipe contains only water. Within the water, three regions containing different amounts of MEG are set up.
FLOWPATH — Boundary&InitialConditions — SOURCE: The mass source is ramped up to a steady
mass flow of 53.34 kg/s over the first 8.5 seconds of the simulation. The source temperature is 30°C.
FLOWPATH — Piping: The branch is a single pipe, 1 km long with an elevation of 50 m.
FLOWPATH — Output — PROFILEDATA: Variables of interest are hold-ups and inhibitor fractions.
FLOWPATH — Output —SERVERDATA: Server variables are available for plotting in interactive
simulations.
NODE: The inlet node is closed. The outlet boundary condition is set to a constant pressure of 4.5 MPa
and a temperature of 30°C.
Output:
2nd-order scheme
OUTPUT: OLGA variables are printed to the output file every 100 seconds.
TREND: Trend variables are plotted every 0.1 seconds.
Water options
The sample case WaterOptions.opi is an example of a three phase simulation using WATEROPTIONS. The main pipeline starts with a 3.3 km long horizontal pipe ending in a 90 m riser followed by a short horizontal pipe. The inner diameter of the pipe is 0.41 m. Heat transfer through pipe walls is calculated.
Case comments
Library
WALL: - The pipe walls consist of steel (two layers) covered by one layer of insulation.
CaseDefinition
OPTIONS -The full heat transfer calculation option with heat transfer through pipe walls is used.
INTEGRATION - The simulation runs for five hours using a minimum time step of 0.01 s and a maximum
one of 10 s. The initial time step is set equal to the minimum one.
FA-models
WATEROPTIONS - Water flash and water slip are turned on.
FlowComponent
FLOWPATH — Boundary&InitialConditions — SOURCE - The inlet boundary condition is a constant
mass source with mass flow of 34.181 kg/s and temperature of 60°C. The mass fraction of free water is set to 0.3. Since water flash is active, see WATEROPTIONS keyword, there is additional water in the vapor phase given by the water vapor mass fraction in the PVT table. By default, the equilibrium is used to determine the gas source at the inlet.
FLOWPATH — Piping - The pipeline is 3.3 km long. The total number of pipes, including topside, is 9.
The pipes are divided into 58 sections. The pipe walls consist of steel (two layers) covered with a layer of insulation.
FLOWPATH — Output —SERVERDATA - Server variables are available for plotting in interactive
simulations.
NODE - The inlet node is closed. The outlet boundary condition is to a constant pressure of 24 bara and a
temperature of 26°C.
Output
ANIMATE - 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds. OUTPUT - OLGA variables are printed to the output file at the start and end of the simulation. TREND - Trend variables are plotted every 10 seconds.
Wax deposition
Wax deposition
The sample case WaxDeposition.opi demonstrates a simulation of wax deposition. The pipeline consists of an 8 km long horizontal pipe, a 110 m vertical riser, and 60 m long horizontal topside pipe. The inner diameter is 0.17 m throughout the pipeline.
The fluid enters the pipeline with a temperature of 70°C, which is above the wax appearance temperature. On its way through the pipeline, the fluid is cooled and wax precipitation and deposition starts once the temperature is low enough. This happens about 2 km from the inlet. Due to the thermal insulation effect of the wax layer, the fluid temperature increases in the parts of the pipeline where wax is deposited.
Furthermore, the wax layer makes the effective area of the pipe decreases, resulting in an increasing inlet pressure in order to maintain a constant flow rate.
Case comments
Library
WALL: The pipe wall consists of steel, concrete, and an insulating polypropylene layer.
CaseDefinition
FILES: The wax properties are defined in the file wax_tab-1.wax.
OPTION: The steady state pre-processor is activated to generate the initial conditions. N.B., wax is not
accounted for in the pre-processor. Full temperature calculation (TEMPERATURE=WALL) is required when simulating wax deposition.
INTEGRATION: Since wax deposition is a slow process, the simulation time is set to 10 days. This is
sufficient for a wax layer to start appearing.
FlowComponent
FLOWPATH — Boundary&InitialConditions — SOURCE: The flow rate at the inlet is set to 17.51 kg/s
with a temperature of 70°C.
FLOWPATH — FA-models — WAXDEPOSITION: Deposition of wax is allowed in the entire pipeline. The
wax porosity is set to 0.6 and the built in routine for calculating the viscosity of oil with precipitated wax is used. Wax properties are taken from the table WAXTAB in the file wax_tab-1.wax. Contribution to the wall roughness from deposited wax is not considered (WAXROUGHNESS=0 by default).
FLOWPATH — Output — PROFILEDATA: Variables of interest are pressure and temperature in addition
to wax related variables, such as wax layer thickness (DXWX), mass of wax dispersed and dissolved in oil (MWXDIP and MWXDIS, respectively) and the wax appearance temperature (WAXAP), which is pressure dependent.
Backpressure IPR
The sample case Well-BackpressureIPR.opi is constructed to show how to model well production using backpressure reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62°C respectively. The PRODOPTION and INJOPTION are chosen as BACKPRESSURE with positive production and negative injection coefficient C =100 scf/d/psi2. The exponent constant n=1.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component:
FLOWPATH(s): The well consists of one flowpath: Well
OUTPUT: Multiple variables have been set up for output such as trend variables and profile variables. NODE: The bottom of the wellbore is a closed node. The tubing outlet boundary condition is set to a
constant pressure of 50 bara, temperature of 22°C.
Output:
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds. OUTPUT: OLGA variables are printed to the output file at the start and end of the simulation. TREND: Trend variables are plotted every 15 seconds.
Well Forchheimer IPR
Well Forchheimer IPR
The sample case Well-ForchheimerIPR.opi is constructed to show how to model a well production using Forchheimer reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62°C respectively. The PRODOPTION and INJOPTION are chosen as Forchheimer with positive production and negative injection coefficients B=1 e-6 Psi2 –d/scf and C =1e-10 Psi2 –d2/scf2.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
Linear IPR
The sample case Well-LinearIPR.opi is constructed to show how to model a well production using the linear reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 85 bara and 62°C respectively. The PRODOPTION and INJOPTION are chosen as linear with positive production and negative injection coefficient B=1 e-6 kg/s/Pa.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
FLOWPATH(s): The well consists of one flowpath: Well
OUTPUT: Multiple variables have been set up for output such as trend variables and profile variables. NODE: The bottom of the wellbore is a closed node. The tubing outlet boundary condition is set to a
constant pressure of 50 bara, temperature of 22°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds. OUTPUT: OLGA variables are printed to the output file at the start and end of the simulation. TREND: Trend variables are plotted every 15 seconds.
Normalized backpressure IPR
Normalized backpressure IPR
The sample case Well-NormalizedBackpressureIPR.opi is constructed to show how to model a well production using normalized backpressure reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62°C respectively. The PRODOPTION and INJOPTION are chosen as NORMALIZEDBACKPRESSURE with exponent constant=1, QMAX=50000 STB/d and PHASE=OIL
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Quadric IPR
The sample case Well-QaudraticIPR.opi is constructed to show how to model a well production using Qaudratic reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62°C respectively. The PRODOPTION and INJOPTION are chosen as QUADRATIC with AINJ=APROD=0 Pa2 and BINJ=BPROD=0 Pa2s/kg and
CINJ=CPROD=50000000 Pa2s2/Kg2.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
FLOWPATH(s): The well consists of one flowpath: Well
OUTPUT: Multiple variables have been set up for output such as trend variables and profile variables. NODE: The bottom of the wellbore is a closed node. The tubing outlet boundary condition is set to a
constant pressure of 50 bara, temperature of 22°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds. OUTPUT: OLGA variables are printed to the output file at the start and end of the simulation. TREND: Trend variables are plotted every 15 seconds.
Single Forchheimer IPR
Single Forchheimer IPR
The sample case Well-SingleForchheimerIPR.opi is constructed to show how to model a well production using Single Forchheimer reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80.5 bara and 62 C respectively. The PRODOPTION and INJOPTION are chosen as SINGLEFORCHHEIMER with BINJ=BPROD=1e-6 d/scf and CINJ=CPROD=1e-11 psi-d2/scf.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
FLOWPATH(s): The well consists of one flowpath: Well
Tabular IPR
The sample case Well-TabularIPR.opi is constructed to show how to model a well production using Single tabular inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62 C respectively. The PRODOPTION and INJOPTION are chosen as TABULAR. The production table given at three DELTAP (PR- Pwf) (bar) provides the
production mass flow (kg/s) from the reservoir. The table is shown in See " Production table" on page 48.
Production table
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
Tabular IPR
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
FLOWPATH(s): The well consists of one flowpath: Well
OUTPUT: Multiple variables have been set up for output such as trend variables and profile variables. NODE: The bottom of the wellbore is a closed node. The tubing outlet boundary condition is set to a
constant pressure of 50 bara, temperature of 22°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds. OUTPUT: OLGA variables are printed to the output file at the start and end of the simulation. TREND: Trend variables are plotted every 15 seconds.
Undersaturated IPR
The sample case Well-UndersaturatedIPR.opi is constructed to show how to model a well production using Undersaturated reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62°C respectively. The bubble point pressure is set as 79 bara while INJECTIVY= 0 scf/d/psi and PRODI= 42 scf/d/psi.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
FLOWPATH(s): The well consists of one flowpath: Well
OUTPUT: Multiple variables have been set up for output such as trend variables and profile variables. NODE: The bottom of the wellbore is a closed node. The tubing outlet boundary condition is set to a
constant pressure of 50 bara, temperature of 22°C.
Output
ANIMATE: 3D plot of holdup for liquid along the pipeline is plotted every 10 seconds. OUTPUT: OLGA variables are printed to the output file at the start and end of the simulation. TREND: Trend variables are plotted every 15 seconds.
Vogels IPR
Vogels IPR
The sample case Well-VogelsIPR.opi is constructed to show how to model a well production using Vogels reservoir inflow option. The well geometry and components are shown in the figure below.
The system consists of a 1000 m vertical well with a well module located at the bottom. The reservoir pressure and temperature are 80 bara and 62°C respectively. QMAX in Vogels equation is set to 50000 STB/D.
Library
WALL: The simple tubing wall consists of two material layers.
CaseDefinition
OPTIONS: The STEADYSTATE preprocessor is ON.
INTEGRATION: The simulation runs for 100 seconds using a minimum time step of 0.01 s and a maximum
one of 5 s. The initial time step is set equal to the minimum time step.
Flow Component
FLOWPATH(s): The well consists of one flowpath: Well
Network server
The case Network-server.opi is an OPC server version of the demo case Network.opi.
Case comments
Only server specific items are commented here. For other comments see the Network.opi sample which apart from server specific items is identical, except for the ANIMATE keyword which is turned off in the OPC server version of the case.
CaseDefinition:
SERVEROPTIONS : A model name “NetworkDemo” is specified. Defining this keyword is all that is needed to start the built-in OPC server in OLGA.
INTEGRATION: SIMULATIONSPEED is set to 15, indicating the model is requested to simulate at 15 times real-time speed. Further, SIMULATIONSPEED and MINDT are selected in the EXPOSE key, which gives the possibility to change these input values using a connected OPC client.
FlowComponent:
FLOWPATH : BRAN-3-ProcessEquipment-VALVE: The valve OPENING is selected in the EXPOSE key. Thus, the valve opening can be set from a connected OPC client.
NODE: NODE-2: The node PRESSURE is exposed.
FLOWPATH : BRAN-1-Boundary&InitialConditions-SOURCE: SOUR-1-1: All possible keys are selected as exposed. OLGA will automatically filter out any keys that cannot be exposed and issue a harmless warning when the case starts. In this case the keys STDFLOWRATE, TEMPERATURE and WATERCUT are ultimately exposed on the OPC server.
FLOWPATH : BRAN-5-Boundary&InitialConditions-SOURCE: SOUR-2-1: MASSFLOW is exposed. FLOWPATH – Output – SERVERDATA: VALVOP is selected for the valve. HOL and PT profile is selected for BRAN-8. GT trend is selected for position TOPSIDE-OUT in BRAN-8.
Output:
SERVERDATA: SIMTIME, TIME, HT, SPEED, LAGFACT, LAGIND is set. These will be visible on the OPC server.
OPC Interactivity:
Fiddling with the exposed input parameters, the running case can be manipulated. For instance, lowering Toolkit.NetworkDemo.NODE-2.PRESSURE from 243 to 40 will cause the holdup in BRAN-8 to drop, setting the pressure back to 243 causes the same holdup to rise again.
PID-net-gainsched-normrange-server
PID-net-gainsched-normrange-server
PID-net-gainsched-normrange-server.opi is a simple case with one flowpath modeling a pipeline riser system. At the bottom of the riser a valve labeled CHOKE-1-1 is included. Upstream the valve a pressure transmitter is included. A controller C-1 acts on the valve CHOKE-1-1 to control the pressure upstream the valve.
The purpose with this sample case is to demonstrate the possibilities to interact with a PID controller through the OLGA OPC Server and exemplify how vectors can be addressed through the OLGA OPC Server.
Case comments
CaseDefinition
SERVEROPTIONS : The model name sub-key is set to “TEST” and the server name is set to OLGAOPCServer
INTEGRATION: SIMULATIONSPEED is set to 10, indicating the model is requested to simulate at 10 times real-time speed. Further, SIMULATIONSPEED is set in the EXPOSE key, which gives the possibility to change the requested simulation speed through the OPC server.
Controller:
PIDCONTROLLER C-1: Controller C-1 is used to control the pressure at riser base (upstream the valve CHOKE-1-1) by adjusting the opening. The set-point to the controller is 75e5. The controller measures the pressure in unit Pa. Note the use of controller sub-key NORMRANGE which is set to 1e5. The controller C-1 is a scheduling controller. It uses a table of amplification factors, integral constants and derivative constants rather than one value for each. For further description of PID controller with scheduling functionality refer to the OLGA PID controller documentation.
The EXPOSE key of controller C-1 is set to ALL. The OPC Server will then expose all input keys that are explicitly set in the controller. In this case the following keys are exposed as input items on the OPC Server:
MAXSIGNAL, MINSIGNAL, AMPLIFICATION, BIAS, DERIVATIVECONST, ERROR, INTEGRALCONST, NORMRANGE, SETPOINT, MODE, MANUALOUTPUT, OPENINGTIME, CLOSINGTIME
For further information of these keys see the description of PID controller.
Note that the keys: AMPLIFICATION, ERROR, INTEGRALCONST and DERIVATIVE CONST are vectors of size four in the definition of controller C-1.
Output
Global SERVERDATA keyword: Variables VOLGBL, HT, TIME, SPEED and SIMTIME are defined to be updated on the OPC server with DTPLOT set to 10 seconds.
SERVERDATA keyword defined on controller C-1: Variables CONTR, MEASVAR, SETPVAR, ERRVAR are defined to be updated on the OPC server with DTPLOT set to 10 seconds.
OPC Interactivity:
Manipulation of input items
Start simulating the OLGA case by pressing one of the run buttons in the OLGA GUI. Then launch MatrikonOPC Explorer, connect to SPT.OLGAOPCServer.1, add a group and add all items to the provided by the OLGA OPC server to the group. Then one will obtain a display similar to the one below.
PID-net-gainsched-normrange-server
Note that the values on the exposed keys automatically comes up with the values set in the model.
Manipulation of server inputs
The engineer has the possibility to change the values of all the exposed keys. For instance decreasing the set-point of controller C-1 to 74e5 causes the controller to open the valve from 5.8% to 6.6%. By further reduction in the set-point to 73e5 causes the controller to open the valve to 8.1%, etc.
Through the OPC Server the maximum, minimum constraint on the controller output can be changed through the MAXSIGNAL and MINSIGNAL keys. The rate of change constraints on the output can be changed through OPENINGTIME and CLOSINGTIME.
The engineer can detune the controller either by reducing the amplification factors or increasing the integral constants. The amplification factor is scaled by dividing by the NORMRANGE. By increasing the NORMRANGE the controller is thus detuned for all ERROR ranges. If the engineer wants to detune the controller for a specific error range one need to adjust the corresponding element in the array of
amplification factors or integral constants. By changing the elements in the array exposed as ERROR the engineer can change the error ranges.