You are on page 1of 39

Advanced ECLIPSE Course

Reservoir Coupling

Purpose
The Reservoir Coupling option allows the engineer to couple a

number of different E100/200 simulation models


The coupled reservoirs could share a common surface network, or
could be under constraints on overall production / injection
The individual simulation models run as separate processes, each
having its own standard ECLIPSE data file
The simulation models may have different characteristics e.g. 2phase models may be coupled with 3-phase models

2005 Schlumberger Information Solutions. All rights reserved.

How Does It Work?


One model is chosen to be the MASTER, the other models are

defined as SLAVES
The slave processes are activated by the master, and run in
synchronisation with it
The master process imposes production and injection constrains
on the slaves to meet the overall targets
Communication between the processes is handled by the
message-passing system PVM (parallel virtual machine) / MPI
(Message Passing Interface), which must be present on the
system

2005 Schlumberger Information Solutions. All rights reserved.

Slave Reservoirs
Each slave reservoir has its own ECLIPSE input data file
The slave could be a restart run
Each slave must have one or more slave groups - acting as the

path for communicating flow rates and constraints with the master
process
Slave groups can be at different levels. But one slave group
cannot be subordinate to another slave group

Slave
Group

2005 Schlumberger Information Solutions. All rights reserved.

PVM
MPI

Master
Group

same
physical
group

Master Reservoirs
The master has its own ECLIPSE input data file
It can be a reservoir of its own or just a dummy model

containing the control logic


It must have as active phases all the phases that are active in
any of the slave runs
It must contain the group hierarchy of the whole system down
as far as the slave groups in the slave reservoirs
Slave groups are represented in the master reservoir by master
groups which do not contain any subordinate groups or wells
Slave
Group

2005 Schlumberger Information Solutions. All rights reserved.

PVM
MPI

Master
Group

same
physical
group

Master-Slave Hierarchy (1)

2005 Schlumberger Information Solutions. All rights reserved.

Master-Slave Hierarchy (2)

R2
2005 Schlumberger Information Solutions. All rights reserved.

R1

Running the Models (1)


At the start the master run, the master enquires the start date of
each slave run
A slave may start later than the master

The master then decides about the time step length in the usual
way, but subjected to that
it does not overshoot a reporting time step in any of the slave
reservoirs
it keeps the flow rate changes in the slave reservoirs within
acceptable bounds (estimated from the changes over the
previous time step)
2005 Schlumberger Information Solutions. All rights reserved.

Running the Models (2)


At the beginning of a time step, the master enquires from the

slaves the slave groups production potentials (may be used for


calculating the guide rates)
Then the master allocates rate targets to all its master groups,
based on their guide rates
These are sent to their equivalent slave groups
Slaves calculate the flows of the group under this constraint,
and tells the master
The master completes its own time step, assuming that the rates
of the slave groups remain constant over the time step

2005 Schlumberger Information Solutions. All rights reserved.

Running the Models (3)


When the master has finished its time step the slave reservoirs are

advanced to the end of the masters time step


These slaves may take one or more time steps to reach this
time
When the slaves have advanced to the new time, they send the
new cumulative production totals of the slave groups to the
master
From these the master calculates the average flow rates of
each master group over its time step
Master updates its cumulative totals, and writes outputs

2005 Schlumberger Information Solutions. All rights reserved.

Running the Models (4)


This procedure continues until the master run finishes.
The master sends a message to terminate the slave runs
The master run and all the slave runs will terminate under the
following circumstances:
A slave run stops due to an error
A slave run finishes earlier than the master run AND item 8 of
keyword GECON in the master run sets to end run.

2005 Schlumberger Information Solutions. All rights reserved.

Reservoir Coupling Files


The master run may write the flow rates and coupling constraints

of the master groups to a reservoir coupling file


Subsequently, this file can be used to
substitute for one or more slave reservoirs in the master run

slave group flows are read from file

drive a slave reservoir on its own

master rate and constraints are read from file

2005 Schlumberger Information Solutions. All rights reserved.

Group Control (1)


