Вы находитесь на странице: 1из 5

Copyright 1991 Society of Petroleum Engineers In this paper, we describe a system in which the user can moni-

This paper (SPE 22309) was prepared for presentation at the Sixth SPE Petroleum Com- tor and modify the simulation run during its execution. We first
puter Conference held in Dalias, June 17-20, 1991.
discuss our design criteria for an ideal interactive reservoir simu-
Summary lation system, We then discuss how we implemented the system,
its operation, and some applications. Finally, we discuss the hard-
This paper describes a system that allows engineers to monitor and ware and software requirements, demonstrating that the system can
control a reservoir simulation run during its execution. The sys- easily be implemented with inexpensive commercial software.
tem consists of a 3D, three-phase black-oil reservoir simulator run-
ning simultaneously with an interactive graphics pre- and Design Criteria
postprocessor. Previous authors have described systems that allow
Before development, we specified the following design criteria for
monitoring of job execution with simultaneous graphics displays;
an ideal interactive reservoir simulation system.
the system described here is unique in that the engineer can modi-
I, The system should enable simultaneous graphics display dur-
fy simulator and well-control parameters during the execution.
ing execution of the simulation run. The system should allow the
While the system will be helpful in detection and correction of time-
display of any information generated by the simulator in the form
dependent data problems, it will be very useful in optimizing reser-
of X-Y plots, contour maps, and tabular summaries.
voir management decisions in future performance projections.
2. The system should allow instantaneous modification of all
The system is implemented on an ffiM-compatible 486 microcom-
simulator and well-control parameters-i.e, anything that can be
puter with commercially available multitasking software, although
specified in the time-dependent section of the input data file,
it can be implemented easily on any microcomputer or worksta-
3. The system should be easy to implement. It should require
tion capable of multitasking. We show that implementation of the
minimal modification of code to the existing reservoir simulator
system required only a moderate amount of modification of the pre-
and pre- and postprocessor. In particular, portability of the reser-
and postprocessor and even less modification of the reservoir voir simulator should be maintained by use of only ANSI-standard
simulator. FORTRAN code that is not specific to any particular computer en-
vironment.
Introduction 4. Simultaneous execution of the reservoir simulator and the pre-
Great strides have been made recently in the use of reservoir simu- and postprocessor, as well as transfer of data between the two,
lation, largely because of the development of better computer tech- should be handled by the operating system or commercially avail-
nology. Comprehensive reservoir simulation on microcomputers able multitasking software so that the code is not machine-specific.
is now a reality, The speed and memory capabilities of microcom- 5. The system should allow instantaneous modification of simu-
puters have increased to the point where they can now handle reser- lation runs on computer systems (such as mainframes) on which
voir simulations that, 10 years ago, had to be performed on the pre- and postprocessor has not been installed.
mainframes. These developments have greatly increased the produc- Our interactive reservoir simulation system incorporates most of
tivity of reservoir simulation engineers and made the analysis capa- these criteria. In the current implementation, we can modify only
bilities of reservoir simulation available to a much larger segment a subset of the complete set of time-dependent data. We expect to
of the petroleum industry. complete the implementation, allowing interactive modification of
The graphics capabilities of microcomputers have also enhanced all time-dependent data, in the near future.
the productivity of reservoir simulation engineers. Previous
authors 1.2 described interactive graphical pre- and postprocessors Implementation
for reservoir simulation. These systems allow the engineer to process The interactive reservoir simulation system was developed by
and verify simulation data quickly and to interpret rapidly the large modifying our existing reservoir simulator and pre- and postproces-
amounts of output generated by reservoir simulators, More recently, sor. The reservoir simulator is a 3D, three-phase, fully implicit,
systems where simultaneous graphics are displayed while the simu- black-oil reservoir simulator. The pre- and postprocessor is a user-
lator is executing have been described, 3 This concept is attractive friendly program designed to process data for and interpret results
because the engineer can monitor the progress of the simulation from the reservoir simulator. The post-processor allows the user
run for early error detection or evaluation of history-match runs. to display almost all simulator-generated results in the form of X-Y
Although these developments have made reservoir simulation plots, contour maps, and tabular summaries.
"feel" more interactive, actual simulation runs are still executed Before development of the interactive system, the postprocessor
in a batch mode; i, e" the data are input to the simulator, the simu- could display graphical results only at the end of the run; it could
lator executes, and the results are then analyzed. If the data were not update plots and maps simultaneously with the execution of the
input incorrectly or there are numerical problems, then the data run, The reservoir simulator simply wrote information from each
are modified and the run is resubmitted. Environments that allow timestep to a postprocessing file. After a simulation run complet-
simultaneous monitoring of the run may allow the problem to be ed, the postprocessor then read information from the postprocess-
detected earlier; however, the run must still be terminated and resub- ing file and rewrote it in a structured, binary format for quick access
mitted. Errors that occur well into a long simulation run can waste during generation of graphics displays.
many hours and dollars if the run has to be restarted from the be- The first task in development of the interactive system was to
ginning. If restart files are available, they can reduce the amount provide for updating of graphics displays as the simulation run
of time wasted, but restart files can be cumbersome and often re- progressed. The reservoir simulator and postprocessor were run
quire large amounts of disk space. in separate multitasking windows to allow simultaneous execution.
SPE Computer Applications, NovemberlDecember 1991
8
We then modified the postprocessing file read routine and restruc-
tured the intermediate binary files so that postprocessing informa-
/STATUS tion could be read and stored continually. We also had to modify

