of 20
8/11/2019 Dynamic Modelling Tips and Tricks
1/20
8/11/2019 Dynamic Modelling Tips and Tricks
2/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 2 of 20
Attachments
The files described in this report are included in the attached ZIP file
A)
Files for computing
1.
MoReSBatchonPC.bat File for running MoReS in batch on PC2.
execute.exe File for running MoReS in batch on PC3.
.setenv File contain example to setup environment variables
MoReS_Files.zip
B)
File for extracting data from OFM
1. Production DataT3.rpt OFM report file for production data
2.
PressureData.rpt OFM report file for Datum Pressure, FBHP, SBHP3. PressureDataTHP.rpt OFM report file for THP pressure data4. Header format.txt Example Header file for MoReS table definition
MoReS_data_OFM.zip
C) Example file for generating Pressure data for MoReS from BHP Database
NEMC_PRESSURE.zip
References1.
DYNAMO Reference Manuals,http://sww-geo.shell.com/pro/dynamo/doc/html/
8/11/2019 Dynamic Modelling Tips and Tricks
3/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 3 of 20
1 Computing Environment
1.1
Getting Started with DYNAMO in Linux
The following provides a quick guide to running and managing DYNAMO processes inLinux. A full description can be found in the DYNAMO User Manuals.
DYNAMO command line options
Start an Interactive Dynamo Session (current default installed version)DYNAMO
Start an Interactive Dynamo Session in a specific versionDYNAMO v2009.1
Start an Interactive Dynamo Session and immediately load an existing runfileDYNAMO r RunFile.run
List the current installed and available versionsDYNAMO --list
Start a process in batch from an input file and send output to an output file and error fileDYNAMO < InputFile.inp > OutputFile.out 2> Output.File.err &DYNAMO -i InputFile.inp -o OutputFile.out e OutputFile.err &
A full list of options is displayed by typingDYNAMO --help
Start Parallel MoReS and specify the number of processes to useDYNAMO -paripc 2 -i InputFile.inp -o OutputFile.out e OutputFile.err
&
___________________________________________________________________
Managing DYNAMO processes
To monitor the progress of a DYNAMO process in backgroundbjobs -w (-l)options : -w create a short listing on the processes
-l creates a long listing of the processes
To stop a DYNAMO process running in background (JOBID# is output from bjobs
command)bkill JOBID#
To stop all DYNAMO processes running in backgroundbkill 0
8/11/2019 Dynamic Modelling Tips and Tricks
4/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 4 of 20
1.2
Use of Environment variables (Windows and Unix)
Environment variable are very useful and can be used for
-
Navigating the Unix directory structure more easily
- Transferring and running the same input file between the Windows and Unix
WindowsOn Windows, Environment variables are defined from the System Properties Menu
From the My Computer icon on the Desktop,Right Click and select Properties > Advanced > Environment VariablesClick Newto create a new variable
In the example shown below, the environment variable is used to define a shortcut to aspecific directory on the C:\ drive of the PC.
VistaOn Vista, Environment variable are define from within the Control Panel > User
Accountspage. The option Change my environment variableis found on the left hand side ofthe panel.
UnixEnvironment variables can be defined in Unix by creating an executable file in the userhome directory that contains a listing of the required variables and running the file asfollows
1.
Open an interactive terminal window on Linux2. Go to T-Shell
tcsh3. Run the executable file
source .setenv
An example .setenv file is included in the attached MoReS_Files.ZIP file. Note that theuser needs to be in the T-Shell to recognise the setenvkeyword. The K-Shell recognisesthe exportkeyword. Also shown is the use of aliases that are useful unix shortcuts.
##Script to define useful aliases and environment variable in Linux#
echo "\-------------------------------------------------------------------------------\Set Environment Variables and Aliases\
\-------------------------------------------------------------------------------\"
#Set useful aliasesalias dy91 'DYNAMO -v2009.1'
#Set useful environment variable
8/11/2019 Dynamic Modelling Tips and Tricks
5/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 5 of 20
setenv EPU"/glb/af/spdc/data/mid_project/GBAR_PH2_0108/Dynamo/Work/EPU"
How to define an environment variable in a Windows operating system.
8/11/2019 Dynamic Modelling Tips and Tricks
6/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 6 of 20
1.3
Useful Unix commands
The following is a list of basic but useful Unix commands helpful to anyone using aUnix/Linux computing environment. The list below is very far from a complete butcontains only the most useful commands to run DYNAMO.
ls{-al} Listing a directory {all files (a), in long format (l)}cp Copying a filemv Renaming a filecd Change to another directory, if is omitted it points to the users
home-dirrm{-r} Removes a file or directory {recursively, i.e. including sub-
directories}pwd Shows the present directorymkdir{-p} Create a new directory (including the entire path when not present)who Shows all users presently logged on to the systemwhoami Shows the username of the present userfinger Display information about the user uidid Shows the id (uid & gid) of the present userhostname Shows the name of the current machine
cat Printing the contents of a file to the standard output (normally:screen)
man Showing the contents of the manual pages about mank Showing what manual pages contain the specified setenv Create an environment variable (in T-Shell)echo Display line of text (eg. echo $env, displays contents of the
environment variable env .vi Text-editor in Unix (view is the read-only version of this editor)grep{-i} Finding a certain in {ignoring upper/lowercase}more Handling output on a screen-by-screen baseps{-ef / -u } Show the processes running at that moment {all or of a specific
| Pipe; can be used to redirect output from one command to input for
the other [ e.g. ps ef| grep shows all pr ocesses of ]
chmod{ugorwx} Change permissions on (or directory) using various options(specifing user, group, others adding (+)/removing(-)permissionsrwx). chomd R 777 * will change all file to rwx to all.
chown Change owner of to user-id chgrp Change group of to group-id file Determine the file-type of (i.e. ascii, executable, tar-archive,
etc.)which Displaying the entire path to the command or file intendedpasswd{user} Change password {of user}df {-k, dir} Show free/used space {in kB, on file-system involved with specified
dirdate To show system time and dateuname{-a} Shows (more) information about the operating system
ssh X [email protected] Logon to the system as a specific user (
bjobs {-w,-l} Returns list of active jobs on the system.lfor long listing
8/11/2019 Dynamic Modelling Tips and Tricks
7/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 7 of 20
2 Running Dynamo
2.1
Running MoReS in batch on a PC
It can be useful to run DYNAMO jobs in batch on a PC. To do this, the files included inthe attached ZIP file are needed
1.
execute.exe2.
*.batfile which runs one or more DYNAMO jobs by calling theDYNAMO executable with appropriate options
Examples can be found in the following directory and are described below.
/glb/af/spdc/data/mid_project/Templates/MoReSBatchonPC
The .bat file contains commands to run DYNAMO on a PC using the dynamo.exeinstalled in a specific directory. Environment variable can be used within the DYNAMO
input decks in the same way as in Unix, so setting a common variable on both Windowsand Unix allows the same input deck to be used on each system. The .bat file can containmultiple commands to run several jobs after one another (e.g. overnight). Note thatEnvironment variables in DOS are recognised by having % signs before and after thekeyword, whereas Unix uses a $ sign before the keyword only.
To run the file simple Double Click the MoReSBatchonPC.bat file from the Windowsdirectory.
8/11/2019 Dynamic Modelling Tips and Tricks
8/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 8 of 20
Double-click the .batfile to run the model
8/11/2019 Dynamic Modelling Tips and Tricks
9/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 9 of 20
2.2
Running Dynamic Models on Linux Cluster in parallel
SPDC currently has a 32 node Linux Cluster available that can be used for dynamicmodelling. The advantage of the cluster is that several dynamic models can be run inparallel, significantly speeding up the turnaround time for a sensitivity study.
The procedure to do this outlined below.
The following files are need in the Unix directory for the specific model:
- All the necessary dynamo input decks-
A batch file with commands to run the decks
An example of a batch file is shown below.
The batch file is processed by typing:
./ BELE_D1D2_HM_BB.BATCH &
In this example the batch file will submit 10 DYNAMO jobs to the cluster, which will bedistributed across different nodes depending on availability. All jobs will run in parallel.
The jobs can be monitored by typing bjobs -w to determine which node they arerunning on.
8/11/2019 Dynamic Modelling Tips and Tricks
10/20
8/11/2019 Dynamic Modelling Tips and Tricks
11/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 11 of 20
The benefits of centralized storage are:
-
Access to increased storage space
- Improved management of dynamic models-
Allow better archiving of models and projects
- Allow hibernated projects to be restarted quickly-
Sharing of common templates, scripts and workflows
Unix DirectoriesThe following Unix directories are available to store dynamic model data:
Mid belt reservoir models:Linux directory Samba link/glb/af/spdc/data/mid_project \\phc-n-s00051\mid\project\
West belt reservoir models:Linux directory Samba link/glb/af/spdc/data/west_project \\phc-n-s00051\west\project\
Dynamic Model Naming ConventionDynamic model input decks and run files should be named in a consistent manner toease identification of key models and sensitivities. The recommended naming conventionis outlined below and is consistent with Global standards and static model namingconventions.
Each file should have a Field, Reservoir, Descriptionand Modeidentifier.
Field Four character field abbreviation, e.g. BELE for BelemaReservoir Reservoir description, e.g. D1000A
Description Text abbreviation to describe what the run is about, e.g. ED forExperimental Design
Mode Optional addition to Description identifier, e.g. rpp forReduce++ runfile
8/11/2019 Dynamic Modelling Tips and Tricks
12/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 12 of 20
8/11/2019 Dynamic Modelling Tips and Tricks
13/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 13 of 20
The following directory structure is recommended for all dynamic modelling in SPDC.The structure is compliant with global standards on data storage and is consistent with asimilar directory structure being used for static models (Petrel).
The structure has the following features-
The top level directory name describes a field
and activity, e.g. BELE for Belema, FDP_0909for FDP update September 2009
-
Beneath the top level directory, sub-directoriesof Dynamo and Work exist
- An Include sub-directory exists which containsall the individual include files being used byMoReS. This allows easy access to and qualitychecking of the data
- A series of directories exist below the Workdirectory which contains dynamic model datafor each specific reservoir. Where reservoirsare combined, the name should reflect this.
For example opposite, the D1D2A directoryrefers to the analysis for the combinedD1000A and D2000A reservoir
- Beneath the reservoir level directory, severalsub-directories can be created to organisespecific items of work. In the exampleopposite, the ED directory refers toExperimental Design with further sub-directories for PlackettBurman andBoxBehnken analyses, HM for Historymatching and PVT for PVT sensitivities.
- The static model is normally transferred to
DYNMAO via an Open Petrel Binary file(OPB file). It is recommended to store allOPB files in the Petrel sub-directory under theInclude directory
- Historical production data (from OFM) shouldbe stored inside the History sub-directory
8/11/2019 Dynamic Modelling Tips and Tricks
14/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 14 of 20
4 Generating Historical Data for MoReS from OFM
Oil Field Manager (OFM) software from Schlumberger is used in SPDC to storeproduction and pressure data. The data is stored at a completion level, Field -> Reservoir-> Well -> Zone). Data at a perforation level is not stored. This section explains how toextract production and pressure data in tabular format suitable for direct input to
MoReS.
At the time of writing this report, the templates files outlined below only work withOFM 2005. The templates will NOT work with OFM 2007.3.1. Until advised otherwisethe user is recommended to only use OFM 2005 to perform these tasks.
4.1
Production Data
A template (Production DataT3.rpt) is available for extracting production data fromOFM in a format that can be directly loaded into MoReS. The template file is included inthe attached MoReS_Data_OFM.ZIP file at the beginning of the report. It can beextracted and stored in an appropriate place on the PC, e.g. C:\Apps\OFM.
The procedure to generate the MoReS data table is outlined below:1.
Open OFM and lead in the latest MSAccess database with relevant productiondata (East or West)
2.
Filter on the required production dataset, e.g. BELE -> D1000B
3. Open a report. Report -> Analysis -> OK
4.
Load the Template Production Data report file: File -> Open, and navigate tolocation where the template file is stored.5. The report produces a table of the production data for the filtered dataset.6.
Production data for the individual completion zones can be generated byselecting:View -> Summary -> By Item.
7.
The data can be output to a text file. Right click in the top left hand corner of thecentral screen and select Text. In the File:dialog box, define a name of anoutput file and select Close and Update. The output file will appear in theappropriate directory.
8/11/2019 Dynamic Modelling Tips and Tricks
15/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 15 of 20
4.2
Required edits to Production Data files
The tables generated by the OFM report files described above need to be hand edited towork properly in MoReS. This section describes the edits required.
1.
Inclusion of header information to define tables.
A MoReS header file is required to define the necessary table format. Anexample is attached. The file generate by OFM should be include inside theheader file.
Header format.txt
2. Addition of zero rate/cumulative row at start of each table
It is important to ensure MoReS is synchronised with history data table. The start
time in MoReS is set using the TIME command in the SIMDATA dictionary.For example,
SIMDATA.TIME = DATE(31,08,1993) ! (day, month, year)
MoReS will start simulating from this time. The time in the first row of a historymatch table must correspond to the time that the well is opened for the first timeand the cumulatives and rates in this row must be zero.
In the example table below, the first row must be inserted by hand with zerorates and cumulatives. It is generally recommended that liquid rate constraints areapplied to the production wells. Well BELE001S will start simulating from time
31-Aug-1993 at a liquid production constraint of 288.97 b/d until 30-Sep-1993.The liquid rate constraint will then be increased to 1954.52 b/d and simulationprogressed to 31-Oct-1993, and so on.
3. Addition of zero rate row at end of history period
A particular well will continue to simulate as described above, being controlled bythe relevant constraint in the history data table. For situations where the wellstops production before the end of simulation run, a row must be inserted at the
end of the table with zero rates. This will stop the well producing; otherwise itwill continue to produce beyond the history period. The scripts will workcorrectly in most cases; however the user needs to check that a row with zerorates and ratios is present. The cumulative volumes should be same as theprevious month.
8/11/2019 Dynamic Modelling Tips and Tricks
16/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 16 of 20
Select Text
Right Click inthis box
8/11/2019 Dynamic Modelling Tips and Tricks
17/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 17 of 20
8/11/2019 Dynamic Modelling Tips and Tricks
18/20
8/11/2019 Dynamic Modelling Tips and Tricks
19/20
DynamicModelling_Tricks&Tips_July2010.doc
Page 19 of 20
4.4
Surface Pressure Data from OFM: THP
A template (PressureDataTHP.rpt) is available for extracting surface pressure data on adrainage point level from OFM in a format that can be directly loaded into MoReS. Thetemplate file is included in the ZIP file above. It can be extracted and stored in anappropriate place on the PC, e.g. C:\Apps\OFM.
The OFM report file will generate a table of well completion name, date, THP as shownbelow. THP data is reported on a monthly basis. This is different from the down-holepressure data which is only reported at dates when specific down-hole pressure survey
where conducted.
The procedure to generate the MoReS data table is identical to that described for down-hole pressure data in section 4.3
8/11/2019 Dynamic Modelling Tips and Tricks
20/20
DynamicModelling_Tricks&Tips_July2010.doc
5 Generating Pressure Data Tables from BHP Database
The BHP Database is used to store a range of pressure test data. This section describesthe process of extracting the data in a form that can be used by MoReS. Data from theNembe Creek Field will be used as the example. It is assumed that the user has access tothe BHP Database (ID and Password).
The procedure to generate Pressure data tables for MoReS is outlined below:1.
Open BHP Database with ID and Password2. From Menu bar select Report -> Summary Reports -> Pdatum re-calculated3.
Specify the field name in the dialog box
4. The BHP Summary Report screen with appear containing well test data andparameters for all wells in the Nembe Creek field. The data is order by Reservoir/ Well / Date
5.
Extract that data to an excel sheetReport -> Save to File... -> Save as type (Excel with headers)
6.
Save the excel file to a location on the C: drive7.
The pressure data excel file will have data in columns A to AB. The attachedtemplate file contains excel function in columns AC and AD to extract datatables in a form suitable for MoReS. Copy the functions from the template fileinto the columns AC and AD of the file extracted from the database
a.
Column AC: Well data (FTHP, FBHP, SBHP, Pdatum)b. Column AD : Reservoir data (Pdatum)
8. The data can be used to create MoReS input tables. Table definition statementsare also included in row 1.