The master groups must be given guide rates
they may optionally set as function of their potential rates
they may be equal to their voidage replacement need (for

injection)
Groups in the slave reservoir that are superior to the slave groups
must not be given any constraints on them
If the slave reservoir has been already given such constraints,
three options are available:
ignore such constraints
honour the constraints
take the minimum of these limits and the targets set by the
master.

2005 Schlumberger Information Solutions. All rights reserved.

Group Control (2)


If a rate constraint is applied to a phase that is not active in the

slave, it will be transformed into a active phase using a previously


calculated phase ratio
The overall rate targets applied to the coupled system in the
master run will not be met exactly
reason: the master run apportions the rate targets among the
master groups according to their slave groups capabilities at
the start of the time step, but the flows are reported at the end
of the time step
remedy: limit the master runs time steps to keep the expected
drift within a specified tolerance (item 4 of keyword
GRUPMAST)
2005 Schlumberger Information Solutions. All rights reserved.

Requirements for the Global Network

The master reservoir should contain a representation of the global

network down to the master groups and their own well groups
In each slave reservoir, the slave groups should be defined as
fixed pressure nodes, and the network extended down from them
to the well groups. Any groups superior to the slave groups
should not be part of the network in the slave reservoirs.
Either standard or extended network can be used
Slave
Group

2005 Schlumberger Information Solutions. All rights reserved.

Nodal pressure
PVM / MPI

Master
Group

same
physical
group
node

Requirements for the Extended Network

Master reservoir: the master groups must coincide with the

source nodes with the same names in the network


Slave reservoirs: The slave groups must coincide with the fixedpressure nodes with the same names in the network
FIELD
FA2

FA1

COMP-B

COMP-A
SEP

N1

N2

N3

FB1

N4

FB2

Not Coincide with


the source node

FB1

FB2

Coincide with
the source node

Network
2005 Schlumberger Information Solutions. All rights reserved.

Group Hierarchy

Network Balancing
The network should be balanced at each time step (the default in

keyword NETBALAN)
All networks will be balanced simultaneously at each time step of
the master process
At each iteration of the balancing in the master:
Master group nodal pressure -> slave group
Using this pressure as the fixed pressure, slave balances it
own networks to convergence
Slave sends back to the master the flows of the slave groups
Master sums its flows up to the FIELD level, and updates the
nodal pressures

2005 Schlumberger Information Solutions. All rights reserved.

Using RC Facilities - The Master Run (1)


Define all active phases that are in any of the slave run
Define the group hierarchy using GRUPTREE

GRUPTREE
R1-A PLAT-A /
R2-A PLAT-A /
R3-A PLAT-A /
R1-B PLAT-B /
R3-B PLAT-B /
/

2005 Schlumberger Information Solutions. All rights reserved.

Using RC Facilities -The Master Run (2)


Activate the coupled slave runs using SLAVES

SLAVES
-- slave slave file
machine
directory
number of
-- name root name host name
of data file Processors
SLV1 SLAV1 *
/usr/models/s1
2 /
SLV2 SLAV2 susie
/usr/models/s2
/
/

* means the machine the master is running on


This keyword can only be used once in a run,

so all slave processes must be started together


item 5: only needed when MPI is used (2003a_1
onward)
It should be the same as the value in PARALLEL
Request to create a RC file:

DUMPCUPL

U / Unformatted or F /- Formatted
2005 Schlumberger Information Solutions. All rights reserved.

Using RC Facilities -The Master Run (2)


Identify the master groups (MG):
GRUPMAST
limiting rate
-- MG slave associated
-- name name

R2-A
R3-A
R3-B
/

SLV1
SLV2
SLV2

Slv Group

fraction

FIELD
R3-A
R3-B

0.1/
0.1 /
0.1/

if item 4 above is set, it is advised


to set a minimum length to which
the time step can be reduced:

RCMASTS
10.0 /

2005 Schlumberger Information Solutions. All rights reserved.

Using RC Facilities -The Master Run (3)


Set the global production rate targets and limits:
GCONPROD
CM
Qo Qw Qg Ql Actn Fld G_rate G_rate
-- G
-- name

FIELD ORAT 4e5 /