/ FILE ~ the graphics display routines so that X- Y plots and contour maps
could be updated continuously as more data became available. No
modifications to the reservoir simulator were required to accom-
plish this first task.
RESERVOIR 11 I IlpRE- AND POST-]/ The next task was to implement interactive modification of simu-
II SIMULATOR 11 II PROCESSOR 11 lation data. Communication between the reservoir simulator and

~UPDATE/
pre- and postprocessor was provided through two new external files,
a "status" file and an "update" file (Fig. 1). The status file, writ-
ten by the reservoir simulator, contains the current values of all
time-dependent parameters. It is rewritten only when time-dependent
FILE
data are changed (usually once each time the simulator is interrupted
to read new data, a maximum frequency of once per timestep). The
Fig. 1-lnteractive run modification provided by two exter- status file is read by the postprocessor, which then displays the pa-
nal files. rameters in a data screen. Thus, at any time during the run, the
user can view the current values of all time-dependent parameters
before deciding if and what parameters should be changed.
The update file, written by the postprocessor, contains the time-
l=SIMMGR~~~~~~~~~~~~~=======~ dependent parameter values to be modified interactively. The user
specifies new values of time-dependent parameters from within a
data screen in the postprocessor. The postprocessor then writes the
changed parameters to the update file in an ASCII keyword for-
mat. The reservoir simulator checks for the existence of the up-
date file at the beginning of each timestep. If the file exists, it is
read, the data are processed, and the file is deleted.
If the user needs more time for study and does not want the simu-
lation run to progress, he or she can pause the run. After studying
the simulation results (possibly examining many other plots and
maps) and changing the desired parameters on the update form,
the user can then continue the run.

System Operation
Here we illustrate how the interactive simulation system operates.
Figs. 2 through 11 present a sequence of computer screens dis-
played during a sample interactive simulation session. The session
presented here was designed primarily for illustrative purposes.
Fig. 2 shows the screen soon after the user starts a session. The
reservoir simulator is executing in a small window at the bottom
of the screen and is writing a one-line summary of timestep infor-
Load plot files
mation. The postprocessor is executing in the top window. At this
2-SrMULATION~~~~~~
point, the user elects to monitor the run by displaying a combina-
STEP=
STEP=
2 eye=
eye=
2
2 DELT=
0.300
0.900
CTIM=
CTIM'"
0.400
1.300
JAN
JAN
01,
02,
1998
1988
21 36:00
19 12;00
tion of X- Y plots and contour maps. Figs. 3 and 4 show pictures
STEp: eYe'" 3 DELT- 1.197 CTIM- 2.497 JAN 03, 1988 2J 55:)8 of the screen illustrating the simultaneous graphics display of plots
STEP'" 5 eye= 3 DELT= 2.297 CTIM= 4.794 JAN 06, 1988 07 03:07
STEP= eye= 4 DELT= 6.891 CTIM= 11.684 JAN 13, 1988 and maps during run execution.
3 DELT" 11.312 CTIM"" 22.996 JAN 24, 1988 II 54;24
The run appears to be progressing slowly. Upon exiting the graph-
ics display, the user notes from the one-line timestep summary (Fig.
5) that the maximum timestep size has inadvertently been set at 30
Fig. 2-Simultaneous execution of simulator and post- days. To change the maximum time step size, the user proceeds to
processor.
the update form (Fig. 6). This form lists all data items that can be
changed interactively and the current values of these data items.
The user instructs the postprocessor to change the maximum
Depletion PerfoMllance
Pressure Depletion Perforllldnce
XYlofl t = 521.'31'1 Z00E1-
B,B X 1 HJElO .0 1875-
Pressure
XY 1 of 1 t '" 1081.98

