You are on page 1of 122

Plots

Copyright © 1998-2014 Schlumberger. All rights reserved.

This work contains the confidential and proprietary trade secrets of Schlumberger and may not be copied or stored in an
information retrieval system, transferred, used, distributed, translated or retransmitted in any form or by any means,
electronic or mechanical, in whole or in part, without the express written permission of the copyright owner.

Trademarks & Service Marks

Schlumberger, the Schlumberger logotype, and other words or symbols used to identify the products and services
described herein are either trademarks, trade names or service marks of Schlumberger and its licensors, or are the
property of their respective owners. These marks may not be copied, imitated or used, in whole or in part, without the
express prior written permission of Schlumberger. In addition, covers, page headers, custom graphics, icons, and other
design elements may be service marks, trademarks, and/or trade dress of Schlumberger, and may not be copied,
imitated, or used, in whole or in part, without the express prior written permission of Schlumberger. Other company,
product, and service names are the properties of their respective owners.
An asterisk (*) is used throughout this document to designate a mark of Schlumberger.

Product Information

Country of Origin: USA


Release Date: August 2014

1 of 122
Plots

Overview of Plots
A plot is a template with two-dimensional XY graphs. A graph can represent any of your variables, in a
colorful, customized format. One plot can have up to six graphs.

When you create or edit a plot, you can:

n Accept the default X-axis variable or change it

n Select plot variables from a list

n Choose the number of graphs that display on the plot

n Choose the number of Y-axes for each graph

After you create a plot, you can change the curves and axes, and display multiple graphs:

n Add, hide, and remove curves

n Add up to six Y-axes to the graphs

n Display up to six graphs, and then focus on a single graph on a plot

You also can change the way the plot displays:

n Change the axis label, tics, lines on the grid, scale, and origin

n Change the graphical features of the curve

n Customize every graph's position and size

n Make changes to the legend

n Create headers for a title

While working with plots, you can view the data in different ways:

n View plot data in a report

n View the data values for every plotted point

n Change the plot type to stacked, sum, or average

n Use a trace point or trace line to highlight data points on the graph