PLA* NONE 3*
R1-* FLD 6*
R2-* FLD 6*
R3-* FLD 6*
/

ctrl?

3e5 RATE /

action can only be RATE


Guide rate can be set constant

or calculated from the potential

2005 Schlumberger Information Solutions. All rights reserved.

phase

100
100
200

LIQ /
LIQ /
LIQ /

Using RC Facilities -The Master Run (4)


Set the global injection rate targets and limits:
GCONINJE
Inj
Ctl
Surf resv reinj vrep fld gr gr def
-- G
-- name phase mod rate rate frac frac ctl?
1.0 /
PLA* WAT REIN 2*
VOID/
R* WAT 6*
/
guide rate is set to the groups
voidage production rate

2005 Schlumberger Information Solutions. All rights reserved.

Using RC Facilities -The Slave Run

Identify slave groups (SG):

GRUPSLAV
-- SG Assoc Qo Qw/Ql Qg Qres Qinj_o Qinj_w Qinj_g
-MG
FIELD R2-A /
/
the filter flags for the rate constraints
are MAST, SLAV and BOTH
The default is MAST

GRUPSLAV
R3-A R3-A /
R3-B R3-B /
/

2005 Schlumberger Information Solutions. All rights reserved.

Using RC Facilities Reading a RC File in the Master Run (1)


Define the RC file and its format to be read
USECUPL
MASTER F /

Remove the particular slave models data from SLAVES


SLAVES
-- slave root name machine
directory
-- name slave
host name of data file
SLV1 SLAV1 *
/usr/models/s1 /
--SLV2 SLAV2 susie
/usr/models/s2 /
/

2005 Schlumberger Information Solutions. All rights reserved.

Using RC FacilitiesReading a RC File in the Master Run(2)

Default the slave models name (item 2) in GRUPMAST


GRUPMAST
-- MG
slave associated
limiting rate
-- name name
Slv Group
fraction
R2-A
SLV1 FIELD
0.1/
R3-A
1*
R3-A /
R3-B
1*
R3-B /
/

2005 Schlumberger Information Solutions. All rights reserved.

Using RC FacilitiesDriving a Slave Run with a RC File


Identify slave groups using GRUPSLAV as usual
Define the RC file and its format to be read
USECUPL

MASTER F /

The slave(s) will read the constraints from the RC file

2005 Schlumberger Information Solutions. All rights reserved.

Using RC FacilitiesSUMMARY Keywords


The following summary data allows the user to examine the rate
constraints in the file that are applied to the slave groups in a
slave reservoir being run on its own:
Group Oil,Gas,Water production and injection rate limits:

GOPRL, GOIRL, GWPRL, GWIRL, GGPRL, GGIRL

Group liquid production rate limit:


GLPRL

Group reservoir volume production and injection rate limit:


GVPRL, GVIRL

2005 Schlumberger Information Solutions. All rights reserved.

Some Notes (1)


All runs must share the same measurement units.
The only global constraints that can be applied are:
group rate control
nodal pressure.
Other features may be applied within individual reservoirs, but

cannot be employed globally:


prioritisation, economic limits, automatic drilling & workover
facilities, group production rules.
The master does not know anything about wells in the slave runs.

2005 Schlumberger Information Solutions. All rights reserved.

Some Notes (2)


The master time step cannot be influenced by slaves, other than

observing their report time steps.


Gas Field Operations:
All contract groups must be situated in the master reservoir
Each contract year must start at the same date in all slaves.
Gas lift optimisation cannot be used.
The order of solving different types of wells (e.g. producers, water
injectors, gas injectors) must be the same in all the coupled
reservoirs.
same top up phase (injectors solved last).

2005 Schlumberger Information Solutions. All rights reserved.

Run RC Jobs Using PVM(1)


on the Same Machine
Start pvm:@pvm
at the pvm prompt, type command quit to get out of the pvm

prompt and leave pvm running


run ECLIPSE jobs: @eclipse
at the end of the run, type @pvm again to enter pvm
at the pvm prompt, type command halt to stop the pvm
processes

2005 Schlumberger Information Solutions. All rights reserved.