~~::':~]'".
1750- 2BBB~
B,B
1875-

'l:~~
1625- ffl ' ~
1500- 1750-
1375-
1250-
~ ++++++ ++ 8 1625-
15B9-
1125-
1000- 1
1£1 .;' + los 1 1375-
1250-
875- I 1125-

5300.8
625-1
759- I

500-
g>
.::
~
"./", " .
~
~
.:

G
y

0

uma-
875-
750-
625-
SIUJ-
GdS Saturdt Ion Time 5308 .8
XY lof 1 t '" 521.'31'1

.Xr>
0.523-
Gas Saturation

B:~B'B:,"BB. nll~
!J\ J
XY 1 of 1 t = HJBl.'J0 B.SZB-

(j'
__ ~_ 0.200-
B'B[B'B
. .. x~. U~I~
:}'""." 0.320-
EI.ZRfJ-
../
-
121.160---
O.lZU-
Y •• g:~cig=
- 0 080 • 8.160 --
(, 13.120-
Time 5300.8 _ 0.040-
.. 0.080-
TiNe 5380.8 0.8-10-

Fig. 3-Simultaneous graphics display-522 days of simulated Fig. 4-Simultaneous graphics display-1 ,002 days of simu-
time. lated time.
9
timestep size from 30 to 60 days. Fig. 7 shows the messages dis- performs optimally. To do this, the user graphically monitors simu-
played in both windows, indicating that the run has been modified. lator performance variables, such as timestep size, the number of
Further monitoring of the run indicates that larger timesteps can timestep-size cutbacks, iterations per timestep, and material-balance
be used. To investigate this, the user pauses the run (Fig. 8) to ana- errors. If poor simulator performance is detected, then the param-
lyze simulator performance in more detail. The user quickly gener- eters controlling simulator performance (such as level of implicit-
ates a graph of maximum pressure and saturation change per ness in the formulation, timestep-size control parameters, and matrix
timestep over the life of the run (Fig. 9) and sees that pressure and
saturation changes are small, indicating that much larger timesteps
are possible. Returning to the update form, the user changes the
maximum timestep size to 90 days (not larger than that because
the user desires output at a minimum frequency of four times per
year) and then continues the run (Fig. 10). The user then returns
to the graphics display and monitors the run to its conclusion (Fig.
Production LimitsF=======]I~
11). F'ield ml.n gas r,'lte (MCF/D) o.co
Clearly, the interactive simulation system gives the user a great Field m~n oil r,'lte (STB/D)
Yield max GOR (MCF/STB) 20.000
deal of flexibility in the monitoring and control of simulation runs. Field max WOR (STB/STB)
Well max GOR (MCY/STB)
20.000
0.000
Although this sample session is rather simple and contrived, it dem- Well JrlIl.X WOR (STB/STB) 0.000
6500.00
onstrates that the interactive simulation system works and illustrates 250.00
1
several benefits. 200.CO
0.0300
0.0500

Applications
No
I
An interactive reservoir simulation system has many potential ap-
No
plications. One application is to detect and correct time-dependent
"''II
Ye, i:
No
data problems. It will be possible to correct interactively a data error No

that occurs many minutes or hours into a simulation run. This can y"
il,.
prevent having to abort and restart the run, which would result in i!
'I
a waste of time and the associated costs. Of course, not all errors I
will be correctable in this manner; some may require a restart. The
ability to detect and correct data errors interactively will be most
useful on long runs that take many minutes or hours of CPU time. IPOLD: Toggle to select time level of press differences employed
8-Update __ Pau.. IIJ-Contiftu.
in flow cales

It may be more efficient to analyze short runs (i.e., runs that take
only a few minutes of CPU time) after completion of the run. 2-SIMULATION
STEP= 69 eye= DELT= 30.000 CTIM= 851.900 MAY 02, 1990 09 36:00
Other important applications of interactive reservoir simulation STEP=
STEP=
70
71
eyc=
CYC=
DE:'T=
~E:"T'"
30.000
30.000
CTIM= 881.900
CTIM= 911.900
JUN
JUL
01, 1990
01, 1990
09
09
36:00
36:00
fall into three areas: simulator performance, model performance, STEP= 72 CYC= DE:"T"" 30.000 CTIM= 941.900 JUL 31, 1990 09 36:00
STEP= 73 CYC", JE:"T= 30.000 CTIM'" 971.900 AUG 30, 1990 09 36:00
and reservoir performance. Simulator performance is an indication STEP= 74 cye", JELT'" 30.000 CTIM= 1001.900 SEP 29, 1990 09 36:00

of how accurately and efficiently the simulator solves numerically


the differential equations describing fluid flow. An interactive simu-
lation system will permit the user to "tune" the simulator until it Fig. 6-Update form.

I
],1, :t 'I\>(i Q:lhl p ~l' :::'l ~ ~ "1 It " ~ 1