n Remove data points that have a specific value (for example, if you want to remove all data points
that have OFM's null value)

n For clarity, show the plot curves in reverse order or below the X-axis as a negative curve (for
example, to see injection below the axis, and production above the axis)

n For intraday plots, you can change the data frequency of a curve to a different time aggregation (for
example, quarterly)

2 of 122
Plots

Related Tutorials and Examples


Creating and Editing Plots

Auditing Plots

Calculating Pressure from P/Z and Production Data

Creating a Water Breakthrough Diagnostic (Chan) Plot

Creating a Hall Plot

Creating Plots for Waterflooding Surveillance

Fitting a Polynomial Curve Through Plot Data and Displaying Its Equation

Related System Functions


List of Plotting System Functions

3 of 122
Plots

Using Gallery Templates


The gallery offers pre-formatted analyses for:

n Reports

n Plots and forecasts

n Grid maps, contour maps, bubble maps, and scatter plots

To create an analysis with a template in the gallery:

1. On the Home tab, in the Launch analysis group, click the launcher (the down arrow) for the type
of analysis.
A gallery of templates displays.

2. Click an item in the gallery.

You are ready to select the variables and other choices.

Related Topics
Using Analyses Saved in Catalogs

4 of 122
Plots

Creating and Editing Plots


There are two types of plots:

n Regular plot: Has multiple curves for one well

n Multiple curves plot: Has one curve (the same variable) for multiple entities

Perform the following steps to create a plot. You also can create plots:

n From the gallery, which have the formatting already applied to them

n From the catalog, which have the variables and formatting already applied to them

To Create a Quick Regular Plot


Follow these steps to create a quick plot with one graph, with Date for the X-axis, and one Y-axis.

1. To begin:

n To create a new plot: On the Home tab, in the Launch analysis group, click Plot.

n To edit an existing plot: With the plot open, on the Format tab, in the Edit group, click
Variables.

The Edit Plot window opens.

2. The middle section of the window lists the curves on the Y-axis. On the first row, in the Variables
column, select a variable from the list of variables for the Y-axis.

3. When you finish, click OK. (Or see the next procedure for a more-complex plot.)
Your plot displays a curve of data for the entity you select on the Navigation pane. For example, if
you select a well, the plot displays data for the well. If you select a reservoir, the plot displays data for
the reservoir.

To Create a More-Complex Regular Plot


The previous steps will create a quick regular plot. On the Edit Plot window, you can make other changes
to it.

1. If you do not have the Edit Plot window open: With the plot open, on the Format tab, in the Edit
group, click Variables.

2. To add and remove curves:

n To show or hide a variable, select or clear the check box next to the variable on the list.

n To add a curve, click Add Curve to add a new line in the list of variables, and then select a
variable.

5 of 122
Plots

n To apply a fixed filter on the curve, select a Category and Name. When you do this, only
entities with the selected category and name will display. For example, if you select the
Completion category, and the Well-A name, then the curve data will be only for Well-A in the
Completion category even if you select a different completion on the Navigation pane.

n To remove a curve, select the name of the curve you want to remove (not the check box) and
then click Remove Curve.

3. For more than one graph on the plot:

n To see more than one graph at a time in a tiled formation, select the Number of Graphs you
want to display.

n If you have more than one graph displayed, select the graph you want to change on the
Current Graph list. All changes you make will affect the current graph, and not the other
graphs.

4. To change the X-axis variable:

n By default, OFM selects Date as the X-axis variable. To change the X-axis variable, select a new
X-Axis Variable from the list.

Note: The data points are connected according to time. If the X-axis is not a date, you should connect the
data points for the X-axis variable.

n The X-axis variable multiplier displays the database units selected for the field. To change this for
only the current plot, select a new Multiplier.

Note: If you change the Multiplier, OFM changes it for this instance. If you close the plot and reopen it,
OFM will use the multiplier you set on the Variable Editor.

5. To change the Y-axis variable:

n The middle section of the window lists the curves on the Y-axis. To change the Y-axis variable: In
the Variables column, select a variable from the list of variables for the Y-axis.

n To change the current Y-axis, in the Y Axis section select a new Current Axis.

n To change the number of Y-axes that display on your graph, change the Number of Axes and
select a Current Axis variable from the list.

6. By default, the Category and Name is the selected entity (the one selected on the Navigation
pane). If you want to show only specific entities, select a new Category and Name.

7. When you finish, click OK.

To Create a Multiple Curves Plot


Follow these steps to create a plot with one curve (the same variable) for multiple entities.

6 of 122
Plots

1. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

2. Click Add Multiple Curves.

3. Select the Category and Variable and then click OK.


OFM adds one curve for each item in the category you selected. For example, if you have three
reservoirs in the filter category and you selected reservoir as a category, OFM adds three curves.
Each curve is for a different reservoir.

Related Examples and Tutorials


Creating and Editing Plots: To Create a Plot that Displays Data for a Single Completion

Auditing Plots: To Get Started

Patterns: To Compare Multiple Patterns on a Plot

Calculating Fitted Pressure from Fitted P/Z: Comparing the Reservoir Pressure to the Fitted Pressure from
the Fitted P/Z Curve

Creating a Chan Plot: Creating the Plot

Creating a Hall Plot

Creating Plots for Waterflooding Surveillance

Fitting a Polynomial Curve Through Plot Data and Displaying Its Equation

Related Topics
Grouping Completions for a Well

Viewing Plot Data in a Report

7 of 122
Plots

Adding, Hiding, and Removing Curves


1. With the plot or forecast open, on the Format tab, in the Edit group, click Variables.
The Edit Plot window opens.

2. If you have more than one graph: In the Graph group, select the Current Graph (the graph to
which you want to add or remove curves).

3. If you have more than one Y-axis: In the Y Axis group, select the Current Axis.

4. To show or hide a variable, select or clear the check box next to the variable on the list.

5. To add one curve:

a. Click Add Curve to add a new line in the list of variables.

b. Select a Variable. If you want to select calculated variables, select the Select from
Calculated variables list check box.

c. By default, the Category and Name is the selected entity. To change this, select a new
Category and Name.

6. To hide curves, clear the check box to the left of the Variables name.

7. To remove one or more curves:

n To remove one curve, select the name of the curve you want to remove (not the check box) and
then click Remove Curve.

n To remove all curves, click Remove All.

8. When you finish, click OK.

9. For plots only (not forecast plots): To remove all curves without returning to the Edit Plot window,
on the Format tab, in the Edit group, click Clear All Curves.

Related Topics
Displaying More Than One Graph on a Plot

Adding More Y-Axes to a Graph

8 of 122
Plots

Adding More Y-Axes to a Graph


A plot can have up to six graphs. Each graph may have up to six Y-axes.

1. With the plot open, on the Format tab, in the Edit group, click Variables.
The Edit Plot window opens.

2. In the Y Axis group box, change the Number of Axes.

3. In the Current Axis field, select the axis for which you want to add a variable. (The first axis you
created is Y-AXIS 1.)

4. Click Add Curve to add a new line in the list of variables.

5. Select a Variable. If you want to select calculated variables, select the Select from Calculated
variables list check box.

6. By default, the Category and Name is the selected entity. To change this, select a new Category
and Name.

7. Click OK.

Related Tutorials
Creating and Editing Plots: To Extend a Plot to Multiple Y-Axes

Related Topics
Displaying More Than One Graph on a Plot

Adding, Hiding, and Removing Curves

9 of 122
Plots

Displaying More Than One Graph on a Plot


A plot can display up to six graphs.

1. With a plot open, on the Format tab, in the Edit group, click Variables.
The Edit Plot window opens.

2. In the Graphs group box, change the Number of Graphs.

3. Depending on the number of graphs, a message may display: "Graphs Overlapped?" To tile (overlap)
the graphs, click Yes. To stack the graphs vertically, click No.

4. Follow these steps for each new graph:

a. In the Current Graph field, select the graph you wish to change. (The first graph you created is
Graph 1.)

b. To change the X-axis, in the X-Axis group select a new Variable.

c. To add a variable to the Y-axis, click Add Curve to add a new line in the list of Y-axis variables.

d. Select a Variable. If you want to select calculated variables, select the Select from
Calculated variables list check box.

e. By default, the Category and Name is the selected entity. To change this, select a new
Category and Name.

5. Click OK.

6. To use the same scale on the X-axis of all graphs: On the Format tab, in the Edit group, click Same
X-Axis Scale.
All graphs use the X-axis that is used in Graph 1.

7. To clear all curves on the plot, on the Format tab, in the Edit group, click Clear All Curves.

Note: This will remove all the curves, and the plot will return to showing only one graph.

Related Topics
Focusing on a Single Graph on a Plot

Adding, Hiding, and Removing Curves

Adding More Y-Axes to a Graph

10 of 122
Plots

Focusing on a Single Graph on a Plot


If you have more than one graph on a plot, you can fill the plot window with only one of the graphs.

1. On the plot, click the graph on which you want to focus.

2. On the Format tab, in the Display group, select the Blow Up check box.
The selected graph displays, and the other graphs do not display.

3. To show all graphs, on the Format tab, in the Display group, clear the Blow Up check box.

11 of 122
Plots

Moving and Resizing Plots


You can customize every graph for position and size.

1. Right-click the plot and select Move/Resize (for plots) or Graph Move/Size (for forecasts).

2. To move it, drag the graph to the new position.

3. To resize it, drag the handles that display to a new size.

4. (For plots) When you finish, right-click and select Done.

5. To go back to the original size and position, on the Format tab, in the Edit group, click Default
Size.

12 of 122
Plots

Resolving Missing Data When Stacking,


Summing, or Averaging
If you display plot data as a stacked, summed, or averaged plot, you must specify what OFM should do
when discrete data values are not available. The following methods are available for stacking or summing
plot data.

If you For this This happens...


choose this plot
method... display...
Interpolation Stacked When a discrete data point is missing, OFM linearly interpolates a value between
the data points on either side of the missing value. For example, if you have data
points at 1 and 3, OFM linearly interpolates between these points and adds a
point at 2 when creating a stacked plot.
Sum or OFM does not interpolate beyond the last discrete data point for a curve in the
Average data set. As a result, the last data point plotted on a summed plot may be less
than the previous plotted point.
Carry Stacked If a discrete data point is missing, OFM carries the current value until the next
Forward discrete data point. For example, if you have data points at 1 and 3, OFM plots
points at 1, 1, and 3 when creating a stacked plot.
Sum or OFM carries the value of the last discrete data point on a curve being summed or
Average averaged to the end of the data set.

Follow these steps to apply a plot type. You can apply different plot types (Regular, Stacked, Sum, Average,
or Percent) to each of the different Y-axes. For example, the first Y-axis can be Regular, and the second Y-
axis can be Stacked.

1. With the plot open, on the Format tab, in the Display group, click Regular, Stacked, Sum,
Average, or Percent.

Note: If you apply this condition to the plot, you can include the condition in the legend. On the Property
pane, under Legend, change Show Condition to Yes.

2. To change the method OFM uses when discrete data values are not available:

a. On the plot, click the axis.

b. On the Property pane, under Axis, select a Method (interpolation or carry forward).

Related Sample Workspaces


Sample Workspace: Stacked Plots

13 of 122
Plots

Highlighting Data Points with Trace Points


and Trace Lines
Use a trace point or trace line to highlight data points on the graph. When you select different entities on
the Navigation pane, the trace point or trace line remains with the data points. You can have only one
trace point and one trace line at a time.

To Add a Trace Point


Follow these steps to add a trace point on a plot.

1. With a plot open, on the Format tab, in the Utilities group, click Trace Plot.

2. On the plot, click the data point you want to highlight.

Note: The point does not display until you lock the trace.

3. If you want the point to remain on the window as you select other entities, you must lock the point:
On the Format tab, in the Utilities group, select Lock Trace.
OFM displays the data point on the plot, and locks its position. It will remain with the data point as
you select other entities on the Navigation pane.

To Add a Trace Line


Follow these steps to add a trace line on a plot.

1. With a plot open, on the Format tab, in the Utilities group, click Compute Line.

2. Click on a starting point within the plot area and drag the cursor to the ending point.

3. Release the mouse.

4. If you want the line to remain on the window as you select other entities, you must lock the line: On
the Format tab, in the Utilities group, click Lock Line.

To Change Trace Point and Trace Line Attributes


Follow these steps to change the color, type, and size of a trace point or trace line on a plot.

1. With a plot open, on the Format tab, in the Utilities group, click Trace/line Attributes.
The Trace Attributes window opens.

2. In the section for the trace line or the trace point, select the following:

n Color: Color for trace lines or points

n Type: Line (for example, dashed or solid) or symbol to use for the point (for example, arrow or
star)

n Width or Size: Size of the line or point

14 of 122
Plots

3. Click OK.

Related Tutorials
Auditing Plots: To Use the Trace a Plot Utility

Auditing Plots: To Use the Compute Line Utility

Related Topics
Changing OFM's Default Colors

Related System Functions


@EquationGraphLine (Equation of a Locked Line)

@EvalGraphLine (Evaluate Graph Line)

@SlopeGraphLine (Slope of a Locked Line)

@XGraphTrace (X-Axis Value of a Trace Point) System Function

@YGraphTrace (Y-Axis Value of a Trace Point) System Function

@YoGraphLine (Y-Intersect of a Locked Line)

15 of 122
Plots

Viewing Plot Data in a Report


With the plot open, on the Format tab, in the Utilities group, click Send to Report.
The plot data displays in a report.

Related Topics
Viewing Report Data on a Plot

16 of 122
Plots

Viewing Curve Data


On forecasts and plots, you can view the data values for every plotted point. For forecasts, this information
also displays on the Historical Regression pane.

1. Select a curve to view its data values:

n For a plot: Select the curve.

n For a forecast: On the Layout tab, in the Display group, select Enable Curve Select and
then select the curve.

When you select a curve, the Property pane displays more choices for curve properties. The curve
properties are not available until you select a curve.

2. To show the value for each point on the forecast or plot:

a. On the Property pane, under Curve Properties, set Data Labels to Yes.
More data label selections become available.

b. By default, the Y value displays. To show the X and Y values, change the Value to X,Y.

c. By default, the labels do not display decimal points. To show them, select the number of
Decimal Places.

d. To change the position of the labels, select a Position that is Above, Below, or to the Left of its
point.

3. To view a table showing the X and Y data values:

a. On the Property pane, under Curve Properties, click the Values button.

b. To identify the values listed on the window as they display on the forecast, hover your mouse
over any row.
On the graph, an indicator shows which point on the forecast corresponds to the value in the
window. As you move the cursor over the table data, the indicator continues to track the plotted
value.

c. To change the indicator, on the window choose a new Color, Size, and Type.

d. To show points outside the zoomed area and the minimum, maximum, and average for the
historical values, clear the Show Visible Points Only check box.
These values are listed in the last rows on the window. The indicator is not available while you
are displaying these values.

4. By default, the data points are connected according to time even if the X-axis is not Date. If the X-
axis is not a date, connect the data points for the X-axis variable: On the Property pane, under
Curve Properties, change Sort to Yes.

17 of 122
Plots

5. (For a forecast) When you finish, on the Layout tab, in the Display group, clear Enable Curve
Select.

Related Topics
Changing the Graphical Features of the Curve

Changing OFM's Default Colors

18 of 122
Plots

About Intraday Plots


The following intraday features are available in plots:

n OFM can handle intraday data up to second-level data.

n You can specify a frequency for each individual curve.

n OFM calculates the date scale based on the length of the data being displayed:

n Fewer than three days: OFM displays hours

n Fewer than two hours: OFM displays minutes

n Fewer than two minutes: OFM displays seconds

n OFM may change the zoom to get the best scale range. If you need an exact range, you must specify
it in the min and max properties of the axis.

19 of 122
Plots

Changing the Data Frequency


You can change the data frequency on plots.

It is possible to select a data frequency that does not match your data. For example, you can select a
minute frequency for daily data. In this example, OFM shows one data point and that data point remains
constant for the rest of the day (that is, OFM displays a step curve).

1. On the plot, click the curve you want to change.

2. On the Property pane, under Curve Properties, expand Variable.

3. Select a new Data Frequency.


OFM may change the zoom to get the best scale range. If you need an exact range, you must specify
it in the min and max properties of the axis.

Related Topics
About Intraday Plots

20 of 122
Plots

Removing a Data Point


On plots, you can remove data points with a specific value. For example, you may want to remove all data
points that have OFM's null value (-99999).

1. On the plot, select a curve.


The Property pane displays Curve Properties.

2. Change the Remove points from data field to Yes.

3. On the Value field, enter the value of the data point you want to remove.

21 of 122
Plots

Inverting the Values


On occasion (for example, for clarity), you may display a curve below the X-axis. OFM can show the inverse
of values on plots and forecasts.

For example, perform these steps if you want to see injection below the axis, and production above the
axis. In this example, although injection values are positive, they will display as negative values.

1. On a plot or forecast, select the curve.

2. On the Property pane, under Curve Properties, expand Variable.

3. Change Inverse Values to Yes.

22 of 122
Plots

Changing the Axis Attributes


You can change the axis attributes on plots and forecasts.

1. On your plot or forecast, click the X- or Y-axis.


When you select an axis, the Property pane displays more choices for the properties for the
selected axis.

2. To change axis features, make changes on the Property pane, under Axis.

n To change the label for the axis, enter a new Axis Label, select a new Font, and choose to
Show the label.

Note: To return to the original axis label, on the Format tab, in the Edit group, click Default Labels.

n To show or hide minor tics, and to change their position, make selections in the Tics section.

n To change the color of the tics, select a new Line Color.

n To change the line color, type, and size of the grid lines, make changes in the Grid section.

n To change the scale, make changes in the Scale section. This section is slightly different,
depending on the type of values displayed on the axis.

n To change the starting point for the X- and Y-axis, enter new percentages in the Axis Origin
section.

Related Examples
Creating Plots for Waterflooding: Creating a Conformance Plot (Jordan Plot)

Related Topics
Changing the Scatter Plot Appearance

Changing OFM's Default Colors

23 of 122
Plots

Changing the Graphical Features of the


Curve
Follow these steps to change the graphical features of a curve on a forecast or plot.

1. Select a curve:

n For a plot: Select the curve you want to change.

n For a forecast: On the Layout tab, in the Display group, select Enable Curve Select and
then select the curve you want to change on the forecast.

When you select a curve, the Property pane displays more choices for curve properties. The curve
properties are not available until you select a curve.

2. To change the features of the curve, make changes on the Property pane, under Curve
Properties.

n To change the way the event displays, select an Event Display Type and Font.

n To change the way the curve name displays, choose to Show and then select a Font and enter
Label Text.

n To hide the curve, on the Show field select No, or enter a Condition.

n To change the line color, type, and size, make changes to the Curve Attributes.

n To add labels to each data point, set Data Labels to Yes and then enter the Decimal Places
and Position and select a Font.

3. (For a forecast) When you finish, on the Layout tab, in the Display group, clear Enable Curve
Select.

Related Examples
Creating a Chan Plot: Creating the Plot

Related Topics
Creating and Editing Headers for Plots

Creating and Editing Headers for Forecasts

Viewing Curve Data

Changing OFM's Default Colors

24 of 122
Plots

Changing the Legend on Plots


You can make many changes to the legend on plots: Show or hide the legend, change the position and
font, and change the information that displays in the legend.

1. To show or hide the legend: On the Format tab, in the Display group, select or clear Legend.

2. To move the legend quickly: Drag the legend to a new location.

3. To reset the position to default settings: On the Format tab, in the Edit group, click Default
Positions.

4. If the Property pane does not display a Legend section, on the plot click the legend.

5. To move the legend to a precise location: On the Property pane, under Legend, type new values in
the Left (%) and Top (%) fields.

6. You can show more information in the legend. If needed, on the Property pane, under Legend:

n Change Show Category Name With Legend Info to Yes if you have filtered by a category
and you want the legend to define the category.

n Change Show Entity Name With Legend Info to Yes if you want the legend to define the
selected entity.

n Change Show Condition to Yes if you have applied a condition (for example, you changed the
display to Sum or Average) and you want the legend to define the condition.

7. To change the legend to labels, on the Property pane, under Graph Settings, change Curve
Name to As Labels.

8. To hide the legend: On the Property pane, under Graph Settings, change Curve Name to No.

9. To change the font used in the legend, on the Property pane, under Legend, click the Font browse
button and select a new font and text display choices.

10. OFM automatically sizes the legend. To change the size of the legend:

a. On the Property pane, under Legend, change Auto Size to No.

b. Enter a new Width (%) and Height (%).

11. To remove the box around the legend, change Legend Box to No.

12. To add a shadow across the top and left sides of the legend box, change Shadow to Yes.

13. To select new colors for the legend box, select a new Box Color for the line, and a new Fill Color for
the color inside the box.

14. To change the width of the line used on the legend box, select a new Line Width.

Related Topics

25 of 122
Plots

Changing OFM's Default Colors

26 of 122
Plots

Saving Pictures of Maps and Plots


You can save a picture of your maps and plots to use for other purposes (for example, to show in
presentations or share by email). You can save the picture in these file formats: .bmp, .jpg, .tiff, and .emf.

You can save pictures of the base map, all analytical maps, and plots. You cannot save pictures of the GIS
map.

1. For the base map: With the base map open, on the Format tab, in the Utilities group, click Save
Image As.
For analytical maps and plots: With the map or plot open, on the Format tab, in the Utilities group,
select Save Analysis > Save Image As.

2. Navigate to the location where you want to save the file, type a name for your file, and then click
Save.

Related Topics
Animating Maps and Making Videos of the Animations

Printing an Analysis (to save each of the analyses as an image file, such as .bmp, .jpg, and .tiff)

27 of 122
Plots

Printing an Analysis
You can print the base map, GIS map, and any analysis in OFM.

1. Open the analysis you want to print.

2. To print an analysis for the currently-selected entity:

a. On the Workspace tab, click Print.

Note: You can print the GIS map, but there is no print preview.

b. Select the printing choices and then click Print.

3. To print or save as graphic files in a batch process, for all the completions in the current filter:

a. On the Workspace tab, click Auto Print.

b. Select one of the following:

Printer: To print the analysis for each of the completions in the current filter.

Print to multiple files: To save each of the analyses as an image file (such as .bmp, .jpg, and
.tiff).

c. If you selected Print to multiple files, select the following:

A File Location for your image files.

The file format.

How you want to name the files (with the load names, or with a prefix number you select).

d. Click Print.

Related Tutorials
Auditing Plots: To Print (Auto Print) Plot Views

Related Topics
Automatically Applying the Forecast to All Completions (to use the Auto Decline feature to apply a forecast
to all the completions in the current filter and print them to a printer)

Showing a Histogram, Monte Carlo Simulation, and Cumulative Distribution Frequency (to print the
information in the Statistics panel of a scatter plot)

Finding Grid Map Statistics and Values (to print the information in the Statistics panel of a grid map)

28 of 122
Plots

Saving Pictures of Maps (to save a map or plot as a .bmp, .jpg, .tiff, or .emf file)

Related System Functions


@ReverseOrder (Print Report in Reverse Order) System Function

@LineCount (Count Lines in Report) System Function

29 of 122
Plots

Creating and Editing Headers for Plots


You can add multiple headers to plots. If you are not displaying the header as a legend, you can format
each header with different fonts and colors, and show or hide individual headers.

1. With the plot open: On the Format tab, in the Edit group, click Header.

2. To add text to a new or existing header:

a. To add a header, click Add.

b. Click Assist.
The Edit Header window opens.

c. Enter the text, variables, and functions needed for your header on the entry window.

d. Click OK to return to the Headers window.


The new header displays on the row you added.

3. To change the font, size, and color of the header:

a. Select the row and then click Font.


The Font window opens.

b. Select the font, style, size, angle, alignment, color, and background for the header.

c. Click OK to return to the Headers window.

4. To show or hide one or more of the headers:

n To show all headers, select the Show Header check box. To hide all headers, clear this check
box.

n To show only some of the headers, select the check box to the left of the headers you want to
display. Clear the check box to the left of the headers you want to hide.

5. Click OK.

Related Examples
Drawing a Polynomial Curve on a Plot and Displaying Its Equation: Fitting a Polynomial Curve

Related Topics
About Calculated Variables

About Calculated Fields

30 of 122
Plots

Related System Functions


Overview of System Functions

@CategoryName (Currently Selected Category) System Function

@EquationGraphLine (Equation of a Locked Line) System Function

@FmtDate (Format Date) System Function

@FmtName (Format Name) System Function

@Image (Display Image or Image File Name) System Function

@LoadName (Composite Name of Loaded Data) System Function

@Name (Name of Loaded Data Without Prefix) System Function

@PlotHeaderFile (Load Plot Header File) System Function

31 of 122
Plots

Displaying Headers as a Legend on Plots


Usually people use headers as titles. But, you can display headers as a legend (text in a box) on your plots.

If you display headers as a legend, the formatting you chose for each header changes to the default
formatting. If you have more than one header, they all display as a single text box with multiple lines.

1. With the plot open: On the Property pane, under Graph settings, on the Show as Legend field,
select Yes.

2. To change the header back to a title, on the Show as Legend field, select No.
The text returns to header text, with the formatting selected for header text.

Related Topics
Changing OFM's Default Colors

32 of 122
Plots

Moving Headers on Plots


You can drag headers to a new location on your plot.

1. Drag the header to the new location.

2. To restore the headers to the default positions: On the Format tab, in the Edit group, click Default
Positions.

33 of 122
Plots

Showing and Hiding Headers on Plots


You can create many headers and show or hide some or all of them.

1. With the plot open, on the Format tab, in the Edit group, click Header.

2. To show headers, select the Show Header check box. To hide headers, clear this check box.

3. To show only some of the headers, select the Show Header check box and then select the check
box to the left of the headers you want to display. Clear the check box to the left of the headers you
want to hide.

Note: This is available if you are showing the header text as headers. If you are displaying the headers as a
legend, you cannot select which headers display.

4. Click OK.

Related Topics
Deleting Headers on Plots

34 of 122
Plots

Saving and Loading Header Files on Plots


You can save the headers on your plots as a graph header (.gh) file. You (or other people) can load the
header file to use in other maps.

1. With the map, forecast, or report open, on the Format tab, in the Edit group, click Header.

2. Perform one of the following steps:

n To save: Click Save As, type a name for your graph header (.gh) file, and then click Save.

n To load: Click Open, select the graph header (.gh) file, and then click Open.

3. On the Header window, click OK to close the window.

Related System Functions


@PlotHeaderFile (Load Plot Header File)

35 of 122
Plots

Deleting Headers on Plots


Perform these steps to remove headers permanently from plots.

1. With the plot open: On the Format tab, in the Edit group, click Header.

2. Select the headers you do not want and then click Delete.

Note: OFM does not confirm your choice before it deletes the headers you select.

Related Topics
Showing and Hiding Headers on Plots

36 of 122
Plots

@Abs (Absolute Value) System Function


Description This system function returns the absolute value of an expression.
Syntax @Abs (value)
Where Argument Type Required Description
value Numeric Yes Data stream
Example In this example, the function returns 9500:

@Abs (-9500)

37 of 122
Plots

@CategoryName (Currently Selected


Category) System Function
Description This system function gets the name of the currently selected category
(completion, wellbore, pattern, or custom category name). It is
commonly used in headers.
Syntax @CategoryName ( )
Where Argument Type Required Description
None
Example In this example, the function returns "Summary by Wellbore" if you
have the wellbore category selected (on the Navigation pane). If you
have the reservoir category selected, it returns "Summary by
Reservoir".

"Summary by " + @CategoryName()

38 of 122
Plots

@CFirst (Conditional First) System Function


Description When the specified condition is True (1), this system function finds the
first occurrence of a numeric expression at the specified condition.

Note: This system function requires a condition. The @First (First


Record Value of an Expression) system function performs the same
task, but the condition is optional.
Syntax @CFirst (value, condition)
Where Argument Type Required Description
The parameter for which the first
value Numeric Yes
conditional entry is being requested
Required condition, which must
condition String Yes
evaluate to True (1) or False (0)
Example In this example, the function is when water production is greater than
zero after December 15, 1990:

@CFirst (Date, MonthlyProd.Water > 0)

Related Examples
Finding the Best Three Months of Production

Drawing a Polynomial Curve on a Plot and Displaying Its Equation: Getting Started

Related Topics
Sample User Function: First Oil

39 of 122
Plots

@CumInput (Cumulative Input) System


Function
Description This system function returns the running sum of an input variable,
including pre-cumulative values. It is applicable only for monthly and
daily tables, and it cannot be used with calculated variables. It is the
most commonly used system function for creating production volume
cumulatives.

Note: This system function will honor the intuitive nature of


cumulatives (that is, it will report on dates beyond which there may be
data).
Syntax @CumInput (Input_variable)
Where Argument Type Required Description
Input_variable Numeric Yes Any numeric type field
Example In this example, the system function returns cumulative water
production across all time steps:

@CumInput (MonthlyProd.Water)

Related Examples
Creating Plots for Waterflooding: Finding Pore Volume Injected (PVI)

Creating Plots for Waterflooding: Finding Recovery

40 of 122
Plots

@Dom (Days of Month) System Function


Description This system function retrieves the number of days for a calendar
month based on specified date. This function can be used to compute
calendar day rates from monthly data.
Syntax @Dom (Date)
Where Argument Type Required Description
Date
Date Date Yes Note: OFM requires dates to be entered
in YYYYMMDD format.
Example In this example, the function returns the value of 31 because there
are 31 days in January:

@Dom (19840101)

Note: In this example, the final last two numbers ("01") represents
the first day of the month, but does not affect the calculation.

Related Examples
Creating a Hall Plot

Fitting a Polynomial Curve Through Plot Data and Displaying Its Equation: Getting Started

41 of 122
Plots

@ElapsedDays (Elapsed Days) System


Function
Description This system function calculates the number of elapsed days from
Date1 to Date2.
Syntax @ElapsedDays (Date1, Date2)
Where Argument Type Required Description
Date
Date1 Date Yes Note: OFM requires dates to be entered
in YYYYMMDD format.
Date2 Date Yes Date
Example In this example, the function returns the value of 31, the number of
elapsed days from 30 June to 31 July, 1983. Note that to return a
positive integer, the first date (Date1) should be the later date and the
second date (Date2) should be the earlier date.

@ElapsedDays (19830731, 19830630)

Related Examples
Creating a Chan Plot: Finding the Number of Elapsed Days

42 of 122
Plots

@ElapsedMonths (Elapsed Months) System


Function
Description This system function calculates number of elapsed months from
Date2 to Date1.
Syntax @ElapsedMonths (Date1, Date2)
Where Argument Type Required Description
Date
Date1 Date Yes Note: OFM requires dates to be entered
in YYYYMMDD format.
Date2 Date Yes Date
Example In this example, the function returns the value of 12 (the number of
elapsed months from January 1984 to January 1985). Note that to
return a positive integer, the first date (Date1) should be the later
date and the second date (Date2) should be the earlier date.

@ElapsedMonths (19850101, 19840101)

Related Examples
Drawing a Polynomial Curve on a Plot and Displaying Its Equation: Getting Started

43 of 122
Plots

@EquationGraphLine (Equation of a Locked


Line) System Function
Description This system function finds the equation of the line that is currently
locked. It is most-effectively used in a report or as a header.
Syntax @EquationGraphLine ( )
Where Argument Type Required Description
None

44 of 122
Plots

@EvalGraphLine (Evaluate Graph Line)


System Function
Description This system function valuates a locked line at the specified value.
Syntax @EvalGraphLine (value)
Where Argument Type Required Description
X-axis value at which the current
value Numeric Yes
locked line should be evaluated

45 of 122
Plots

@First (First Record Value of an Expression)


System Function
Description This system function finds the first record value of a specified numeric
expression, subject to an optional condition.
Syntax @First (value, condition)
Where Argument Type Required Description
value Numeric Yes Parameter to be returned
condition String No Condition to be satisfied
Example In this example, the function returns the value of monthly oil
production when water is first greater than zero:

@First (MonthlyProd.Oil, Monthly Prod.Water > 0)

Related Examples
Creating a Chan Plot: Finding the Number of Elapsed Days

46 of 122
Plots

@Fit (Fit) System Function


Description This system function fits a polynomial of order n through the data,
using the least squares method. It can be used across tables and n can
equal up to 12 degrees.
Syntax @Fit (value1, value2, value3, value4, option)
Where Argument Type Required Description
Numeric The X-axis parameter for the
value1 Yes
or date dataset being fitted
The Y-axis parameter for the
value2 Numeric Yes
dataset being fitted
Condition; any value evaluating as
value3 True/False Yes
False will be excluded from the fit
Numeric The X-axis parameter for the output
value4 Yes
or date fitted curve
n Date: Use if the input X-axis
parameter represents date

n Xlog: Use if the curve is to be


fitted to the logarithm of X

n Ylog: Use if the curve is to be


fitted to the logarithm of Y

n deg: Order, n, of fitted


polynomial, where n should not
exceed 12

option Several Yes n min val: If any resulting fitted


value is less than val, then
function returns a Null

n max val: If any resulting fitted


value is greater than val, then
function returns a Null

n opt: Finds the best value for n


(between 1 and 12)

n abs val: Fit the curve. Exclude


the point if abs (resulting data) >
val, then refit the curve
Example In this example, the function returns an array of points evaluating the
fourth degree polynomial fit to monthly oil production, subject to the
constraint that values below 500 are not reported:

@fit(Date, Prd.oil, Prd.oil>0, Date, "Date deg 4 min 500")

47 of 122
Plots

Related Examples
Calculating Pressure from P/Z and Production Data: Finding the P/Z Value

Creating a Water Breakthrough Diagnostic (Chan) Plot: Fitting the WOR Derivative

Creating a Water Breakthrough Diagnostic (Chan) Plot: Fitting the WOR

Fitting a Polynomial Curve Through Plot Data and Displaying Its Equation: Fitting a Polynomial Curve

48 of 122
Plots

@FitEq (Fit Equation) System Function


Description This system function determines the equation of the current fitted
polynomial, and returns the polynomial equation as a string. You must
use the Y variable and the same options (in the same order) from the
@Fit variable which you are now evaluating.
Syntax @FitEq (value, options)
Where Argument Type Required Description
The data (Y variable) which has been
value Numeric Yes
fitted using the @fit variable
n Date: Use if the input X-axis
parameter represents date.

n Xlog: Use if the curve is to be fitted


to the logarithm of X.

n Ylog: Use if the curve is to be fitted


to the logarithm of Y.

n deg: Order, n, of fitted polynomial,


where n should not exceed 12.

n min va: If any resulting fitted


options String Yes value is less than val, then function
returns a Null.

n max va: If any resulting fitted


value is greater than val, then
function returns a Null.

n opt: Finds the best value for n


(between 1 and 12).

n abs val: Fit the curve. Exclude the


point if abs (resulting data) > val,
then refit the curve.
Example In this example, a fourth-order polynomial fit to the log of
MonthlyProd.Oil has been performed:

@Fiteq (MonthlyPrd.Oil, "date ylog deg 4")

Related Examples
Drawing a Polynomial Curve on a Plot and Displaying Its Equation: Fitting a Polynomial Curve

49 of 122
Plots

@FmtDate (Format Date) System Function


Description This system function creates a string with a formatted date.
Syntax @FmtDate (date, "format")
Where Argument Type Required Description
The date to be reformatted
date Date Yes Note: OFM requires literal dates to be in
YYYYMMDD format.
The format of the date you wish to
"format" Text Yes
display
Example 1 In this example, if Test.Date is 19941128, the function returns the
value of 1994-11-28:

@FmtDate (Test.Date,
Example 2 The following alternative forms of the Month portion of the displayed
date are supported:

n "mm" will return 11

n "mmm" will return nov

n "Mmm" will return Nov

n "Mmmm" will return November

In this example, the function returns a value of November 28, 1994:

@FmtDate (Test.Date,
Example 3 The system function also supports intra-day display:

n HH formats the Hour

n NN formats the Minute

n SS formats the Second

n TT allows for AM or PM

In this example, the function returns a value of November 28, 1994


12:00:00 AM:

@FmtDate (Test.Date, "Mmmm dd, yyyy hh:nn:ss tt")

50 of 122
Plots

@FmtName (Format Name) System


Function
Description This system function creates a string containing a numeric variable’s
plot name, units, multipliers, and a relevant value of an expression.
This function is useful for plot labels and report headers.
Syntax @FmtName (Variable, Value)
Where Argument Type Required Description
Numeric variable (project variable,
Variable Numeric Yes calculated variable) whose attributes
are to be used to create the string
Numeric value to be included in the
Value Numeric Yes
output string
Example In this example, the function returns the plot name, unit, and output
multiplier for the numeric variable Prd.Oil, and the value of a numeric
expression, combined in one legible text string. It pulls together these
pieces of information, and uses them to create a very useful label for
your plots and reports.

@FmtName (Prd.Oil, @Last(Prd.Oil))

Depending on how the variable has been defined, the example could
produce the following output text string: "Monthly Oil Production:
15.0 Mbbl"

Here, "Monthly Oil Production" was defined as the plot name for the
variable Prd.Oil. The variable’s units were set to bbl, and the output
multiplier was set to "M". The value of the current monthly production
(15.0) was specified using @Last(Prd.Oil)

51 of 122
Plots

@If (If) System Function


Description If a specified condition is True (1), the function returns the second
argument. Otherwise, the function returns the third argument. It
executes one of two expressions, depending on the result of a
conditional text.

This system function is used frequently in advanced applications.

Note: This system function returns a number; the @IfStr (If String)
system function returns a number.
Syntax @If (Condition, Value1, Value2)
Where Argument Type Required Description
Condition String Yes Expression to be evaluated
Value to be returned if condition is
true or equals 1
Value1 Numeric Yes Note: Value1 can be an expression,
such as a further (nested) @if()
statement.
Value to be returned if condition is
false or equals 0
Value2 Numeric Yes Note: Value2 can be an expression,
such as a further (nested) @if()
statement.
Example In this example, the system function returns the value of Water.Cut
when monthly liquid production (oil + water) is non-zero. Otherwise,
the function returns Null.

@If (MonthlyProd.Oil + Monthlyprod.Water 0,

Related Examples
Creating a Water Breakthrough Diagnostic (Chan) Plot: Finding the Water-Oil Ratio (WOR)

52 of 122
Plots

@Image (Display Image or Image File


Name) System Function
Description When this system function is used in a plot or report header, it displays
an image. When used in other circumstances, it returns the name of
the image file. The image can be a .jpg or a .bmp file.
Syntax @Image ("ImageFileName")
Where Argument Type Required Description
Name of image file, including
extension

Note: If the image is in the same

ImageFileName String Yes folder as the OFM project, you do


not need to include the file path. If
the image is in a different folder
than the OFM project, you must
include the file path.
Example In this example, the function is used in a report header. The image is
the company logo, and the .jpg file is in the same folder as the OFM
project. The function displays the CompanyLogo.jpg in the report
header:

@Image ("CompanyLogo.jpg")

53 of 122
Plots

@LoadName (Composite Name of Loaded


Data) System Function
Description This system function finds the composite name of the currently loaded
data. It consists of a data prefix name and a data item name. It is
useful in preparing header information on plots and reports.

Note: To return the name without the prefix, use the @Name (Name
of Loaded Data Without Prefix) system function.
Syntax @LoadName ( )
Where Argument Type Required Description
None
Example n If a completion X is the active entity, then the system function will
return “X”.

n If a Category (for example, Lease) is chosen from the Navigation


pane, and the Lease named “Smith” is selected as the chosen
entity, then the system function will return “Lease: Smith”.

54 of 122
Plots

@Name (Name of Loaded Data Without


Prefix) System Function
Description This system function gets the name of the currently loaded entity. It is
useful in preparing header information on plots and reports.

Note: To return the name with the prefix, use the @LoadName
(Composite Name of Loaded Data) system function.
Syntax @Name ( )
Where Argument Type Required Description
None
Example n If a completion X is the active entity, then the system function will
return “X”.

n If a Category (for example, Lease) is chosen from the Navigation


pane, and the Lease named “Smith” is selected as the chosen
entity, then the system function will return “Smith”.

Related Examples
Creating an After-Before-Compare (ABC) Plot: Creating a Report Showing the Monthly Oil Rate

Finding the Monthly Average Value for Sporadic Data: Creating the Report

55 of 122
Plots

@Null (Null) System Function


Description This system function returns a null value. The null value displays as an
asterisk (*) in reports.

Note: To convert null values to zero or another value you specify, use
the @NZ (Null to Zero) system function.
Syntax @Null()
Where Argument Type Required Description
None
Example In this example, a calculated variable is created that returns a gas-oil
ratio (GOR). The @Null system function is used to "trap" potential
errors. It will force a null result when a "divide by zero" error could
have occurred:

@If(MonthlyProd.Oil = 0, @Null(), MonthlyProd. Gas /


MonthlyProd.Oil)

Related Examples
Creating a Water Breakthrough Diagnostic (Chan) Plot: Finding the Water-Oil Ratio (WOR)

56 of 122
Plots

@PlotFile (Load Graph File) System


Function
Description This system function loads a specified graph file. By default, the file
extension is .grf.
Syntax @PlotFile (filename)
Where Argument Type Required Description
filename String Yes Path of the plot file
Example In this example, the graph file text.grf is plotted:

@PlotFile ("test.grf")

57 of 122
Plots

@PlotFromFile (Plot Data at Keyname in


External File) System Function
Description This system function reads from the external file's columns of data (X-
axis) at the corresponding *keyname (Key Name) keyword, and then
plots the data. Output is viewed as a plot; the output cannot be viewed
in a report.

This function is used mainly to overlay ideal solutions or data models.

You must specify a column name if a header exists. If header does not
exist, you must specify the column number (as shown in the
examples).

Note: If a keyname does not exist, specify it as "*".


Syntax @PlotfromFile (filename, colName, keyName)
Where Argument Type Required Description
Path of the file containing data to be
filename String Yes
plotted
colName
keyName
Example 1 This example uses keywords:

*x *y1 *y2 *y3

*keyname set1

1 1 2 3

2 1 2 3

3 1 2 3

4 1 2 3
Example 2 This example uses a calculated variable:

@PlotfromFile ("c:\data\test\ test.dat", "*y1","set1");

*x *y1 *y2 *y3

*keyname set2

1 1 2 3

2 1 2 3

3 1 2 3

4 1 2 3
Example 3 This example uses a column number:

File

58 of 122
Plots

1 1 2 3

2 1 2 3

3 1 2 3

4 1 2 3

@PlotfromFile ("c:\data\test\test.dat" ,"2","*");

59 of 122
Plots

@PlotHeaderFile (Load Plot Header File)


System Function
Description This system function loads the specified plot header file. By
default, the file extension is .gh.
Syntax @PlotHeaderFile (filename)
Where Argument Type Required Description
filename String Yes Path to file containing header
Example @PlotHeaderFile ("test.gh")

60 of 122
Plots

@Previous (Value of Expression for Previous


Record) System Function
Description This system function finds the value of a numeric expression for the
record before the current record. It is applicable only for monthly and
daily tables.

Note: To find the value of a numeric expression for the next record,
use the @Next (Value of Expression for Next Record) system function.
Syntax @Previous (variable)
Where Argument Type Required Description
The variable for which the previously-
variable variable Yes
available value is required
Example In this example, the difference between the current month's oil
production and the prior month's production can be found:

MonthlyProd.Oil - @Previous (MonthlyProd.Oil)

Related Examples
Creating a Chan Plot: Finding the WOR Derivative

61 of 122
Plots

@PvtZ (Gas Z-Factor at a Pressure) System


Function
Description This system function calculates the gas Z-factor at a specified pressure
using the PVT gas property correlation.
Syntax @PvtZ (pressure)
Where Argument Type Required Description
pressure Numeric Yes Pressure value
Example In this example, the system function returns time-dependent gas
deviation factor based on time-dependent pressure data:

@PvtZ (Prd.Pressure)

62 of 122
Plots

@RSum (Running Sum) System Function


Description This system function calculates the running sum (cumulative) of a
specified expression, including any prior cumulative.

Note: You must use this system function for summing calculated
variables.
Syntax @RSum (expression)
Where Argument Type Required Description
expression Numeric Yes Expression to be summed
Example In this example, the function returns the cumulative value of an
expression given by a calculated variable:

@RSum (CV.Corrected_MonthlyProd_Oil)

Related Examples
Creating a Hall Plot

63 of 122
Plots

@Step (Return Last Value if Condition is


True) System Function
Description When a specified condition is True, a stair-step function is created for a
specified expression. This has the effect of creating a continuous
stream of values, where a value remains constant over time until it is
changed by a new data point.

It returns the last value in the expression when the condition is met.
Syntax @Step (value, condition)
Where Argument Type Required Description
value Numeric Yes Variable to be stepped
Example In this example, the function returns the step function when monthly
oil production is greater than 1000:

@Step (MonthlyProd.Oil, MonthlyProd.Oil > 1000)

Related Examples
Creating a Hall Plot

64 of 122
Plots

@SlopeGraphLine (Slope of a Locked Line)


System Function
Description This system function finds the slope of a line that is locked.
Syntax @SlopeGraphLine ( )
Where Argument Type Required Description
None

65 of 122
Plots

@XGraphTrace (X-Axis Value of a Trace


Point) System Function
Description This system function returns the X value of a trace point.
Syntax @XGraphTrace ( )
Where Argument Type Required Description
None

66 of 122
Plots

@YGraphTrace (Y-Axis Value of a Trace


Point) System Function
Description This system function finds the Y value of a trace point.
Syntax @YGraphTrace ( )
Where Argument Type Required Description
None

67 of 122
Plots

@YoGraphLine (Y-Intersect of a Locked


Line) System Function
Description This system function finds the Y-axis intersect of the current locked
line.
Syntax @YoGraphLine ( )
Where Argument Type Required Description
None

68 of 122
Plots

Viewing Report Data on a Plot


With the report open, on the Format tab, in the Utilities group, click Send To Plot.
A new plot opens.

Related Topics
Viewing Plot Data in a Report

69 of 122
Plots

About Calculated Variables


Calculated variables are one of the project variable types available in OFM. Calculated variables are created
from expressions that follow OFM’s calculation syntax. You create these variables from input variables, and
once you create them, you can export or delete them as necessary. The other project variables available in
OFM are input variables and calculated fields. Input variables reflect columns of data in your data sources,
and calculated fields are calculations performed by the data source.

Note: Calculated variables are derived or dependent variables. The result of calculated variables can
change if the dependent variables change. OFM saves only the definition of the calculated variable. It does
not save the result of the calculation. The advantage to this is that the result of a calculated variable is
always produced from the latest available data.

In many ways, calculated variables in OFM are analogous to calculations in spreadsheets. In a spreadsheet,
you can define a simple calculation for a cell; for example: C1=A1+B1

You also can use the result of that calculation as the input to another calculation; for example: D1 = C1/2

Example 1
In OFM, you can define a similar expression; for example: LIQUID = PROD.OIL + PROD.CONDENSATE

In this case, you are creating a calculated variable named LIQUID that is the result of adding two input
variables: PROD.OIL and PROD.CONDENSATE.

However, this calculation is more than a simple addition of two cells. The oil and condensate variables each
represent a series of values over time. Likewise, LIQUID will be a time-based series of results, produced by
adding the PROD.OIL and PROD.CONDENSATE values from each row of the input data.

In addition, the result of the LIQUID calculation is updated automatically whenever you select a new well
or group of wells. This makes it quick and efficient for you to perform that calculation for any group of wells.

Example 2
To extend the LIQUID calculation a bit further, you can define a calculation to compute the cumulative
liquid production; for example: CumLiquid = @RSum( LIQUID)

In this example, @RSum() is an OFM system function provided to accumulate a time series of values—in
this case, the result of the LIQUID calculation.

70 of 122
Plots

Example 3
The following example shows another calculation you could define: CumLiquidText = "Cumulative
Liquid = " + @NtoA( CumLiquid, 10, 0 )

In this example, @NtoA() is a system function that converts numbers to text, and that text is appended to
a literal string.

71 of 122
Plots

About Calculated Fields


Calculated fields are one of the project variable types available in OFM.

Calculated fields are all represented internally as double precision floating-point numbers. So, after you
create a field you cannot change the data type. In the Edit Calculated Field window, calculated fields are
passed to the data source for evaluation by OFM, and the results are retrieved from the data source into
OFM. Calculated fields differ from calculated variables in that OFM does not calculate them.

Calculated fields do not use the OFM parser file to evaluate a calculated field expression. You cannot enter
OFM system functions or other OFM calculated variables to use in a calculated field expression, because the
data source cannot evaluate them.

We recommend you use calculated fields for simple, numerical expressions that can be operations of other
fields within the same table.

Example: The gas field in a table divided by the oil field in that table.

Note: Since the expression is evaluated at the data source, it is subject to errors that may occur with the
expression in the data source. Critically, division operations are subject to divide by 0 errors in the data
source. If you are going to have divide-by-0 errors, use syntax supported by your data source to prevent
the expression from the division by 0. Any other expression can be safely evaluated on these fields at the
data source, and can be placed in the calculated fields.

Expressions are specific to data sources.

n If you are running a native OFM workspace on a Microsoft® Access data source, you can use Access
syntax.

n If you link to tables that are in Microsoft SQL Server® or Oracle®, your syntax might be different,
depending on the operation. It is your responsibility to locate and use the correct syntax.

The demo database contains some calculated fields.

Related Topics
Adding Calculated Fields

Enabling and Disabling Fields in a Table

Deleting a Table or Field

Renaming a Table or Field

72 of 122
Plots

Grouping Completions for a Well


If more than one completion exists in the well, you can group wells. You can do this on the base map and
on the GIS map.

1. On the base map or GIS map, click a well.

Or

On the GIS map, press Shift and then select multiple wells. When you finish, on the Format tab,
in the Utilities group, click Group.

The Select Completions window opens.

2. Select one or more well completions listed in the Completions section.

3. Click Group.
OFM highlights the well on the base map and highlights the grouped wells in the Navigation
toolbar.

73 of 122
Plots

Tutorial: Creating and Editing Plots


You can create plots to display information graphically. OFM produces plots from stored data or from
calculated results in the project.

In this tutorial, you will:

1. Create a plot that displays data for a single completion: The simplest form of a line plot is a time-
dependent display of monthly oil and gas production for a selected completion. In this section of the
tutorial, you create one.

2. Extend a plot to multiple Y-axes: You can extend the visualization capabilities of the plot.

3. Extend a plot to multiple graphs: You can create up to six graphs in any single OFM plot. In this
section of the tutorial, you add graphs to a plot. You will prepare the following graphs: Oil versus
Time, Oil versus Cum Oil, Water Cut versus Time, and Water Cut versus Cum Water. All the graphs
do not have to use the same X-axis variable.

4. Create a plot displaying data for a single variable for multiple completions: One way to compare the
performance of several entities is to display their data on the same plot. In this section, you display
data for a single variable for multiple completions.

5. Edit plot headers: Headers are titles or labels that display on the plot. Headers display information
about the entity you select. In this section, you place a simple text title at the top of the plot. Below
the text title, you place a title that displays the name of the completion. The title changes as the
selected entity (in this case, the selected completion) changes.

6. Use categories to display different levels of information: You can configure plots to display data at
more than one level. In this section, you use categories in the plots to compare the performance of
an individual completion with the performance of the reservoir from which it produces.

7. Export a plot template: After you have prepared a plot, you can save the features of the plot (but not
the data) to an external file as a template. With the template, you can share the features with a
colleague while keeping the data confidential. Your colleague can import the template (a .grf file) into
their project, and their plot will have the same structure as the original, plotting the same variable
names but applied to the set of wells in their project.

8. Import a plot template

Creating a Plot that Displays Data for a Single Completion


The simplest form of a line plot is a time-dependent display of monthly oil and gas production for a selected
completion. In this section of the tutorial, you create one.

1. Open the Demo workspace. It is in the OFM installation folder, at ...Sample Workspaces\Demo
Workspace\demo.ofm.

2. On the Navigation pane, select the Blue_1:He_0 completion.

74 of 122
Plots

3. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

4. Notice the X-Axis Variable is set to Date by default.

5. In the table, click the first cell in the Variables column and then select Monthlyprod.Oil.

6. Click Add Curve.


OFM adds a new row.

7. Click the new cell in the Variables column and then select Monthlyprod.Gas.

8. Click OK.
The plot (with default features) opens.

9. On the Workspace tab, click Save to save your work.

Extending a Plot to Multiple Y-Axes


You can extend the visualization capabilities of the plot.

1. The curves that display on the primary vertical axis (Y-Axis 1) have been defined. To add another Y-
axis,on the Format tab, in the Edit group, click Variables.
The Edit Plot window opens.

2. On the right, in the Y Axis group, set the Number of Axes to 2.

3. Set the Current Axes to Y-AXIS 2.


Note the Variables list area is empty, because it is for Y-axis 2.

4. In the first row, click the cell in the Variables column and then select Water.Cut.

5. Click OK.
By default, the second Y-axis is on the right side of the graph. You can adjust the attributes of this
axis (for example, linear scale, maximum and minimum values, and so on) by selecting the axis and
then making changes on the Property pane, under Axis.

6. On the Workspace tab, click Save to save your work.

Note: You can create up to six Y-axes for each graph (and up to six graphs) in a single OFM plot. By default,
OFM places the even-numbered Y-axes on the right side of the graph, and the odd-numbered Y-axes on
the left side.

Extending a Plot to Multiple Graphs


You can create up to six graphs in any single OFM plot. In this section of the tutorial, you add graphs to a
plot. You will prepare the following graphs: Oil versus Time, Oil versus Cum Oil, Water Cut versus Time, and
Water Cut versus Cum Water. All the graphs do not have to use the same X-axis variable.

1. Create a new plot: On the Home tab, in the Launch analysis group, click Plot.
The Edit Plot window opens.

2. On the right, in the Graph group, set the Number of Graphs to 4.

75 of 122
Plots

3. Because you selected a number greater than or equal to 4, a message asks if you want to overlap the
graphs. Select Yes or No.
Depending on your choice, the four graphs display as shown below:

4. First, work with Graph 1:

a. In the Graph group (on the right) set the Current Graph to GRAPH 1.

b. In the X-Axis group (at the top), leave Date as the X-axis variable.

c. Click the cell on the first row, in the Variables column, and then select Monthlyprod.Oil as
the Y-axis variable.

5. Next, work with Graph 2:

a. In the Graph group, change the Current Graph to GRAPH 2.

b. In the X-Axis group, set the X-axis variable to Oil.Cum.

c. Click the cell on the first row, in the Variables column, and then select Monthlyprod.Oil as the
Y-axis variable.

6. Then, work with Graph 3:

a. In the Graph group, change the Current Graph to GRAPH 3.

b. In the X-Axis group, set the X-axis variable to Date.

c. Click the cell on the first row, in the Variables column, and then select Water.Cut as the Y-
axis variable.

7. And last, work with Graph 4:

a. In the Graph group, change the Current Graph to GRAPH 4.

b. In the X-Axis group, set the X-axis variable to Water.Cum.

76 of 122
Plots

c. Click the cell on the first row, in the Variables column, and then select Water.Cut as the Y-
axis variable.

8. Click OK.
Notice the layout of the plot. Usually, you will want to set the X-axis variables on the second and
fourth plots to linear.

9. On the plot, click directly on the X-axis scale (the horizontal line).
Handle marks display at both ends and in the middle, confirming that this is the object you want to
adjust.

10. On the Property pane, under Axis, expand Scale.

11. Set Scale Type to Linear.

12. On the Workspace tab, click Save to save your work.

Creating a Plot Displaying Data for a Single Variable for Multiple


Completions
One way to compare the performance of several entities is to display their data on the same plot. In this
section, you display data for a single variable for multiple completions.

1. Create a new plot: On the Home tab, in the Launch analysis group, click Plot.
The Edit Plot window opens.

2. On the X-Axis Variable field, select Date.

3. Click Add Multiple Curves.


The Add Multiple Curves window opens.

4. On the Category field, you select the level in the project at which you want to display the data.
Select Completion.

5. On the Variable field, you select the single variable whose data you want to display for all
completions. Select Monthlyprod.Oil.

Note: If your current filter contains more than 50 entities, you will receive a message asking if you want to
add the curves to your plot. Click Yes.

6. On the Edit Plot window, click OK to display the plot.


The plot displays monthly oil production for the entities.

7. On the Workspace tab, click Save to save your work.

Editing Plot Headers


Headers are titles or labels that display on the plot. Headers display information about the entity you select.
In this section, you place a simple text title at the top of the plot. Below the text title, you place a title that
displays the name of the completion. The title changes as the selected entity (in this case, the selected
completion) changes.

77 of 122
Plots

1. With your plot open, on the Format tab, in the Edit group, click Header.
The Headers window opens.

2. Click Add.
OFM inserts a blank row.

3. On the blank row, type "MY COMPANY"and then press Enter. When entering a text string, you must
use quotation marks around the text.

4. Click Add.
OFM inserts another blank row.

5. On the new blank row, type "Completion" + @Loadname () and then press Enter. You must
include the space immediately after the word completion for proper spacing.

6. Click OK.
The headers display on the plot.

7. (Optional) Drag the header to a new location on the plot.

8. On the Navigation pane, select other completions to see how the dynamic portion of the header
changes.

9. On the Workspace tab, click Save to save your work.

Using Categories to Display Different Levels of Information


You can configure plots to display data at more than one level. In this section, you use categories in the
plots to compare the performance of an individual completion with the performance of the reservoir from
which it produces.

1. Create a new plot: On the Home tab, in the Launch analysis group, click Plot.
The Edit Plot window opens.

2. On the X-Axis Variable field, select Date.

3. Click the cell on the first row, in the Variables column, and then select Monthlyprod.Oil.
Observe the entries in the next two columns: Category is set to Current, and Name is set to
correspond to the entity (in other words, completion) you currently have selected on the
Navigation pane.

4. Click Add Curve.


OFM adds a new row.

5. Click the cell on the new row, in the Variables column, and then select Monthlyprod.Oil again.

6. In the Category column for the second row, change the category to Reservoir.
By default, the entry in the Name column is CURRENT. Usually, this is the name you will want, but
it is possible to use this column to specify that this curve will be for one particular reservoir.

7. Click OK.

8. On the Navigation pane, select other completions in your project to see how the plot changes:

78 of 122
Plots

n Curve 1 displays the monthly oil production for the selected completion.

n Curve 2 displays the monthly oil production for the reservoir to which the selected completion
belongs.

9. On the Workspace tab, click Save to save your work.

Exporting a Plot Template


After you have prepared a plot, you can save the features of the plot (but not the data) to an external file
as a template. With the template, you can share the features with a colleague while keeping the data
confidential. Your colleague can import the template (a .grf file) into their project, and their plot will have
the same structure as the original, plotting the same variable names but applied to the set of wells in their
project.

Note: The template will only be applicable to an OFM project which uses the same variable names as the
original project from which it was created.

1. On the Format tab, in the Utilities group, select Save Analysis > Save As.

2. Select a location and name for the file, including the .grf extension.

3. Click Save.
You now can send the file to your colleague.

Importing a Plot Template


1. Create a new plot: On the Home tab, in the Launch analysis group, click Plot.
The Edit Plot window opens.

2. Do not make any changes. Click OK.


An empty plot opens.

3. On the Format tab, in the Utilities group, click Open Analysis.

4. In the OFM application directory, select ...\Sample Workspaces\Demo Database\Format


Files\prod1.grf, and then click Open.

5. On the Navigation pane, select a new completion.


The plot format will look similar to the following:

79 of 122
Plots

6. On the Workspace tab, click Save to save your work.

80 of 122
Plots

Tutorial: Auditing Plots


You can further increase your analysis of plots with the trace, compute line, flag, tabular report, and auto-
print features. In this tutorial, you will:

1. Use the Trace Plot utility: Use this utility to mark or digitize a point anywhere on the plot. The
marked point remains visible while you scroll through other entities in the project. In this way, you
can see the location of a particular data point (for example, the peak production for completion A)
while viewing the same plot for other completions (for example, B, C, and so on).

2. Use the Compute a Line utility: With OFM, you can find the equation of a straight line fit through a
region you define on your plot. Like the trace point feature, you can lock this line to compare the
curve it represents with other entities.

3. Print (Auto Print) the plot: There are two ways to print. If you use the normal printing method, OFM
prints the plot for the currently-selected entity. If you use Auto Print, you can print or save as
graphic files in a batch process the plots for all completions in the current filter.

4. Flag a completion: While viewing plots for each completion in your project, you may want to study
further one or more completions. You can mark (or, flag) completions and later you can return to the
flagged completions as a separate collection.

5. Send a plot to a tabular report: You can transform the display of data from a graphical format (a plot)
to a tabular format (a report).

Getting Started
For this tutorial, you need a plot. If you have already created plots while doing the "Creating and Editing
Plots" tutorial, you can use one of those. If you have not completed that tutorial, follow these steps to
create a quick plot:

1. Open the Demo workspace. It is in the OFM installation folder, at ...Sample Workspaces\Demo
Workspace\demo.ofm.

2. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

3. Notice that OFM sets the X-Axis Variable to Date by default.

4. In the table, click the first cell in the Variables column and then select Monthlyprod.Oil.

5. Click Add Curve.


OFM adds a new row.

6. Click the new cell in the Variables column and then select Monthlyprod.Gas.

7. Click OK.
The plot opens.

8. On the Workspace tab, click Save Workspace to save your work.

81 of 122
Plots

Using the Trace a Plot Utility


Use this utility to mark or digitize a point anywhere on the plot. The marked point remains visible while you
scroll through other entities in the project. In this way, you can see the location of a particular data point
(for example, the peak production for completion A) while viewing the same plot for other completions (for
example, B, C, and so on).

1. With the plot open, on the Navigation pane select the Blue_1:Li_1C completion.
There is a spike in oil production in 1980 (circled in the following graphic). You want to watch this
event while viewing other completions in the project.

2. On the Format tab, in the Utilities group, click Trace Plot.

3. Click one time at the point where there is a spike in production.

4. On the Format tab, in the Display group, click Lock Trace.


You should now see a small mark at the selected point.

5. Select another completion with a production history coincident with the previous completion (for
example, Blue_5:Li_1C is a good choice).
Note how the location of the spike in production for completion Blue_1:Li_1C is marked on the
plot for Blue_5:Li_1C.

Note: To change the color, shape, and size of the mark symbol, on the Format tab, in the Utilities group,
click Trace/line Attributes. To remove the mark and disable the utility, in the Display group, clear the
Lock Trace check box.

6. On the Workspace tab, click Save to save your work.

82 of 122
Plots

Using the Compute Line Utility


With OFM, you can find the equation of a straight line fit through a region you define on your plot. Like the
trace point feature, you can lock this line to compare the curve it represents with other entities.

1. On the Navigation pane, select the Blue_5:Li_1C completion.

2. Set the Y-axis to logarithmic:

a. On the plot, click the Y-axis scale.


Handle marks display at both ends and in the middle, confirming that this is the object you want
to adjust.

b. On the Property pane, under Axis, expand Scale.

c. Set Scale Type to Logarithmic.

There is a strong decline period in oil production from 1973 to 1978. (See marked region in
graphic). You want to watch this decline while viewing other completions in the project.

83 of 122
Plots

3. On the Format tab, in the Utilities group, click Compute Line.

4. On the plot, drag a representative straight line through the decline period.
Note the information at the bottom of the OFM window. If the plot is a semi log, the relevant
equation of the line will be similar to the following:

5. On the Format tab, in the Utilities group, click Lock Line.


OFM freezes the line.

6. On the Navigation pane, select another completion with a production history coincident with the
previous completion (for example, Blue_1:Li_1C is a good choice).
OFM highlights the locked line (which represents the declining oil production for completion Blue_
5:Li_1C) on the plot for Blue_1:Li_1C.

Note: To change the color, shape, and size of the line, on the Format tab, in the Utilities group, click
Trace/line Attributes. To remove the mark and disable the utility, clear the Lock Line check box.

7. On the Workspace tab, click Save to save your work.

Printing (Auto Print) Plot Views


There are two ways to print. If you use the normal printing method, OFM prints the plot for the currently-
selected entity. If you use Auto Print, you can print or save as graphic files in a batch process the plots for
all completions in the current filter.

1. On the Workspace tab, click Auto Print.

2. To print the plot for each of the completions in the current filter, select Printer and then click Print.

3. To save each of the plots as an image file (such as .bmp, .jpg, and .tiff), select Print to multiple
files, select a naming scheme for the output files, and then click Print.

Flagging a Completion
While viewing plots for each completion in your project, you may want to study further one or more
completions. You can mark (or, flag) completions and later you can return to the flagged completions as a
separate collection.

1. When you see a plot that requires further investigation, on the Home tab, select Flag well.

2. When you finish reviewing the plots and you want to study the flagged completions, on the Filter
pane, click Filter by Completion ( ).

The Filter by Completion window opens.

3. Click Select Flagged.

4. Click OK.

84 of 122
Plots

The Filter pane now shows that your Current Filter contains only the flagged completions.

5. On the Workspace tab, click Save to save your work.

Sending a Plot to a Tabular Report


You can transform the display of data from a graphical format (a plot) to a tabular format (a report).

1. On the Format tab, in the Utilities group, click Send to Report.


The report opens, displaying the data that displayed on Graph 1 of the plot.

2. You can edit the attributes of the report on the Property pane.

3. On the Workspace tab, click Save to save your work.

85 of 122
Plots

Sample Workspace: Normalization


There is a sample workspace that shows normalization. The database for the sample consists of simple
monthly data. You can use the normalization feature to shift monthly or daily data in time-based, user-
defined criteria. You can shift production, test, or daily production data forward or backward in time to
compare well or group performance.

Before Normalization:

After Normalization

86 of 122
Plots

1. Open the sample workspace. It is in the OFM installation folder, at ...Sample Workspaces\Illustrative
Databases\Normalization\Normalization.ofm.

2. If OFM does not list a plot in the Analysis pane, create a plot:

a. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens. You will add three rows to the table in the middle of the window.

b. On the first row, make these selections:

Variables: Monthly_prod.Oil

Category: Completion

Name: Well_001

c. Click Add Curve to add a second row.

d. On the second row, make these selections:

Variables: Monthly_prod.Oil

Category: Completion

Name: Well_002

e. Click Add Curve to add a third row.

f. On the third row, make these selections:

Variables: Monthly_prod.Oil

Category: Completion

Name: Well_003

g. Click OK to close the window and display the plot.


The plot shows the three wells. Each well starts and ends on a different date.

3. Normalize (time-shift) the tables:

a. On the Workspace tab, click Options.


The Options window opens.

b. On the Normalize Tables tab, select Enable Normalize Tables.

c. In the Starting Condition field, select InitialProdMonth.

d. For Date Option, select Earliest or Latest.

e. Click OK to close the Options window and see the normalized plot.
The date option affects the date to which production for all of the wells is shifted.

87 of 122
Plots

Sample Workspace: Stacked Plots


There is a sample workspace that shows the effect of stacking sporadic data with the carry forward and
interpolate methods, using the sum, average, and percent contribution displays.

1. Open the sample workspace. It is in the OFM installation folder, at ...Sample Workspaces\Illustrative
Databases\Stacked Graphs\Stacked Graph Illustration.ofm.

2. This workspace has two completions with sporadic data in a table named Prod. View this table:

a. On the Setup tab, in the Tables group, click Data Grid.


The Select OFM Table to Edit window opens.

b. Select Prod.

c. Select the Edit all records check box.

d. Click OK.
The Prod table opens and displays this sporadic data:

UniqueID Date Val2 Val1


one 01/01/1990 1 1
one 01/01/1991 3 3
one 01/01/1992 5 5
one 01/01/1993 7 7
two 01/01/1990 2 2
two 01/01/1991 4 4
two 01/01/1991 6 6
two 01/01/1993 8 8

e. Close the table.

3. There are four plots with this workspace. Add them to the workspace:

a. On the Analysis pane, right-click My Analysis and then click Open > Plot.

b. In the OFM installation folder that has this workspace, select the four .grf files and then click OK.
Four plots open and OFM adds them to the workspace.

Stacked plots are not difficult to make when data is nicely columnar. When data is sporadic,
the task needs more effort. Yet in OFM, we often want to plot sporadic data for more than one
well. For example, we might want to plot oil rate versus gas rate for a series of wells. Each of
these curves are easy to make independently. If you stacked this data in Excel, you would get
a series of filled-in jagged lines, unless you did some manipulation to put the data into
columns. OFM does that manipulation for you.

OFM starts with the first curve in the list. It then compares the X values in the next curve with
those in the first. If the X values match exactly, the stacked value is simply the sum of the first

88 of 122
Plots

and second curve. If it doesn't, there are two choices. OFM will either carry forward the last
value of the first curve, or it will interpolate between values in the first curve that bound the X
value in the second curve. Carry forward allows the first curve's value to be carried forward
even if the data in the second curve falls beyond that of the first curve; interpolate doesn't do
that.

4. View the Regular, Stacked, Percent Contribution plot.


Each graph on this plot has Date for the X-axis and shows Prod.Val1 and Prod.Val2 on the Y-axis.

a. Click the upper graph.


This is a regular display. On the Format tab, in the Display group, the Regular button is
selected.

b. Click the middle graph.


This is a stacked display. On the Format tab, in the Display group, the Stacked button is
selected.

c. Click Regular to see the stacked display change to a regular display, and then click Stacked
again to return to the original display.

d. Click the curve in the middle graph.

e. On the Property pane, under Axis, the Method is Interpolation.


When the Interpolation method is selected for a stacked plot and a discrete data point is
missing, OFM linearly interpolates a value between the data points on either side of the missing
value.

f. Click the lower graph.


This is a percent contribution display. On the Format tab, in the Display group, the Percent
button is selected.

Interpolated plots might be the best choice when you are stacking instantaneous data, such as
rates. In this case, you might be able to assume that the rate between two points is the average of
the rate that came before and the rate that came after. You could use carry forward plots for
stacking volumes, especially if you want cumulative graphs, since with carry forward each curve's
last point is carried forward to the end, to be included in the total.

5. View the Carryforward with Sum and Average plot.


Each graph on this plot has Prod.Val1 for the X-axis and shows Prod.Val2 on the Y-axis.

a. Click the upper graph.


This is a regular display. On the Format tab, in the Display group, the Regular button is
selected.

b. Click the green curve.

c. On the Property pane, under Curve Properties, Step line between values is set to Yes.
Change it to No to see the graph without steps, and then change it back to Yes.

d. The middle graph uses the carry forward method in a sum display. The lower graph uses the
carry forward method in an average display. When the carry forward method is used in sum or

89 of 122
Plots

average displays, OFM carries the value of the last discrete data point on the curve that is being
summed or averaged to the end of the data set.

6. View the Interpolate with Sum and Average plot.


Like the previous plot, each graph on this plot has Prod.Val1 for the X-axis, and shows Prod.Val2 on
the Y-axis. For interpolated plots in a sum or average display, OFM does not interpolate beyond the
last discrete data point for a curve in the data set.

7. View the Stacked with Interpolate and Carryforward plot.


Like the previous two plots, each graph on this plot has Prod.Val1 for the X-axis and shows Prod.Val2
on the Y-axis. With a stacked display:

n If the method is interpolation and a discrete data point is missing (as shown in the middle
graph), OFM linearly interpolates a value between the data points on either side of the missing
value.

n If the method is carry forward and a discrete data point is missing (as shown in the lower graph),
OFM carries the current value until it encounters the next discrete data point.

8. To see how OFM performs the calculations, there is a spreadsheet in the OFM installation folder, at
...Sample Workspaces\Illustrative Databases\Stacked
Graphics\InterpolateAndCarryforwardCalculations.xls.

90 of 122
Plots

Example: Calculating Pressure from P/Z and


Production Data
This example shows how to use user functions in OFM. Among other things, you can use user functions to
execute iterative calculations. In this example, you execute iterative calculations to create a continuous
stream of pressure data, using a combination of sporadic pressures, production data, and a P/Z line. To do
this, you will:

1. Add sporadic pressure data to the monthly production table.

2. Create a user function to calculate the pressure that corresponds to the P/Z line at any given time.

3. Create two calculated variables:

n Fitted P/Z value

n Calculated pressure from a fitted P/Z curve

4. Create a plot to compare reservoir pressure to the fitted pressure.

Adding Sporadic Pressure Data


1. Open the Demo workspace. It is in the OFM installation folder, at ...Sample Workspaces\Demo
Workspace\demo.ofm.

2. In this workspace pressure data is stored in the MonthlyProd table. The table has a field for pressure
data, but does not have data. Add pressure data:

a. On the Setup tab, in the Tables group, click Data Grid.


The Select OFM Table to Edit window opens.

b. Select the MonthlyProd table and then click OK.

c. On the Navigation pane, select the Blue_1:Ge_6 completion.

d. In the Pressure column, add the following pressure data:

For this date... Enter this pressure...


12/1/1999 5000
1/1/2000 4789
2/1/2000 4234
3/1/2000 4123
4/1/2000 3900
5/1/2000 3876
6/1/2000 3768

e. Close the data grid to save your entries.

91 of 122
Plots

Creating a User Function to Calculate the Pressure


Corresponding to Any Point on a P/Z Line
1. On the Setup tab, in the Variable Managers group, click User Functions.
The User Functions window opens.

2. In the top field, enter the name of your new user function: Pcalc

3. Click Add.
The Edit User Function window opens. The name of the user function displays in the text field at
the top of the window.

4. This user function will take one input, which is a parameter that represents a P/Z value. It also will
create five temporary variables for the calculation. So, the first lines are this:

Pcalc(PZ)
num Zold, Znew, Pnew, DeltaZ, loops;

5. You then set the initial values. The next two lines are:

DeltaZ=1;
Zold=1;
loops=0;

6. The calculation has a loop. On the next lines, set the exit criteria for the loop:

while(DeltaZ > 0.001 & loops < 50)

7. At the end of one loop pass, a variable increments by 1. The next lines are:

{
loops=loops+1;

8. Inside the loop, the following takes place:

a. Pressure (P) is calculated at a Z value of 1.

b. The Z value is re-evaluated at this pressure.

c. The new Z value is used to re-calculate P (in step a).

d. These steps are repeated until the re-evaluated value of Z has not changed the value of Z by
more than 0.001. In other words, the function has converged, and it outputs its result, which is
the current value of P.

To do this, the next lines of the user function are:

Pnew=PZ*Zold;

Znew=@PvtZ(Pnew);

DeltaZ = @abs(Zold-Znew);

92 of 122
Plots

Zold=Znew;
}

Pcalc= Pnew;

9. Double-check your user function. It should be:

Pcalc(PZ)

num Zold, Znew, Pnew, DeltaZ, loops;

DeltaZ=1;

Zold=1;

loops=0;

while(DeltaZ > 0.001 & loops < 50)

loops=loops+1;

Pnew=PZ*Zold;

Znew=@PVTZ(Pnew);

DeltaZ = @abs(Zold-Znew);

Zold=Znew;

Pcalc= Pnew;

10. Click OK.

11. On the Edit User Function window, click Close.

Finding the P/Z Value


1. On the Setup tab, in the Variable Managers group, click Calculated Variable Editor.
The Variable Editor opens with a list of all calculated variables.

2. Click Add Calculated Variable.

The calculated variable will use the @Fit system function, which fits a polynomial of n order
through the data. When you use this system function, you identify:

n The X-axis parameter for the dataset being fitted (in this case, cv.cumgas)

n The Y-axis parameter for the dataset being fitted (in this case, cv.pz)

n A true/false condition that excludes a value if the condition is false (in this case, you exclude a
value if cv.pz is greater than 0)

n The X-axis parameter for the output fitted curve (in this case, cv.cumgas)

n An option (in this case, the order of the fitted polynomial, which is 1 linear)

93 of 122
Plots

In this workspace, PZ is already defined as a calculated variable.

3. Double-click the items in the System Functions and Project Variables lists to add this equation
to the text box at the top of the window: @Fit( Gas.cum, pz, pz>0, Gas.cum,"Deg 1 linear")

4. Click OK.
The new variable displays on the list of variables. By default, OFM names it NewItem.

5. Type this new name for the calculated variable and then press Enter: Fit.PZ

6. Set plot attributes for the new calculated variable:

a. At the top of the window, click Define to hide the definition columns, and click Plot to show the
plot attribute columns.

b. On the row for the new Fit.PZ calculated variable, for Curve Name select Fit P/Z.

7. Set report attributes for the new calculated variable:

a. At the top of the window, click Plot to hide the plot attribute columns and click Report to show
the report columns.

b. On the row for Fit.PZ, make these selections:

Report Heading 1: Fitted

Report Heading 2: Pressure

Report Heading 3: from P/Z

8. Set unit attributes for the new calculated variable:

a. At the top of the window, click Report to hide those columns and click Units to show the units
columns.

b. On the row for Fit.PZ, for Units select psig ==> bar.

c. You need to use this calculated variable in the next calculated variable you will create. It is not
available until you save your changes. Click OK to save your changes and close the Variable
Editor.

Calculating the Pressure from a Fitted P/Z Curve


1. Reopen the Variable Editor: On the Setup tab, in the Variable Managers group, click
Calculated Variable Editor.

2. Click Add Calculated Variable.

3. The calculated variable will use the user function you created with the Fit.Pz calculated variable you
created. Double-click the items in the User Functions and Project Variables lists to add this
equation to the text box at the top of the window: #PCalc(FIT.PZ)

4. Click OK.

94 of 122
Plots

5. Type this for the name of the calculated variable and then press Enter: Fit.Press_PZ

6. Set plot attributes for the new calculated variable:

a. Click Define to hide the definition columns and click Plot to show the plot attribute columns.

b. On the row for Fit.Press_PZ, make these selections:

Curve Name: Fitted Pressure from P/Z

Curve Line Color: Red

7. Click OK to save the calculated variable and close the window.

Comparing the Reservoir Pressure to the Fitted Pressure from


the Fitted P/Z Curve
1. On the Navigation pane, select the BLUE_1:Ge_6 completion.

2. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

3. You will create a plot with two graphs. In the Graph section, set the Number of Graphs to 2.

4. Make selections for the first graph:

a. In the Graph section, for the Current Graph select Graph 1.

b. For the X-Axis Variable, select Gas.Cum.

c. In the curve section, select the Fit.PZ variable, Current category, and BLUE_1:Ge_6 name.

d. Click Add Curve.

e. For the second curve, select the PZ variable, Current category, and BLUE_1:Ge_6 name.

5. Make selections for the second graph:

a. In the Graph section, change the Current Graph to Graph 2.

b. For the X-Axis Variable, select Date.

c. In the curve section, select the Fit.Press_PZ variable, the Current category, and the BLUE_
1:Ge_6 name.

d. Click Add Curve.

e. For the second curve, select the Monthlyprod.Pressure variable, the Current category, and
the BLUE_1:Ge_6 name.

f. Click OK.

6. Change the scale type for the top graph:

95 of 122
Plots

a. On the top graph, click the X-axis.

b. On the Properties pane, under Axis, change the Scale Type to Linear.

96 of 122
Plots

Example: Creating a Water Breakthrough


Diagnostic (Chan) Plot
The Chan plot is a useful tool for diagnosing causes of water production. In this example, you will:

1. Create five calculated variables needed for the plot:

n Water-oil ratio (WOR)

n WOR derivative

n Number of elapsed days

n Fitting the WOR derivative

n Fitting the WOR

2. Create the Chan plot

Getting Started
Open the Bfield sample workspace. It is in the OFM installation folder, at ...Sample Workspaces\Pilot
Waterflood Sample\Pilot Waterflood BField.ofm.

Water-Oil Ratio (WOR)


1. On the Setup tab, in the Variable Managers group, click Calculated Variable Editor.
The Variable Editor opens, with the list of variables filtered to show only calculated variables.

2. Click Add Calculated Variable.

For this calculated variable, you want to evaluate oil production. The calculated variable uses two
system functions:

n The @If system function evaluates a condition. If the condition is true, the system function
returns the second argument. If it is false, it returns the third argument. In this case, if oil
production is less than, or equal to, zero then the expression will prevent divide-by-zero errors.

n The @Null system function returns a null value.

3. Double-click the items in the System Functions and Project Variables lists to add this equation
to the text box at the top of the window: @if(Prd.Oil>0,Prd.Water/Prd.Oil,@null())

4. Click OK.
The Variable Editor lists the new calculated variable. By default the name is NewItem.

5. Type the name of the calculated variable and then press Enter: WOR

97 of 122
Plots

WOR Derivative
1. Click Add Calculated Variable.

For this calculated variable, you want to make sure the result is positive (it will be plotted on a log
scale), so you want the absolute value of the derivative. You will use these two system functions in
the calculated variable:

n The @Abs system function returns the absolute value of an expression.

n The @Previous system function finds the value of a numeric expression for the record before the
current record.

2. Enter this equation: @If(Prd.Days>0, @abs(Ratio.WOR-@Previous(Ratio.WOR))/Prd.days,


@Null())

3. Click OK.

4. Type the name of the calculate variable and then press Enter: WOR_Deriv

Number of Elapsed Days


1. Click Add Calculated Variable.

For this calculated variable, you want to find the number of days that have elapsed between first
production and the current date. You will use these two system functions in the calculated
variable:

n The @ElapsedDays system function calculates the number of days between two dates.

n The @First system function finds the first record value of a numeric expression.

2. Enter this equation: @elapseddays(date,@first(date))

3. Click OK.

4. Type the name of the calculate variable and then press Enter: Elapsed_Days

5. You will need to use this calculated variable when you create next one. It is not available until you
save your changes. Click OK to save your changes and close the Variable Editor.

Fitting the WOR Derivative


1. Open the Variable Editor again: On the Setup tab, in the Variable Managers group, click
Calculated Variable Editor.

2. Click Add Calculated Variable.

For this calculated variable, you will fit a 5th order polynomial curve through the data. The X-axis
for the plot should be days, and the Y-axis for the dataset should be the value from this WOR_Deriv
calculated variable. You want to exclude the values from WOR_Deriv if that value is not greater
than zero.

98 of 122
Plots

You will use one system function in the calculated variable. The @Fit system function fits a
polynomial through the data using the least squares method. It requires five things:

n The X-axis parameter for the dataset (Elapsed_Days)

n The Y-axis parameter for the dataset (the WOR_Deriv value)

n A true/false condition that excludes any false values from the fit (exclude when the WOR_deriv
value is not greater than zero)

n The X-axis parameter for the output fitted curve (Elapsed_Days)

n Options (Order of the fitted polynomial to be 5, and the best value for the logarithm of Y)

3. Enter this equation: @fit(Elapsed_Days,WOR_deriv,WOR_deriv>0,Elapsed_Days,"deg 5 opt


ylog")

4. Click OK.

5. Type the name of the calculate variable and then press Enter: WOR_Deriv_Fit

Fitting the WOR


1. Click Add Calculated Variable.

This calculated variable is similar to the previous one. You will fit a 5th order polynomial curve
through the data. The X-axis for the plot should be days, and the Y-axis for the dataset should be
the value from this WOR_Fit calculated variable. You want to exclude the values from WOR_Fit if
that value is not greater than zero.

You will use the @Fit system function in this calculated variable.

2. Enter this equation: @fit(Elapsed_Days,ratio.wor,ratio.wor>0,Elapsed_Days,"deg 5 opt


ylog")

3. Click OK.

4. Type the name of the calculate variable and then press Enter: WOR_Fit

5. You are finished creating calculated variables for the Chan plot. Click OK to save your changes and
close the Variable Editor.

Creating the Chan Plot


1. Create a plot with the calculated variables you created:

a. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

b. For the X-Axis Variable, select the Elapsed_Days variable you created.

c. For the first curve, select the WOR_Deriv variable and then click Add Curve.

d. For the second curve, select the WOR_Deriv_Fit variable and the click Add Curve.

99 of 122
Plots

e. For the third curve, select the WOR_Fit variable and then click Add Curve.

f. For the fourth curve, select Ratio.WOR.

g. Click OK.

h. On the Navigation pane, select the 1975:B completion.

i. On the Analysis pane, right-click Plot1 and then click Rename.

j. Type Chan and then press Enter.

2. Change the curve and axis properties:

a. On the plot, click the X-axis.

b. On the Properties pane, under Graph Settings, change the Curves field to 1:WOR_Deriv.

c. Under Curve Properties, in the Curve Attributes section, select the following:

Line Color: Red

Line Type: None

Point Type: Filled Circle

Point Size: 10

d. On the Properties pane, under Graph Settings, change the Curves field to 2:WOR_Deriv_
Fit.

e. Under Curve Properties, in the Curve Attributes section, select the following:

Line Color: Red

Line Type: Solid

Line Width: 3

f. On the Properties pane, under Graph Settings, change the Curves field to 3:WOR_Fit.

g. Under Curve Properties, in the Curve Attributes section, select the following:

Line Color: Blue

Line Type: Solid

Line Width: 3

h. On the Properties pane, under Graph Settings, change the Curves field to 4:Ratio.Wor.

i. Under Curve Properties, in the Curve Attributes section, select the following:

Line Color: Blue

Line Type: None

Point Type: Filled Circle

Point Size: 10

100 of 122
Plots

j. On the Properties pane, under Axis, change Scale Type to Logarithmic.

3. View the different characteristic trends:

a. On the Navigation pane, select the 3518:B completion. This is an example of normal behavior.

101 of 122
Plots

b. Select the 2465:B completion. This is an example of water coning.

102 of 122
Plots

c. Select the 3516:B completion. This is an example of near wellbore breakthrough.

103 of 122
Plots

104 of 122
Plots

Example: Creating a Hall Plot


The Hall plot is a useful diagnostic for water injection wells, assuming a series of steady-state injection
conditions.

1. Open the Bfield sample workspace. It is in the OFM installation folder, at ...Sample Workspaces\Pilot
Waterflood Sample\Pilot Waterflood BField.ofm.

2. Verify the project has water injection and water injection pressure data:

To create the Hall plot, you need data for volume injected and injection pressure.

a. On the Setup tab, in the Tables group, click Data Grid.


The Select OFM Table to Edit window opens.

b. Select the WIN (water injection) table and then click OK.

c. On the Filter pane, expand Table Data and then select WIN show that the Navigation pane
only shows the completions with data in the WIN table.
The Navigation pane lists 16 completions.

d. In the WIN table, water injection is in the WINJ field. Water injection pressure is in the WIPRE
field. On the Navigation pane, click through the 16 completions. Note that only these
completions have data in the WINJ and WIPRE fields:

502WI:B

503WI:B

504WI:B

505WI:B

515WI:B

e. On the Navigation pane, under Table Data, expand the WIN table. To the left of each
completion is a check box. For each completion that does not have data in the WINJ and WIPRE
fields, click the check box three times so that a red minus sign displays in the check box. This
removes the completion from the list on the Navigation pane.

f. Close the data grid.

3. Create the calculated variable:

a. On the Setup tab, in the Variable Managers group, click Calculated Variable Editor.
The Variable Editor opens with a list of all calculated variables.

b. Click Add Calculated Variable.


The Edit Calculated Variable window opens.

You will create the Hall function, which is essentially a pressure integral. You will use three
system functions to do this:

105 of 122
Plots

@RSum calculates a running sum of an expression.

@Step determines if a condition is true. If it is true, it creates a continuous stream of values


where the last value remains constant until it is changed by a new data point (a stair-step). If
it is not true, it returns the last value in the expression when the condition is met.

@Dom finds the number of days for a calendar month. The integral will be performed on a daily
basis.

c. Double-click the items on the Project Variables and System Functions lists to add this
equation to the text box at the top of the window: @RSum(@Step(Win.Wipre,Win.Wipre=0)
*@Dom(date))

d. Click OK.
The new variable displays on the list of variables. By default, OFM names it NewItem.

e. Type this new name for the calculated variable and then press Enter: HallPlot

f. Click OK to save the calculated variable and close the window.

4. Create the plot:

a. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

b. For the X-Axis Variable, select Winj.Cum.

c. For the curve, select the HallPlot calculated variable.

d. Click OK.

e. On the Navigation pane, select the different water injection completions to view the Hall plot
for the completion.

106 of 122
Plots

Example: Creating Plots for Waterflooding


Surveillance
In this example, you create several plots that illustrate the performance of a waterflood. You will:

1. Create a table and field, and then add STOIIP data to it.

2. Create four calculated variables to use in the plots. In OFM, you can explore different methods for
introducing PVT data. In this example, you will assume the properties are constant and so you will
use calculated variables.

n Hydrocarbon pore volume (HCPV)

n Displaceable hydrocarbon pore volume (DHCPV)

n Pore volumes injected (PVI)

n Recovery factor (RF)

3. Create a conformance plot. This plot helps characterize injection behavior by comparing production
volumes to injection volumes.

4. Create two recovery plots:

n Recovery Factor versus PVI: This plot helps you determine how individual patterns compare to
the field average, to find the factor affecting recovery.

n Recovery Factor versus Time: With this plot, you can track the overall performance of all
patterns on the same plot.

5. Create two PVI plots:

n Water Cut versus PVI: This plot shows the development of water cut behavior with water
injection.

n PVI versus Time: In this plot, you can see the amount of pore volume injected over time.

6. Create a cumulative oil versus cumulative water production plot.

Adding Stock Tank Oil Initially in Place (STOIIP) to the


Workspace
1. Open the Bfield sample workspace. It is in the OFM installation folder, at ...Sample Workspaces\Pilot
Waterflood Sample\Pilot Waterflood BField.ofm.

2. Add a table for stock tank oil initially in place (STOIIP):

a. On the Setup tab, in the Tables group, click Schema.


The Edit Schema Tables window opens.

107 of 122
Plots

b. On the OFM Representation pane, right-click the Pilot Waterflood BField.mdb home data
source and then click Add.
OFM lists the new table on the OFM Representation pane. By default, OFM names the table
NewItem and you must change the name.

c. Type the new name and then press Enter: STOIIP

d. By default, OFM sets the table to hold monthly data. On the right side of the window, on the
Table tab, change Table Type to Static.

e. OFM asks if you want to keep the DATE key field. Click No.

f. On the Table tab, change Key Type to Pattern.

g. On the Fields tab, in the Add New Field field, enter Volume and then click Add.
The OFM Representation pane shows two fields in the STOIIP table: The Pattern field (which
is a primary key field) and Volume.

h. Click OK to save your changes and close the window.

3. Add data in the STOIIP table:

a. On the Setup tab,in the Tables group, click Data Grid.


The Select OFM Table to Edit window opens.

b. Select the STOIIP table and then click OK.

c. Enter the following rows of data for the Pattern and Volume columns:

Patter Volum
n e
495 77400
496 88200
497 91800
500 12000
0
506 60000
509 45000

d. Close the data grid to save your entries.

Hydrocarbon Pore Volume (HCPV)


1. On the Setup tab, in the Variable Managers group, click Calculated Variable Editor.
The Variable Editor opens with a list of all calculated variables.

2. Click Add Calculated Variable.


The Edit Calculated Variable window opens.

The HCPV is the STOIIP * Boi (initial oil formation volume factor). For this example, assume that
the Boi is a constant value of 1.2.

108 of 122
Plots

3. Double-click the items in the Project Variables list to add this equation to the text box at the top of
the window: Stoiip.Volume*1.2

4. Click OK.
The new variable displays on the list of variables. By default, OFM names it NewItem.

5. Type this new name for the calculated variable and then press Enter: HCPV

6. You need to use this calculated variable in the next one. It is not available until you save your
changes. Click OK to save your changes and close the Variable Editor.

Displaceable Hydrocarbon Pore Volume (DHCPV)


1. Open the Variable Editor again: On the Setup tab, in the Variable Managers group, click
Calculated Variable Editor.

2. Click Add Calculated Variable.

You now want to create a calculated variable for DHCPV by allowing for residual oil saturation (Sor).
DHCPV is HCPV (1-Sor). For this example, assume that Sor (residual oil saturation) is 0.2.

3. Double-click the items in the Project Variables list to add this equation to the text box at the top of
the window: HCPV*(1-0.2)

4. Click OK.

5. Type this new name for the calculated variable and then press Enter: DHCPV

6. You need to use this calculated variable in the next one. It is not available until you save your
changes. Click OK to save your changes and close the Variable Editor.

Pore Volumes Injected (PVI)


1. Open the Variable Editor again: On the Setup tab, in the Variable Managers group, click
Calculated Variable Editor.

2. Click Add Calculated Variable.

You now use the DHCPV calculated variable to created a calculated variable for PVI. PVI is
cumulative water injection / DHCPV. You can find the cumulative water injection with the
@CumInput system function. This system function returns the running sum of an input variable
which in this example is the water injection (WINJ) data in the water injection volumes (WIN)
table.

3. Double-click the items in the System Functions and Project Variables lists to add this equation
to the text box at the top of the window: @CumInput (Win.Winj)/DHCPV

4. Click OK.

5. Type this new name for the calculated variable and then press Enter: PVI

109 of 122
Plots

Recovery Factor (RF)


1. Click Add Calculated Variable.

Recovery factor is cumulative oil / STOIIP. To find cumulative oil, use the @CumInput system
function again. This time, use it with the oil production data in the PRD table.

2. Double-click the items in the System Functions and Project Variables lists to add this equation
to the text box at the top of the window: @CumInput(Prd.Oil)/Stoiip.Volume

3. Click OK.

4. Type this new name for the calculated variable and then press Enter: RF

5. Click OK to save the calculated variables and close the window.

Creating a Conformance Plot


This plot helps characterize injection behavior by comparing production volumes to injection volumes.

1. On the Home tab, in the Launch analysis group, click Plot.


The Edit Plot window opens.

2. For the X-Axis Variable, select Winj.Cum.

3. Click Add Multiple Curves.


The Add Multiple Curves window opens.

4. Make these selections and then click OK:

n Category: regular_five_spot

n Variable: Oil.Cum

5. On the list of curves on the Edit Plot window, highlight rows 7 and 8 (for patterns 510 and 511) and
then click Remove Curve so that you have six curves.

6. Click OK.

110 of 122
Plots

5. On the Analysis pane, right-click Plot1 and then click Rename.

4. Type Conformance Plot and then press Enter.

You are now ready to enhance the plot.

7. Hide the legend: On the Format tab, in the Display group, clear the Legend check box.

8. On the Properties pane, under Graph settings, change Curve Name to As Labels.

9. Make changes to the X axis:

a. On the plot, click the X axis.

b. On the Properties pane, under Axis, on the Axis Label field type Cumulative Water
Injection.

c. Change the Scale Type to Linear.

10. Make the first curve a thicker red line: On the Properties pane, under Graph settings, on the
Curves field, select 1: Oil.Cum:regular_five_spot:495. Under Curve Properties, change the
Line Color to Red and the Line Width to 3.

11. Make the second curve a thicker blue line: Under Graph settings, on the Curves field, select 2:
Oil.Cum:regular_five_spot:496. Under Curve Properties, change the Line Color to Blue and
the Line Width to 3.

111 of 122
Plots

12. Make the third curve a thicker teal line: Under Graph settings, on the Curves field, select 3:
Oil.Cum:regular_five_spot:497. Under Curve Properties, change the Line Color to Teal and
the Line Width to 3.

13. Make the fourth curve a thicker green line: Under Graph settings, on the Curves field, select 4:
Oil.Cum:regular_five_spot:500. Under Curve Properties, change the Line Color as Green
and change the Line Width to 3.

14. Make the fifth curve a thicker magenta line: Under Graph settings, on the Curves field, select 5:
Oil.Cum:regular_five_spot:506. Under Curve Properties, change the Line Color to Magenta
and the Line Width to 3.

15. Make the sixth curve a thicker brown line: Under Graph settings, on the Curves field, select 6:
Oil.Cum:regular_five_spot:509. Under Curve Properties, change the Line Color to Dark
Brown and the Line Width to 3.

16. On the plot, drag each of the curve names close to the line it defines. For example, drag the line that
defines regular_five_spot_500 near the green line.

If you were to draw a unit slope line on this plot (the dotted line from 0,0 to 500000,50 in the graph
below), that line would show where cumulative oil production equals the cumulative water injected.

112 of 122
Plots

Viewing the Recovery Factor versus PVI


This plot helps you determine how individual patterns compare to the field average, to find the factor
affecting recovery.

1. Make a copy of the conformance plot: On the Analysis pane, right-click Conformance Plot and
then click Save As New Node.
OFM names the copy Copy of Conformance Plot.

2. Right-click Copy of Conformance Plot and then click Rename.

3. Type Recovery Factor versus PVI and then press Enter.

4. On the Analysis pane, double-click Recovery Factor versus PVI to open it.

5. On the Format tab, in the Edit group, click Variables.

6. Change the X-Axis Variable to PVI.

7. For the curves, change all the Variables to RF. Keep the Category and Name selections the same.

8. Click OK.

The plot loses its formatting when you change the curves. You are ready to improve visibility of the
plot.

9. On the Format tab, in the Display group, select the Legend check box.

10. Change the X-axis scale:

a. On the plot, click the X-axis.

b. On the Properties pane, under Axis, make sure the Scale Type is Linear.

11. As you did for the conformance plot, change the curve color and line width. Make them the same as
you did for the conformance plot:

n 495: Red, line width 3

n 496: Blue, line width 3

n 497: Teal, line width 3

n 500: Green, line width 3

n 506: Magenta, line width 3

n 509: Dark brown, line width 3

113 of 122
Plots

Viewing the Recovery Factor versus Time


With this plot, you can track the overall performance of all patterns on the same plot.

1. This plot is the same as the previous, except the X-axis is Date instead of PVI. Make a copy of the
previous plot: On the Analysis pane, right-click Recovery Factor versus PVI and then click
Save As New Node.

2. Rename the copy Recovery Factor and then open the plot.

3. On the Format tab, in the Edit group, click Variables.

4. Change the X-Axis Variable to Date.

5. Click OK.

114 of 122
Plots

Viewing the Water Cut versus PVI


This plot shows the development of water cut behavior with water injection.

1. Like the Recovery Factor versus PVI, the X-axis variable for this plot is PVI. The variables for the
curves are different. Make a copy of the plot: On the Analysis pane, right-click Recovery Factor
versus PVI and then click Save As New Node.

2. Rename the copy Water Cut versus PVI and then open the plot.

3. On the Format tab, in the Edit group, click Variables.

4. For the curves, change all the Variables to Water.Cut. Keep the Category and Name selections
the same.

5. Click OK.

The plot loses its formatting when you change the curves. You are ready to improve visibility of the
plot.

6. On the Format tab, in the Display group, select the Legend check box.

7. As you did for the other plots, change the curve color and line width. Make them the same as you did
before:

115 of 122
Plots

n 495: Red, line width 3

n 496: Blue, line width 3

n 497: Teal, line width 3

n 500: Green, line width 3

n 506: Magenta, line width 3

n 509: Dark brown, line width 3

Viewing PVI versus Time


PVI helps normalize the quantity of water injection and gives you a basis for comparison. In this plot, you
will see the number of pore volumes injected over time.

1. Make a copy of the Recovery Factor versus Time plot, and rename it PVI.

2. Open the plot to change its variables.

3. On the Format tab, in the Edit group, click Variables.

4. For the curves, change all the Variables to PVI. Keep the Category and Name selections the
same.

5. Click OK.

116 of 122
Plots

The plot loses its formatting when you change the curves. You are ready to improve visibility of the
plot.

6. On the Format tab, in the Display group, select the Legend check box.

7. As you did for the other plots, change the curve color and line width. Make them the same as you did
before:

n 495: Red, line width 3

n 496: Blue, line width 3

n 497: Teal, line width 3

n 500: Green, line width 3

n 506: Magenta, line width 3

n 509: Dark brown, line width 3

Viewing Cumulative Oil Production versus Cumulative Water


Production
1. This plot is similar to the conformance plot, except the X-axis shows cumulative water production.
Make a copy of the Conformance Plot, and rename it Cum Oil versus Cum Water.

117 of 122
Plots

2. Open the plot to change its variables.

3. On the Format tab, in the Edit group, click Variables.

4. Change the X-Axis Variable to Water.Cum.

5. Click OK.

6. On the Format tab, in the Display group, select the Legend check box and then drag the legend to
a good location.

118 of 122
Plots

Example: Fitting a Polynomial Curve


Through Plot Data and Displaying Its
Equation
In this example, you will create a variable that curve fits production data. Then you will display it on a graph
and post the equation of the line as a label. You will:

n Create a plot that shows calendar day oil versus elapsed time

n Create calculated variables to fit a polynomial curve and to show the equation, and then add these to
the plot and plot header.

Getting Started
1. Open the Demo workspace. It is in the OFM installation folder, at ...Sample Workspaces\Demo
Workspace\demo.ofm.

2. You will use three of the calculated variables already in this project. To review them, on the Setup
tab, in the Variable Managers group, click Calculated Variable Editor.
The Variable Editor opens with a list of calculated variables.

3. Double-click the Name column to sort the list alphabetically by name.

4. Find the Oil.CalDay calculated variable and view the Equation.


The equation is Prd.Oil/@dom(date). This calculated variable divides oil production by the number
of days in the month. The @Dom system function returns the number of days.

5. Find the InitialProdMonth calculated variable and view the Equation.


The equation is @cfirst(date,MonthlyProd.Oil>0|MonthlyProd.Gas>0|MonthlyProd.Water>0).
This calculated variable uses the @CFirst system function to find the first date on which monthly oil,
gas, or water production is greater than zero.

6. Find the MonthsOfProd calculated variable and view the Equation.


The equation is @ElapsedMonths(date, InitialProdMonth). This calculated variable uses the
@ElapsedMonths system function to find the number of months between the current date and the
date of initial oil, gas, or water production.

7. Click OK to close the Variable Editor.

Creating a Plot Showing Calendar Day Oil versus Elapsed Time


1. On the Home tab, in the Launch analysis group, click Plot.
The Edit Plot window opens.

2. For the X-Axis Variable, select MonthsOfProd.

3. For the curve, select the Oil.CalDay calculated variable.

119 of 122
Plots

4. Click OK.

5. On the Navigation pane, select the BLUE_1:He_0 completion.

6. On the plot, click the X-axis. On the Properties pane, under Axis, change the Scale Type to
Linear.

Fitting a Polynomial Curve to Data


1. You will create calculated variables for the fit and its equation. Create the first calculated variable:

a. On the Setup tab, in the Variable Managers group, click Calculated Variable Editor.

b. Click Add Calculated Variable.

This calculated variable will use the @Fit system function, which fits a polynomial of n order
through the data. When you use this system function, you identify:

The X-axis parameter for the dataset being fitted (in this case, MonthsOfProd)

The Y-axis parameter for the dataset being fitted (in this case, Oil.CalDay)

A true/false condition that excludes a value if the condition is false (in this case, you exclude a
value if Oil.CalDay is greater than 0)

The X-axis parameter for the output fitted curve (in this case, MonthsOfProd)

120 of 122
Plots

An option (in this case, the order of the fitted polynomial, which is 3)

c. Double-click the items in the System Functions and Project Variables lists to add this
equation to the text box at the top of the window: @Fit( MonthsOfProd, Oil.CalDay,
Oil.CalDay > 0, MonthsOfProd, "deg 3")

d. Click OK.
The new variable displays on the list of variables. By default, OFM names it NewItem.

e. Type this new name for the calculated variable and then press Enter: Fit.OilCalDay

2. Create the second calculated variable:

a. Click Add Calculated Variable.

This calculated variable will use the @FitEq system function, which returns the equation for
the fitted polynomial. The variable that is fitted is Oil.CalDay, to the order of 3.

This is an example of curve fitting in OFM. There is no physical reason a third-order polynomial
should fit this data, but the example illustrates the principle.

b. Double-click the items in the System Functions and Project Variables lists to add this
equation to the text box at the top of the window: @FitEq( Oil.CalDay, "deg 3")

c. Click OK.

d. Type this new name for the calculated variable and then press Enter: FitEq.OilCalDay

e. Click OK to save the calculated variables and close the window.

3. Add the best-fit curve variable to the plot:

a. With the plot open, on the Format tab, in the Edit group, click Variables.
The Edit Plot window opens.

b. Click Add Curve.

c. For the new curve, select the Fit.OilCalDay calculated variable.

d. Click OK.

121 of 122
Plots

4. Display the equation on the plot:

a. On the Format tab, in the Edit group, click Header.


The Header window opens. You will add both calculated variables to the header, because
FitEq.OilCalDay requires Fit.OilCalDay to do its calculation.

b. Click Add.

c. On the new row, type: Fit.OilCalDay

d. Click Add.

e. On the new row, type: FitEq.OilCalDay

f. Click OK to save and close.

g. To hide the first line of the header, select and right-click it. Change the Font Color to White.

122 of 122

You might also like