Run RC Jobs Using PVM(2)


on different machines (a)
If the master and slaves are not run on the same machine, there is

some configuration to do:


Make sure that from the master machine you can rsh to each slave
machine without typing password (.rhosts file in your home
directory)
You must run csh or one of its variants. It wont work with Korn or
Bourne shell.
In the .cshrc file, set variables
LM_LICENSE_FILE - point to the license file
PVM_ROOT - point to the location of the PVM3 directory.
E.g. setenv PVM_ROOT$ECLPATH/2000a/pvm3
PVM_ARCH: e.g. setenv PVM_ARCH @pvmgetarch
2005 Schlumberger Information Solutions. All rights reserved.

Run RC Jobs Using PVM(2)


on Different Machines (b)
Having got all the set up, run pvm on the master machine: @pvm
at the pvm prompt, add the machines you want to run slaves: e.g.
add machine1
add machine2
Check if these have been added successfully by typing conf at

the pvm prompt


quit - get out of pvm and leave it running
run eclipse jobs
back to pvm by @pvm
at pvm prompt type halt to terminate the pvm proceses

2005 Schlumberger Information Solutions. All rights reserved.

Run RC Jobs Using PVM(2)


on Different Machines (c)
To run master and slaves on different machines are quite tricky,

especially if the various machines are not of the same type (e.g.
SGI and IBM). It is far easier to run with everything on a single
machine.
Error messages get written to the files /tmp/pvmd.uid, and
/tmp/pvml.uid, where uid is the user id number (to get it type id).

2005 Schlumberger Information Solutions. All rights reserved.

PVM Common Error Messages


-6 : No host
the host requested is not in the virtual machine
PVM_ARCH is not set to the correct type.
-7: PVM cannot find the executable you have requested
Check the search paths in the eclpvmhost file.
-10: No data file.
PVM cannot find the data file on a remote host
-12: FLEX License problem.
Usually returned if the FLEX license manager is not running or
it cannot find the FLEX license file on a remote machine.

2005 Schlumberger Information Solutions. All rights reserved.

PVM Error Messages

A full list

2005 Schlumberger Information Solutions. All rights reserved.

Run RC jobs using MPI (2003a_1 onward)


on PCs
MPI is installed (see the installation

notes for details)


Item 5 of SLAVES is set to the value as
in PARALLEL (if any)
Click on parallel Eclipse
Define number of processors to run on
= Number of slaves + 1 + no.
extra nodes needed for parallel
runs
E.g. 2 slaves, one in serial, the
other in 2 way parallel -> no.
procs = 1+2+1=4
Define the hosts file
Select the master file and run

2005 Schlumberger Information Solutions. All rights reserved.

Hosts.txt
hostname
Hostname
hostname
Hostname

Run RC jobs using MPI (2003a_1 onward)


on UNIX
MPI is installed
Item 5 of SLAVES is set to the value as in PARALLEL (if any)
@mpieclipse procs 3 file master ver 2004a
Where 3 processors are needed
The master file is named MASTER.DATA
To use 2004a mpieclipse
Some machines require the hosts file (-hostfile hosts.txt)

2005 Schlumberger Information Solutions. All rights reserved.

License Sharing

When master and slaves are running on the same host, only one license is
required, IF
The licenses required by the slaves are checked before the keyword
SLAVES in the master run
License checking
Some options are checked in RUNSPEC section, e.g. ENDSCALE for
end point scaling
Some options are checked in SCHEDULE section, e.g. GRUPNET for
standard network, SWINGFAC for gas field options
Use keyword LICENSES to reserve licenses in RUNSPEC section

LICENSES
network /
gasfield /
/

If slaves are running on separate hosts, each slave requires a separate


license.

2005 Schlumberger Information Solutions. All rights reserved.

References
ECLIPSE Technical Description
PVM
Reservoir Coupling
Installation Guide
Running the software

Parallel ECLIPSE on UNIX and Linux


Parallel ECLIPSE on PC

Installing PC software from CD


Installing MPI/Pro

2005 Schlumberger Information Solutions. All rights reserved.

You might also like