I {DescriPtions
, : View #: 1 Device: Screen Update file hae been saved 0.00
I
T. itle:Oepletlon Performance 100.00
I L_aYO~_t:_ 4 ObJects _ ~ Press any key to continue 20.000
20.000
0.000
0.000
6500.00
250.00

12 200.00
0.0300
0.0500
:rl Control Parameters' - -
:[M'.X Bi1nUl.• t.ed time (days]: "Print M4PSI=F~~~===1
Max number of steps : Well Locat~onB No

rri Interrupt data c ~:!~R;:~:ures ~:s i,

! ~:!n~r7~~6 i~~!~~:l e~~~~n~~~;~~~ ~!! :~:::~~:: YesI


' St.a~t~ng time step ~ize (days) : Water Presaurea =~ I
Max~rnum tirr,e step s~ze {days) : Oil Saturations No "
T~me step size factor : Gas Saturations Yes :111

I ._~~~~~:w:.:t:er~s.:t:ur:.:t:io:n:S~~~._:NO~_]

Internal reference number for this view DELMAX: Maximum time step size allowed (daya)
iB-Plot IiJ-Update IIl-Pau.. IIl-Continue

2 SIMULATION 2-SIMULATION
STEP'" 69 eye= DELT= 30.000 CTIM'" 851.900 MAY 02, 1990 09 36 00 STEP= 73 CYC= 30.000 CTIM'" 971.900 AUG )0, 1990 09:36:00
STEP= 70 eye= DELT= 30.000 CTIM'" 881.900 JUN 01, 1990 09 36 00 STEP= DELT=
STEP" 71 eye= DELT= 30.000 CTIM= 911. 900 JUL 01, 1990 09 36 00 STEP= 75
CYC=
CYC= " DELT=
30.000
30.000
CTIM= 1001.900
CTIM= 1031.900
SEP 29, 1990
OCT 29, 1990
09:36:00
09:36:00
STEP=
STEP=
72
73
eye= DELT= 30.000
30.000
CTIM=
CTIM==
941.900
971.900
JUL
AUG
31.
30, 1990
1990 09
09
36
36
00
00
UPDATE HAS BEEN PROCESSED
STEP= 76 CYC= DELT= ,
60.000 CTIM= 1091.900 DEC 28, 1990 09:36:00
STEP'" 74 eye= 30.000 CTIM: 1001.900 SEP 29, 1990 09 36 00 STEP= 77 cye", DELT= 60.000 CTIM= 1151. 900 FEB 26, 1991 09:36:00
- - - - _ . _. ._------ ~-

