07 CMOST Tutorial
07 CMOST Tutorial
07 CMOST Tutorial
TUTORIAL
INTRODUCTION
TO
2010
TABLE OF CONTENTS
21
Tutorial
21
30
33
288611179
3. Open the files "CMOST_Engineer_SA.CMM" and "Engineer.dat" for comparison to observe how certain
variables have been replaced by CMOST variables.
For example, to create a CMOST variable such as permeability we need to replace line 75: *PERMI *KVAR
2000 1000 500 2000 in the "Engineer.dat" file by the new line:
288611179
288611179
Now we need to fill out all the sections of the CMOST Studio.
5. In General Properties we need to browse for the files we are going to use. Your screen should look
something like this:
288611179
b. Each parameter is given a range of values for CMOST to work with (high and low), therefore, in the
Sample Value window we need to input the following values for different parameters:
Parameter
CRD1
FACTOR
FFI 1 al 4
PDILA_INCR
PERM1
PERM2
PERM3
PERM4
PERMUL1
POR1
PVMOD
RESPRESS
c.
288611179
Candidate Value
Min
Max
5.00E-04
1
1
100
250
250
250
250
0
0.1
0.3
100
5.00E-02
4
20
900
4000
4000
4000
4000
6
0.35
1
500
7. In the Sampling Method Option choose Fractional Factorial design with 15 parameters and 128 runs to
calculate the experimental design. After that, do click the Generate Patterns button.
c.
Term name can be changed if needed; accept the origin types as WELLS, select the origin name as
Producer 1, and Cumulative Oil SC as the Property. The Simulation Date Time is automatically entered
from the irf file from the base data set. All these objective functions will be referenced to the end of the
288611179
pilot period, however we could also add additional values for different times (for example end of each
cycle or part of cycle). Browse for the field history file [FieldData.FHF], and enter a conversion Factor of 1.
d. Repeat this process for each Objective Function row, selecting the appropriate well name (Origin
Name) and Property for each Objective Function. The same FHF file is used for each Objective
Function term, the Conversion Factors are all 1.
The next figure shows the Objective Function Term row for the CumSteam Objective Function:
e. In the CMOST Formula Editor add Cmost Single Value Variables and press OK.
f.
9. In Results Observers we include the objective function variables, as well as, BHP values. To do that:
a. Press Import button, you will see the following window:
288611179
Use Shift key to highlight all the objective terms to be added. Press OK.
b. Add missing objective function variables (BHP_Producer and BHP_Injector).
c.
f.
288611179
c.
Click OK. Now you should be able to see a Run Status Monitor
12. Once the job is completed you will see the following screen which can be viewed by loading the CMR file
for this case:
13. In the Results Observers we can see the 128 runs and we can compare it with the historical data (Blue
points). In the following pictures you can see the results of BHP for a producer and injector well, also
cumulative steam injection and cumulative oil produce.
288611179
Here we see that in some runs the oil production is one sided compared to the field data, as is the steam
injection (the other way).
288611179
10
15. By copying the table to Excel and calculating percentage for each parameter we can sort out which
parameters should be included in the history match. Since the results are quite insensitive to the dilation
compressibility value as it can be seen from the table below, we can ignore dilation itself but leave the effect
288611179
11
of normal formation compressibility on permeability. Also, some parameters have an effect on certain
objective functions but not on others and they should be included in the history match.
Note that steam injected objective function is relatively insensitive to most parameters which suggests that this
objective function is not required.
288611179
12
Save as Tutorial_HM.cmt
2. Unit system can be changed to Field to be consistent with the Input units
3. Add a description; browse for the CMM file [CMOST_Engineer_SA.CMM]; add the base data set
[Engineer.dat] and the session file [Engineer.ses]. Save.
4. Select Parameters
5. Import parameters; turn off FACTOR, PERMUL1 and CRD1; check that the default values for these two
parameters are as shown. Also check the defaults for the active parameters.
288611179
13
288611179
14
Enter 0.25 as the second Candidate Value and repeat the process to add the values 0.3 and 0.35 per
the next figure
d. Follow the same procedure to add Candidate Values for each of the rows. Select the Parameter row
first, then the first Candidate Value row to enter the first value. The next figure shows the values for
Parameter PERM1:
15
Once PERM1 values were entered, left click on the row corresponding to PERM1 and choose copy candidate
values to other parameters.
On the newly opened screen, select PERM2 and PERM4 cells, hit OK and then confirm the replacement of values.
f.
288611179
16
g. Select FFI1 row and click on the generate button. On the following menu, choose Arithmetic sequence
as the method. Set the Min value to 1, Max value to 19 and number of values also 10. Click OK.
h. Copy the candidate values from FFI1 to FFI2, FFI3 and FFI4.
i. For the reservoir pressure we should use a low value of 100 psi and a high value of 500 psi. An increment
of 100 psi can be used
288611179
17
j. The pore volume modifier should span a range from 0.3 to 1 with an increment of 0.1. There is nothing
magic about this range except that you want the answer to fall within it. The Sensitivity Analysis would
help to validate whether this was an appropriate range
k. The dilation incremental pressure must start with a value > 0 and in the example we have used 100 psi.
The upper value of the increment is determined by looking at the lowest reservoir pressure selected (100
psi) and the steam injection pressure (1000 psi). The difference (900 psi) is the largest increment we need
since any larger value would eliminate dilation onset. Therefore, in total we need to set 9 values for
PDILA_INCR with minimum value of 100, maximum of 900
7. Select the Objective Functions screen. We wish to add five Objective Functions:
a. Click on the Insert button to add a row and overwrite the default name that shows for the first Objective
Function. Add % as the Display Unit. The other columns are defaulted.
b. Add the other four Objective Function rows in the same way.
c.
Select the first Objective function row. A blank row will appear under Objective Function Terms:
d. Highlight the row, change the term name if you wish, accept the origin type as WELLS, select Producer1
as the Origin Name, and Cumulative Oil as the Property. The Start Date Time and End Date Time are
automatically entered from the irf file from the base data set (if it exists). Usually this can be left as is
unless you are trying to match a different time period for a particular Objective Function. Browse for the
field history file [FieldData.FHF], enter a Measurement Error of 0, and a Term Weight of 1.
e. Repeat this process for each Objective Function row, selecting the appropriate well name (Origin
Name) and Property for each Objective Function. The same FHF file is used for each Objective
Function term, the Measurement Errors are all zero, and the Term Weights are all 1. The next figure
shows the Objective Function Term row for the BHP_I Objective Function:
288611179
18
f.
8. The Influence Matrix allows you to specify what level of influence a given active Parameter has on a Given
Objective function. In this case we will leave these levels at 1. Note that we have removed the Parameters
which have no influence on any Objective Function as determined by the Sensitivity Analysis (see
sensitivity tutorial). Note also that the Parameter Effect table created in Excel after the Sensitivity Analysis
indicates that some other Parameters have little effect on some Objective Functions, so those IM cells could
be set to zero or 0.2. You can try this as an exercise to see the effect on the History Matching.
9. For the Time Series Results Observers click the Import button and select all the time series quantities:
288611179
19
10. Change the number of Display Points to 100 and save the file:
Select the simulator and version. This will be one of those on the local machine. Select Find Closest
Version so that CMOST uses the most appropriate version available on the machines on which the
simulations will be run. Note that all jobs should be run on the same version with the same number of
CPUs as otherwise the results may be affected by version and parallelization issues.
The max job time, in hours, should be set to a suitable number. In this case, each job should take no longer
than 15 seconds to complete. Therefore it is recommended to set the Maximum Job Run Time to 0.1 hour
(6 mins) so that in case a job runs for more than 6 mins, the simulator kills the job and continues with the
next one in queue.
e. Save the file and click Start Task.
12. The next slide shows the parameter status chart from the second CMOST history match, and identifies the
range of all the parameters:
288611179
20
13. After running the History Matching you should get a screen similar to:
14. Review the PowerPoint slides for a discussion of re-running the History Matching using PSO rather
than DECE. In this case you need to specify a maximum number of jobs to be run since the PSO
approach does not reduce the search space. A value of 1000 is appropriate.
15. The slides also discuss how to stop and restart a CMOST run.
288611179
21
Tutorial
1. Copy one of the history match data sets from the jobs directory into the main project directory. All work
must be done in the project directory (you may create a new one for optimization if you wish, but make sure
that all necessary fhf files are copied to this directory) to avoid confusion. In the example we shall use the
DECE history match file numbered 743.
2. The first step is to add the cyclic groups definition at DATE 1973 9 25. A comparison of the original data set
at this date, and the revised data set at this date, is shown in:
Figure 1
3. Note that we have defined a Group Cycling which is attached to the upper group Master. This Cycling
group has both wells attached to it.
4. We also need to write a restart record at the last time in the historical period so we add a line WRST TNEXT
after TIME 1094:
Figure 2
288611179
22
5. Save the data set and run it. Note that we have not made any material changes to this data set as far as
the history match is concerned. All that we have done is to enable the cyclic group definition in the restart
record, and to write this restart record.
6. Next we need to create the base data set for optimization. This will also be the 743 data set, but it will be
designed to restart from the restart record previously given. It will also have additional TIME lines covering
the forecast period and, at the restart point of DATE 1976 09 24 we will have instructions as to how to
operate the two wells under cyclic group control.
7. Open the selected history match data set (00743 in our case) in Builder and save it with the same name but
with _OPT attached. Go to I/O Control and select Restart. Into Restart and Writing Restart windows, select
"Restart from previous simulation run..." as shown in the following picture:
Figure 3
8. Note that it is important that the restart time step number be identified correctly to ensure that the restart
happens at the correct date.
9. Using the cyclic control interface in Builder, define the cyclic controls for the two wells at the 1976 09 24
DATE:
Figure 4
288611179
23
10. Note that we start with well Injector 1 explicitly open to start the cycle. Well Producer 1 is implicitly closed.
It is assumed that the user is familiar with the use and construction of cyclic controls. Refer to the figure to
determine the constraints to use for the cyclic controls.
11. Extend the dates to 1984 12 31 in 1-day intervals in Builder and remove the STOP. We use 1-day intervals
to give good definition of the stages of the cycles, but also to ensure consistency in results during
optimization. This limits the time step size to 1 day and ensures that results are not biased by some cases
running with significantly larger time steps than others. For the same reason e need to ensure that we
always use the same number of CPUs for running cases to avoid different degrees of drift in the results.
12. Save, exit Builder and run it. Open the file in the text editor. Save the file with the extension of .CMM.
13. We will replace the cycle times for the three parts of the cycle (injection, soak, and production) with CMOST
parameters. We will also replace the minimum produced oil rate switching constraint with a CMOST parameter:
Figure 5
14. Note that once we input CMOST variables in the text file, we cannot make any changes to it in Builder
anymore because Builder is unable to read the <cmost> strings.
15. Remove the line specifying STOP just before the DATE 1976 09 24 if it exists, and save the file.
16. Open CMOST and select Optimization as the task type. Identify the correct project directory containing the
files just created.
17. Complete the General Properties screen by importing the files as shown below and adding a descriptive
comment:
288611179
24
Figure 6
18. Move to the Parameters screen
19. Import the Parameters the three time periods:
Figure 7
20. The range of times for the injection period is shown above. For the soak period use three times of 7, 14,
and 21 days; for the production period use eight times starting at 90 days and going to 720 days.
21. Move to the Objective Function screen.
22. In this case we only have one Global Objective Function the NPV of the forecast period:
288611179
25
Figure 8
a. Click Insert in the upper right and select Discounted Value.
b. There will be only one local objective function so you can select any of the Methods. However, if you
choose anything other than Sum you will get a warning message that Sum is preferred.
c.
f.
i.
ii.
Note that the Start Date Time is the beginning of the optimization (forecast) period as we do not
wish to include the historical data in the calculation
ii.
iii. The Yearly Interest Rate (Discount Rate) is the fractional annual discount rate, in this case 10%, for
calculating the discounted NPV of the term
iv. The Unit Value is the value of one base unit using the unit system defined in CMOST in the General
Properties screen. In this case the base unit is bbl/day (because the defined unit system in
CMOST is Field) so the Unit Value is $/bbl.
v.
For quantities that are a cost, use negative value numbers. In this case we are using a value of
$30/bbl for bitumen and -$3/bbl for steam.
vi. Refer to the CMOST manual for details as to how the NPV calculation is performed.
vii. The Conversion Factor is used to convert the base units used in the simulator to the displayed units
for a given quantity. In this case the base units are bbl and we wish to display the NPV in
thousands of dollars (M$). Thus we use a Conversion Factor of 0.001.
viii. NOTE THAT THE CONVERSION FACTOR IS APPLIED AFTER THE NPV CALCULATION.
288611179
26
24. Move to the Influence Matrix screen. Since we have no idea how the different parameters affect the NPV
we will leave the IM at its default values of 1. If we knew, perhaps by running a SA on the forecast, how the
different parameters affected the NPV, we could include this influence here by using a value between 1 and
0 for each parameter.
In practice, it is usually faster to conduct the optimization with IM values of 1 rather than to conduct several
SAs to obtain IM value estimates.
25. Move to the Result Observers screen:
Figure 9
26. The result observers can be imported from the Objective Function screen by clicking the Import button.
Additional result observers can be added by hand. The top section of the screen is for Time Series result
observers: the bottom section of the screen is for Fixed date result observers. A field history file can be
entered here but since optimization is usually done for a forecast about the only time you might use this
entry is if you have a base case forecast. We shall leave it blank.
27. We can skip the Constraints and restart Configuration screens and move to the Run Configuration screen.
28. On this screen, click the Refresh Schedulers button:
288611179
27
b. The simulator executable on the local machine is 32-bit but the Find Closest Version will result in the
cluster using its 64-bit version, with 1 CPU allocated to each job.
c.
The CMG DECE optimization method is chosen and a short refresh time is used. The refresh time is
automatically adjusted based on job run time.
d. A maximum job run time of 0.05 hours (3 minutes) is selected since the normal run time is shorter than
this. If this time is too short lots of jobs being killed because they run longer than 3 minutes and the jobs
are otherwise OK the time can be increased accordingly. The purpose of this number is to prevent a job
that has hung, or is taking much longer than it should, from blocking the execution of the case.
e. Finally we specify a maximum number of jobs to be run (1000). This is also a safety net in case
something goes wrong. Normally you should reach convergence with DECE before running 1000 jobs,
especially with this particular case.
29. Save the data set and click the Start button.
30. After CMOST finish, examining the best five jobs shows:
Job
ID
64
13
61
10
55
Global
Obj
1033.8
1030.8
1028.4
1020.7
1015.3
MAXINJTI
ME
120
120
120
180
180
MAXPRODT
IME
540
540
540
450
450
MAXSOAKT
IME
14
7
21
14
7
Figure 11
a. The injection time seems to have settled at 120 days.
b. Note that of the best three solutions the only differentiator is the soak time. The soak time seems
that don't have a big impact in the NPV.
c.
Figure 12
37. From the point of view of doing forecast optimization using CMOST we could consider the job to be
complete at this point. It is possible to perform further refinement of the optimization.
38. Another extra exercises could be remove the MAXPRODTIME parameter and use instead of a Minimum Oil
Rate for Cycle Switching. Do the necessary modifications in the OP_00743_OPT.CMM
39. Compare the two optimization cases.
Figure 133
288611179
28
42. Use Results Graph in order to compare the best NPV cases in both optimization cases.
STARS Test Bed No. 6
Producer 1 OP-2_00028.irf
250
200
150
100
50
0
1974
1976
1978
1980
1982
1984
1986
Time (Date)
OP-2_00028.irf
OP_00064.irf
1.40e+5
1.20e+5
1.00e+5
8.00e+4
6.00e+4
4.00e+4
Cumulative Oil SC (bbl)
2.00e+4
0.00e+0
1974
1976
1978
1980
1982
1984
1986
Time (Date)
OP-2_00028.irf
OP_00064.irf
Figure 144
41.This concludes the tutorial on CMOST Optimization.
288611179
29
Figure 1 - 3D Representation of a RS
Figure 2
288611179
30
Figure 3
4. Save the changes done in the master data file.
5. Now, go to the Optimization job folder and open the master data file in a text editor. Copy the prediction part
of the file (from TIME 1094 to the STOP keyword), and paste in the file that we want to create for the UA
activity (CMOST_Engineer_UA.CMM).
6. Change the defaults values in the cyclic option by those obtained in the optimization. Save the file.
7. Open CMOST Studio and select Uncertainty Assessment task type. Identify the correct project directory
containing the files just created.
Figure 4
8. Complete the General Properties screen by importing the files as shown below and adding a descriptive
comment:
288611179
31
Figure 5
9. Go to parameters and do click in the import button to get the CMOST parameters from the cmm file.
10. Uncheck all the
MAXSOAKTIME).
parameters
except
(FFI2,
FFI3,
FFI4,
PDILA_INCR,
MAXPRODTIME,
and
11. Add parameter values for the active parameters. For that, we will be using the range of values that were not
blocked in the history match and the optimization. This procedure will permit calculate the uncertainty in the
combinations.
Figure 6
288611179
32
Figure 7
12. Select Parameter row FFI2. Select a "Uniform Probability Distribution" and use 7 and 15 as lower and upper
value.
13. Do click in the Suggest Samples button. Leave the default options and do click in OK.
Figure 8
14. Repeat the steps 11 to 12 for the parameters FFI3, FFI4, MAXPRODTIME, and MAXSOAKTIME and select
the range unblocked for those parameters.
15. Select Parameter row PDILA_INCR. Select a "Triangle Distribution" and use 400, 600 and 700 as Lower,
Peak and Upper value.
Figure 9
16. Save the task file (UA.CMT)
288611179
33
17. Move to the Objective Function screen. Insert the NPV as Global Objective Function as in the optimization
case.
Figure 10
a. Click Insert in the upper right and select Discounted Value.
b. The Formula is the Sum of Objective Terms
c. The Display Unit is M$ for thousands of dollars
d. The NPV will be made up of two terms:
i.
ii.
Note that the Start Date Time is the beginning of the optimization (forecast) period as we do not
wish to include the historical data in the calculation.
ii.
iii. The Yearly Interest Rate (Discount Rate) is the fractional annual discount rate, in this case 10%, for
calculating the discounted NPV of the term
iv. The Conversion Factor is used to convert the base units used in the simulator to the displayed units
for a given quantity. In this case the base units are bbl and we wish to display the NPV in
thousands of dollars (M$). Thus we use a Conversion Factor of 0.001.
18. Go to Sampling Method and select Box-Behnken. Do click in the Generate Patterns button.
19. Move to the Result Observers screen, and create variables for Oil rate, Steam rate and Cumulative oil as
showed below.
Figure 11
288611179
34
20. Move to Run Configurations screen, and complete this section as before.
21. Save the task file and run.
22. When CMOST finish, the results will be similar to:
Figure 12
Figure 13
288611179
35