Documente Academic
Documente Profesional
Documente Cultură
OLGA 2015
Version 2015.1
Submodelling guide
Page i
Page ii
INTRODUCTION
2.
3.
3
3
5
5
6
6
6
6
6
7
4.
5.
10
6.
11
7.
12
8.
HIERARCHICAL SUBMODELLING
8.1 Making the Hierarchic Submodelling case
13
13
9.
14
14
15
15
1.
Page 1
INTRODUCTION
This document is a guide for creating OLGA submodelling cases. OLGA submodelling
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 in different engineering teams. Examples
of such teams are; well engineering, flow assurance and process engineering. When
modelling and simulation of these subsystems have been done by separate teams, the
submodelling and scheduling functionality will provide an efficient method for
integrating such models into larger models covering the full production system scope.
A great advantage with submodelling is that it may also lead to a faster execution of
the OLGA simulation compared to 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 mean
that the Well model requires a smaller time-step than the Pipeline model (CFL-criteria).
By putting the models in one large OLGA model, all the sections in the Pipeline model
will be run at a small time step. This will slow down the simulation. When running
submodelling, the individual models run on separate time-steps allowing for faster
simulation execution of the total model scope.
2.
Page 2
The flow from the Well model will be connected to the Pipeline model. This can be
done by establishing a submodelling flow connection between the Pressure node NFLOWOUT (in the Well model) and Source S-FLOWIN (in the Pipeline model), and
running 3 separate OLGA processes: Well model, Pipeline model and a Scheduler.
The Scheduler may also run the Well/Pipeline model as an internal submodel and
there will be only 2 processes.
The Scheduler is responsible for:
1.
2.
The communication between the two OLGA models will be done through the OLGA
OPC server functionality. The next chapters will go into details about the setup of this
simulation configuration.
3.
Page 3
Please note that the submodelling connection variables HT and HTEXT are new in
OLGA 2015.1.
FLOWOUT (NODE EXPOSED variables):
HTEXT
External time step limitation. If HTEXT is less than or equal to zero, external timestep
limitation is disabled.
PRESSURE
Boundary pressure. For internal nodes, this key can be used in conjunction with
INITIALCONDITIONS to specify the initial pressure.
TEMPERATURE
Temperature of the inflow mixture on boundary nodes. For internal nodes, this key can be
used in conjunction with INITIALCONDITIONS to specify the initial temperature.
GASCMASS
Normalized gas masses for each component (volume fractions multiplied by density)
DPDGG
OILCMASS
Normalized oil masses for each component (volume fractions multiplied by density)
DPDGLTHL
WATERCMASS
Normalized water masses for each component (volume fractions multiplied by density)
DPGLTWT
Page 4
Time step
PTBOU
TMBOU
CGGBOU
DGGDPB
CGLTHLBOU
DGLTHLDPB
CGLTWTBOU
DGLTWTDPB
WATERCMASSFLOW
Water mass flow rate. For compositional tracking its the flow rate of the water phase
for each component.
DGLTHLDP
OILCMASSFLOW
Oil mass flow rate. For compositional tracking its the flow rate of the oil phase for
each component.
DGGDP
GASCMASSFLOW
Gas mass flow rate. For compositional tracking its the flow rate of the gas phase for
each component.
TEMPERATURE
Mixture temperature of the mass flow rate at all points in time specified.
PRESSURE
Upstream pressure for a positive source (flow into pipeline). Downstream pressure
for a negative source. Required key if pressure driven source.
HTEXT
External time step limitation. If HTEXT is less than or equal to zero, external timestep
limitation is disabled.
CMLTWT
Mass in water phase. For compositional tracking its the mass of the water phase
for each component.
DPDGLTHLS
CMLTHL
Mass in oil phase. For compositional tracking its the mass of the oil phase for
each component.
DPDGGS
CMG
Mass in gas phase. For compositional tracking its the mass of the gas phase for
each component.
TM
Fluid temperature
PT
Pressure
HT
Time step
Page 5
Pipeline case:
Page 6
Page 7
Note that you can expose more variables on the node and source if needed for other
purposes.
4.
Page 8
Page 9
4.
5. Connect the FLOWOUT to the FLOWIN using the Submodel Connections window
available from the Tools menu in the OLGA GUI.
Note: Be sure to get the labels of the SOURCE and NODE correct, because there is no verification
across different OLGA cases.
5.
Page 10
6.
Page 11
The Pipeline model is now an internal submodel. This means that that the LOCATION
key on the SUBMODEL SUBMODEL_PIPELINE must be changed to from LOCAL to
INTERNAL:
If you would like to retain the flexibility to run the Pipeline model and the Well model independently, the
Scheduler should be configured as a separate case as shown initially.
7.
Page 12
Running a submodelling case involves more than one OLGA case. The rule-check in the
OLGA GUI is only for single OLGA cases. To fix configuration errors when running
submodelling cases, the OLGA console window outputs have to be investigated. Below is a
list of the most common errors and how to fix them.
Verification errors for submodels.
Check that all submodels are possible to run standalone.
The scheduler complains about missing global items on the submodel.
Add global input and output on the submodel (see chapter 3.3).
The submodel console windows close so fast that the user does not see the error.
Set DEBUGOPTIONS=KEEP_CONSOLE_WINDOW on the submodels in the
Scheduler case.
One of the submodels crash directly after startup (Not when run standalone).
Steady state are not implemented for submodelling cases, so it is more difficult to set
good startup conditions. Possible to try different initial conditions or boundary
conditions.
Set the initial synchronization interval (MAJORTIMESTEP on SCHEDULER keyword)
to a low value (e.g. 0.1 seconds).
The Scheduler case made with OLGA2014 does not run with OLGA2015.1
The submodelling connection variables HT and HTEXT are new in OLGA2015.1.
HTEXT has to be exposed on all submodelling sources/nodes. All submodelling
sources/nodes has to have SERVERDATA keyword with variable HT.
The submodelling results look completely wrong.
For a submodel connection the units must match. The unit on the exposed key has to
match the unit used on the connected output variable.
8.
Page 13
HIERARCHICAL SUBMODELLING
In this example, we will consider a system where the flow from one transport line:
Pipeline-1 and the flow from a well: Well-2 are joined into another transport line:
Pipeline-2:
In order to build the submodelling case as a hierarchical system, two schedulers are
required. The first scheduler will control connection between Well-1 and Pipeline-1
submodels and the second one will handle connection among Pipeline-2, Pipeline-1
and Well-1 submodels.
When two or more schedulers are required to run a submodelling case, you should
start the scheduler contained in the submodel located at the top level of the system (in
this case the scheduler in Pipeline-2 submodel), in which the whole flow of the system
converges.
The communication between Well-1 and Pipeline-1 is the same as in the simplified
submodelling case used in previous chapters and is handled by Scheduler-1.
Scheduler-2 handles the communication between Pipeline-1 and Pipeline-2, and
between Well-2 and Pipeline-2. Both Pipeline-1 and Well-2 will have a submodelling
pressure node at the end of the pipelines. Pipeline-2 will have two submodelling
sources. Due to stability reasons, the submodelling sources should not be located in
the same section.
Scheduler-2 will have 3 submodels. Pipeline-1 and Well-2 will be LOCAL submodels
while Pipeline-2 will be an INTERNAL submodel. There will be a submodel flow
connection between the submodelling pressure node at Pipeline-1 and the first
submodelling source at Pipeline-2. Another submodelling flow connection will exist
between the submodelling pressure node at Well-2 and the second submodelling
source at Pipeline-2.
9.
Page 14
To make the signal connection over the two submodels, the following steps should be
carried out:
1. Enable the OPC server for both SubmodelSend and SubmodelReceive cases
(see chapter 3.2).
2. Add minimum global input/output on OPC server for both cases (see chapter
3.3).
3. In SubmodelSend, add a SERVERDATA keyword containing the output variable
CONTR on MANUALCONTROLLER_1, then add a second SERVERDATA
keyword containing HT as output variable on the same controller.
4. In SubmodelReceive, expose the keys SETPOINT and HTEXT on
MANUALCONTROLLER_2.
5. Make a new scheduler case and name it SignalScheduler (see chapter 4.1).
6. In the scheduler case, add two new SUBMODEL network components which
references to the SubmodelSend and SubmodelReceive cases respectively
(see chapter 4.2).
7. Add a SIGNALOUT keyword under the SUBMODEL network component that
refers to SubmodelSend case and set TYPE = CONTROLLER, CONTROLLER
= MANUALCONTROLLER_1 and VARIABLE = CONTR.
8. Add a SIGNALIN keyword under the SUBMODEL network component that refers
to SubmodelReceive case and set MANUALCONTROLLER =
MANUALCONTROLLER_2.
Page 15