Fig. 5-Maximum time stepsize set at 30 days. Fig. 7-Simulation run modified during execution.
10-------------------------------------------------------------
solution algorithm) can be modified instantaneously. Subsequent formance projections. For example, in simulation studies designed
performance can be monitored and modified until desirable simu- to determine an initial or infill reservoir development plan, the user
lator performance is attained. can monitor pressure and saturation maps to detect sweet spots,
Model performance pertains to how well the reservoir model or areas of the reservoir that are not being adequately drained. The
(simulator and data) approximates the performance of the reser- user can then interactively "drill" wells in these areas. In simula-
voir under study. Interactive reservoir simulation can be used to tions of secondary recovery processes, such as water or gas injec-
monitor runs made to history match past performance. The primary tion, simulated reservoir performance can be monitored to evaluate
benefit here is in early evaluation of the history match. The user the effectiveness of the recovery process. Controlling variables--
cannot change reservoir properties (such as permeabilities and such as the timing, locations, and volumes of fluids injected-can
porosities) during the run; however, he or she may be able to change be modified interactively to optimize sweep efficiencies and recovery
some well-control properties during the run, which could result in factors.
fewer runs to obtain an adequate history match. For example, in The overall benefit of an interactive reservoir simulation system
attempts to match the observed flowing bottomhole pressure histo- is to make the reservoir simulation engineer more efficient. Such
ry for a well, several values of PI or hydraulic fracture properties a system will allow the engineer to use the time previously spent
can be investigated within a single run, instead of several complete waiting on simulation runs to evaluate and optimize the runs.
runs with different values.
Reservoir performance pertains to how efficiently the simulated Hardware and Software Requirements
reservoir produces oil and gas. Interactive reservoir simulation can Although the reservoir simulator and pre- and postprocessor have
be used to optimize reservoir management decisions in future per- been installed on a variety of platforms, we used an ffiM-compatible

l-SI~R~======================================~~------

Simulator haa been signalled to pause. F/D) 1'10) 0.00


B/c)
~~~~~~ I
BID) 100.00
Freas any key to continue ) I 20.000
I
~:,::.:::~~~~~::::::::~I~lw~.,~l~m:.x~GO;R~'~~F~/~sT~BII '~~~~:-;~~~========~~IW:.~ll~m~~G;O;R~'~~~F~/~ST~BII
20.000 20.000
0,000 ' 0.000

65~~~~~ I
Well max WOR (STB/STB) Well max WOR (STB/STB) 0.000
Well max pree8ure (psia] Well max pre.aura (psi.) 6500.00
,well min pressure (peial 250.00 W~ll min preaaure (psia.) 250.00
,MinimUl!l number of wells 1 : rlIter.tion Control Ml.nimum nuJllber of welll1
12
cell max pres.,.ure C.h9 '.PSil
200.00 ~ [H.ximurn number per step 12 ell max prell sure chg (pai) 200.00
Cell milX gas sat chg (frac) 0.0300 i No_nlin~ar term updotes .·11 max gas sat chg (frac) 0.0300
II~~:;:~;:;=~~=====~ Il Cell max wat sat chg (frae)
0.0500 I• -
I rl Control Porameters
ell mox wat set chg (frac) 0.0500

3650.00 Print Map"I=I=~~~~~~_1 1 [H.X simulated time (daye): 3650.00 Print


500 Well Locations No i M.x number of steps : 500 Well Locations No

~ ;nterru~t d~~a~,=::::::::==:.::::::::~~
well Report Ye, Well Report Ye,
Interrupt data Datum Pressures :; Dotum Pressures No

illI =:~n;r~~~s i:~!;~:l e~~~!n:~::~~~


Print lIIapa before each interrupt Oil Fr••• ures Ye. Oil Pre.aurae Ye,
: Map print interva.l (time .tep.): Gall Pre •• urea No Ga8 Pre.aurea No
i Sta.rting time atep size (dayll) 0.1000 Water Pr••• urea No :, Starting time step size (days) : Water Pr•• aurea No
J MaximUJII time step lIize (days) 60.0000 Oil Saturations No " Maximum time step size (days) : Oil Saturation a .No
i 'l'ime atep size foetor 3.0000 GSII Soturations
Water Saturations
Ye' ;;~Time step size factor Gas Saturations
Water Saturations
Yea·
No No J

III-Upd.te .P.u..
DELKAX: Maximum tim. step lIiz. allowed (day.)
"CoDtiDue
DEI.MAX: Maximum time .tep lIize allowed (day.)
.Update III-Pau.. "CoatiJlue

2 SIMULATION 2 SIMULATION
STEp:5
STEP- 81
'0
CYC'"'
eYC'"
DELT= 60.000
60.000
C'l'IH-
CTIH-
1331.900
1391. 900
AUG
OCT
25,
24,
1991
1991
0936:00
0936:00
STEP" 83
STEP= 84
Cye=
eyc ..
CELT'"
DELT=
60.000
60.000
CTIK- 1511.900
CTIK- 1571.900
rtB 21, 1992
APR 21, 1992
09:36:00
09:36:00
STEP- 82
STEP~

STEP- .."
CYC=
CYC'"
CYC""
DELT=
DELT=
DELT=
SABRE EXECUTION PAUSING
60.000
60.000
60.000
CTIH"
CTIH'"
CTIM-
1451. 900
1511. 900
1571. 900
DEC
FEB
APR
23,
21,
21,
1991
1992
1992
09 36:00
09 36:00
09 36:00
SABRE EXECUTION PAUSING
UPcATE HAS BEEN PROCESSED
STEP" 85
STEP'" 86
CYC"
eYe=
4 DELT=
DELT:
90.000
90.000
CTIM- 1661.900
CTIM'" 1751.900
JUL 20, 1992
OCT 18, 1992
09:36:00
09:36:00

Fig. 8-Simulation run paused. Fig. 10-Simulation run modified and then continued.

Dep let ion Perfor_4nce

·'t .~
fressure
XY 1 of 1 t. '" 2651. '}o

i~=
2000-
~ + ~ 1875-
~ ++ 1750-
1n25-
1]1 :+ ~+ 1 1 o 1500-
1375-
1250-
! ++ +++ )IE Y •
1125-
unm-

o'"
875-
75.~

= tillie
= 5380 .0
. &25-
50B-

Gas Sat.uratlon
XY 10f 1 t. = 2651.90 B.5ZIJ-

.:~!~ • B.160-

~ ~
. 0.IZ8-
• 0.089-
53BB.9 B .810-
R---------~~---------,~~--------~mr------~md~
TI~e
I
T\""

Fig. 9-Analysis of simulator performance. Fig. 11-Graphic display at run conclusion.


---------------------------------------------------------11
486 microcomputer for this study. We selected DESQview 386 as modem computers make it possible to perform comprehensive reser-
the multitasking software. voir simulations interactively on microcomputers, or any comput-
The reservoir simulator is written in ANSI-standard FORTRAN er capable of multitasking. An interactive reservoir simulation
77 code. The simulator was compiled with the Lahey F77L-EM/32 system is easy to implement. The ideal system will allow the user
FORTRAN extended-memory compiler. The pre- and post-processor to monitor a simulation run during its execution and, if necessary,
is written in C. It was compiled with Borland's C++ compiler. instantaneously modify any time-dependent simulator and well-
Graphic Software System's CGI library of graphics routines was control parameters. The system will allow early detection and cor-
used to provide support for a wide variety of display devices and
rection of time-dependent data problems and will be helpful in op-
hard copy devices.
timizing simulations of both past performance and future
This system can be run on any multitasking environment (such as
performance. The overall result will be a more productive reser-
Unix workstations). Using the interactive system in an environment
where the simulator is running on one computer and the pre- and post- voir simulation engineer.
processor is running on another should even be possible, although a
more sophisticated communication system would be required. References
It is still possible to use some interactive features of the system in 1. Rogers, W.L., Ingalls, L.J., and Prasad, S.J.: "Pre- and Postprocess-
environments where the postprocessor has not been installed (such as ing for Reservoir Simulation," paper SPE 20360 presented at the 1990
a a mainframe). To modify simulation data interactively in such an en- SPE Petroleum Computer Conference, Denver, June 25-28.
vironment, the user simply creates the ASCII update file with a text 2. Huang, A. Y. and Ziauddin, Z.: "Use of Computer Graphics in Large-
editor. After saving the update fIle to disk, the simulator then reads the Scale Reservoir Simulation," paper SPE 20343 presented at the 1990
fIle and incorporates the changes at the beginning of the next timestep. SPE Petroleum Computer Conference, Denver, June 25-28.
3. Norris, S.O. and Capps, K.S.: "Reservoir Simulation With Simultane-
Conclusions ous Graphic Display on the Macintosh II Personal Computer," paper
Reservoir simulation can now be truly interactive. The improve- SPE 20362 presented at the 1990 SPE Petroleum Computer Conference,
ments in speed, memory capacity, and graphics capabilities of Denver, June 25-28.

Вам также может понравиться