0% found this document useful (0 votes)
18 views

OFM cookbook

The OFM administrator handbook is a comprehensive guide for users familiar with OFM 3.0, focusing on various aspects of project creation and administration. It covers installation, database models, project variables, units, basemap symbols, project optimization, and back allocation, providing insights and tips for efficient use. The handbook is not official documentation and aims to consolidate helpful information for experienced users rather than beginners.

Uploaded by

adeeyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

OFM cookbook

The OFM administrator handbook is a comprehensive guide for users familiar with OFM 3.0, focusing on various aspects of project creation and administration. It covers installation, database models, project variables, units, basemap symbols, project optimization, and back allocation, providing insights and tips for efficient use. The handbook is not official documentation and aims to consolidate helpful information for experienced users rather than beginners.

Uploaded by

adeeyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 354

The OFM administrator

handbook
Version 0.3

The OFM administrator handbook____________________________________ Page i


Page ii ____________________________________The OFM administrator handbook
Preface

This handbook has been written solely as a personal effort to document, in one place,
several aspects related to the latest version of OFM: 3.0. I find myself very often writing
handouts and hints for users and it is so much effort to make them independent
documents that I decided to group them together in this file. This handbook is not a
tutorial, so it is not intended to beginners. Although new users will benefit from these
pages, it is mainly oriented to people who have created one or several projects and did
not catch all the details in the process.

This is not GeoQuest official documentation and I am not responsible for the results you
might get into while trying to apply its concepts. I tried, however, to make this
information as accurate as possible, but hey, it’s only version 0.2!
You can jump from one chapter to other, however sections within chapters are not
(believe me, it’s a big effort) auto contented. You can’t just jump from one to any other
one. You need to go, more or less in sequence.

All OFM documentation comes on-line, so you might notice that Chapter 1 will look
familiar to you. I personally find difficult to read helps on the screen and that is why I
decided to include this chapter instead of just referring you to the on-line instructions.
Someone who has never used the program could use this part. It will teach you how to
do a basic OFM installation and some basic tasks with it, such as plots, reports, DCA
analyses, bubble maps, etc.

FLEXlm is on of the darkest aspects of OFM administration and receives great attention
on Chapter 2. I tried to cover as many aspects as possible. Because FLEXlm supports so
many scenarios, you will end up using only five percent of the chapter, the one that
concerns to you. I still recommend reading the whole thing, to get a good overview of
the system and eventually improve your setup.

Chapter 3 covers the OFM database model and explains the ideas behind it. There are a
couple of examples there for you to follow and create a project from zero but it is not a
complete tutorial. To build a professional project, you should also read chapters 4, 5, 6
and 7.

Chapter 4 covers project variables. I believe that the explanations covering the different
variables and what you can do with them are quite interesting. This is an important
subject that anyone creating a project should understand clearly.

Chapter 5 deals with Units and Multipliers, another mystery for many of the users that
work with metric unit systems.

The OFM administrator handbook____________________________________ Page iii


Chapter 6 covers the details of the basemap symbols and chapter 7 a brief review about
all you can do to make your projects go faster.

Chapter 8 will show you some tricks and tips to create new OFM projects faster, based
on pre-set templates.

Finally chapter 9 covers Back Allocation, one of the new modules of OFM 3.0.

I will appreciate help of any kind to make this handbook better. You can always suggest
sections, changes and of course, mail1 me your “ready for the press” chapters.

Hope you find it helpful.

Milci

Buenos Aires – April 8, 1999

1
[email protected]

Page iv ____________________________________The OFM administrator handbook


PREFACE .................................................................................................................................................... III
CHAPTER 1 – GETTING STARTED ....................................................................................................... 1
INTRODUCTION ........................................................................................................................................... 1
INSTALLING THE SOFTWARE........................................................................................................................ 1
Requirements ......................................................................................................................................... 1
Installation options ................................................................................................................................ 3
Licensing Schemes ................................................................................................................................. 4
Stand alone licenses ........................................................................................................................................... 4
Network floating licenses ................................................................................................................................... 5
Performing a basic installation ............................................................................................................. 6
Installing a stand alone license.............................................................................................................. 8
STARTING THE SOFTWARE......................................................................................................................... 10
The demodb project ............................................................................................................................. 10
The Static Master table..................................................................................................................................... 11
Monthly tables.................................................................................................................................................. 12
Filtering and Grouping........................................................................................................................ 14
Filter by Completion ........................................................................................................................................ 15
Filter by Table Data.......................................................................................................................................... 16
Filter by Category............................................................................................................................................. 16
Filtering by Query ............................................................................................................................................ 17
Creating a plot ..................................................................................................................................... 19
Creating a report ................................................................................................................................. 22
Date-based report ............................................................................................................................................. 22
Summary report................................................................................................................................................ 23
Creating a bubble map ........................................................................................................................ 27
Build the Binary Map File................................................................................................................................ 27
Build the Bubble Map ...................................................................................................................................... 29
Creating a Grid Map ........................................................................................................................... 31
Creating a Log Display........................................................................................................................ 33
Creating a Cross Section ..................................................................................................................... 36
Creating a Cross Section .................................................................................................................................. 36
Creating Intervals ............................................................................................................................................. 38
Creating Wellbore Diagram Cross Sections ..................................................................................................... 39
Performing Decline Case Analysis ...................................................................................................... 41
CHAPTER 2 - INSTALLATION.............................................................................................................. 43
INTRODUCTION ......................................................................................................................................... 43
FILES INSTALLATION................................................................................................................................. 44
Stand-Alone Installation ...................................................................................................................... 44
Client Workstation Installation............................................................................................................ 44
OFM available installation options ..................................................................................................... 45
Installations Cases ............................................................................................................................... 46
Case 1............................................................................................................................................................... 46
Case 2............................................................................................................................................................... 46
Case 3............................................................................................................................................................... 47
Case 4............................................................................................................................................................... 48
OFM LICENSING IMPLEMENTATION – CLIENT SIDE ................................................................................. 50
License information ............................................................................................................................. 51
1- Registry........................................................................................................................................................ 51
2- OFM Home directory................................................................................................................................... 51
3- LM_LICENSE_FILE environmental variable ............................................................................................. 52
4- Default FLEXlm directory ........................................................................................................................... 52
X- OFM.INI file ............................................................................................................................................... 53
License check out ................................................................................................................................. 53
Stand Alone license – DiskID .......................................................................................................................... 53
Stand Alone license - HostID ........................................................................................................................... 54

The OFM administrator handbook____________________________________ Page v


Stand Alone license - FlexID ........................................................................................................................... 55
Network license served by a Windows license server ...................................................................................... 56
Network license served by a UNIX license server ........................................................................................... 57
Network license served by a Novell license server .......................................................................................... 58
INSTALLING THE FLEXID DRIVERS............................................................................................................ 60
Windows NT installation...................................................................................................................... 60
Reconfiguration of the NT driver ..................................................................................................................... 61
Windows 95/98 installation.................................................................................................................. 61
Reconfiguration of the Windows 95/98 driver ................................................................................................. 62
FLEXLM ................................................................................................................................................... 62
Stand-alone license process ................................................................................................................. 63
Network Licenses process .................................................................................................................... 64
Combining licenses and daemons – Flexibility and Redundancy ........................................................ 66
Single license file and multiple daemons ......................................................................................................... 66
Multiple license files and multiple daemons .................................................................................................... 68
Combo LM_LICENSE_FILE variables ........................................................................................................... 70
Simple redundancy ........................................................................................................................................... 71
Real redundancy............................................................................................................................................... 72
FLEXlm parts - Summary .................................................................................................................... 72
License Manager daemon (always: lmgrd)....................................................................................................... 72
Vendor Daemon (for OFM: lmgrd.slb) ............................................................................................................ 72
License File (license.dat).................................................................................................................................. 72
Application Program (OFM) ............................................................................................................................ 72
Version Conflicts – OFM uses FLEXlm 6.x ......................................................................................... 73
The Options file.................................................................................................................................... 74
FLEXLM NOVELL LICENSE SERVER INSTALLATION ................................................................................. 74
Ordering a Novell server license ......................................................................................................... 74
Installing and starting a Novell Server ................................................................................................ 76
The parts of a Novell license file.......................................................................................................... 77
FLEXLM UNIX LICENSE SERVER INSTALLATION .................................................................................... 78
Ordering a UNIX server license .......................................................................................................... 78
Determining the HostID and hostname ............................................................................................................ 79
Order the license from GeoQuest ..................................................................................................................... 80
Installing and starting a UNIX Server ................................................................................................. 80
Install the server software................................................................................................................................. 80
Start the license manager.................................................................................................................................. 81
The parts of a UNIX license file........................................................................................................... 81
UNIX mini-help.................................................................................................................................... 82
Solaris Commands: .......................................................................................................................................... 82
VI commands: .................................................................................................................................................. 83
File Utilities: .................................................................................................................................................... 83
UNIX CD ROM help ....................................................................................................................................... 84
Setting an automatic start for the lmgrd program ............................................................................... 85
Solaris 2.x......................................................................................................................................................... 85
AIX and Irix ..................................................................................................................................................... 88
FLEXLM WINDOWS LICENSE SERVER INSTALLATION .............................................................................. 88
Ordering a Windows server license ..................................................................................................... 88
Installing and starting a Windows license server ................................................................................ 90
Parts of a Windows license file ............................................................................................................ 94
TROUBLESHOOTING LICENSE PROBLEMS .................................................................................................. 95
The FLEXlm Wizard ............................................................................................................................ 95
Lmtools ................................................................................................................................................ 97
Lmtools buttons................................................................................................................................................ 99
Lmutil................................................................................................................................................. 102
Ping.................................................................................................................................................... 104
CHAPTER 3 – THE OFM DATABASE ................................................................................................ 111
INTRODUCTION ....................................................................................................................................... 111

Page vi ____________________________________The OFM administrator handbook


DATABASES ............................................................................................................................................ 111
Flat File database.............................................................................................................................. 111
Relational database ........................................................................................................................... 113
Table keys ...................................................................................................................................................... 114
OFM RELATIONAL DATABASE ............................................................................................................... 115
An example .................................................................................................................................................... 118
Divide to Group ................................................................................................................................. 122
Filter Categories ............................................................................................................................................. 123
Wellbore......................................................................................................................................................... 123
Patterns........................................................................................................................................................... 125
What is grouping, anyway? ............................................................................................................................ 125
Review 1............................................................................................................................................. 126
Exercise 1........................................................................................................................................... 127
Static Data ...................................................................................................................................................... 128
Log and Wellbore Equipment data .................................................................................................... 134
Review 2............................................................................................................................................. 140
Data levels extension – Group Tables ............................................................................................... 142
Review 3............................................................................................................................................. 145
Symbols.......................................................................................................................................................... 145
Formats........................................................................................................................................................... 145
Objects ............................................................................................................................................... 146
Data Associations .............................................................................................................................. 148
Exercise 2........................................................................................................................................... 150
Creating the project and loading the first files................................................................................................ 152
OFM DATABASE BINARY FILES ............................................................................................................. 169
CONCLUSIONS ......................................................................................................................................... 171
CHAPTER 4 – OFM PROJECT VARIABLES..................................................................................... 173
INTRODUCTION ....................................................................................................................................... 173
OFM VARIABLES: TYPES ....................................................................................................................... 174
Input Variables .................................................................................................................................. 174
Imputed Variables.............................................................................................................................. 175
Calculated Variables ......................................................................................................................... 176
Summary and reflections.................................................................................................................... 177
INPUT VARIABLES ................................................................................................................................... 180
OFM Input Variable Types ................................................................................................................ 181
Input Variables Attributes.................................................................................................................. 183
The Define Tab............................................................................................................................................... 183
The Report tab................................................................................................................................................ 185
The Plot tab .................................................................................................................................................... 186
The Math tab .................................................................................................................................................. 187
Reusing attributes .............................................................................................................................. 188
IMPUTED VARIABLES .............................................................................................................................. 189
Imputed Variable Types ..................................................................................................................... 189
Imputed Variables Attributes ............................................................................................................. 191
Reusing Attributes.............................................................................................................................. 191
CALCULATED VARIABLES ....................................................................................................................... 192
OFM Calculated Variable types ........................................................................................................ 194
Calculated Variables Attributes......................................................................................................... 194
Reusing Calculated Variables............................................................................................................ 198
Preparing a parser file....................................................................................................................... 201
Exporting........................................................................................................................................................ 201
OFM Plus – Calculated Variables Builder ..................................................................................................... 201
CV Builder Calculated Variables Description .......................................................................................... 202
CV Builder Example .......................................................................................................................... 213
Save Days of work with CV builder ................................................................................................... 214
Examples that might save you some time....................................................................................................... 215

The OFM administrator handbook____________________________________ Page vii


CHAPTER 5 – UNITS AND MULTIPLIERS ....................................................................................... 217
INTRODUCTION ....................................................................................................................................... 217
UNITS ...................................................................................................................................................... 217
OFM is flexible .................................................................................................................................. 218
How does it work? ............................................................................................................................. 221
Loading data in English Units ........................................................................................................................ 221
Using data loaded in English Units ................................................................................................................ 221
Loading data in metric units. The *METRIC command ................................................................................ 222
Using Data in English units............................................................................................................................ 222
Summary ........................................................................................................................................................ 223
Problems ............................................................................................................................................ 223
Problem 1 ....................................................................................................................................................... 223
Problem 2 ....................................................................................................................................................... 224
OFM implementation of Units ........................................................................................................... 225
MULTIPLIERS .......................................................................................................................................... 227
Problems ............................................................................................................................................ 230
CHAPTER 6 – BASEMAP SYMBOLS.................................................................................................. 231
INTRODUCTION ....................................................................................................................................... 231
WELL TYPE INFORMATION...................................................................................................................... 232
Well Type – Sort................................................................................................................................. 233
Well Type – Table .............................................................................................................................. 234
Well Type – Expression...................................................................................................................... 235
Value based symbol ....................................................................................................................................... 235
Sporadic Table value ...................................................................................................................................... 236
SYMBOL MAPPING INFORMATION ........................................................................................................... 238
ASCII file ....................................................................................................................................................... 238
Acronyms ....................................................................................................................................................... 239
PUTTING IT ALL TOGETHER ..................................................................................................................... 239
Using Default mapping information .................................................................................................. 239
Using a User Supplied mapping information..................................................................................... 241
Using Create from data mapping information................................................................................... 242
Using Merge with current mapping information ............................................................................... 243
SYMBOL-SHAPE FILES ............................................................................................................................ 243
Examples ........................................................................................................................................................ 244
Notes on Basemap Symbols Customization........................................................................................ 245
Map Symbols Roadmap ..................................................................................................................... 245
BASEMAP SYMBOLS CUSTOMIZATION .................................................................................................... 246
CREATING A CUSTOM SYMBOL FILE ........................................................................................................ 248
SYMBOLS ARE NOT DYNAMIC. REFRESHING SYMBOLS ........................................................................... 249
SOME APPLICATIONS WITH MAP SYMBOLS .............................................................................................. 250
Filter Categories................................................................................................................................ 250
Calculated Variables and Filter Categories ...................................................................................... 252
CHAPTER 7 – PROJECT OPTIMIZATION ....................................................................................... 255
INTRODUCTION ....................................................................................................................................... 255
Basemap Symbols and Well Names.................................................................................................... 255
Deactivating the Basemap ................................................................................................................. 256
Table Manager................................................................................................................................... 257
Filter Files ......................................................................................................................................... 258
Auto Grouping ................................................................................................................................... 258
Tables design ..................................................................................................................................... 259
CHAPTER 8 – PROJECT TEMPLATES.............................................................................................. 263
INTRODUCTION ....................................................................................................................................... 263
THE PRODUCTION ANALYST TEMPLATE .................................................................................................. 264

Page viii ____________________________________The OFM administrator handbook


THE GEOQUEST STANDARD TEMPLATE .................................................................................................. 268
THE FINDER TEMPLATE ........................................................................................................................... 275
THE COMPANY STANDARD TEMPLATE .................................................................................................... 276
THE COMPANY ODBC STANDARD TEMPLATE ........................................................................................ 277
THE USER DEFINED TEMPLATE ............................................................................................................... 277
DATA SOURCES....................................................................................................................................... 278
CHAPTER 9 - BACK ALLOCATION................................................................................................... 281
INTRODUCTION ....................................................................................................................................... 281
SIMPLE BACK ALLOCATION .................................................................................................................... 282
COMPLEX BACK ALLOCATION ................................................................................................................ 287
OFM BACK ALLOCATION MODULE ........................................................................................................ 290
BACK ALLOCATION USING KH OR VALUES............................................................................................ 295
OFM calculated Back Allocation....................................................................................................... 295
Manually Calculated Back Allocation ............................................................................................... 299
Differences between the manual and OFM calculation..................................................................... 303
Back Allocation Files......................................................................................................................... 304
BACK ALLOCATION USING WELL TEST DATA......................................................................................... 305
OFM calculated Back Allocation....................................................................................................... 306
Manual Calculated Back Allocation .................................................................................................. 310
Differences between the manual and OFM calculation..................................................................... 314
BACK ALLOCATION USING WELL CHARACTERISTICS DATA ................................................................... 315
OFM calculated Well Characteristics Allocation.............................................................................. 317
Manually Calculated Back Allocation ............................................................................................... 321
Differences between the manual and OFM calculation..................................................................... 325
BACK ALLOCATION USING DECLINE CURVE DATA ................................................................................. 325
OFM calculated Decline Curve Allocation........................................................................................ 326
Manually Calculated Back Allocation ............................................................................................... 329
Differences between the manual and OFM calculation..................................................................... 333
READ ME LAST........................................................................................................................................ 334
THE REST OF THE SETTINGS ..................................................................................................................... 336
The Control Tab................................................................................................................................. 336
The Measurements tab ....................................................................................................................... 337
The Production Times tab.................................................................................................................. 338
The Welltest/Equations tabs............................................................................................................... 339
The Writeback to OFM tab ................................................................................................................ 339
THE BACK ALLOCATION FILE ................................................................................................................. 340
Opening a previous BA session.......................................................................................................... 340
Network section ............................................................................................................................................. 341
CONCLUSIONS ......................................................................................................................................... 344

The OFM administrator handbook____________________________________ Page ix


Chapter 1 – Getting Started

Introduction

This chapter will get you started with the software. I would prefer that you can get your
hands on a PC and install OFM yourself, so you could start with a fresh copy of the
software and examples provided with it, and work the book exercises through.
After a brief description of the licensing options, you will be guided through a typical
installation to get your hands on the software as soon as possible.

The rest of the chapter explains the very basic stuff that can be done with the OFM. This
handbook is not intended to train you on the use of the software (which deserves a full
book and there is plenty of documentation about) but to explain the guts of the
database engine and what you can do with it. In order to show you this, it is imperative
that you get a feeling of what does the program do, so you will be ready to figure out
how [if] can you implement your own needs.

Installing the software

Requirements
OFM is a full 32-bit application that uses the new Microsoft Foundation Classes libraries.
This is a huge improvement over the previous version (2.2). However, old 16 bit
Windows is not supported anymore. OFM 3.0 will exclusively run on the following
operating systems:

• Windows 95®, patched with Service Pack 1 or later


• Windows 95® OSR2
• Windows 98®
• Windows NT® 4.0, patched with Service Pack 3 or later

Notice that some Windows versions require patches (Microsoft calls them “Service
Packs” and they can be freely obtained. You can download them from their web site and
install the to correct bugs or other issues). Some of these service packs are provided
with this book. However, you should check Microsoft’s web site for the latest versions
that apply to your OS.
Although it runs fine on any of them, my personal vote goes for Windows NT 4.0
Workstation. It will also run on the NT 4.0 server, but this version of the operating

The OFM administrator handbook_____________________________________ Page 1


system has been optimized for a server type of operation (background processes, etc.).
NT workstation is more responsive to the user and provides the best performance. Also,
Microsoft’s official recommendation for a PC in an office environment is NT Workstation.
Regarding the recommended hardware, I can only reproduce the official figures:

• Intel Pentium® processor


• 32 MB Ram for Windows 9x or 64MB Ram for Windows NT
• SVGA video adapter with a minimum resolution of 800x600 pixels
• A mouse and a printer that work in Windows
• 42 to 92 MB of disk space, depending on block size of the partition where
you want to install it.

As a rule of thumb (and not very surprisingly), get the best hardware you can. Processor
speed is the driving force. Increasing the memory size helps, but not as much. Think of
the PC you will be using as a real workstation that will be processing vital data. Don’t
see it as a word-processing machine that also happens to run OFM.
You could also consider hardware with more than one processor but remember: None of
the Windows 9x will ever use them. Windows NT Workstation scales up to two
processors (NT server up to 16) but OFM is not designed to use this kind of hardware.
NT will perform better but you should not expect an increase in OFM performance. It will
run better (another processor will be doing part of the tasks) but OFM will use only one.

You can find below some tests performed on different hardware. It is interesting to
notice that, generally speaking, the performance increase (compared to OFM 2.2 and
Production Analyst) gets higher with bigger data-sets, so if you are an OFM 2.2 user
with a “50 wells x 5 years” database, you should not expect to be surprised with speed
increase.

Pentium 166/32 Mb. RAM – 352 Wells

Functions Performed OFM 2.2 PA


Load all Wells 9 sec. 15 sec.
Plot all Wells 3 sec. 3 sec.
Create PBF file 3:11 min. 5:10 min.
Animate Bubble Map 7:30 min. 9:06 min.

Pentium 266/64 Mb. RAM – 352 Wells

Functions Performed OFM 3.0 OFM 2.2 PA


Load all Wells 2 sec. 7 sec. 10 sec.
Plot all Wells .8 sec. .9 sec. 1.3 sec.
Create PBF file 35 sec. 59 sec. 3:45 min.
Animate Bubble Map 2:08 min. 3:46 min. 8:23 min.

Pentium 266/64 Mb. RAM – 402 Wells

Functions Performed OFM 3.0 OFM 2.2 PA

Page 2 ____________________________________ The OFM administrator handbook


Load all Wells 7 sec. 12 sec. 10 sec.
Plot all Wells .8 sec. 1.5 sec. 1.4 sec.
Create PBF file 1:14 min. 1:52 min. 7:56 min.
Animate Bubble Map 4:30 min. 7:04 min. 13:05 min.

Installation options
OFM 3.0 is distributed on a CD. This CD comes with the software itself and some other
commercial software from Microsoft®, FLEXlm® and Oracle®.

The following picture shows you the contents of the OFM 3.0 distribution CD. A quick
description of the included files follows:
• FLEXlm folder: This folder includes software for FLEXlm, the licensing software
used by OFM. There are different configuration options for licensing and in some
of them, you will require extra software. Inside this folder you have:
• Client folder: Under some circumstances, you might need some DLLs
that are not present in a standard Windows distribution. These are
normally needed for network floating licenses that are served by a Novell

The OFM administrator handbook____________________________________ Page 3


server. You don’t need to use these files, but you might be asked to copy
them to your system folder in some rare cases.
• FlexID7 folder: OFM 3.0 now supports licensing using a hardware key
(dongle). If you decide to use this setup, you will need the Windows
drivers for this device.
• Server folder: These are the files needed to implement a license server
on different operating systems (Windows, Novell and Unix are the only
ones supported by OFM)
• Odbc_drv folder: OFM can work with ODBC (i.e. Open Data Base Connectivity).
If you are going to use ODBC for you projects, you will probably have to install
these drivers, depending on what databases you will be accessing. For Microsoft
data sources (Access, FoxPro, Excel, etc.) you need the Microsoft Data Access
Components pack. For Oracle databases, you need the Oracle Client software.
Both programs are included in the 3.0 CD, however, the Microsoft Data Access
components included is the minimum package and could no be enough for you. This
book comes with this package in the full version. OFM 3.1 CD fixes this issue.

WinDLLs folder: Finally, you might be also missing some standard Windows DLLs
and you have them there. Unfortunately, the list of supplied files is not complete.
You could find the missing files also with this book. OFM 3.1 CD fixes this issue.

To round up this section just let me say that you could run OFM by just having a
supported operating system and by ignoring all these folders with sub-installations. You
don’t have to install them unless you need them. I will explain you these cases, as we
move along.

Licensing Schemes
OFM has a protection mechanism to avoid running illegal copies of the software. As the
rest of GeoQuest software, it uses FLEXlm. FLEXlm is a third party software developed
by Globetrotter Software Inc. and became the de-facto licensing scheme used by most
software companies. We will explain in details this system on chapter 2.

When you order OFM from GeoQuest, you have three basic licensing schemes to choose
from:
• Stand Alone license with Hardware key and license file
• Stand Alone license with license file
• Network floating license with license file

You must choose which one is more convenient depending on your conditions.

Stand alone licenses


A stand-alone license is one that only requires the PC running OFM (no external
resources) to validate the license. You should consider this type of license if:

• You have a mobile PC that could be running OFM on its own, without connection to the
office network.
• You don’t have a network.
• You decided that OFM would be installed and run on one particular PC only.

Page 4 ____________________________________ The OFM administrator handbook


In any case, a stand-alone license is always tied to something. The
easiest example to understand is the hardware key or dongle (see
figure). When you order this type of license, all you need to run OFM on a
PC is to plug this key into the parallel port and install the license file and
needed drivers. OFM will not run if you don’t have this device available. Of course, you
could have the software installed on more than one PC and move the dongle around,
enabling one PC at a time.

The other option of a stand-alone license is to tie it to a number that the software can
access and it’s unique to the chosen machine. Once the license is designed (i.e.,
prepared and sent to you by GeoQuest), it will allow you to run OFM only on that PC.
You can’t share this license with other co-workers, unless –of course- they come and sit
at your machine to do their job.

The numbers that can be used for this purpose are two:
• DiskID: the serial number assigned to the hard disk when it was formatted.
• HostID: the Ethernet number of your network card.

The big advantage of them is that there is no extra hardware (dongle) involved. You
don’t have to worry about someone taking your license away and stop working until you
get it back. These are real stand-alone licenses.

Network floating licenses


This scheme is more complex than the stand-alone one, but is, by far, more flexible for
a network environment. You should choose this scheme when:

• You want to share a license over several potential users (imagine having one –or
more- electronic dongles, being shared between several PCs over a network).
• You don’t use OFM all the time. For instance, you could buy three licenses to be
shared by 5 engineers. Any of them could use the program on his/her PC, but only
three of them will be able to use it simultaneously.

This scheme is very flexible and could be much cheaper (following our example, three
licenses could be enough for five engineers), however you must meet these
requirements:

• You must have a network available to all PCs that will run OFM.
• You must have a server on your network (a machine that is on all times you want to
use OFM).

The OFM administrator handbook____________________________________ Page 5


Performing a basic installation
This section will guide you through a basic installation on a stand alone PC. This will
assume that your hardware and software meet the requirements listed before. If that is
your case, just insert your OFM CD into your PC.

If your Windows is set to play Data


CDs automatically, the OFM setup
program starts by itself. If it does
not, then execute (double click) on
the setup.exe file located at the
root of the CD.

The setup displays a blue start-up


screen, like the one in the figure. At
this point, nothing has been installed
yet. You have then four options
listed on the right hand side of the
screen.
• Installation &
Licensing Guide: Opens a Windows help file with some information about
licensing.
• Install OFM 3.0: Starts the installation process.
• Browse CD: Opens a window to explore the contents of the D: drive. If your
CD is the D: drive, then it will show you the CD. If not, It will just show you
your second hard drive. A small detail…
• Exit Setup: Exits the Install Options window.

Choose Install OFM 3.0 to continue.

After that, you get an introduction screen (same as any other Windows program). Click
Next to continue.

Then you are presented with the Setup Type window (see figure). There is where you
select what do you want to do.

1. Full Install of OFM 3.0: copies


just everything (recommended one).
2. Custom Install of OFM 3.0: lets
you choose what to install.
3. Workstation install: sets up your
machine to run the software that
has been already installed on a
server (network disk). This option
does not mean client-server
architecture. OFM is not client-

Page 6 ____________________________________ The OFM administrator handbook


server2 software. The program resides on the server disk, but all the processing will
be done on the client machine (your PC).

Choose the first option (Full Install of OFM 3.0).

If you decide to do a custom install, you


will be prompted (as shown in the
figure) for what parts you want to
install. The first item is the program
itself so you shouldn’t disable that one.
If you definitely need to save space, you
could disable the PA_Draw, OFM Plus
and the Sample Databases. Try to keep
the help files and the Demo database.
All the exercises here are based on this
project.

Notice also the Browse button that lets


you choose the folder where OFM will be
installed.

After doing the proper selections (again, if you have disk space, just install everything),
the setup program starts copying the files from the CD to your PC and registering the
application in your Windows.

At the end of the process, another window comes with a warning for users that will be
using ODBC. As mentioned later, this warning explains that you might have to install

2
They are exceptions. When you use a direct connect with ODBC, then your database does some
processing for OFM.

The OFM administrator handbook____________________________________ Page 7


extra ODBC drivers if you are planning to access other databases from within OFM. Click
Next and Finish on the next window to finalize the installation.

Installing a stand alone license


The standard setup program leaves a demo license file installed with the software. This
demo expires on Jan 15-1999 and unless you remove this file or update it with your own
license, OFM will attempt to use it. This demo license expired by the time I was writing
this, so I would suggest you get rid of it. It won’t work.

Ensure you open this file (license.dat) with Notepad. Notepad is the safest editor you
could use for license files. Don’t use a word processor for this task.

The text in this demo file supplied with the CD has three lines (wrapped here just for
displaying):

FEATURE OFM32 lmgrd.slb 3.2 15-jan-99 uncounted ECD5E121324E98762D99


"CD TRIAL LICENSE #1" DEMO
FEATURE OFMMBAL lmgrd.slb 3.2 15-jan-99 uncounted 7C6501B1FED5F4297H1F
"CD TRIAL LICENSE #1" DEMO
FEATURE OFMBA lmgrd.slb 3.2 15-jan-99 uncounted 9C75B151120743670750
"CD TRIAL LICENSE #1" DEMO

These are for the OFM itself (OFM32 feature) and the two optional modules: Material
Balance (OFMMBAL feature) and Back Allocation (OFMBA feature).

If you have been provided with a stand-alone license, then just replace the contents of
the license.dat file. The following ones3 are some examples of typical license files you
could have received from GeoQuest:

• A Stand Alone DiskID license:


FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 uncounted 4B7E20C18F8105E9B69B\
HOSTID=DISK_SERIAL_NUM=887f8582 ck=241

• A Stand Alone HostID license:


FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 uncounted 4B7E20C18F8105E9B69B\
HOSTID=1234ABCF1234DEFA ck=241

• A Dongle license:
FEATURE OFM32 lmgrd.slb 3.2 1-jul-2001 uncounted 2BAE10616BB77751D19\
HOSTID=FLEXID=7-b28440a2 ck=254

When you replace the old text with the new one, make sure you check that the new
lines are all that is there in the license file. You could have more characters that you
don’t see and this will confuse the software. Make sure that:
• You don’t have any extra lines at the beginning of the file.
• You don’t have any spaces at the beginning of the lines
3
These example licenses contain only the OFM32 feature, needed to run the program. They
don’t include the extra modules. If yours does, then it will contain additional lines.

Page 8 ____________________________________ The OFM administrator handbook


• You don’t have any extra spaces at the end of the lines (the “\” is required if
the data continues on the next line)
• You don’t have any extra lines at the end of the file.

Once you are done, save the file and start the program.

As a last comment, if you have a FlexID license (dongle), then remember that you will
have to install the Windows drivers for it. You can find a description of the installation of
these files in Chapter 2, in the Installing the FlexID Drivers section.

That’s all for a standard setup. This is all we need to get you started. Later on we will
explain the details of all other installation possibilities. For now, let’s just start a small
tour on OFM.

The OFM administrator handbook____________________________________ Page 9


Starting the software

Once the installation has been successfully done, you are ready to use OFM. Start it as
any other Windows application. The icon is called OFM 3.0 and is under the OFM group.

Once you
start it,
you will
get the
following
screen4:

The demodb project


In order to complete this tour,
you will need to open an OFM
project. A project (also named a
database) is an OFM “document”.
You can have only one project
opened at a time.
Select File/Open and under the
DemoDB folder open the
demo.ofm project.

OFM displays the “base map” of


the project. Each symbol
represents a completion. Each
type of completion is identified by
a different symbol. The following

4
You might have a Tip of the Day window. If you do, just close it and proceed.

Page 10 ____________________________________ The OFM administrator handbook


figure shows the base map displayed by OFM.

The demodb project contains 225 perforated intervals (completions) allocated to 95


different wells.

The Static Master table


There is a master table that keeps static data for each of these 225 completions. Static
data is basically data with no needs for history. For example, the name of a completion
does not change in time. Neither does the well to which it belongs, its coordinates, etc.
This type of data is kept in a static OFM table. For our demo project, the name given to
this static table is HeaderID.

The next figure shows the contents of the HeaderID table. The first column contains the
names of the completions. Notice that there are 225 lines. If you want to review this
data, do an Edit/Project/Data/HeaderID.

After you inspect these values, just close this data window issuing a File/Close
command.

The OFM administrator handbook____________________________________ Page 11


Because almost all data loaded to this project is related to (or owned by) these
completions, this is a very important table. In fact, is a special type of static table called
Static Master table. Keep this table in mind. There is only one static master table per
project and almost all loaded data is related to it. Each line of the static master table
contains an entity. Entity is a general term to whatever you decide to put in a line of
this table: a completion, a well, a tank, a pump, etc.

Monthly tables
The static master table contains basic information to build the base map we have seen
before. You have the X-Y coordinates, the names, etc. Eventually the information for the
symbol on the map goes there as well. However, you notice that it could be only “one of
anything” per entity (one X coordinate each, one name each, etc.), so you can’t store
historic data in this table. Data that changes with time (such as the water production
volume or pipe pressure) is stored in other kind of tables. The most common one is a
monthly table.

A monthly table is a separate table that stores one value per month. The classic
example is the production volumes measured once a month for every completion.

In the demodb there is a monthly table called MonthlyProd. Let’s see its contents.

Do an Edit/Project/Data/MonthlyProd. You will get an empty spreadsheet. You


could see what columns we have on this table: DATE, DAYS, OIL, GAS, WATER,
PRESSURE & STATUS.

Page 12 ____________________________________ The OFM administrator handbook


Next completion

The spreadsheet is empty because there is no data to be displayed yet! Click on the
‘Next’ arrow a few times until you reach the Blue_12:Ad_4 completion. This
completion has data in the MonthlyProd table, so you should see a figure like the next
one.

As you can see, this table stores values (once and only once per month) for a particular
completion (o whatever you have in a line of the static master table)
In March 1967, the Blue_12:Ad_4 completion produced 1984 bbls of oil, 245 Mcf of gas,
4061 bbls of water. The number of effective producing days of that month has not been
recorded. Neither was the pressure.
Click again next a few times to see data belonging to other entities (completions). When
you are done with it, do a File/Close to return to the base map.

The OFM administrator handbook____________________________________ Page 13


In an OFM project, the user builds the tables, so the user chooses table and column
names. The database has a quite open architecture, so you have a wide range of data
you could eventually store. Keep in mind that the demo project is just and example an
not what your database will necessarily look like.

Filtering and Grouping


You have just experimented that in order to see some data, you have to order OFM to
go and retrieve it. You just did it very careless by hitting Next. Next tells OFM
something like “go and get the data that belongs to the following item in the list”. The
list5 is, as said before, 225 items long. You can
also hit Previous (the other arrow, pointing to
the left) to go back and navigate through the
data.

The full list is also available for you to go and


choose the one you want by just selecting it
directly, without having to navigate one by one
to it.

Try to get the data for the completion Blue_1:He


by selecting it from the list, as shown in the
figure.

The act of getting ready the desired data is called Grouping. This is a general term,
because you don’t normally analyze individual completions. You want to selectively
gather them together to perform more complex analysis. You group different data
together to process it as a set.

It is also important to notice that when you group data for analysis, OFM displays it in
its status bar (at the very bottom of the main OFM window). The next figure shows OFM
displaying that the completion Blue_1:He has been grouped.

In the previous paragraph, notice the word selectively. When you put data together, you
must select exactly what you want to group. All completions that produce from a
particular reservoir, all intervals completed on a particular well, etc. The act of selecting
is called filtering. You normally filter what you want and then group it together.

Finally, remember that in OFM, filtering and grouping data are separate functions. A
Filter is a sub-set of the total available information. The filtered data is grouped into
memory and then accessed by other OFM functions and applications. The tools available
to filter the desired items will be described in the following sections.

5
The contents of this list depends on the user’s choice. For now, we see the default list of the
entities of the static master table, i.e., the completions.

Page 14 ____________________________________ The OFM administrator handbook


Try them as you read along. Once you filter some wells, you will notice that the base
map shows whatever was left after your selection. Also notice that the window below
the map shows (in the Filter tab) a list of whatever was left.
To return to the full set of data, you need to clear the filter with Filter/Clear. Make
sure you do this between the different filtering options you try, so you start a new filter
from the complete database.

Filter by Completion
Use this method when you want to manually select, by their names, the list of
completions you want to filter.

1. Select Filter/Filter By/Completion from the OFM menu bar. The Selection
dialog box displays.
2. Select a well completion (for instance,
select BLUE_10:Ad_1A,BLUE_12:Ad_4,
BLUE_12:Li_1C and BLUE_13:Ge_4E)
3. You may select up to the total number
of completions displayed.
4. After clicking OK, OFM leaves the
selected completions on the base map. If
you want to perform a study on all of them
together, you can do a Filter/Group to
have them all available as one set. If you
do that, notice the status bar displaying a
description of the group (see next figure).

Notes:
• Re-select a highlighted well completion
to de-select.
• Click Select All to include all items in
the scroll list.
• Select Exclude to reverse the selection logic.

The OFM administrator handbook____________________________________ Page 15


Filter by Table Data
In an OFM project, you normally have many tables.
Not all completions have data loaded in all of them.
You could use this method when you want all
completions that have data loaded in a particular
table.

1. Select Filter/Filter By/Table Data from the


OFM menu bar. The Table Data dialog box
displays.
2. Select a table (for instance, the MONTHLYPROD
table). You may select up to the total number
of Tables displayed.
3. Click OK.
4. After clicking OK, OFM leaves the completions
that have data on the selected tables on the base map. If you want to perform a
study on all of them together, you can do a Filter/Group to have them all available
as one set. If you do that, notice the status bar displaying a description of the group
(see the next figure).

Notes

• Re-select a highlighted table to de-select it.


• Click Clear to erase all selections without exiting the dialog box.

Filter by Category
You can (and should) define Filter Categories for your projects. This is one of the
most popular ways of filtering data. The
demo has five filter categories defined and
loaded with data.

1. Select Filter/Filter By/Category from


OFM menu bar. The Filter By Category
dialog box displays.
2. Select a category (for instance,
RESERVOIR). A Sub-Category dialog box
displays.
3. Select a sub-category item (for example,
ADOBE_1A and ADOBE_2A, as shown in the
figure). You may select up to the total
number of sub-categories displayed.
4. Click OK. The Sub-Categories dialog box
closes revealing a check mark beside the
category.

Page 16 ____________________________________ The OFM administrator handbook


5. You could repeat Steps 2 – 4 as necessary, if you want to do a more complex
filtering.
6. Click OK.
7. After clicking OK, OFM leaves the selected completions on the base map. If you
want to perform a study on all of them together, you can do a Filter/Group to
have them all available as one set. If you do that, notice the status bar displaying a
description of the group (see next figure).

Notes
• Select a highlighted category to de-select it.
• Click Clear to erase all selections without exiting the dialog box.
• A filter can consist of multiple categories.

Filtering by Query
A query is a call to the project database that defines a sub-set of data. An example of a
query is a call for wells with an oil production rate greater than 100 barrels per day. As a
result of this query, OFM would display those wells that ever produced more than 100
barrels of oil per day.

A query can be fairly simple as in the previous example, or it can be quite complex
accessing variables, user and system functions, and calculated variables.

1. Select Filter/Filter By/Query from the OFM menu bar. The Table Query dialog
box displays.
2. Click Edit Query. The Create Query dialog box displays.
3. Click on the following buttons.
• Project Variables
• System Functions
• User Functions
Notice that the list changes its contents, depending on what button you select.
These three lists display the available variables you use to build your query. The
rest of the query is assembled with operators and constants.
4. Select a variable or function from the scroll list.
For instance, select the Project Variables button and click on the item
DailyProd.Oil.
5. Click Add to move the selection to the editing window.
DailyProd.Oil moves to the editing window.
6. Use the keypad to add operators or modify the equation.
Complete the query by selecting the greater sign “>”, then “1” and “0”.
The final query will be: DailyProd.Oil > 10.

The OFM administrator handbook____________________________________ Page 17


This will be the final query: DailyProd.Oil > 10. Notice that OFM adds the
“SELECT UNIQUEID
WHERE” part of the
query, where
UNIQUEID is the
name chosen for
the name of
entities.
7. Click OK. The Table
Query dialog box
displays, as shown in
the figure below.
8. Click OK again. OFM
scans the database to
solve the query.

In our example, OFM


finds nine completions
that have, at least for
once in their
production history, a
dailyprod.oil value
greater than ten.

9. After querying the database, OFM leaves the selected completions on the base map.
If you want to perform a study on all of them together, you can do a Filter/Group
to have them all available as one set. If you do that, notice the status bar displaying
a description of the group (see next figure).

Page 18 ____________________________________ The OFM administrator handbook


Notes
• Only one query can be active at a time. This means that you can’t perform
again a query over whatever was left of another query. If you need to do
that, just combine the two queries in one with the AND button. Example,
you could perform this double query:

Dailyprod.Oil > 10 & Dailyprod.Gas > 200

The & symbol is the logical AND operator


• OFM query language is not SQL. You can’t type any valid SQL command. The
supported commands is a reduced set (although enough for the normal
operation of OFM).

There are more ways of filtering data. We are not covering them all here because that’s
not the idea but you should understand by now that they will produce more or less the
same results: Extract a group of entities that interest you for a particular reason.

Creating a plot
Plots are created from the information stored or calculated from the project data. The
following steps create a plot displaying monthly produced oil and gas data vs. date from
all completions of the OFM demo database.

1. From the base map window, select Filter/Clear to cancel any active filters.
2. Select Filter/Group Data to gather all project data into memory for the plot.
3. Select Analysis/Plot or click the Plot icon located on the OFM toolbar. The plot
window displays. If the Edit Plot window pops up, dismiss it by clicking its Cancel
button.
4. Select File/New to create
a new plot. The Edit Plot
dialog box displays with the
Plot Data tab active.
5. Do the following
• Set the Number of
Graphs to 1.
• Set the X-Axis Variable to
Date.
• Double-click
Monthlyprod.Oil and
Monthlyprod.Gas to
select the Y-Axis Curves.
6. Click the Curve
Attributes tab and select
the Post Annotations
checkbox.

The OFM administrator handbook____________________________________ Page 19


Notes
• The default colors for oil and gas are green and red. This was set when the demodb
project was created and can be manually changed for this particular plot or re-
defined.

7. Click the Axis Control tab and change the Y-Axis Scale Type to Logarithmic.
8. Click the Grid & Tics tab and do the following:
• Select Show Grid for both the X- and Y-axes.
• Select Show Minor Tic for both the X- and Y-axes.
9. Click the Font tab and select the Auto Font Color checkbox.
10. Click the Legend tab and do the following:
• Select Legend Show.
• Select Draw Box.
11. Click OK to apply all the selections. The plot appears on the screen as shown on
next figure. At this step, the plot is finished. The next steps will improve the
appearance by adding a live header.

12. Select Edit/Headers. The Edit Headers dialog


box displays.

Note
If there are header lines on this window,
highlight each one and click Delete. Repeat
until the dialog box is blank. We want to
create new headers.

13. Click Add to add the first header line. The


Create Header dialog box displays.

Page 20 ____________________________________ The OFM administrator handbook


14. Type “MY COMPANY” (as shown in figure) and click OK. The Edit Headers dialog
box redisplays with one header line. It should start looking like the next figure.
15. Click Add to add the next header line. The Create Header dialog box displays.
16. Type “Well: ” + @Loadname() in the data entry field in the top portion of the
dialog box.

Note
You may also create the text lines by double-clicking variables from the variable
list and using the keypad provided on the dialog box. For our example, you will
have to type in the “Well: ” section but the rest could be done with the mouse by
selecting the “+” button and then by double clicking the Loadname system
function from the list. The finished text should appear exactly as shown on the
next figure.

17. Click OK. The Edit Headers dialog box redisplays with two header lines as shown in
the next figure.
18. Click OK. The two headers display on the plot.
19. Position the cursor on the top header line, click the left mouse button, then click the
right mouse button to display a pop-up menu.
20. Click Tag All to select both lines and use the mouse to move them around the plot.
21. When the headers are in the desired position, click the right mouse button again to
display the pop-up menu and click Done. The added headers display in the desired

position.
22. Let’s use the same plot format to display individual completions data. Scroll through
them in the database by clicking the Next and Previous icons located on the
toolbar. This will discard the group of all the completions we initially had and refresh
the plot with data from individual completions, one at a time. Notice that the header
“Well: ” + Loadname() updates itself automatically showing the name of the
completion being displayed.
23. Double click on the headers to choose a font and color for them.

The OFM administrator handbook____________________________________ Page 21


Creating a report
Reports are created from the information stored or calculated from the project data.
Basically, there are two types of report: date-based and summary reports. We will
demonstrate how to make one of each.

Date-based report
1. From the base map window, select Filter/Clear to cancel the active filter
2. Select Filter/Group Data to group all project data for the report.
3. Select Analysis/Report. The Edit Report dialog box displays. Click Cancel

Notes
If the previous report format displays in the Select entry field of the Edit Report
window, highlight it and click Delete. We want to start a new report.

4. Type-in the following data in the Select entry field:

Date, Oil.Cum, Gas.Cum, Water.Cum

Notes
You could type in the previous line or just build it by double-clicking the desired
parts from the available lists. OFM adds the colon in between. Date, Oil.Cum,
Gas.Cum and Water.Cum are all in the Project Variables list.

5. Click OK. The report displays.

You should get a report like the following one:

Page 22 ____________________________________ The OFM administrator handbook


Cumulative Cumulative Cumulative
Oil Gas Water
Production Production Production
DATE Mbbl MMcf Mbbl
---------- ---------- ---------- ----------
---- ---- ---- ----
19600101 25.0 16.8 17.7
19600201 26.9 17.8 19.2
19600301 28.9 18.7 20.7
19600401 30.9 19.3 21.8
19600501 32.8 20.1 22.9
19600601 34.6 20.7 24.1
19600701 36.5 21.4 25.3
19600801 38.4 22.1 26.3
19600901 40.2 22.8 27.6
19601001 42.1 23.5 29.1
19601101 43.9 24.2 30.3
19601201 45.8 24.8 31.3
19610101 47.7 25.5 32.3
19610201 49.4 26.0 33.2
19610301 51.3 26.6 34.1
19610401 53.1 27.3 35.0
---- ---- ---- ----

Notes
• This report shows the selected values for all the completions of the project grouped
together. For instance, in February 1961, all completions had an accumulated Oil
production of 49.4 Mbbl. Notice that OFM generates the complete history of these
values along the report. That is why is called a date-based report.
• If you are interested in saving the report template, you can follow the last two steps.

6. Select File/Save to save the new report format (not the data) to a *.rpt file.
7. Type a report name and select a directory location; then click Save.
8. Close the report module with File/Close. You will be returned to the basemap.

Summary report
The following steps will show you how to create a summary report from the OFM demo
database. This type of report summarizes data from different items, generally with one
report line per item.

1. From the base map window, select Filter/Clear to cancel the active filter.
2. Select Analysis/Report. The Edit Report dialog box displays. Click Cancel.

Notes
If the previous report format displays in the Select entry field of the Edit Report
window, highlight it and click Delete. We want to start a new report.

3. Type-in the following data in the Select entry field:

@Loadname(), HeaderID.UniqueID, Oil.Cum, Gas.Cum, Oil.Cum+Gas.Cum/6000 BOE

Notes

The OFM administrator handbook____________________________________ Page 23


You could type-in the previous line or just build it by double-clicking the desired
parts from the available lists. OFM adds the colons. @Loadname() is available in the
System Functions list. HeaderID.UniqueID, Oil.Cum, Gas.Cum are in the Project
Variables list. The last part is an equation that you can also build using the mouse
and numeric pad. BOE is an arbitrary name and needs to be typed.

4. Click OK. Then click Next until you get some data into the report.
5. Select Edit/Date Range. The Set Report Date dialog box displays.
6. Select At Last Date to make sure only the last date displays in the report, then click
OK.
7. Select View/Summary/By Item so all the report details display.
8. Select Edit/Breaks to set up some totals. The Report Break dialog box displays.
9. Select At End of Report and click OK.

You should be getting a report like the following one:

Cumulative Cumulative
HEADERID Oil Gas
@Loadname( UNIQUEID Production Production <BOE>
Mm3 MMscm
---------- -------------------- ---------- ---------- ----------
BLUE_10:Ad BLUE_10:Ad_1A 0.0 0.0 0.00
BLUE_11:Li BLUE_11:Li_1C * * *
BLUE_12:Ad BLUE_12:Ad_4 39.1 3.4 39627.08
BLUE_14:Ad BLUE_14:Ad_3BU * * *
BLUE_14:Ad BLUE_14:Ad_6A * * *
BLUE_14:Li BLUE_14:Li_1C 141.2 15.2 143689.49
…………

Notes

Notice that this report has the following characteristics:


• The width of the UniqueID (first) column is too narrow for the column data.
• The BOE column displays no units.

Page 24 ____________________________________ The OFM administrator handbook


The following steps are required to make them up.

10. Select Edit/Column Headers. The Edit Column Headers dialog box displays.
The Loadname() variable displays at the top of the dialog box.
11. Type 20 in the Width field to change the width of the UniqueID column.

12. On the same dialog box, select <BOE> from the drop-down list located at the top
of the dialog box and do the following (see previous figure):
• Select bbl/d from the Units drop-down list.
• Select M from the Multiplier drop-down list.
• Select Sum & Average from the Sub-total drop-down list.
13. On the same dialog box, select Gas.Cum from the Current Column drop-down
list.
14. Select Sum & Average from the Sub-total drop-down list.
15. On the same dialog box, select Oil.Cum from the Current Column drop-down list.
16. Select Sum & Average from the Sub-total drop-down list.
17. Click OK to apply the selections.

You should get a report whose last section looks like the following one:

Cumulative Cumulative
HEADERID Oil Gas
@Name( ) UNIQUEID Production Production <BOE>
Mbbl MMcf Mbbl
-------------------- -------------------- ---------- ---------- ----------
RED_5:Os_1 RED_5:Os_1 * * *
RED_5:Os_1A RED_5:Os_1A * * *
RED_6:Ad_3BU RED_6:Ad_3BU * * *
RED_7:Cl_3 RED_7:Cl_3 * * *
RED_7:Os_1 RED_7:Os_1 * * *
RED_8:Li_1 RED_8:Li_1 * * *
RED_9:Cl_2 RED_9:Cl_2 6.9 17.0 9.73
RED_9:Os_1 RED_9:Os_1 33.7 35.3 39.55
RED_9:Os_4 RED_9:Os_4 0.3 102.7 17.37
---------- ---------- ----------
16609.3 42829.4 23747.50 Sum
144.4 372.4 206.50 Average

The OFM administrator handbook____________________________________ Page 25


Notice the Sum and Average figures that were added at the break (end of report) for
the selected columns.
It is also possible to sort by one (or more) of the columns. Let’s sort by the values in the
BOE column, in descending order.

18. Select Edit/Sorts to change the look of the report.


19. Select <BOE> from the First drop-down list.

20. Select Descending; then click OK. The new report displays.
21. OFM calculates and displays the new report.

If you want to use these settings in other reports (with a different set of completions,
etc.) you could save a report template.

22. Select File/Save to save the new report format (not the data) to a *.rpt file.
23. Type a report name and select a directory location; then click Save.

This is a section of the report, sorted by BOE.

Cumulative Cumulative
HEADERID Oil Gas
@Name( ) UNIQUEID Production Production <BOE>
Mbbl MMcf Mbbl
-------------------- -------------------- ---------- ---------- ----------
BLUE_9:Li_1C BLUE_9:Li_1C 1471.7 555.9 1564.38
ORANGE_6:Li_1C ORANGE_6:Li_1C 1322.4 602.9 1422.92
ORANGE_1:Li_1 ORANGE_1:Li_1 999.3 598.0 1098.94
GREEN_7:Li_1C GREEN_7:Li_1C 928.5 496.6 1011.29
BLUE_1:Li_1C BLUE_1:Li_1C 905.4 475.1 984.59
BLUE_14:Li_1C BLUE_14:Li_1C 887.8 537.8 977.44
PURPLE_1:Cl_3 PURPLE_1:Cl_3 657.6 787.4 788.78
GREEN_10:Li_1C GREEN_10:Li_1C 641.5 513.9 727.16
BLUE_5:Li_1C BLUE_5:Li_1C 644.4 407.5 712.36
ORANGE_23:Ge_2A ORANGE_23:Ge_2A 548.9 770.3 677.31

--- --- --- --- ---

BLUE_11:Li_1C BLUE_11:Li_1C * * *
ORANGE_16:Hu_2A ORANGE_16:Hu_2A * * *
---------- ---------- ----------
16609.3 42829.4 23747.50 Sum
144.4 372.4 206.50 Average

Page 26 ____________________________________ The OFM administrator handbook


Creating a bubble map
Bubble Maps are created from a special type of file called Binary Map File. You have to
first create this file and populate it with the data you want to eventually display in the
map. The first steps show you how to create this kind of file. The rest of this section will
demonstrate how to build a bubble map using this file.

Build the Binary Map File


1. From the base-map, select Bubble Map from the Analysis menu. The Mapper
File dialog box displays.
2. Click Create to make a new *.bmf file. The Binary Map Generation dialog box
displays.
3. Type an optional title for the new *.bmf file (this title will come up as the map title,
so, for instance, type “Cumulative Map” in the Title box) and click Output List. The
Edit Report dialog box displays.
4. Select the desired Project Variables from the drop-down list and make sure a
comma separates each item.

Notes

• Date is automatically placed first in the Select dialog box. Make sure you keep it
there. The first variable of a binary map file has a special meaning for OFM. A map
can be animated trough time and OFM assumes that the time is the first variable in
the file. If you put another variable there, they the map will work but animation will
not do what you expect.
• The System Functions and User Functions can also be viewed and selected for
the map by clicking the applicable button on this dialog box.

For our example, leave DATE as the first variable and add the following ones:
Oil.Cum, Water.Cum, Gas.Cum, Liq.Cum. Your Edit Report dialog box should
look like the following one:

The OFM administrator handbook____________________________________ Page 27


Note
• Double check that Date is your first variable in the list.

5. Click OK. The Binary Map Generation dialog box (see next figure) appears with

the selected variables in the Output List field.


6. Click Output File. The Mapper dialog box displays.
7. Type the new file name in the File name area of the Mapper dialog box (for
instance, select “cumvalues” and save it. Remember that OFM is a 32 bit application,
so you can use long file names such as “Cumulative Values binary map file”)

Page 28 ____________________________________ The OFM administrator handbook


8. Select the directory location and click OK. The Binary Map Generation dialog box
displays.
9. Select the correct Data Type (Monthly) and Group By categories (UniqueID) to
load and display all the data related to the categories. In our example, we need to
select a “Montlhy” data type and to group data by UniqueID. Do not enable the
By Wellbore option.

Notes

• Data Type contains the Static, Monthly, Daily, or Sporadic options. Group By
defaults to the primary key of the database, which is named “UniqueID” in this
database. Group By also contains the filter categories, which were defined in this
database.

10. Click OK. The Creating Mapper File dialog box displays and indicates the progress of
the *.bmf file creation.

Notes
• You can abort the process by clicking Cancel.

11. Allow the load to complete by waiting until the


process finishes and the Select Variable dialog
box appears with the list of variables that you
selected to include in the Binary Map File.
At this point, the file is finished and you a
prompted to select which of the variables available
on that file you want to use for the map.
Remember, you can build the bubble map with
any (or combination) of them.

Build the Bubble Map


12. Select the Cumulative Oil Production (Mbbl) and Cumulative Water
Production (Mbbl) variables.

Caution
Do not select the Date variable.

13. Click OK. The bubble map displays.


14. Select Edit/Bubble Map. The Edit Bubble Map dialog box displays with the
Attributes tab active.

The OFM administrator handbook____________________________________ Page 29


15. Do the following:
• Select Pie from the Display drop-down list.
• Select Green from the Color drop-down list.
• Select Top from the Position drop-down list.
• Select Maximum from the Radius drop-down list.
16. From the same dialog box, select Cumulative Water Production from the top
drop-down list.
17. Do the following:
• Select Pie from the Display drop-down list.
• Select Blue from the Color drop-down list.
• Select Bottom from the Position drop-down list.
• Select Maximum from the Radius drop-down list.
• Clear the Vary Size selection.
18. Click OK. The bubble map displays.
19. Select Step/Select Date. The Select Time dialog box displays.
20. Choose 1996/07 and click OK. The bubble map displays.

21. To animate the bubble map through time, select Tools/Animate. The Animation
Control dialog box displays.
22. Do the following:
• Set the start and end dates by clicking the drop-down lists and selecting a date.
• Increment time in steps or pause in increments of 1/10 second by clicking the
drop-down list and selecting a value.

Page 30 ____________________________________ The OFM administrator handbook


• View the animation backward by clicking Backward
23. When you have finished selecting your option, click OK. The bubble map animation
starts.

Notes
• To pause animation, press the space bar. To stop animation, press Escape. To
restart animation, press the space bar.

24. Close the bubble map by selecting File/Close.

Creating a Grid Map


A Grid Map is built using a Binary Map file (the same type of files used for bubble maps).
You have to first create this file and then prepare the grid map. If you need help on how
to create one, see the previous section on Bubble Maps. Its first part explains how to
create this type of file. We will assume that you have a map file ready for the exercise.

1. From the base map, select Analysis/Grid Map. The Mapper File dialog box
displays.
2. This window shows a list of binary map files. You have several options to pick up the
desired map file.
• If you see the file you want to use in this list, just click on it and the select OK.
• If you want to use another file that is not on the list, then click Open and select
the desired file.
• You could also launch the Binary Map Generation window to build a new file.
3. Select …\demodb\sample2.bmf and click OK
(You could also select the cumvalues.bmf file
you created in the previous bubble map
section). The Select Variable dialog box
displays.
4. For this example, select Cumulative Oil
Production (Mbbl) and click OK.
5. The grid map displays.
6. Select Step/Select Date.
7. Choose the date 1989/07 and click OK.
8. Advance the Grid Map through time by
selecting Step/Previous Date and
Step/Next Date.
9. To animate the Grid Map through time,
select Tools/Animate. The Animation
Control dialog box displays.

The OFM administrator handbook____________________________________ Page 31


10. Do the following:
• Set the start and end dates by clicking the drop-down lists and selecting a date.
• Increment time in steps or pause in increments of 1/10 seconds by clicking the
drop-down list and selecting a value.
• View the animation backward by selecting Backward

11. When you have finished selecting your option, click OK. The grid map animation
proceeds.

Notes
• To pause animation, press the Space bar. To stop animation, press the Escape key.
To restart animation, press the Space bar.

12. Select View/Contour Map. A contour map displays.

Page 32 ____________________________________ The OFM administrator handbook


13. Select File/Close to return to the grid map.
14. Select View/Surface Map. A surface map displays.

15. Compare the surface map to the base map by selecting Window/Tile Vertically.
16. Close the surface map when you are finished.
17. Close the grid map by selecting File/Close.

Creating a Log Display


Log data can be loaded to an OFM project. If you have this type of information, then
you can display it in several formats, create cross sections and perform simple log curve
analysis.
To create a simple log display, follow the next steps.

The OFM administrator handbook____________________________________ Page 33


1. From the base map, select Analysis/Log Display/Single Well.
2. The Set Depth Range dialog box opens. This is where you select initial log interval
to be displayed. Do your selection as per the following figure and click OK. An empty
log display appears.

3. Select a well with log data available. Do a Step/Select and pick up the
ORANGE_34:Li_1C from the list.
4. Double-click the first Trace Name at the top of Track 1.
5. The Log Trace Attributes dialog box displays with the Trace Attributes tab
active.
6. Do the following:
• From the Log drop-down list located in the Select area of the tab view, choose
SP.
• From the Color drop-down list,
choose Blue.
• Click to the right of the SP in the
Trace Name field and type the units
mV.
7. Choose –150 to 0 for the scale. Verify
your settings with the ones on the
following figure.
8. Click OK.

9. The log display displays with the SP


curve.

Page 34 ____________________________________ The OFM administrator handbook


10. Double-click the second Trace Name at the top of Track 1.
11. The Log Trace Attributes dialog box displays with the Trace Attributes tab
active.
12. Do the following:
• From the Log drop-down list, choose GR.
13. Click to the right of GR in the Trace Name field and type-in the units GAPI.
• Choose 0 – 100 for the scale limits
14. Click OK.
15. The log display redisplays.
16. Double-click the first Trace Name at the top of Track 2.
17. The Log Trace Attributes dialog displays with the Trace Attributes tab active.
18. Do the following:
• From the Log drop-down list, choose RLD.
• From the Color drop-down list, choose Blue.
• Click to the right of RLD in the Trace Name field and type ohm-m.
19. Click OK. The log display displays.
20. Double-click the second Trace Name at the top of Track 2. The Log Trace
Attributes dialog displays with the Trace
Attributes tab active.
21. Do the following:
• From the Log drop-down list, choose
RLM.
• Click to the right of RLM in the Trace
Name field and type ohm-m.
22. Click OK. The log display displays.
23. Double-click Track 2. The Edit Log Track
dialog box displays, as shown in the figure.
24. Click the Logarithmic radio button to
change the scale type.
25. Click OK.

The following figure shows the log display.

The OFM administrator handbook____________________________________ Page 35


Creating a Cross Section
Cross sections are used to display log traces, wellbore diagrams and lithologies. A cross
section can be also displayed using OFM.
In this section you will learn to:
• Create a cross section
• Create intervals
• Create wellbore diagram cross sections

Creating a Cross Section


Now we will create a cross section. Because you will need to click on specific wells,
make sure you have the well names shown on the base map by doing Edit/Map/Well
Names and selecting Show Alias Name from the Well Name window.
1. From the demo base map, select Analysis/Log Cross Sections/Create. The OFM
Status Bar displays a message indicating that you are ready to digitize wells.

Page 36 ____________________________________ The OFM administrator handbook


2. Choose the Orange_3, Blue_14 and Orange_8 (O-3, B-14 and O-8) wells by
clicking them with the left mouse button.

3. If you have trouble finding them, do a zoom by doing a View/Zoom In and


selecting the area shown above to zoom in. The zoomed area with the desired wells

The OFM administrator handbook____________________________________ Page 37


is shown in the other figure.
4. Once you have finished choosing the wells, click the right mouse button and choose
Done from the pop-up menu.
5. The Cross Section Legend dialog box displays. Accept the default A-A’ name by
clicking OK. A cross section window displays the selected wells.
6. Select View/Size to Fit to enable it.
7. Select Edit/Display.
8. Select Show Wells, Show Depth Scale and Show Logs.
9. Click Setup. The Log Trace Setup dialog box displays.
10. Click OK to accept the defaults. The Cross Section Display Options dialog box
redisplays.
11. Select Show Markers and click OK.
11. Select Edit/Marker Label/Left. The markers display on the cross section.

Creating Intervals
In this procedure, you will create intervals. Intervals can be created in both Cross
Section and Log Display and are used in both tools.
1. From the cross section, select Edit/Interval. The Edit Interval dialog box
displays.
2. Do the following:
• In the Name field, type Layer_1.
• From the Top Marker drop-down list, choose Winter.
• From the Base Marker drop-down list, choose Screed_1.
• From the Lithology drop-down list, select Shale.
3. Click Add and make the following:
• In the Name field, type Layer_2.
• From the Top Marker drop-down list, choose Screed_1.

Page 38 ____________________________________ The OFM administrator handbook


• From the Base Marker drop-down list, choose Screed_2.
• From the Lithology drop-down list, choose Sandstone.
4. Click Add and do the following:
• In the Name field, type Layer_3.
• From the Top Marker drop-down list, choose Screed_2.
• From the Base Marker drop-down list, choose Screed_3.
• From the Lithology drop-down list, choose Limestone.
5. Click Add and do the following:
• In the Name field, type Layer_4.
• From the Top Marker drop-down list, choose Screed_3.
• From the Base Marker drop-down list, choose Decade_1.
• From the Lithology drop-down list, choose Anhydrite.
6. Click Add and do the following:
• In the Name field, type Layer_5.
• From the Top Marker drop-down list, choose Decade_1.
• From the Base Marker drop-down list, choose Decade_5.
• From the Lithology drop-down list, choose Sandstone.
7. Click Add; then click Close.
8. Select Edit/Display. The Cross Section Display Options dialog box displays.
9. Select Show Litho Intervals and click OK. The cross section displays.

10. Select File/Close to return to the base map.


11. Select Filter/Clear to clear any active sort

Creating Wellbore Diagram Cross Sections


In this procedure, you will create a wellbore diagram cross section. This is a cross
section like the previous ones, but also showing wellbore diagram data on the graph.
1. From the demo base map, select Filter/Filter By/Table Data. The Table Data
dialog box displays.
2. Choose LOG and WBD to isolate those wells that have both wellbore diagram and
log data.

The OFM administrator handbook____________________________________ Page 39


3. Click OK. The base map displays.
4. Select Analysis/Log Cross Sections/Create.
5. Click each of the wells to create a cross section; then click the right mouse button
and choose Done from the pop-up
menu. The Cross Section Legend
dialog box displays.
6. Accept the default name (A-A’) and
click OK. The cross section displays
with the selected wells.
7. Select View/Wellbore Diagram.
The wellbore diagram data displays.
8. Select Edit/Display. The Cross
Section Display Options window
pops up. Select all options, as
shown in next figure.
9. The cross section shows all required
information, along with wellbore
diagrams (see next figure).

Page 40 ____________________________________ The OFM administrator handbook


Performing Decline Case Analysis
This tutorial is designed to provide you with the necessary steps to select a specific well,
create a forecast, and plot a graph.

1. Select Filter/Clear to cancel any active filter.


2. Select Filter/Filter By/Completion. The Selections dialog box displays.
3. Select Orange_23:Li_1c and click OK. The base map displays only the selected
well. Select Filter/Group Data to load the selected well to memory and get it
ready for the analysis.
4. Select Analysis/Decline from the OFM menu bar. If the Fetkovich tips dialog
displays, dismiss it by clicking OK.
5. Select Edit/Scenario from the OFM menu bar. The Case-1 Scenario dialog box
displays.
6. From the section labeled Plot Type, select Log Rate vs. Time.
7. From the section labeled Phase, Ratio, select Oil.
8. In the section labeled Variable Association, select the following:

Variable Select from drop-down list


X axis – Date Date
Y axis – Oil Rate (bbl/d) Oil.CalDay
Cumulative Oil Mbbl) Oil.Cum

9. In the section labeled Rate Type, select the following:

Rate Type Select


Fractional Decline Rate Annual Effective
Display Forecast Rate Average Rate

10. In the section labeled Historical Regression, select the following:

Regression Type Select


Type Hyperbolic
B value Best Fit

11. Select the Forecast dialog tab.


12. In the section labeled Oil Forecast Schedule #1, select the following:

Field Select from drop-down list


Starting Time Last Historical Date
Ending Time Months from Start

13. Enter 480 in the field labeled Months.


14. Select Economic Limit and enter 10 in the field labeled bbl/d.
15. Click OK. The Decline and Forecast for Well Orange_23:Li_1c are displayed. Check
that your results match the ones shown on the next figure.

The OFM administrator handbook____________________________________ Page 41


Notes
• If you want to report forecast results, Decline Cases must be checked.
Decline Curve Analysis can be performed without checking this box, but
system functions such as @Forecast do not report case data unless Decline
Cases has been selected. The Decline Cases check box is on the Table
Manager dialog box (Edit/Project/Table Manager)
• Each forecast must be saved to a case name before creating a new forecast.
If you do not save the forecast, the analysis will be lost.
• OFM internally calculates the Calendar Day Rate based on the number of
days in each month and the Producing Day Rate based on actual number of
production days.

Page 42 ____________________________________ The OFM administrator handbook


Chapter 2 - Installation

Introduction

This chapter will show you the different procedures for successfully installing OFM.
Because the software could be used on different environments, there are many
installation options that you need to know before you decide which one is most
adequate for you. Before we start, I would like to explain some concepts. Make sure you
understand them before proceeding. The two keywords of this chapter are:

• Files Installation
• License Installation

The Files Installation is the task that consists in copying the OFM files to a disk that can
be accessed from the client PC (the workstation that will actually run OFM) and
registering the application. This disk could be a local hard disk6 or a network disk7. For
Windows (and OFM), there is no difference between them. Just that the latest is
accessed trough the network and has generally8 slower performance.
Apart from the main files copied to the directory where OFM is installed, there are some
local settings (in the client PC registry, system files) and shortcuts (icons) that are also
made by the installation process.

The License Installation is a different story. Assuming that OFM file-copying and settings
are properly done, there is still the need for correctly setting up the license before you
can run the program.

Don’t get confused by them. These two processes could be all seen as “the installation”.
However, keep the difference in mind because it will help you troubleshooting eventual
problems.

6
Could be also a ZIP/JAZ disk or even a CD-ROM, however, a hard disk is recommended.
7
By network disk we mean a disk space on another computer that is made available to qualified
users trough the network. From the client PC, this space is seen as an extra disk. The machine
sharing this space could be almost anything (Windows NT/9x, Novell, UNIX, Linux, etc.)
8
A fast server on a fast network can perform better than standard IDE hard disks.

The OFM administrator handbook____________________________________ Page 43


Files Installation

A typical installation process consists mainly in two parts:

1. The copy of files to the target directory chosen for OFM.


2. The OFM registration to the client-PC’s Windows operating system.

You need to perform both parts to successfully install OFM on a PC. If one is not done,
then either OFM or Windows will be confused if an attempt is made to run the program.

Now that we know the two parts of an installation process, we can split the available
installations in two different flavors:

• A stand-alone installation
• A client workstation installation

Stand-Alone Installation
On a stand-alone installation, the setup program performs both parts (1+2) together. It
will ask you for a folder where to copy the OFM files and will also register
the OFM application on the PC where you are installing it. In the process, you can
decide

Client Workstation Installation


On this installation, the setup program just performs the second step. It needs the OFM
files already present in a particular directory. In other words, the setup program will not
copy the OFM files again. It expects them to be available. Once you tell the installation
program where these files are, it will register OFM in the PC where you are running this
setup. The installation will also create the icons for you. At the end, it will look like a
stand-alone install, but using your previously installed OFM files.

Page 44 ____________________________________ The OFM administrator handbook


OFM available installation options
The previous paragraphs described generically the installation parts of almost any
software. This section
describes how OFM
implements them.

When you launch the


OFM installation from
the CD-ROM, there is
one step where you
must select what kind
of installation you want
to do.

The figure shows you


the three available
options.

• The Full Install is


a stand-alone install
(parts 1 + 2) of all
OFM files.
• The Custom Install is a stand-alone install (parts 1 + 2) but lets you select what
files of step 1 will be copied to the destination directory. You use this option if you
don’t want to install things such as example databases, help files, etc.
• The Workstation Install does only the second part (2). It will ask you where have
you got the OFM files installed and make all local settings pointing to them.

If you decide to install OFM in the local hard disk of the machine that will run OFM, then
you will have to pick up one of the first two ones and follow the instructions. Full Install
is the recommended one.

If you are planning to install OFM on a network disk, you will also have to select one of
these two the first time. At one point, you will need to copy the main file to the network
disk and the only choices you have to do that is by selecting a Full or Custom Install.

Notes
• In the cases where you will install to a network disk, make sure you have this disk
mapped to your PC (this means visible through a letter, such as Y:) and that you
have write privileges there. Because these setups will perform steps 1 + 2, at the
end, the installation program will register OFM in your PC and create the necessary
icons on the Start menu.
• On Windows NT/9x file servers, you could run the installation program from the
server’s console and install the files to a folder that will be accessed later by
workstations. Notice, however, that this will also register OFM on the server, as
another application that can be run from the server’s console. Normally, you keep

The OFM administrator handbook____________________________________ Page 45


servers with the minimum software installed, so think before installing to the server,
from the server.
• On Novell or UNIX servers, the installation program will not run from the server’s
console, so you will have to do it from a Windows PC and save to the server’s disk.

Installations Cases
The following pages describe four different installation cases where you will see practical
examples of the most common options.

Case 1
The next figure shows a standard plain-vanilla installation, like the one performed on
Chapter 1.

Case 1

This is all done on one PC. The setup program from the OFM CD-ROM is executed and a
Full (or Custom) installation is performed. During the process, the user selects the
C:\OFM30 (or any other local) folder as a destination. All OFM files go to that folder
(yellow arrow) and at the end, the installation program registers OFM on that PC (green
arrows). OFM becomes as another available application, through the Start menu.

Case 2
In this case, you decide to do a local install but choose as destination a directory on a
network disk.
Notice that the process is totally equivalent, with the exception that the selected
destination folder was P:\OFM30. P is not a local disk. It is a network disk, a resource
offered by a server on the network and mapped on the PC as P. The only difference

Page 46 ____________________________________ The OFM administrator handbook


with the first case is that the data saved to the P disk actually went to a server’s disk.
However, as long as this disk is available as P, OFM will run normally.
Beware that this disk will have to be available (and as P) every time you want to run
OFM. If you disconnect the workstation from the network, the OFM will not run. If your
P drive becomes available but through another letter, OFM will not run.

Case 2

Case 3
Case 2 gives you the ability to run OFM on a workstation that reads the OFM files off a
server. If you have multiple workstations, you could use OFM on all of them and make
them all read the program files from a single network disk (the OFM files are installed in
only one –probably read only- disk and shared between all workstations that run the
program). The following figure illustrates this.

Assume that a previous installation left the OFM files on the network disk P, under the
OFM30 directory.

We need to execute the installation program from the CD and select a Workstation
Install. During the process, the setup will ask the location of the OFM files. We must
enter (or browse to) P:\OFM30. The program will do the rest of the setup but will not
copy anything to the P disk. All files needed are there already. However, it registers
OFM on the workstation and creates the needed icons.

The OFM administrator handbook____________________________________ Page 47


Case 3

Case 4
Finally, the case 3 could have been done even simpler, without the original CD-ROM. A
special setup
program (called
setupws.exe –
Setup
Workstation) is
always copied
together with
the rest of the
installation files,
so just
executing this
file is enough to
install OFM from
a network disk
and perform a
Workstation
Installation.

Case 4

Page 48 ____________________________________ The OFM administrator handbook


The previous figure illustrates this case. Notice that the network folder P:\OFM30
contains not only the OFM files but also the setup program needed to setup the
workstation.

The setupws.exe will perform a workstation setup. As said before, it will ask you
where are the installed copies of OFM 3.0 files. The default location that appears is not
correct, make sure you Browse to the proper location. The following figure shows that
particular step of the process.

The OFM administrator handbook____________________________________ Page 49


OFM Licensing Implementation – Client Side

As mentioned before, one thing is installing the software files. Installing the license is a
different task. The installation of the files is somehow strait forward and almost
everyone has done it once, so it could be considered a familiar process.
On the contrary, very few people are familiar with FLEXlm and its configuration options.
This section will explain how FLEXlm works and the client side installations. The next
ones cover how FLEXlm works and the server side installations.

FLEXlm is a third party


software developed by
Globetrotter Software Inc. and
became the de-facto licensing
scheme used by most software
companies, so becoming
familiar with it could bring
some benefits, not only a
satisfactory OFM installation.

A FLEXlm license checkout


procedure is divided in two
distinctive and consecutive
steps:

• Get license information


• Check out a license

Page 50 ____________________________________ The OFM administrator handbook


License information
The figure shown explains the very first thing OFM 3.0 does when you start it: Get the
license information. The information about licensing could be given to OFM in several
places: a registry setting, a file or an environmental variable.

Depending on which one is found first, OFM will act differently. We will discuss each of
the possibilities in the following sections.

1- Registry
As seen in the previous figure, OFM first looks in the Windows registry for a string-type
key named license located in:

HKEY_CURRENT_USER\Software\Schlumberger\GeoQuest\Ofm\3.0

This key must contain a value like “M:\OFM30\license.dat”, which should be the
complete path, from the workstation’s point of view, to the license file.

An OFM installation does not create this key at all, and you should never have one
license key in your workstation’s registry, unless you manually create it. Nobody
recommends modifying your computer’s registry. Neither do I. This is an extra resource
you have (with the highest priority) to tell OFM where is the license information.

Finally, if this registry key exists and points to a non-existent file, OFM will ignore it and
continue looking for license information. If this file exists, then it will use it.

2- OFM Home directory


If there is no luck checking for a registry key, then OFM proceeds to inspect the
directory where OFM is installed and tries to find a file named license.dat. If this file
exists, then it will attempt to use it.
Beware that the normal OFM 3.0 CD installation leaves a demo license file named
license.dat in that directory and unless you remove it, OFM will find and use. This
demo file expired on January 1999, so OFM will fail to start. Make sure to remove this
file after you install OFM.

The OFM administrator handbook____________________________________ Page 51


3- LM_LICENSE_FILE environmental variable
If none of the previous steps was successful, then OFM looks for an environmental
variable named LM_LICENSE_FILE. This variable is set from different places, depending
on the Windows you are running.

• For Windows 95/98, you set it up in


the autoexec.bat file with a line like9:

SET LM_LICENSE_FILE=C:\Lics\OFMlic.dat

And you’ll have to reboot to see the


changes.

• For Windows NT, these variables are


set from the System Control Panel,
under the Environment tab. The
figure shows you an example. In NT
you don’t have to reboot to see the
changes, however is recommended
that you set this variable logged in as
an Administrator to make it available
to all other users.
In any case (Windows 9x or NT), you can
verify the existence and the value of this variable by opening a command-prompt
window and typing (notice the %%):

C:\WINDOWS>echo %LM_LICENSE_FILE%
C:\OFM30\license.dat

C:>WINDOWS>

If the variable is set, then it echoes the value of the variable. If is not set, then it just
replies with a trivial message:

C:\WINDOWS>echo %LM_LICENSE_FILE%
ECHO is on

C:>WINDOWS>

4- Default FLEXlm directory


As a last resort, OFM tries to find a file named license.dat in a directory named
FLEXlm, on the root of the C disk. In other words, it attempts to use a
C:\FLEXlm\license.dat file. If it exists, it will use it. If not, it will give a final error
message and abort.

9
Don’t insert spaces around the equal sign.

Page 52 ____________________________________ The OFM administrator handbook


X- OFM.INI file
In previous versions of the software, we used to have another way of telling OFM where
to find the license information by adding a line to the OFM.INI file. OFM 3.0 does not
honor this file (generally speaking, 32bits applications don’t use INI files). It does not
care what you have there. You could safely delete this file, if you have one left from
previous versions.

License check out


Once OFM gets the license information, it will decide what steps are needed to get a
license and attempt to check out one. The procedure to do this changes depending on
the type of license you have. In stand-alone ones, there is no license server nor network
involved. In network floating licenses, the process is more complicated.
We will discuss the available options and list their characteristics. We will also show an
example license file for each of them.

OFM supports the following licensing modes:

• Stand Alone license – DiskID


• Stand Alone license – HostID
• Stand Alone license – FlexID
• Network license served by a Windows license server
• Network license served by a UNIX license server
• Network license served by a Novell license server

Stand Alone license – DiskID


The DiskID number comes from the serial number that the operating system assigns
(randomly) to the hard disk when it is formatted. Because formatting a hard disk is not
something people do very often, this is quite stable data. This number is a hexadecimal
number, with 8 digits. Digits can be 0 to 9 and A to F, for instance 1234-ABCF.

Once OFM finds the license file, it will read it and discover that it is a DiskID license. It
will then compare the machine’s DiskID with the one in the license. It they match, OFM
will start. There is no need to “check out” a license because there is no accounting
process. Stand-alone licenses are always single user licenses.

Notes:
• This license is called stand-alone because it does not depend on anything outside
the machine itself. When a stand-alone license is requested using the DiskID
number, only that number is required by GeoQuest to issue the license.
• A license of this type is always (and can't be otherwise) a single user license.
• Because there is no need for counting the number of licenses being used, there is no
license counting method needed.
• It does not matter whether the machine has a network card or not.
• When a disk is formatted gets a unique number and users can’t change that. This
means that the license will check this number to verify that the machine is the one
specified in the license file. If the hard disk is reformatted, this serial number will
change and the license will stop working.

The OFM administrator handbook____________________________________ Page 53


• A very important point here is that when the PC has more than one disk, the license
software checks the serial number of the FIRST one (i.e., C) and that's the number
that will be used for license validation. It does not matter where OFM is installed (D,
E, network drive, etc.)
• On page 88, (Ordering a Windows server license) there are explanations on
how to get this number from a computer using the lmtools program. This is the
preferred method to get the information to design the license file.

Example of a stand alone DiskID (887f-8582) type of OFM license:

FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 uncounted 4B7E20C18F8105E9B69B \


HOSTID=DISK_SERIAL_NUM=887f8582 ck=241

The recommended setup for this license is just to place a copy of it in the OFM directory
and name it license.dat.

Stand Alone license - HostID


The HostID number comes from the network card installed in the PC. This means that in
order to use this type of license, the PC has to have a network card installed (even if is
not connected to a network). This number is assigned to the card when it is
manufactured and is a hexadecimal number, with 12 digits. Digits can be 0 to 9 and A to
F, for instance 1234ABCF1234, or 12-34-AB-CF-12-34.

Once OFM gets to the license file, it will read it and discover that this is a HostID license.
It will then compare the machine’s HostID with the one in the license. It they match,
OFM will start. Notice that there is no network communications in the process. You don’t
need to have the network card connected to a network at all. Also, there is no need to
“check out” a license because there is no accounting process. Stand-alone licenses are
always single user licenses.

Notes:
• This license is called stand-alone because it does not depend on anything outside
the machine itself.
• When a stand-alone license is issued using the HostID number, only that number is
required by GeoQuest to design the license.
• A license of this type is always (and can't be otherwise) a single user license.
• Because there is no need for counting the number of licenses being used, there is no
license counting method needed.
• The machine has to have a network card installed. It is also important to state that it
is not enough to just plug-in the card. You have to have its drivers installed, so when
OFM queries the card for its number, it can do it trough the standard Windows
libraries.
• Is does not matter whether the machine is connected to a network or not.
• Sometimes, OFM fails to read the HostID of a card, even if the drivers are properly
installed. In those cases, you may have to install the Client for Microsoft Networks
software to get it to work. There are some files in this package needed by OFM that
are not apparently present in other network software you could have installed.

Page 54 ____________________________________ The OFM administrator handbook


• Again: the HostID number is written in the hardware (the network card) and is
assigned at the factory. It is unique and follows the card. If the machine is changed
and a new network card is installed, the license will stop working. If the network
card of the machine is replaced, the license stops working. If the machine is
changed but the original network card is used, then the license will work.
• A very important point here is that when you have more than one network card, the
license checks the number of the FIRST one installed (as seen by Windows) and
that's the number that will be used.
• On page 88, (Ordering a Windows server license) there are explanations on
how to get this number from a computer using the lmtools program. This is the
preferred method to get the information to design the license file.

Example of a HostID type of stand-alone (1234-ABCF-1234) OFM license:

FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 uncounted 4BE20C18F8105E9B69B \


HOSTID=1234ABCF1234 ck=241

The recommended setup for this license is just to place a copy of it in the OFM directory
and name it license.dat.

Stand Alone license - FlexID


The FlexID number comes from a hardware key (dongle) that you plug
into the parallel port of the host computer. This means that in order to
use this type of license, the PC has to have this device connected to the
port and the necessary drivers installed. The number is assigned to the
key when it is manufactured and is a hexadecimal number, with 8 digits. Digits can be 0
to 9 and A to F, for instance B28440A2.

Once OFM finds the license file, it will read it and discover that this is a FlexID license. It
will then verify that there is a hardware key connected to the machine and that its
number matches the one in the license file. There is no need to “check out” a license
because there is no accounting process. Stand-alone licenses are always single user
licenses.

Notes:
• This license is called also Stand Alone because it does not depend on anything
outside the machine itself, except for the hardware key and its drivers.
• When a stand-alone license is issued using the FlexID number, GeoQuest requires no
information from the machine. The license file and the hardware key will be
delivered together and will obviously match.
• A license of this type is always (and can't be otherwise) a single user license.
• Because there is no need for counting the number of licenses being used, there is no
license counting method needed.
• The machine has to have the key plugged-in. It is also important to state that it is
not enough just to plug it in. You have to have its drivers installed, so when OFM
queries for the key, it can access it correctly. There is a section ahead explaining
how to set up these drivers.
• Is does not matter whether the machine is connected to a network or not.

The OFM administrator handbook____________________________________ Page 55


Example of a FlexID (b28440a2) type of stand-alone OFM license:

FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 uncounted 4B7E20C18F8105E9B69B \


HOSTID=FLEXID=7-B28440A2 ck=241

The recommended setup for this license is just to place a copy of it in the OFM directory
and name it license.dat.

Network license served by a Windows license server


In this scheme, we will assume that there is a machine (running Windows NT or 9x)
acting as a license server10 and ready to manage OFM licenses among different clients.
All communications between an OFM workstation and a Windows license server are
done over the TCP/IP protocol. This implies that you have to have this protocol
installed and working on the server and the client workstation.

When OFM is started, it first tries to find the licensing information. At one point, it will
find a license file11 similar to the following one:

SERVER license_server 00605201f7e6 1701


DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF ck=36

Notice that this license has different format. There is a SERVER line with very important
information. OFM learns from this line that it should contact the server named
license_server on the TCP port 1701. It also knows that there is a special process
(daemon) serving OFM32, the license needed. The name of this “private” servant is
lmgrd.slb. OFM knows that just knocking on the “door” number 1701 of the
license_server “house” is not enough. It will also have to address the request to “Mr.
lmgrd.slb” in person, to ask for a license.

Notice that this license contains other information (such as the DAEMON line), but this
is relevant to the license server (the program running on the license_server machine).
OFM, as a client, does not need anything else.

If you understood the process, then you will agree with me that:
• The client machine (PC with OFM) should be able to communicate to the
license server. This needs a working TCP/IP network connection.
• The license server process should be up and running in the server machine.
If not, OFM will not receive an answer and will refuse to start.

Notes:
• There is communication between OFM and the license server every few
minutes. This requires minimum network resources (a few bytes per minute)
but also a constant connection between the two machines. If the network

10
We will cover the server installation later in this chapter
11
It will find a physical file if is told to do that. When OFM is directly pointed to the server, it just
checks out a license from the server with no need for the actual license file.

Page 56 ____________________________________ The OFM administrator handbook


connection is lost while OFM is being used, a few minutes later, the user will
be notified and asked to exit the program.
• If you point OFM to a license file, you need to ensure that the parameters of
this file (such as server name or port number) are equal to the ones of the
license file used by the server. If one of them is modified (say you want to
use the port 1700), the other must be modified too.
• With NT servers, you could set the LM_LICENSE_FILE to point directly to the
server. In this case, you don’t need a copy of the license file available to
OFM. For instance, if you specify the license information by setting
LM_LICENSE_FILE=1700@OFMserver, then the client does not need
access to the actual license file. Using this variable, you have only one license
file being accessed by the server program.
• In FLEXlm version 6.x, there is a default port (27000). If you suppress the
port number from the license file, then the server will be tied to this default
port and you could simplify your variable just to:
LM_LICENSE_FILE=@OFMserver, without specifying the port. I personally
experienced some problems using default ports, which fixed themselves after
specifying a 1700 port.

The recommended setup for this license is just to set up the environmental variable
LM_LICENSE_FILE to the port@server as required. See the corresponding section on
page 52.

Network license served by a UNIX license server


In this scheme, we will assume that there is a machine (running one of the supported
UNIX operating systems12) acting as a license server and ready to manage OFM licenses
among different clients. All communications between an OFM workstation and a UNIX
license server are done over the TCP/IP protocol. This implies that you have to have this
protocol installed and working on the server and the client workstation.

When OFM is started, it first tries to find the licensing information. At one point, it will
find a license file similar to the next one:

SERVER license_server 00605201f7e6 1701


DAEMON lmgrd.slb /usr/local/flexlm/bin/lmgrd.slb
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF ck=36

Notice that this license looks a lot like the NT format. There is a SERVER line with very
important information. OFM learns from this line that it should contact the server named
license_server on the port 1701. It also knows that there is a special process
(daemon) serving OFM32 (the license name for OFM 3.0). The name of this “private”
servant is lmgrd.slb. OFM knows that just knocking on the “door” number 1701 of the
license_server “house” is not enough. It will also have to address the request to “Mr.
lmgrd.slb” in person, to request a license.

12
Supported UNIX versions are Solaris, Irix and AIX. AIX server software is included only with
OFM 3.1 distribution CD.

The OFM administrator handbook____________________________________ Page 57


Notice that this license contains more information (such as the DAEMON line), but this
is relevant to the license server (the program running on the license_server machine).
OFM, as a client, does not need anything else. In fact, you should notice that this is the
only line where we have differences between an NT and UNIX formats.

Similar comments apply:


• The client machine (PC with OFM) should be able to communicate to the
license server. This needs a working TCP/IP network connection.
• The license server process should be up and running on the server machine.
If not, OFM will not receive an answer and will refuse to start.
Notes:
• There is communication between OFM and the license server every few
minutes. This requires minimum network resources (a few bytes per minute)
but a constant connection between the two machines. If the network
connection is lost while OFM is being used, a few minutes later, the user will
be notified and asked to exit the program.
• If you point OFM to a license file, you need to ensure that the parameters of
this file (such as server name or port number) are equal to the ones in the
license file used by the server. If one of them is modified (say you want to
use the port 1700), the other must be modified too.
• With UNIX servers, you could set the LM_LICENSE_FILE to point directly to
the server. In this case, you don’t need a copy of the license file available to
OFM. Example LM_LICENSE_FILE = 1700@OFMserver
• In FLEXlm 6, there is a default port (27000). If you suppress the port number
from the license file, then the server will be tied to this default port and you
could simplify your variable just to LM_LICENSE_FILE=@OFMserver,
without specifying the port. I personally experienced some problems using
default ports, which fixed themselves after specifying a 1700 port.
• OFM supports only Solaris (Sun), AIX (IBM) and Irix (SGI) versions of UNIX.

The recommended setup for this license is just to set up the environmental variable
LM_LICENSE_FILE to the port@server as required. See the corresponding section on
page 52.

Network license served by a Novell license server


In this scheme, we will assume that there is a machine (running Novell Operating
System) acting as a license server and ready to manage OFM licenses among different
clients. Communications to Novell license servers is done over the SPX/IPX protocol. This
implies that you have to have this protocol installed and working on the server and the
client workstation. There is no need for TCP/IP communications, so if you don’t have
this protocol installed, don’t worry.
When OFM is started, it first tries to find the licensing information. At one point, it will
find a license file similar to the following one:

SERVER novell1 00605201f7e6 SPX:1234@000000000001#0001002


DAEMON lmgrd.slb lmgrdslb.nlm
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 4 CB4ED06134F890C45FEF ck=128

Page 58 ____________________________________ The OFM administrator handbook


Notice that this license is very different than the ones before. The communication to the
Novell server is done over the SPX/IPX protocol.

When you use SPX/IPX, then you have to set an environmental variable in the OFM
workstations.

FLEXLM_COMM_TRANSPORT=SPX

Remember that you set it in the autoexec.bat (for Windows 9x) or in the System control
panel (for Windows NT), as explained on page 52. If you don’t set it, your workstation
will fail trying to communicate with the server. Notice also that there are no spaces
around the equal sign. If you add spaces, the check could fail.

Let’s take a closer look to the file. The first line ends with the IPX network number of
the server (0001002), so OFM can find it on the network. Notice that the FEATURE line
is the same as always. The same process (named lmgrd.slb) will be dispatching the
OFM32 licenses. The only difference is that this process is installed on a Novell server
(but OFM does not care).

Notice that this license contains more information (such as the DAEMON line), but this
is relevant to the license server (the program running on the novell1 machine). OFM,
as a client, does not need anything else.

The equivalent of the TCP port in Novell is an SPX socket. The number is also specified
in the license after de SPX keyword. In the example given (and most of the time), this
number is 1234. Leave this default socket number. Although you can change it, it is
very rare that you have to do that.

Similar comments apply:


• You need a working network connection between a workstation and the
server.
• OFM supports Novell license server only through the SPX/IPX protocol.
• The license server process should be up and running in the server machine.
If not, OFM will not receive an answer and will refuse to start.
Notes:
• There is communication between OFM and the license server every few
minutes. This requires minimum network resources (a few bytes per minute)
but a constant connection between the two machines. If the network
connection is lost while OFM is being used, a few minutes later, the user will
be notified and asked to exit the program.
• You can’t set the LM_LICENSE_FILE to port@server. You can, however,
set it to the complete path to a license file.

The recommended setup for this license is just to place a copy of it in the OFM directory
and name it license.dat.

The OFM administrator handbook____________________________________ Page 59


Installing the FlexID drivers

These drivers are the ones needed by the hardware key (see figure), also
called dongle or Sentinel. If your OFM was licensed using this device,
you should install these drivers before you can successfully run OFM. A
third-party company named Rainbow Technologies, Inc. (www.rnbo.com)
maintains this software. The installation files are present on the OFM CD under the
\Flexlm\Flexid7 directory.
Depending on your operating system (the one of the machine that will run OFM), you
have to select the correct folder: Win_nt (for Windows NT) or Win_95 (for Windows
95 and 98).

Windows NT installation
Because NT runs on different hardware platforms, there are different installation
programs:

• SetupAXP.exe for DEC Alpha computers


• SetupX86.exe for Intel computers (Pentium and x86 chips)
• SetupMPS.exe for MIPS computers
• SetupPPC.exe for PowerPC computers

Don’t get confused by them. There is a batch file that will recognize what hardware you
have and start the appropriate setup program. The file is the install.bat and that is the
one you should run to start the installation process. I just wanted to mention them
separately, in case that the install.bat fails the recognition and you have to manually run
the setup.

To install the NT drivers, follow these steps:


• Open a command prompt window, go to the \Flexlm\Flexid7\Win_nt directory
of the CD and run the install batch file.

You can customize your setup by passing arguments to the install.bat program. You
do that only if you know what you are doing. If this is the first time you do a FlexID
installation, don’t give any arguments. However, if you are interested, these are the
options:

>INSTALL /q Quiet mode.


Normal dialogs described below are not displayed.
Error messages are displayed.

>INSTALL /p xxx Path, where xxx is the path of files to be installed.


Specify the path of files to be installed.
Otherwise, files will be copied from the default directory.

Page 60 ____________________________________ The OFM administrator handbook


>INSTALL /o Overwrite the existing Sentinel Driver. By default, if
the existing driver is newer then the one to be installed,
the installer will not copy over it.

• A window with the title bar Sentinel Driver Setup Program is displayed.
• Select Functions/Install Sentinel Driver from the menu bar.
• A dialog box with the default path for the NT driver is displayed. Change the drive
letter if necessary and click OK.
• The Sentinel Driver and associated files are copied to the hard disk.
• If the driver installation is successful, a dialog box with the message "Sentinel Driver
Files Copied Successfully".
• When the installation is complete, a dialog box with the message “Driver Installed
Restart your system" is displayed.
• OK to continue.
• Restart your computer.

Reconfiguration of the NT driver


If
you need to change the configuration of the driver, follow these steps:
• Open your NT’s Control Panel.
• In the Control Panel double click on Drivers.
• Select Sentinel for i386 System in the installed driver list box.
• Click the Setup button.
• Click the Edit button to edit an existing parallel port setting or click the Add button
to add a new parallel port setting.
• Select OK after you finish the port configuration.
• A dialog box with the message "Your driver setting has changed" is displayed. You
will need to exit and restart Windows NT so that the new setting can take effect."
• If you have any other application running at the background with unsaved data,
choose "Don't Restart Now". Quit all the application and restart Windows NT,
Otherwise select "Restart Now".

There is plenty of information on the \Flexlm\Flexid7\readme.txt file present on the CD


about troubleshooting and uninstalling the software.

Windows 95/98 installation


Open an MS-DOS window, go to the \Flexlm\Flexid7\Win_95 directory of the CD
and run the SENTW95.EXE file.

You can customize your setup by passing arguments to the SENTW95.EXE program.
You do that only if you know what you are doing. The first time, you normally don’t
give any arguments. However, if you are interested, these are the options:

>SENTW95 /q Quiet mode.


Normal dialogs described below are not displayed.
Error messages are displayed.

>SENTW95 /p xxx Path, where xxx is the path of files to be installed.

The OFM administrator handbook____________________________________ Page 61


Specify the path of files to be installed.
Otherwise, files will be copied from the default directory.

>SENTW95 /o Overwrite the existing Sentinel Driver. By default, if


the existing driver is newer then the one to be installed,
the installer will not copy over it.

• A window with the title bar Sentinel Driver Setup Program is displayed.
• Select Functions/Install Sentinel Driver from the menu.
• Click OK when the "Driver installed! Restart your system." message appears.
Restart Windows.

Reconfiguration of the Windows 95/98 driver


If you need to change the configuration of the driver, follow these steps:
• Run the SENTW95.EXE file located in the WINDOWS\SYSTEM\RNBOSENT
subdirectory.
• Select Functions/Configure Sentinel Driver from the menu.
• Click the Edit button to edit an existing parallel port setting or click the Add button
to add a new parallel port setting.
• Select OK after you finish the port configuration.
• Restart Windows for the changes to take effect.

There is plenty of information on the readme.txt file present on the CD about


troubleshooting and uninstalling the software.

FLEXlm

FLEXlm is a third party software developed by Globetrotter Software Inc13. and became
the de-facto licensing scheme used by most software companies. This software is in
charge of managing OFM licenses. The previous sections described all supported
licensing modes. This one will explain FLEXlm parts and how they relate together and
the following ones will cover the server side installation procedures.

The are four main components of FLEXlm and they are:


1. License manager daemon (Globetrotter’s software). This daemon is named
lmgrd must be always running on the server machine. You can download the
latest version of lmgrd from Globetrotter’s web.
2. Vendor daemon (GeoQuest – Globetrotter software). This daemon is named
lmgrd.slb and it’s started (on demand) by the lmgrd daemon. This software is
designed for GeoQuest products and distributed only by GeoQuest.
3. License file (provided by GeoQuest), usually named license.dat.

13
Globetrotter’s web site can be checked at www.globetrotter.com.

Page 62 ____________________________________ The OFM administrator handbook


4. Application program (OFM and its optional modules linked with Globetrotter
client libraries)

The parts that get involved in the process vary, depending on the type of license you
have. The program (OFM) has only one version that supports all licensing modes. The
code is the same, disregarding the licensing method chosen by the end user.
The simplest schemes are the stand-alone licenses (DiskID, HostID and FlexID). On
those, there is no license server or network involved. They are also single user licenses,
so there is no need to count how many copies of the software are being used.
The other model is the network license that can be shared by users connected to a
network. This is a more complex system (requiring a license server machine, able to
account the seats being used) but by far, more flexible in network environments.

Stand-alone license process


The relation between the parts involved is shown in the following figure, with a brief
discussion of the steps involved in a network license check.

FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 B4ED06134F890C45FEF ck=36


HOSTID=123245432345432AB ck=123

1. OFM starts and by one of the four previously described methods (Registry,
LM_LICENSE_FILE, etc.) it finds the license file.
2. OFM scans the license file and discovers that:
• It is a stand-alone license.
• The needed OFM32 feature is present on the license file.
• Depending on the license, OFM checks that the numbers in the license match the
hardware number of the PC where OFM is starting. The example shows a license
tied to the HostID of the machine. OFM checks that number on the PC’s
hardware (the same procedure is carried out for a DiskID or a FlexID license).
3. If the number matches that of the license, OFM starts normally, if not, aborts with
an error message in the Troubleshooting FLEXlm window.
4. OFM verifies regularly that the program is legally running (i.e., re-checking the
license numbers). For DiskID licenses, this does not make much sense (you can’t
reformat your hard drive while OFM is running!). However, when using HostID (the
HostID could come from a PCMCIA portable network card) or FlexID numbers, OFM
verifies that the hardware remains attached to the PC.
Notes

The OFM administrator handbook____________________________________ Page 63


• The license re-check is transparent to the user unless there is a problem. If the
license numbers can’t be validated, the OFM user will be notified and invited to
exit the software. Beware with the PCMCIA card example because notebooks
tend to suspend the power of these devices to save energy. An un-powered
PCMCIA network card reports an erratic HostID and that will confuse OFM.
• Notice that this process involves only software included in OFM 3.0 and does not
need anything else outside the machine (except the case of a FlexID license,
which requires the hardware key connected and its drivers).
• These are very simple configurations an errors found are normally due to the use
of an incorrect or a wrongly edited license file.
• In all the stand-alone cases, the recommended setup is to have a file named
license.dat in the OFM directory.
• Notice that out of the four FLEXlm parts mentioned only the last two ones get
involved in stand-alone licenses.

Network Licenses process


The following section describes a general scenario where OFM starts and needs to check
a license out of a license server through the network14. All components of FLEXlm are
involved in this process and must be properly configured. Also, daemons are introduced
to describe the process. More details about them will be given afterwards.

SERVER Lic_Server1 00605201f7e6 1701


DAEMON lmgrd.slb C:\Flexlm\lmgrdslb.exe
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 B4ED06134F890C45FEF ck=36

1. OFM starts and by one of the four methods described (Registry, LM_LICENSE_FILE,
etc.) it finds the license file.

14
This is true in almost all setups. However, it is possible to run OFM and the server software on
one single machine. In this particular case, the process is similar, with the exception that the
external parts of the network (patch cables, hubs, etc) are not needed. Only the network card
and software. OFM and FLEXlm do not see any difference (just that they both run on the same
PC). All software behaves the same, with the exception that OFM will contact the same machine
for the license.

Page 64 ____________________________________ The OFM administrator handbook


2. OFM scans the license file and discovers that:
• It is a license managed by a server.
• The needed OFM32 feature is managed by the lmgrd.slb daemon.
• The server to contact is Lic_Server1 and the port is 1701
• OFM contacts the Lic_Server1 on port 1701 and sends a request for one
OFM32 license directed to lmgrd.slb.
• The lmgrd daemon receives the request and passes the message to lmgrd.slb.
If lmgrd.slb is not running, it starts it. lmgrd.slb verifies that there is a license
available and checks it out for the client requesting it.
3. lmgrd.slb writes down to a log file the request. It writes the time, license, user and
the machine name that requested it. The following is a typical log15:

10:01:01 (lmgrd.slb) OUT: "OFM32" Peter@Workstation


12:55:45 (lmgrd.slb) IN: "OFM32" Peter@Workstation
13:56:44 (lmgrd.slb) OUT: "OFM32" Peter@Workstation
15:28:35 (lmgrd.slb) IN: "OFM32" Peter@Workstation

• lmgrd.slb sends the OK to the Workstation PC.


4. OFM receives the OK and starts normally.
5. OFM regularly confirms that is still using the OFM license to Lic_Server1.
Lic_server1 also confirms that it’s using a legal license. This is a very light
conversation and requires very little network bandwidth. If OFM can’t contact
Lic_Server1 or receives a negative confirmation, it notifies and asks the user to
shut down OFM. On the contrary, if everything is OK, the user does not see anything
of this happening because the process is completely transparent.
• When the user (say, Peter) closes OFM, OFM sends a message to (lmgrd.slb
contacting Lic_Server1 on port 1701) notifying that is freeing an OFM32
license. The message is received by lmgrd and passed down to lmgrd.slb who
logs the license return and makes it available again. Notice the previous log
example, where Peter started and closed twice an OFM 3.0 copy in his PC,
named Workstation.

Notes:
• If the daemons (server software) are shut down while users are using the
software, after a few minutes they will be invited to close their programs.
However, if the daemons are re-started before this happens, the license
count will be re-set to zero: some users will be using the program and the
daemon knows nothing about them. This situation fixes itself because when
OFM connects to the server to confirm the use of its license, the daemon
discovers the user and checks out a license. In a few minutes, all users will
be discovered and counted by the daemon.
• Notice that this license file includes the DAEMON line that is only relevant to
the server.

DAEMON lmgrd.slb C:\Flexlm\lmgrdslb.exe

When lmgrd (the one that the administrator loads from the console) receives
a request for lmgrd.slb, it will check if that daemon is running. If is not, then

15
OUT means a user has taken a license. IN means that a user has returned a license.

The OFM administrator handbook____________________________________ Page 65


lmgrd will start it. For this, it will get all needed information from the
DAEMON line. Notice that this line is not used by the client, but tells the
lmgrd running on the server which is the file that contains the lmgrd.slb
daemon and where is physically located.
In our example (a Windows server), the file that contains the daemon is
lmgrdslb.exe and its located in the C:\Flexlm directory. Again, this line does
not have any meaning to the client. C:\Flexlm\license.dat means nothing to
the client! The path has to be correct for the server.
• It should be clear now how important is the license file to the client PC and
to the license server. It should also be stressed that it is very important that
both parts access equivalent (or even the same) files. For example:
If the license server reads port 1701, it will receive requests on that port.
If OFM, as a client, reads 1700 (from a non updated license file) then it
attempt to contact the server on that port and never manage to get to
the server daemon.

• On Windows and UNIX both the lmgrd and lmgrd.slb are in two different
executable files. In the Novell implementation, both are contained in a single
NetWare Loadable Module (NLM) file: the LMGRDSLB.NLM

Combining licenses and daemons – Flexibility and


Redundancy
So far, we have seen many examples of network license files. However, before we go
into the details of each the supported server platforms, there are still many comments
to do about them. These are given for you to clarify a bit more how FLEXlm works and
also to comment some of the available options you have. Beware that you will have to
check with GeoQuest for some particular features that might or might not be supported.

Single license file and multiple daemons


First of all, a license file describes and includes all that could be managed by one (and
only one) lmgrd. Because the behavior of lmgrd is described in the SERVER line, any
license file can have only one16 SERVER line.
However, you could have multiple license servers (multiple instances of lmgrd) running
on one physical machine. Each one will have it’s own license file. Huggh?

Inspect this file:

SERVER Lic_Server1 00605201f7e6 1701


DAEMON lmgrd.slb C:\Flexlm\lmgrdslb.exe
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 B4ED06134F890C45FEF ck=36

The administrator will start17 the lmgrd daemon with this license file. The daemon will
hook up to port 1701 and wait there for requests. So far, the only license it can take
care of is OFM32.

16
The only exception is when the file is designed for a server cluster, to implement redundancy.
17
How lmgrd is started (or stopped), depends on the server platform. For Novell and UNIX, it is
started with a command from a terminal. In Windows, there is a control panel to do that.

Page 66 ____________________________________ The OFM administrator handbook


After starting lmgrd with this license file, the “licensing accounting department” will look
like:

lmgrd
Port 1701

lmgrd.slb

Now, take a look to the following one18:

*********************
** SERVER Information
*********************
SERVER criollo-arg 00605301f7e6 1700

*********************
** lmgrd.slb Info
*********************
DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe

** OFM 2.2 Licenses


FEATURE OFM lmgrd.slb 2.100 1-jul-99 2 CB4E06134F890C45FEF ck=36

** QLA 3.0 Licenses


FEATURE QLA lmgrd.slb 3.000 1-jul-2001 1 3CD4D815DE122CF4E08 ck=32
** OFM 3.0 licenses
FEATURE OFM32 lmgrd.slb 3.2 1-jul-2001 3 5EAD31C6383 ck=115
FEATURE OFMMBAL lmgrd.slb 3.2 1-jul-2001 3 14401C55D53 ck=84
FEATURE OFMBA lmgrd.slb 3.2 1-jul-2001 3 404551C6354 ck=55

*********************
** lmgrd.grt Info
*********************
DAEMON lmgrd.grt c:\flexlm\lmgrd.grt.exe

** Eclipse Licenses
FEATURE eclipse100 lmgrd.grt 98.000 1-jul-2001 1 6CA90018AD1650 ck=201
FEATURE unencodedhmd lmgrd.grt 98.000 1-jul-2001 1 F03E5138AC05 ck=247
FEATURE e300 lmgrd.grt 98.000 1-jul-2001 1 FCF3F0914D5A1F42A3B ck=61
FEATURE grid lmgrd.grt 98.000 1-jul-2001 1 8C03B0F11BE1999AD6F ck=55
FEATURE pvt lmgrd.grt 98.000 1-jul-2001 1 ACC39091939F1CEB7B7 ck=17
FEATURE weltest lmgrd.grt 98.000 1-jul-2001 1 1C33B0BB94F7CD2 ck=251

18
Anything starting with * is considered a comment. This is a nice trick to make your license files
more readable.

The OFM administrator handbook____________________________________ Page 67


FEATURE wsim lmgrd.grt 98.000 1-jul-2001 1 8C73908104E118AA476 ck=214
FEATURE graf lmgrd.grt 98.000 1-jul-2001 1 7CA3A0712161999A769 ck=7
FEATURE pseudo lmgrd.grt 98.000 1-jul-2001 1 CC53C0F1242AC698534 ck=1

First of all, we have the SERVER line, which basically describes how the main daemon
(lmgrd) will start and in what machine. The machine name (criollo-arg) and TCP/IP
port (1700) are useful for license clients, but also extremely important for the server.
When you start the lmgrd with this license file, lmgrd reads this server line to verify
that it is being started on the correct machine (this line includes the hostname –criollo-
arg- and its HostID -00605301f7e6-) but also the port number it should hook up to
(1700).
Lmgrd does not administer licenses. It is like the receptionist for the real workers:
the vendor daemons.
Then comes the vendor daemons’ information. The keyword to describe them is either
DAEMON or VENDOR19. The first one describes our familiar lmgrd.slb, which is the
one that manages OFM. Notice that it also manages QLA® (another GeoQuest
program). You can see who will be asking for this daemon by analyzing the FEATURE
lines. Verify the OFM, QLA and OFM32 FEATURE lines. They are all managed by
lmgrd.slb.

What it is interesting is that the same lmgrd on port 1700 can receive requests for
many vendor daemons. Notice a new one named lmgrd.grt. This is the vendor daemon
that administers all Eclipse® licenses. Take a close look to the Eclipse FEATURE lines.
They all specify this daemon as their “accountant”.

So, in summary, when you start the lmgrd daemon with this license file, it will start
receiving requests on port 1700 for two different daemons: lmgrd.slb and lmgrd.grt.
All this will happen on one machine, the gaucho-arg, which HostID is 00605301f7e6.
You can’t start this license on another physical machine.
After starting lmgrd with this license file, the “licensing accounting department” will look
like:

lmgrd
1700

lmgrd.slb lmgrd.grt

Multiple license files and multiple daemons


As mentioned before, nothing stops you from starting multiple lmgrds on one machine.
However, each one will have to be started with it’s own license file. Also, the SERVER
line of each file will have to specify different ports. You can’t start two different lmgrds
on the same port. The main thing you have to remember is that you can have many

19
VENDOR keyword is new to FLEXlm 6.x. Previous versions used DAEMON exclusively.

Page 68 ____________________________________ The OFM administrator handbook


lmgrds running, but you can have only one vendor daemon. Lmgrd.slb can be started
only once by one of the lmgrds. If another lmgrd attempts to start a second
lmgrd.slb, the operation will fail. This prevents duplicating licenses by just running
another instance of the license manager, on the same machine with the same licenses!

So, the previous license file could have been split into two. The first lmgrd could be
started with this license file:

*********************
** SERVER Information
*********************
SERVER criollo-arg 00605301f7e6 1700

*********************
** lmgrd.slb Info
*********************
DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe

** OFM 2.2 Licenses


FEATURE OFM lmgrd.slb 2.100 1-jul-99 2 CB4E06134F890C45FEF ck=36

** QLA 3.0 Licenses


FEATURE QLA lmgrd.slb 3.000 1-jul-2001 1 3CD4D815DE122CF4E08 ck=32

** OFM 3.0 licenses


FEATURE OFM32 lmgrd.slb 3.2 1-jul-2001 3 5EAD31C6383 ck=115
FEATURE OFMMBAL lmgrd.slb 3.2 1-jul-2001 3 14401C55D53 ck=84
FEATURE OFMBA lmgrd.slb 3.2 1-jul-2001 3 404551C6354 ck=55

The second instance of lmgrd can then be started with this one

*********************
** SERVER Information
*********************
SERVER criollo-arg 00605301f7e6 1701

*********************
** lmgrd.grt Info
*********************
DAEMON lmgrd.grt c:\flexlm\lmgrd.grt.exe

** Eclipse Licenses
FEATURE eclipse100 lmgrd.grt 98.000 1-jul-2001 1 6CA90018AD1650 ck=201
FEATURE unencodedhmd lmgrd.grt 98.000 1-jul-2001 1 F03E5138AC05 ck=247
FEATURE e300 lmgrd.grt 98.000 1-jul-2001 1 FCF3F0914D5A1F42A3B ck=61
FEATURE grid lmgrd.grt 98.000 1-jul-2001 1 8C03B0F11BE1999AD6F ck=55
FEATURE pvt lmgrd.grt 98.000 1-jul-2001 1 ACC39091939F1CEB7B7 ck=17
FEATURE weltest lmgrd.grt 98.000 1-jul-2001 1 1C33B0BB94F7CD2 ck=251
FEATURE wsim lmgrd.grt 98.000 1-jul-2001 1 8C73908104E118AA476 ck=214
FEATURE graf lmgrd.grt 98.000 1-jul-2001 1 7CA3A0712161999A769 ck=7
FEATURE fill lmgrd.grt 98.000 1-jul-2001 1 7C63C071120298FA277 ck=162
FEATURE edit lmgrd.grt 98.000 1-jul-2001 1 7C23705109CA9C19D7F ck=223
FEATURE vfp lmgrd.grt 98.000 1-jul-2001 1 3CE3A0D105AFDC8BBB7 ck=32

The OFM administrator handbook____________________________________ Page 69


FEATURE pseudo lmgrd.grt 98.000 1-jul-2001 1 CC53C0F1242AC698534 ck=1

Now pay close attention to this scenario. The first copy of lmgrd will be receiving
requests on port 1700 and can only serve lmgrd.slb requests. If and Eclipse program
attempts to connect this daemon, it will not get any license.
The second lmgrd is started on the same machine, but on port 1701. This instance
could serve only requests for the lmgrd.grt daemon. If OFM tries to get a license from
this port, it will not receive a valid license.

For OFM/QLA users, you could setup LM_LICENSE_FILE=1700@criollo-arg. For Eclipse


users, you should set up their variable to LM_LICENSE_FILE=1701@criollo-arg. Of
course, you could also place a copy of the respective license file and use any of the
other methods20 mentioned before (Registry, LM_LICENSE_FILE, license.dat file, etc).
After starting each lmgrd with its license file, the “licensing accounting department” will
look like:

lmgrd lmgrd
1701 1700

lmgrd.grt lmgrd.slb

Combo LM_LICENSE_FILE variables


(I hope) you can foresee a problem here. What if you decide to have both programs
(OFM and Eclipse) in one PC? Because both need different settings for the
LM_LICENSE_FILE variable (each license is being served on a different port), you can’t
re-set it before using each software. The solution is to combine both in one “combo”
variable. You can create a variable such as this one:

LM_LICENSE_FILE = 1700@criollo-arg ; 1701@criollo-arg

The clients (OFM) normally scan through this variable and can recognize the several
possible values if you separate them with a semicolon (“;”). It is very important to see
that there is one space at each side of the division symbol. Also, the semicolon works for
a Windows client21. There is no limit on the number of options you can have. However,

20
Eclipse finds its license information only trough the LM_LICENSE_FILE, usually set by the eclrc
macro. Please refer to Eclipse documentation for further information regarding Eclipse software.
21
OFM runs only on Windows. For programs that use FLEXlm and run on other operating
systems, there are different ways of combining values in the variable. In UNIX, you need a colon
(“:”), in VMS a space (“ ”).

Page 70 ____________________________________ The OFM administrator handbook


remember that the operating system puts a limit on the environmental variables size
(MS-DOS used to have a 256 bytes limit. Windows, I don’t know).

Another application of a multi-valued LM_LICENSE_FILE variable is for users who have


other packages installed on their PCs that are also licensed with FLEXlm. The classic
example is GeoGraphix programs, which also need an LM_LICENSE_FILE variable like

LM_LICENSE_FILE = D:\GeoDir\License\ggxlic.dat

If that is the case, when OFM starts, it will attempt to get the license information. If it
gets to this variable (because none of the previous methods worked – registry or
license.dat file), then it will try to get the OFM license from the GeoGraphix file. That
won’t work. To complicate things a bit more, the syntax of this file is different from ours,
so you can’t add the OFM features there and have one license file for everyone. You
have to modify this variable so it will satisfy both programs. You could modify it to:

LM_LICENSE_FILE = D:\GeoDir\License\ggxlic.dat ; 1700@criollo-arg

Or

LM_LICENSE_FILE = D:\GeoDir\License\ggxlic.dat ; C:\OFM\OFMlic.dat

That should make them work. Remember that OFM checks for a license.dat file on the
OFM directory. If you place a license there, then OFM will use and it will never get to the
point of the LM_LICENSE_FILE variable. You have many options. Pick up the most
adequate for you and your client.

Simple redundancy
Why not distribute OFM licenses over several servers and use the LM_LICENSE_FILE to
implement some kind redundancy?
Say you have a server (criollo-arg) managing five OFM licenses and also another
server (gaucho-arg) managing another three. Then you can set the variable to

LM_LICENSE_FILE = 1700@criollo-arg ; 1700@gaucho-arg

Your OFM clients will try to get a license from criollo-arg. If there aren’t any licenses
available there (or the server does not respond), then they will check on gaucho-arg.
Beware that if criollo-arg goes down, then only three licenses will be available. In other
words, if one server goes down, all its licenses go with it.

However, suppose that gaucho-arg is in another location (connected through a WAN).


Then when all you local licenses (the five managed by criollo-arg) are being used, you
could attempt to get one (if it is free) from a remote location (the ones managed by
gaucho-arg). For the people in the remote location, you could set their variables in the
same way, but reversing the sequence of options. If there are three users there, a
fourth could start OFM using one of your local licenses.

Remember that this is not redundancy, strictly speaking. It is just a way of using up all
your licenses.

The OFM administrator handbook____________________________________ Page 71


Real redundancy
FLEXlm allows you to implement full redundancy by creating a three-servers cluster.
There are some limitations for this configuration, such as the one that imposes that the
three servers must be on the same TCP/IP sub-net. The setup for this kind of operation
is just mentioned here and will not be covered. Refer to the FLEXlm manual22 and to
GeoQuest to verify that server redundancy scheme is being supported for your particular
case.

FLEXlm parts - Summary


Let’s summarize the four FLEXlm parts mentioned above.

License Manager daemon (always: lmgrd)


The license manager daemon handles the initial contact with the client application
programs (OFM), passing the connection on to the appropriate vendor daemon
(lmgrd.slb, lmgrd.grt, etc.). It also starts and restarts these daemons. The lmgrd runs
on the computer chosen to be the license server. The daemon is contained in an
executable file, depending on the operating system of the server that will run on
(lmgrd.exe for Windows, lmgrdslb.nlm for Novell and lmgrd for UNIX).

Vendor Daemon (for OFM: lmgrd.slb)


In FLEXlm, licenses are granted by running processes (unless they are standalone, in
which case they need only read the license file to run). Each application being licensed
through FLEXlm on the network refers to a particular license accounting process and
many share it. This process is called the "vendor daemon." The vendor daemon keeps
track of how many licenses are checked out and who requested them. This daemon runs
on the computer chosen to be the license server. OFM uses a vendor daemon named
lmgrd.slb, and it is inside the file lmgrdslb.exe (in Windows), LMGRDSLB.NLM (in Novell)
or lmgrd.slb (in UNIX).
There are other GeoQuest programs that will use the same daemon, such as QLA.
As a counterpart, there are also other GeoQuest (vendor) daemons. For instance, most
of the Reservoir Technologies software (such as Eclipse) uses the lmgrd.grt daemon.

License File (license.dat)


Licensing data is stored in a text file called the "license file." Only GeoQuest creates this
file and it is edited and installed by the license administrator. It contains information
about the server nodes and vendor daemons, and at least one line of data for each
licensed product. For OFM, you can have up to three FEATURE lines: one for OFM
(OFM32), one for the Back Allocation (OFMBA) module and one for the Material Balance
(MATBAL) module.

Application Program (OFM)


The application program (OFM) using FLEXlm is linked with special modules (called the
FLEXlm client library) that provides the communication with the license server. This is
the part of the software that handles all the license tasks, such as getting the license
information and checking out (and in) the licenses as needed.

22
You can access the latest FLEXlm user’s manual at http://www.globetrotter.com/manual.htm

Page 72 ____________________________________ The OFM administrator handbook


Version Conflicts – OFM uses FLEXlm 6.x
As you can see, there are three software parts involved (the client libraries, the vendor
daemon and the FLEXlm daemon). Version conflicts between these three parts are not
rare. As a general rule, the versions must follow this rule:

Client libraries <= vendor daemon <= FLEXlm daemon

Notice that the server part should always be newer than the client part. This brings up a
very important issue with OFM because version 3.0 was linked to newer client libraries,
so you have to upgrade the two daemons (lmgrd.slb and lmgrd). In the CD-ROM, OFM
comes with the new versions needed and you must install them to successfully run the
program. Once you upgrade the server software, OFM will be able to work. However, if
you use other vendor daemons that share the lmgrd daemon, ensure they will work with
the new version. If you are in doubt or scared to replace a current licensing scheme,
you could start another instance of lmgrd to manage lmgrd.slb licenses.
For instance, say that you have this current server configuration:

lmgrd
old version
(port 1700)

lmgrd.slb lmgrd.grt otherd


old version old version (other vendor daemos)
(OFM 2.2 and other Eclipse programs (Other applications)
GQ Programs)

If you can’t be sure that lmgrd.grt and otherd will work with the new lmgrd needed
by OFM, then you could split the licenses in two files. One with all the features licensed
by lmgrd.slb and the other with the rest. Then you can end up with this configuration:

lmgrd lmgrd
old version new version
(port 1700) (port 1701)
(license.dat file)

lmgrd.slb
lmgrd.grt otherd new version
old version (other vendor daemons) (OFM 2.2, 3.x and other GQ
Eclipse Programs (Other applications) applications)

You programs that use licenses managed by lmgrd.slb (OFM and other applications) will
need now new license information. If you had an LM_LICENSE_FILE set, you will have
to create now a combo one to include both possible license server processes.

The OFM administrator handbook____________________________________ Page 73


The Options file
FLEXlm also supports an options file, given to the vendor daemons as a command line
parameter. With this license, you can customize the server to do things such as:
• Allow the use of certain features based on used, hostname, display name or IP
address.
• Deny the use of certain features based on used, hostname, display name or IP
address.
• Reserve licenses based on used, hostname, display name or IP address.
• Control the amount of information logged about license usage.
The use of this option file is per vendor daemon and it is just added to the DAEMON line
in the license file. For example, suppose you have a file named OFMOptions.dat in the
C:\Flexlm directory, then you must edit your license file changing the line of lmgrd.slb
daemon. For example:

DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe

to

DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe C:\Flexlm\OFMOptions.dat

The options file will not be covered in this document. Refer to the FLEXlm manual
(http://www.globetrotter.com/manual.htm) and to GeoQuest to verify that this option is
being supported.

FLEXlm Novell License Server installation

This section describes the installation process of the server software on a Novell server.
The Novell implementation of FLEXlm is slightly different than the next two ones
(Windows and UNIX). Both FLEXlm and GeoQuest daemons are combined into one
single file named LMGRDSLB.NLM. This is the only software you need to start the
daemon.

Of course, you will also need the license file and you have to gather some information
about the server to order it, so first we will explain how to order a license file for a
Novell server.

Ordering a Novell server license


You have to follow these two steps:

1. Install the necessary files on the Novell server.


2. Get needed information for the license design and send it to GeoQuest.

These steps are described next

Page 74 ____________________________________ The OFM administrator handbook


1. Copy the LMGRDSLB.NLM, and EADDR.NLM from the CD (\FLEXlm\Server\Netware)
to the SYS:SYSTEM directory.
2. Then load the EADDR module. This module is needed to get the HostID number of
the server. The result should look like:

CONSOLE: LOAD EADDR


Error code: 0 Ethernet Address: 00 12 A8 98 0B 13 F4
<Press any key to close screen>

The Ethernet Address number is the HostID number. Write it down.

Then execute the CONFIG command. This should give you the rest of the needed
information. Among other data, you should write down these two values:
CONSOLE: CONFIG

File server name: novell1

IPX internal network number: 91720001

Send this information to GeoQuest specifying that you are requesting a Novell server
license. This is an example of the information that you need to send to request the
license:

Number of OFM 3.0 licenses: 2


Server Type: Novell
HOSTID: 0012A8980B13F4
HOSTNAME: novell1
IPX internal network number: 91720001

Once you submit this information, GeoQuest will design the license file and send it back
to you. For our example, the license could look like:

SERVER novell1 0012A8980B13F4 SPX:1234@000000000001#91720001


DAEMON lmgrd.slb lmgrdslb.nlm
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF

The OFM administrator handbook____________________________________ Page 75


Installing and starting a Novell Server
1. Once you receive this license, prepare the file and name it license.dat. Because the
license will (usually) come
within an email, by prepare it, I
mean make a new text (pure
ASCII) file with the correct
name and dump contents
inside. The best editor to do Notice the “” around
this is Notepad. Make sure the file name
that the extension of the file is
dat. Notepad always appends
to the file name a “.txt”
extension, so a “license.dat”
file will actually be saved as
“license.dat.txt”! To avoid this, make sure to put the desired file name between “”.
See the figure for an example of saving to a file license.dat without the txt
extension.
2. Create the SYS:FLEXLM directory on the server and copy the license.dat file to it.
3. From the server console, you can start de daemon by loading the LMGRDSLB.
4. Normally, you would just load the daemon with simply LOAD LMGRDSLB. This
should give you some kind of feedback that the daemon is up and running. The
scroll will look similar to:

CONSOLE: LOAD LMGRDSLB


12:32:22 (lmgrd.slb) Server started on Novell1 for: OFM32

Notice that this will only work if:


• You have copied the LMGRDSLB.NLM to the SYS:SYSTEM directory.
• You have created a SYS:FLEXLM directory and placed there the license file
and named it license.dat.

These are the defaults expected by the LMGRDSLB.NLM program. You could change
these defaults by giving command line arguments. For example:

CONSOLE: LOAD LMGRDSLB.NLM -c <path to the license file>, to change


the default location/name of the license file.

CONSOLE: LOAD LMGRDSLB.NLM -L <the name of the log file>, to force


the server to create a log file. By default, it does not create a log and all server
activity goes to the console.

It is strongly recommended to use the default settings unless you have to troubleshoot.
The bottom line is: keep it simple.
If you are having problems and don’t get anything working, you need to:
• Verify that your license file is correct. Check the syntax and look for strange
characters. Make sure you edit it with Notepad. Verify that there is nothing to the far

Page 76 ____________________________________ The OFM administrator handbook


right hand side of the lines. Sometimes there is garbage there but you don’t see it
because it’s out of the Notepad window. Do not leave blank lines.
• Verify that your Novell operating system includes all the patches recommended by
Novell.
• Verify that the numbers in the license file match the numbers of the server. You
should check the HostID by re-running (loading) the EADDR and the IPX network
number and hostname with the CONFIG command. Pay close attention to them. It’s
very easy to consider lic-server equal to lic_server, etc. Make sure that your
license includes the right information. Remember that some parts of the license can
be edited (explained in the next section) to reflect the changes.
• Make sure that the needed files are present in their respective directories
(SYS:SYSTEM and SYS:FLEXLM).
• Finally, you can attempt to load the NLM with the –L command and inspect the
output log, to look for problems.

As a final comment, remember that this described only the server setup. All we wanted
to do in this section is to start the daemons. Once you get it running you need to supply
OFM with the “license information” and eventually, a copy of the license file before you
can run it.
• See the figure on page 50 to understand what OFM will do before contacting your
Novell server. Select how you want your OFM to find the license file. The
recommended setup will be to place a copy of the file in the OFM’s directory.
• Review the “Network license served by a Novell license server” section on
page 58. That section explains other settings needed by the OFM client using a
Novell server, particularly the FLEXLM_COMM_TRANSPORT variable.

The parts of a Novell license file


Based on the following example file, we will explain the different parts of a Novell
license and highlight those that can be modified by the user.

SERVER novell1 0012A8980B13F4 SPX:1234@000000000001#91720001


DAEMON lmgrd.slb lmgrdslb.nlm
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF

• SERVER: line that describes the server running the FLEXlm software
• novell1: hostname of the Novell server running the FLEXlm software.
• 00605201f7e6: HostID of the Novell server running the FLEXlm software.
• SPX: transport protocol used for the licensing networking
• 1234: the SPX socket number that the software will use for licensing. It needs to be
a free port. Change it only in the rare case when the port listed is being used by
other program.
• @000000000001: the server's virtual address. For Novell 4.x a server usually gets
000000000001. Novell 3.x does not use this. Just use the same number.
• #91720001: The IPX Internal Network number of the server.
• DAEMON: line describing vendor a daemon. Since FLEXlm 6, DAEMON and VENDOR
are equivalent keywords.
• lmgrd.slb: name of the license administrator program (daemon) that should be
loaded on the server to manage the licenses.

The OFM administrator handbook____________________________________ Page 77


• lmgrdslb.nlm: name of the Netware Loadable Module (NLM) that will contains the
licensing daemon. This file should be inside the SYS:SYSTEM directory of the server.
• FEATURE OFM32: this line licenses the OFM 3.0 program
• lmgrd.slb: name of the license administrator program (daemon) that should be
contacted on the server to check the OFM32 license.
• 3.2: Version of the licensed OFM32.
• 1-jul-99: Expiration date for this license
• 2: Means (because is different that zero) a counted license. For this license means 2
simultaneous users license.
• CB4ED06134F890C45FEF: encrypted password to validate this license.

Notes:
• Some of the parts of this license could be edited or modified. They are the ones
listed in bold.
• Connection between clients (OFM PCs) and the Novell license server is done only
using SPX/IPX network protocol, so you have to have this protocol installed on the
OFM machines. You don’t need TCP/IP, although having it does not affect the
operation.

FLEXlm UNIX License Server installation

This section describes the installation process of the server software on one of the
supported UNIX servers. FLEXlm recommends performing all the installation process as
a normal user, not as root. This is because starting the license server as a root user will
start the process with root privileges and that could create a security breach on the
server machine. So claim the security experts…

Remember that the supported UNIX platforms are Solaris, AIX and Irix (Sun, IBM and
Silicon Graphics). The OFM 3.1 CD is the one that contains the files for AIX (IBM). No
other UNIX Os is supported, but check with GeoQuest before giving up certain
architecture.

The UNIX implementation is based on three files: The license file and the two daemons
(lmgrd and lmgrd.slb). The CD also supplies a third binary file: lmutil. This file is not
needed for normal operation. It is only an information/troubleshooting tool.
Because you will also need the license file to perform the installation, you have to gather
some information about the server to order it. In the next section, we will explain how
to order a license file for a UNIX server.

Ordering a UNIX server license


You have to follow these steps:
1. Get the HostID and hostname of the server.
2. Order the license from GeoQuest.

Page 78 ____________________________________ The OFM administrator handbook


Determining the HostID and hostname
The best way of doing this is to pre-install the FLEXlm software and use it to read the
HostID of the server with the lmutil program. You need to be aware that the software
for Solaris provided in the original OFM 3.0 CD-ROM is corrupted. You should get those
files before proceeding with a Sun installation. The OFM 3.1 CD has the proper files.

Follow these simplified steps to get the needed information:

Create on the server a /usr/local/flexlm directory. You can use any other directory as
long as you correct all the needed paths to point to it. Copy to this folder the files from
the corresponding CD subdirectory.
• For Irix (Silicon Graphics), copy the three files under
\Flexlm\Server\UNIX\SGI.
• For Solaris (Sun), either get the proper files from GeoQuest support or copy the
three files provided in the 3.1 CD under \Flexlm\Server\UNIX\Solaris 2.x.
• For AIX (IBM), copy the three files under the \Flexlm\Server\UNIX\Rs6000
folder. They are present in the OFM 3.1 CD only. If you only have 3.0, get them
from GeoQuest support.

From the /usr/local/flexlm directory, issue the following command (with the dot and
the dash):

>./lmutils lmhostid
lmutil - Copyright(C) 1989-1994 Globetrotter Software, Inc.
The FLEXlm host ID of this machine is "015A5F3E"

This command should give you the necessary HostID number for issuing the license. If
you can’t have the FLEXlm software installed, there is another way of doing it. The
process varies, depending on the operating system version. The following table shows
you one of the possibilities. This method is NOT recommended and should be used only
as a final resort, if you can’t use lmutil.

Operating System Command Example results


Irix echo ‘/etc/sysinfo –s’ 16o p | dc 90D40225

AIX23 uname -m 00249477


Solaris hostid 170a3472

For getting the hostname of the server, just issue this command:

marrochi> uname -a
SunOS gaucho 5.5.1 Generic_10364-12 sun4u sparc SUNW,Ultra-2
marrochi>

23
For AIX, you need to remove the last two digits and use the lowest eight digits ignoring any
high level zeroes.

The OFM administrator handbook____________________________________ Page 79


The response lists the hostname (gaucho). The example given is for Solaris. For Irix
and AIX is similar (I hope). Never mind for the hostname at this step. If you can get it,
fine. If not, you can always edit the hostname part of the license file.

Order the license from GeoQuest


Send this information to GeoQuest specifying that you are requesting a UNIX server
license. This is an example of the information that you need to send to request the
license:

Number of OFM 3.0 licenses: 2


UNIX Type: Irix, Solaris or AIX
HOSTID: 12A8980B1
HOSTNAME: gaucho

Once you submit this information, GeoQuest will design the license file and send it back
to you. For our example, the license could look like:

SERVER gaucho 12A8980B1 1701


DAEMON lmgrd.slb /somepath/flexlm/lmgrd.slb
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF ck=36

Installing and starting a UNIX Server


When you receive this file, make sure you review it with a UNIX editor. ASCII files that
look OK on PCs normally include extra characters when opened in UNIX. Make sure you
review this file. Modify your file so that it points to the real place where your lmgrd.slb is
located. Notice that for our example, the DAEMON line should look like

DAEMON lmgrd.slb /usr/local/flexlm/lmgrd.slb

Install the server software


If you have not done so on the first part of this tutorial, now you will have to copy the
files from the CD to the target directory. Copy the license file as well and make sure its
name is license.dat.
You should verify /usr/local/flexlm directory contents and ensuring that you have, at
least:
• lmgrd
• lmgrd.slb
• lmutil (optional, only for troubleshooting)
• license.dat

Some times, when UNIX files are copied from the CD, they loose their attributes and the
operating system does not see them as executable files. When you attempt to run them,
nothing happens. In these cases, you can manually set the executable attribute with the
chmod command. The next window shows you a directory listing where you can verify
that the two daemon files have the executable attribute on (notice the * at the end of
the name). Also an example on how to set this attribute for the lmgrd file.

Page 80 ____________________________________ The OFM administrator handbook


ar0s03:marrochi> ls -Fa
./ license.dat lmgrd.slb*
../ lmgrd* lmutil*
ar0s03:marrochi> chmod +x lmgrd
ar0s03:marrochi>

Start the license manager


Type lmgrd at the prompt. The server should respond with a message that its up and
running. You should verify that the license is available through the server. To test it, just
use the lmutil program with the lmdiag argument. The following scroll is an example of
this test.

ar0s03:marrochi> ./lmutil lmdiag


lmutil - Copyright (C) 1989-1998 Globetrotter Software, Inc.
FLEXlm diagnostics on Mon 3/15/99 16:23

-----------------------------------------------------
License file: /usr/local/flexlm/ license.dat

"OFM32" v3.200, vendor: lmgrd.slb


License server: ar0s03
floating license starts: 1-jan-95, expires: 1-jul-2001

This license can be checked out


-----------------------------------------------------
ar0s03:marrochi>

Notice that the scroll reveals an available OFM32 license. If you have extra licenses in
the same file, they will be output one by one, every time you press CR.
If you successfully got the license working, you can log out of the server and attempt to
start OFM. The lmgrd process you started will live as long as you leave the server
running, even if you log out. If the server is restarted, the license manager will not start.
There is a section ahead explaining how to set up an automatic start of the lmgrd
daemon.

The parts of a UNIX license file


Based on the following example file, we will explain the different parts and highlight
those that can be modified by the user.

SERVER gaucho 00605201f7e6 1700


DAEMON lmgrd.slb /user/local/flexlm/lmgrd.slb
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF ck=36

• SERVER: line that describes the server running the FLEXlm software (license
administrator program)
• gaucho: hostname of the UNIX server running the FLEXlm software.

The OFM administrator handbook____________________________________ Page 81


• 00605201f7e6: HostID of the UNIX server running the FLEXlm software.
• 1700: TCP port number that FLEXlm software will use for licensing. It needs to be
a free port. Ports below 1024 are normally reserved and can't be used. Change it
only in the rare case when other program is using the port listed.
• DAEMON: line describing the daemon[s] handling the FEATURES of the license file.
With FLEXlm 6, this line could use also the keyword VENDOR.
• lmgrd.slb: name of the vendor daemon described in the line.
• /user/local/flexlm/lmgrd.slb: complete path to the executable file that
contains the lmgrd.slb daemon on the server as seen from the server.
• FEATURE OFM32: this line licenses the OFM program
• lmgrd.slb: name of the license administrator program (daemon) that should be
contacted on the server to check the license.
• 3.2: Version of the licensed OFM.
• 1-jul-99: Expiration date for this license
• 2: Means (because is different that zero) a counted license. For this license means 2
simultaneous users license.
• CB4ED06134F890C45FEF: encrypted password to validate this license.
• ck=36: an encrypted number to verify this license.

Notes:
• Some of the parts of this license could be edited or modified. They are the ones
listed in bold. If any of these parameters is modified, the all license files should
be modified as well. Normally there are two copies of this file: the one that
FLEXlm uses and the one that OFM uses. Both should be the same.

UNIX mini-help
This is by no means a UNIX tutorial. Is just a list of the commands I encounter myself
using while finding my way around Solaris. I don’t have experience with Irix nor AIX
(the other UNIX supported by OFM license servers), so no help will be given.

Solaris Commands:

Subject Command line


Change passwords passwd
Change passwords with NIS yppasswd
Print working directory pwd
Look for files containing text grep -l ‘search this’ /usr/*
Look for files find path -n filename -print
Disk usage du directory
File systems df
See active processes ps -e or ps -a
See who is logged in who –Hu
More info about a user finger username
Nice directory listing ls -Fa
Info about a particular file file filename
Wildcards * any number of characters
? any ONE character
[abc] including a, b or c

Page 82 ____________________________________ The OFM administrator handbook


[a-d] including a, b, c or d
Copying recursively cp -r
Deleting files with confirmation rm -i
Deleting directories recursively rmdir -r
C-shell command history history
!! last command
!3 third command in history
!s last command in history
starting with s
Modifying the delete key stty erase {delete keystroke}
Remote login rlogin hostname -l username
Aliasing commands (csh only) alias dir -ls -Fa

VI commands:
VI is the last text editor you want to choose. However, is present in all UNIX
distributions and one day, you will have you use it. This is not a tutorial, just a list of the
most common commands.

Insert characters at cursor i


Append characters at cursor (EOL) a
Insert characters at BOL I
Append characters at EOL A
Deletes character at cursor x
Deletes line at cursor dd
Overwrite text at cursor r
Undo last action u
Search a word in file /text_to_find
Search for next occurrence n
Search and replace all, globally :l,$ s/old/NEW /g

File Utilities:
• z files:
Compressed files with z extension.

myfile -> myfile.z issue command: pack myfile


myfile.z -> myfile issue command: unpack myfile

pcat myfile: lists contents of packed file.

• Z files
Compressed files with Z extension
myfile -> myfile.Z issue command: compress myfile
myfile.Z -> myfile issue command: uncompress myfile

• TAR files:
Create a tar file
tar -cvf destination source(s)
c: Create file

The OFM administrator handbook____________________________________ Page 83


v: Verbose
f: filename to create is specified next

Extract contents from tar file


tar -xvf source [destination(s)]
x: extract file
v: Verbose
f: filename to create is specified next

Update contents of a tar file


tar -rvf source
r: update (review?)
v: Verbose
f: filename to create is specified next

View contents of a tar file


tar -tvf source
t: table of contents
v: Verbose
f: filename to create is specified next

UNIX CD ROM help


The following section will give you the commands to mount and access a CD-ROM from
Solaris, Irix and AIX.

• Local mounting (the CD-ROM drive is installed in the host machine. We assume that
there is a directory /cdrom already created)

Solaris 2.x
mount –F hsfs –o ro /dev/sr0 /cdrom
Irix
mount –t iso9660 –o setx /dev/scsi/sc0dn10 /cdrom
AIX
mount –v cdrfs –r /dev/cd0 /cdrom

If the host machine does not have a CD-ROM drive and you want to access one in
another machine, then the task is more complicated. First, log on to the machine that
has the drive and mount it locally. Next, share it so you can access it from other
machines. Finally, from the machine where you want to access the remote CD, mount it
as a remote drive.

• Sharing a mounted CD-ROM (assuming the CD is mounted on a directory /cdrom):

Solaris 2.x
Execute share –F nfs –o ro –d /cdrom /cdrom
Irix
Add the line /cdrom –ro to the /etc/exports file and run the
command exportfs -av
AIX
Same as Irix.

Page 84 ____________________________________ The OFM administrator handbook


• Mounting a remote CD-ROM (assuming there is a loacl directory /cdrom already
created and that the machine sharing the CD is doing it as /cdrom)

Solaris 2.x
Execute mount –F nfs –r cdrom_host_machine_name:/cdrom /cdrom
Irix
Execute mount –r cdrom_host_machine_name:/cdrom /cdrom
AIX
Same as Irix.

Finally, remember that to eject a CD-ROM, you can issue an eject command. Eject will
eject a floppy first (if there is one) and then the CD-ROM. The operation will un-mount
the CD-ROM and eject it. Notice that this will not work if you are using the CD-ROM.
Beware that a CD-ROM will be considered in use even if you have a terminal opened and
the working directory is one that belongs to the CD-ROM (inside the /cdrom directory).

Setting an automatic start for the lmgrd program


Once you manually start the license server program (from the console) and verify that it
works, you need to set up the server to start FLEXlm software at boot time. If you don’t
do this, next time the server is rebooted, lmgrd will not be started.

For this task, you need to be a super user (i.e., root). The procedure is different for
different UNIX platforms, so they will be explained one at a time. If any of the
mentioned files do not exist, simply create it. They are all ASCII files and any text editor
will work.

Solaris 2.x
When Solaris boots, it goes to a standard directory and runs all programs there that
start with a capital S. The convention does not only specify the first letter of the file
name, but also a number that determines in what order these programs are run. Solaris
runs them, one by one and pass them a “start” command line argument. This directory
is similar to your Windows Start Up menu. Anything going there will be started at boot
time. However, you not only have to place the file there but also its name has to start
with S and a number, for instance S90flexlm.
A similar task is done when the system is shut down. A different directory is scanned
and every program starting with a capital K is run with a “stop” command line
argument. The number needed to specify the sequence is also needed, so you could
have a file named K87flexlm to shut down the flexlm daemon.

The programs here are normally shell scripts (like PCs batch files) that start and end all
needed software. You need to add your FLEXlm scripts in those directories, so it is
started and shut down properly.

Because Solaris will pass them a “start” and “stop” command line argument, then you
can use the same script for both tasks. You can place this script with the rest of the
FLEXlm software and make links to it. This keeps all your work in one directory, easier
to maintain.

The OFM administrator handbook____________________________________ Page 85


First, you need to create the script file with a text editor. Create a text file (for instance,
named flexlm) and verify that contains the following commands:

#!/bin/sh
#
# Startup for Flexlm Licensing Daemon
#
LIC_DIR="/usr/local/flexlm"
LIC_BIN="/usr/local/flexlm"
#
if [ ! -f $LIC_BIN/lmgrd -o ! -d $LIC_DIR -o ! -f $LIC_DIR/license.dat ]
then
echo "lmgrd startup: cannot start"
exit
fi

case "$1" in
'start')
# Start the license manager:
nohup $LIC_BIN/lmgrd -c $LIC_DIR/license.dat > /tmp/license.log 2>&1&
;;
'stop')
# Stop the license manager:
$LIC_BIN/lmutil lmdown
;;
*)
echo "Usage: /etc/init.d/flexlm ( start | stop }"
;;
esac
exit 0

The previous was the full feature file, with some error control built in. If you want to get
it to work with minimum typing, you could also try this script.

#!/bin/sh
LIC_DIR="/usr/local/flexlm"
LIC_BIN="/usr/local/flexlm"
case "$1" in
'start')
nohup $LIC_BIN/lmgrd -c $LIC_DIR/license.dat > /tmp/license.log 2>&1&
;;
'stop')
$LIC_BIN/lmutil lmdown
;;
esac
exit 0

Notice that there are two lines that reflect the directories where you have the binaries
and the license files. In out case, they are both equivalent. If you decide to relocate
them, you will have to adjust them accordingly.

There is a section that process the “start” argument and another one that does the
“stop” shut down part.
In PCs, to create a batch file you need to specify a bat extension. In UNIX, any name
works but you have to convert the text file into an executable one. To turn the flexlm
text file into an executable batch file, issue this command:

ar0s03:marrochi> chmod +x flexlm

You can also test that your script works by running it with start and stop arguments.

Page 86 ____________________________________ The OFM administrator handbook


ar0s03:marrochi> ./flexlm start
ar0s03:marrochi> ./flexlm stop

In order to tell Solaris to execute it at boot time, you need to create a link in the proper
directories.

Go the /etc/rc2.d directory and create a link to our script with a name that starts with
a capital S (Start). Remember that after the S, you must also define a number. Pick
up one that is not being used. The rest of the name is up to you, make sure you use
something that lets you identify this script with the FLEXlm daemons start up. For
example, assuming that the flexlm script was saved on the /usr/local/flexlm directory,
you should type:

ar0s03:marrochi> cd /etc/rc2.d
/etc/rc2.d
ar0s03:marrochi> ln -s /usr/local/flexlm/flexlm S90flexlm
ar0s03:marrochi> ls -Fa
./ S47asppp* S75cron* S91leoconfig*
../ S69inet* S76nscd* S92rtvc-config*
K20lp* S70uucp* S80PRESERVE* S92volmgt*
K60nfs.server* S71rpc* S80lp* S93cacheos.finish*
README S71sysid.sys* S88sendmail* S99audit*
S01MOUNTFSYS* S72autoinstall* S88utmpd* S99dbora@
S05RMTMPFILES* S72inetsvc* S89bdconfig@ S99dtlogin*
S20sysetup* S73nfs.client* S90Charisma@ S99gxtdaemon_init@
S21perf* S74autofs* S90flexlm@ S99zeh_queues@
S30sysid.net* S74syslog* S90hpnpd@
ar0s03:marrochi>

Notice that we created a link. This link is /etc/rc2.d/S90flexlm and points to our
flexlm script file. If you issue an ls –Fa directory listing, links appear with an @ at the
end. If you want to verify your link, you can also issue an ls –lag. This will show you
the created link and also the original file it points to.

ar0s03:marrochi> ls -lag S9*


lrwxrwxrwx 1 other 18 Aug 4 1998 S90flexlm -> /etc/init.d/flexlm
-rwxr-xr-x 2 sys 2300 Jun 27 1996 S91leoconfig
-r-xr-xr-x 2 sys 1159 Feb 10 1996 S92rtvc-config
-rwxr--r-- 2 sys 524 May 3 1996 S92volmgt
ar0s03:marrochi>

Remember to use a name that does not exist and that it needs to start with capital S.

This procedure will ensure that your flexlm script will be executed with “start” option
every time you boot the server. It is not a requirement to shut down the daemon, so
instead of adding a script to kill it, you can just let it die when the server is shut down.

However, if you want to be completely neat, you can add a FLEXlm shutdown script.
Create a link to the same script file in the /etc/rc0.d that starts with a capital K. Same
applies to the number. Choose one that is not being used.

ar0s03:marrochi> cd /etc/rc0.d

The OFM administrator handbook____________________________________ Page 87


/etc/rc0.d
ar0s03:marrochi> ln -s /usr/local/flexlm/flexlm K11flexlm
ar0s03:marrochi> ls -Fa
./ K10zzgforacle* K42audit* K57sendmail* K75nfs.client*
../ K12dbora@ K47asppp* K66nfs.server* K76nscd*
K00ANNOUNCE* K11flexlm@ K50utmpd* K69autofs* K85rpc*
K10dtlogin* K20lp* K55syslog* K70cron*
ar0s03:marrochi>

Now, every time the server is shut down, Solaris will run each of the scripts that are in
this directory that start with capital K. Each of them will be run with a “stop” command
line argument. When K11flexlm is run, the lmgrd daemon will be terminated properly.

AIX and Irix


Figuring the proper way of starting and stopping daemons on a Solaris machine took me
a while. I believe that for the other versions should be similar. I am eager to receive
some notes to add to this section. In general, if these directories exist, then they are
used and the boot sequence is similar to the one described for Solaris.

FLEXlm Windows License Server installation

The windows server runs on either Windows 95/98 or Windows NT. The differences are
not many. However, when the installation is done on an NT machine, the license server
can (and should) be installed as an NT service.

All you need are a few programs and the license file. As in the other installations, we will
start with gathering information needed to request the license.

Ordering a Windows server license


Before you order a license, you need to get some server information. The easiest way of
doing this is using the FLEXlm software designed to do that. With this book you should
have received a file named lmtools.zip. It contains some instructions as well as two
other files: lmgr326a.dll and lmtools.exe.

Copy them to any folder on the target server and run the lmtools program. It will open a
window like the following one:

Page 88 ____________________________________ The OFM administrator handbook


Click on the HostID button and the save the results to a text file with the Save Text
button. The results should look like this:

Hostd ID's------------------------------------------------------------
HOSTNAME=ntserv
USER=someuser
DISPLAY=someuser
INTERNET=163.186.32.15
0000214db4d9
DISK_SERIAL_NUM=123010ea

As per the results of our example, the hostname of the Windows machine is ntserv, the
HostID is 0000214db4d9 and the DiskID is 123010ea.

Notice that there is other information, but is not relevant for us. After saving the file
with this information, you can delete the two files (lmgr326a.dll and lmtools.exe) from
the server.

This is all the information needed to order the license. The following table shows you
what you would send to GeoQuest to generate the license:

Number of OFM 3.0 licenses: 2


ServerType: Windows
HOSTID: 0000214db4d9
HOSTNAME: Ntserv

With this information, GeoQuest will mail you back the license, which should look like:

The OFM administrator handbook____________________________________ Page 89


SERVER ntserv 0000214db4d9 1700
DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe
FEATURE OFM32 lmgrd.slb 3.2 1-jul-99 2 CB4ED06134F890C45FEF ck=36

Installing and starting a Windows license server


After you receive your license back from GeoQuest, you can start the installation
process.
1. Start preparing the file and
name it license.dat. Because
the license will (usually) come
within an email, by prepare it, I
mean make a new text (pure
Notice the “” around
ASCII) file with the correct the file name
name and dump contents
inside. The best editor to do
this is Notepad. Make sure
that the extension of the file is
dat. Notepad always appends
to the file name a “.txt”
extension, so a “license.dat” file will actually be saved as “license.dat.txt”! To
avoid this, make sure to put the desired file name between “”. See the figure for an
example of saving to a file license.dat without the txt extension.
Make sure that the DAEMON line of the license file reflects the actual path to the
lmgrdslb.exe file, as seen from the server.
2. Create a flexlm directory on your server. The default (and desired) is C:\Flexlm.
3. From the CD-ROM, copy all files from the \Flexlm\Server\Win95_NT\ to the
C:\Flexlm directory.
4. With the Windows Control Panel closed, move the files Flexlm.cpl and
lmgr326b.dll to the system directory (C:\Windows\System in Windows 9x or
C:\Winnt\System32 in Windows NT)
5. Copy your license.dat file to the C:\Flexlm
directory.

At this point, you have all needed information. The


lmgrd.cpl file that you copied to the system directory is
a control panel that will be added to the server. If you
open the control panels, you should see now a
“FLEXlm License Manager” icon.

This panel IS NOT the server software. The software is in the lmgrd.exe and
lmgrdslb.exe files. This control panel is just a nice tool to install the server software
and control the parameters that will be used to start the server, instead of issuing a
command line start.

So go ahead and run this panel to set up the license server.

Page 90 ____________________________________ The OFM administrator handbook


The first screen you see is the Control tab. From there, all you can do is manually
start/stop and check the status of the license server. Because we have not set it up yet,
there is not much we can do here right now.

Click on the Setup tab and using the Browse buttons, find the correct files for each of
the options. The debug.log file does not initially exist on the flexlm directory. Just point
to the directory and the program will create it.

Note: Don’t select the lmgrdslb.exe instead of the lmgrd.exe

The two check buttons on the lower part (Use NT services will be disabled in Windows
9x setups) are the ones needed to set Windows to automatically run the license server

The OFM administrator handbook____________________________________ Page 91


when Windows starts. You have to check them both (unless you want to manually start
the license server every time you need it).

For NT, it is recommended that you install the server as an NT service. You could
remove it from the Services list later, with the Remove button.

Click on the Licenses tab and check that the server is set up to use the same license
file you set in the previous step. Click on the button to take a final look at the license file
before you try to start the server. Remember that the DAEMON lone of the license has
to point correctly to your vendor daemons executable file, so remember to check this
part. If you are happy with the license file, the go to the Control tab and start the
server with the Start button.

The first check you have to do is to click on the Status button. In less than a second,
you should see a message like the one shown in the figure (your-server: license
server UP (MASTER))

If you don’t get this message, the something went wrong. Go to the Diagnostics tab.

Page 92 ____________________________________ The OFM administrator handbook


Click on the Hostid’s button. The figure shows
the results of this action. Verify the software reads
the same HostID (in the line below the INTERNET
address) than the one in the license file. Double-
check also the hostname and compare it to the
one in the license.

The Environment button shows you


the possible settings for license
information. This is not really important
for the server and you can achieve
normal functionality without setting any
of these variables, as shown on the
figure.

The OFM administrator handbook____________________________________ Page 93


The Connection button should give
you an answer pretty quickly. It is a
basic check that the software can
connect to the machine whose name
is stated as server in the SERVER line
of the license file. The figure shows a
typical answer.

In the case of an NT server, when you select to Use NT Services, the control panel
installs the lmgrd.exe as a service. You can view the results of this action if you open
the Services Control Panel and find the FLEXlm License Manager service. This is
another place to start and stop it. The next figure shows you the service registered.

Parts of a Windows license file


Based on the following example file, we will explain the different parts and highlight
those that can be modified by the user.

SERVER ntserv 00605201f7e6 1700


DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe
FEATURE OFM lmgrd.slb 2.100 1-jul-99 2 CB4ED06134F890C45FEF ck=36

• SERVER: line that describes the server running the FLEXlm software (license
administrator program)
• ntserv: hostname of the Windows server running the FLEXlm software.
• 00605201f7e6: HostID of the Windows server running the FLEXlm software.
• 1700: TCP port number that FLEXlm software will use for licensing. It needs to be
a free port. Ports below 1024 are normally reserved and can't be used. Change it
only in the rare case when the port listed is being used by other program.

Page 94 ____________________________________ The OFM administrator handbook


• DAEMON: line describing a vendor daemon. Since FLEXlm 6, the keyword VENDOR
is equivalent.
• lmgrd.slb: name of the vendor daemon that should be loaded on the server to
check the licenses.
• c:\flexlm\lmgrdslb.exe: complete path to the executable file that loads the
lmgrd.slb daemon on the server as seen from the server.
• FEATURE OFM32: this line licenses the OFM program
• lmgrd.slb: name of the license administrator program (daemon) that should be
contacted on the server to check the license.
• 3.2: Version of the licensed OFM. For OFM 2.2, uses the same number.
• 1-jul-99: Expiration date for this license
• 2: Means (because is different that zero) a counted license. For this license means 2
simultaneous users license.
• 4B7E20C18F8105E9B69B: encrypted password to validate this license.
• ck=36: an encrypted number to verify this license.

Notes:
• Some of the parts of this license could be edited or modified. They are the ones
listed in bold.

Troubleshooting License Problems

The FLEXlm Wizard


New to OFM 3.0 is the FLEXlm wizard technology. When the license validation process
fails, OFM will present the Troubleshooting
FLEXlm wizard window. This is where you can
see the key numbers of your workstation (as
detected by OFM) and also some other
settings. It shows you what is the
LM_LICENSE_FILE variable set to and what
license file is being used. If you want to
manually start this wizard, you need to start
OFM while holding the Control key down.

The OFM administrator handbook____________________________________ Page 95


Notice that having a copy of the license file being used can help you troubleshooting.
Sometimes, you believe OFM will use a
particular license file and because it found other
one before, it attempts to use the wrong one.
Make sure you review the license file OFM
attempted to use.

This is a very interesting tool to troubleshoot


remotely users with licensing problems. If the
user clicks Next, he gets a window where he
can print or email the “autopsy” results. There is
an “use SPX/IPX” setting. If the user clicks
that, then the results will also include the
SPX/IPX information (needed if the setup
includes a Novell license server). The following
part shows you a couple of examples of the
results produced by this the wizard.

Without IPX/SPX information:


License file [default name: license.dat] not found in the directory
in which program was installed or C:\flexlm\license.dat. Alternatively
specify the complete path in a LM_LICENSE_FILE environment variable
or by editing the Registry value for OFM32.

Environment variables:
LM_LICENSE_FILE=1700@criollo-arg
FLEXLM_COMM_TRANSPORT=(null)
LMGRDSLB_COMM_TRANSPORT=(null)

Feature requested:OFM32
Version requested:3.0
Hostids found:
Ethernet address: 00-00-21-4d-b4-d9
Volume serial number: 123010ea
Internet IP Address: 163.186.32.15
Username: marrochi
Display name: milci
Node name: milci

License file: 1700@criollo-arg

Microsoft Windows 98 4.10 (Build 1998)

With IPX/SPX information:


License file [default name: license.dat] not found in the directory
in which program was installed or C:\flexlm\license.dat. Alternatively
specify the complete path in a LM_LICENSE_FILE environment variable
or by editing the Registry value for OFM32.

Feature: OFM32
License path: Y:\OFM30\license.dat
FLEXlm error: -57,17. System Error: 10047 "(null)"
For further information, refer to the FLEXlm End User Manual,

Page 96 ____________________________________ The OFM administrator handbook


available at "www.globetrotter.com".

*** SPX/IPX Network protocol set. ***

Environment variables:
LM_LICENSE_FILE=(null)
FLEXLM_COMM_TRANSPORT=(null)
LMGRDSLB_COMM_TRANSPORT=(null)

Feature requested:OFM32
Version requested:3.0

Hostids found:
Ethernet address: 00-a0-24-8f-4d-af
Volume serial number: 374911f0
Username: dpetkovs
Display name: exec
Node name: exec

License file: Y:\OFM30\license.dat


SERVER BAS_FS03 00805fd4abed SPX:1234@000000000001#319CA1CC
DAEMON lmgrd.slb lmgrdslb.nlm
FEATURE OFM32 lmgrd.slb 3.200 1-jul-2000 1 AD8DD2036D7A \
VENDOR_STRING="Company Name"
Microsoft Windows 95 4.0 (Build 1111)

Notice that both examples show interesting information. The second one reveals an
error, and probably because the user forgot to set the FLEXLM_COMM_TRANSPORT
variable to SPX, as mentioned. At least, there is a problem with it because the program
can’t see it set to anything at all24.

They also provide all hardware numbers as detected from the program. The Ethernet
address is the HostID, the Volume Serial Number is the DiskID. Very interesting
information to double-check these numbers with the ones in the license file.

This summary tells you what is exactly seen by OFM.

As a final comment, this tool helps troubleshooting the OFM workstation. The server
troubleshooting tools are not that complete and in some platforms, they don’t exist at
all. We will cover them later, as we move forward.

Lmtools
Lmtools can be run on the clients to get information from the client or from the server.
Also, if you have a Windows server, you can run it on the server as well, to get similar
information.
From the client side, you can use Lmtools to query the server as if you where a client
application. This check is quite complete because uses almost all the system (your
server setup and your network connection to it). The following figures show the kind of

24
What actually happened here is that the variable was set, but with spaces around the equal
sign. This confused OFM, that refused to start.

The OFM administrator handbook____________________________________ Page 97


information that you can get from your server (or your client) from a client workstation
using this utility.

Lmtools is very easy to use, as long as you understand how it works. Lmtools can
perform the most common tasks you normally do with a remote server (such as re-read
a license file, diagnose individual vendor daemons, get a complete list of all licenses
available, shutdown the server, etc.)

The only catch you could step into is that Lmtools finds out what server it needs to
contact by either inspecting the LM_LICENSE_FILE variable or by directly accessing
the license file.

LM_LICENSE_FILE: This variable has to be set properly (to a port@server o the path
to the license file). If you don’t want to modify your current variable settings and just
want to occasionally use this tool, you could open an command prompt window, set the
variable and then run the program from the prompt. The LM_LICENSE_FILE variable will
keep the value and stay valid only inside that command window and will not affect the
rest of the applications. For instance, for successfully running Lmtools, I could do this:

C:\WINDOWS>echo %LM_LICENSE_FILE% Show you that the


ECHO is on variable is not set yet.
C:\WINDOWS>SET LM_LICENSE_FILE=C:\LICENSE.DAT Set the variable and
C:\WINDOWS>echo %LM_LICENSE_FILE% verify its contents.
C:\LICENSE.DAT Also “1700@gaucho” is
OK.
C:\WINDOWS>C:\FLEXLM6.1\LMTOOLS.EXE Start the program with
C:\WINDOWS> the variable set for it.
It should work fine now.

Page 98 ____________________________________ The OFM administrator handbook


The previous image shows an Lmtools session that was started by using the
LM_LICENSE_FILE variable.

License file: If you have access to the license file, you just have to point Lmtools to
it. You do it using the Browse button and selecting the proper license file. The following

image shows a session where LM_LICENSE_FILE had no value, but Lmtools was
100pointed to the license file. Notice that the Current License File box displays the
license being used in the troubleshooting.

Lmtools buttons
Checksum: Use this button to verify the integrity of the checksum value of feature
lines. If you doubt whether you have extra or missing characters, just locate this file

The OFM administrator handbook____________________________________ Page 99


with the Browse button and hit Checksum. See the next example, where the OFM32
feature line failed the check. This checks only the checksum number (the one after the
expiration date).
Diagnostics: This button gets you complete information of each license by querying
the server as if it was a client application. You tell Lmtools which server to check either
by setting the LM_LICENSE_FILE or browsing to a license file with the correct SERVER
line.
When you hit Diagnostics, Lmtools asks you which FEATURE you want to check. If you
leave it blank Lmtools will report all the available features of the server. The following
figure is an example.

Notice that this check is very powerful because it ‘certifies’ your server, network and
communications between the machine where you execute Lmtools and the license
server.

Shutdown: Beware with this button. You can remotely shutdown a server but there is
no way to remotely start it back. You will have to re-start it from the server’s console.

HostID: This reports the HostID, DiskID, FlexID, hostname, IP address, etc. from the
machine where you run Lmtools, as seen by FLEXlm software.

Reread: You can force the server to re-process the license file with this button. If you
modify the license file, you can force FLEXlm to re-read it and activate the changes.

Status: The status is a quick summary of the licenses available on a server. Again, once
you define which server to check, hit Status to get some quick information. Lmtools
asks you for some details on what you want. You can specify a single feature, a server
or a vendor daemon. If you don’t specify any of them, you get everything. The next
figure shows you an example.

Page 100 ____________________________________ The OFM administrator handbook


Notice that apart from a single line of information per feature, you get the different
daemon versions: lmgrd v6.1, lmgrd.slb v6.0 and lmgrd.grt v5.12. Cute.

Switchr: This button does not do anything for us. It works only with FLEXlm servers
running on VMS to switch the output of a feature to a new file. GeoQuest does not
support VMS servers.

Time: You can inspect your client’s local time with this button. This will not give you the
server’s time.

Version: This button lets you specify an executable file to verify its version and other
information. The next scroll shows the results of asking for lmgrd.exe, lmgrdslb.exe
and lmgrd.grt.exe version details. Remember that you specify the filename of the
executable file containing the FLEXlm software. I could only test this for Windows
servers.

Version------------------------------------------------------------------------
Flexlm v6.1a
FLEXlm Copyright 1988-1998, Globetrotter Software, Inc.
FLEXlm 6.1 (libmgr_s.a), Copyright (C) 1988, 1997 Globetrotter Software, Inc.
FLEXlm 6.1 (liblmgr.a), Copyright (C) 1988-1997 Globetrotter Software, Inc.
Version------------------------------------------------------------------------
Flexlm v6.1a
FLEXlm 6.0i (libmgr_as.a), Copyright (C) 1988-1998 Globetrotter Software, Inc.
FLEXlm 6.0i (liblmgr.a), Copyright (C) 1988-1998 Globetrotter Software, Inc.
FLEXlm 6.0i (libmgr_s.a), Copyright (C) 1988, 1998 Globetrotter Software, Inc.
Version------------------------------------------------------------------------
Flexlm v6.1a
FLEXlm 5.12a (libmgr_as.a), Copyright (C) 1988-1997 Globetrotter Software, Inc.
FLEXlm 5.12a (libmgr_s.a), Copyright (C) 1988, 1997 Globetrotter Software, Inc.

The OFM administrator handbook____________________________________ Page 101


Save Text: This button allows you to save the scroll on a text file. This can be helpful
when you want to get the machine information to order a license file: Click on HostID
and then save the results with this button.

Lmutil
Lmutil is a command line utility. It is available for Windows and UNIX. There is no such
a thing for Novell servers. Lmutil is similar to Lmtools, without the Windows interface.
The following scroll is lmutil’s help, given when it is just ran, without any arguments:

C:\OFM30\Flexlm\LMUTIL.EXE
lmutil - Copyright (C) 1989-1998 Globetrotter Software, Inc.
usage: lmutil lmcksum [-k] [-pre_v6]
lmutil lmdiag [-n]
lmutil lmdown [-q] [-vendor name]
lmutil lmhostid[-ether|-vsn|-flexid]
lmutil lmhostid
lmutil lminstall [-i infile] [-o outfile] [-overfmt {2, 3, 4, 5, 5.1,
or 6}] [-odecimal] [-maxlen n]
lmutil lmremove feature user host display
lmutil lmremove -h feature host port handle
lmutil lmreread [-vendor name]
lmutil lmswitchr vendor new-file, or
lmutil lmswitchr feature new-file
lmutil lmstat [lmstat-args]
lmutil lmver flexlm_binary
lmutil lmver flexlm_binary
lmutil -h[elp] (prints this message)

C:\OFM30\Flexlm>

Notice that this is more or less the same as Lmtools but from a command line. The next
scroll shows you the equivalent results of lmutil in a UNIX terminal:

ar0s03:marrochi> lmutil
lmutil - Copyright (C) 1989-1994 Globetrotter Software, Inc.
usage: lmutil lmcksum [-k]
lmutil lmdiag [-n]
lmutil lmdown
lmutil lmhostid
lmutil lmremove feature user host display
lmutil lmremove -h feature host port handle
lmutil lmreread [daemon]
lmutil lmswitchr feature new-file
lmutil lmstat [lmstat-args]
lmutil lmver [binary-file]
OR
link the following file names to lmutil:
"lmcksum", "lmdiag", "lmdown", "lmhostid", "lmremove"
"lmreread", "lmstat", "lmswitchr", or "lmver"
ar0s03:marrochi>

The following scroll shows some example results of using lmutil under UNIX.

Page 102 ____________________________________ The OFM administrator handbook


ar0s03:marrochi> ls
core lmdiag lmgrd-50.slb lmstat validdat
license.dat lmdown lmhostid lmstrip
lmborrow lmfeats lmrandom lmswitchr
lmcksum lmgrd lmremove lmutil
lmclient lmgrd-41.slb lmreread lmver

ar0s03:marrochi> lmutil lmver lmgrd


lmutil - Copyright (C) 1989-1994 Globetrotter Software, Inc.
FLEXlm Copyright 1988-1996, Globetrotter Software, Inc.
FLEXlm 5.0b (lmgr_s.a), Copyright (C) 1988, 1996 Globetrotter Software, Inc.
FLEXlm 5.0b (liblmgr.a), Copyright (C) 1988-1996 Globetrotter Software, Inc.

ar0s03:marrochi> lmutil lmver lmgrd-41.slb


lmutil - Copyright (C) 1989-1994 Globetrotter Software, Inc.
FLEXlm 4.1 (lmgr_as.a), Copyright (C) 1988-1994 Globetrotter Software, Inc.
FLEXlm 4.1 (lmgr_s.a), Copyright (C) 1988, 1993 Globetrotter Software, Inc.
FLEXlm 4.1 (lmgr.a), Copyright (C) 1988-1994 Globetrotter Software, Inc.

ar0s03:marrochi> lmutil lmstat


lmutil - Copyright (C) 1989-1994 Globetrotter Software, Inc.
Flexible License Manager status on Fri 2/5/99 11:03

License server status (License file: /usr/local/flexlm/licenses/license.dat):


ar0s03: license server UP (MASTER)

Vendor daemon status (on ar0s03):


lmgrd.slb: UP

ar0s03:marrochi>

ar0s03:marrochi> lmutil lmdiag


lmutil - Copyright (C) 1989-1994 Globetrotter Software, Inc.
FLEXlm diagnostics on Fri 2/5/99 11:10

-----------------------------------------------------
License file: /usr/local/flexlm/licenses/license.dat
-----------------------------------------------------
"ApplicationManager" v5.000, vendor: lmgrd.slb
License server: ar0s03
floating license starts: 1-jan-95, expires: 1-jul-2001

This license can be checked out


-----------------------------------------------------

Enter <CR> to continue:

"CPS-3Mapping" v5.000, vendor: lmgrd.slb


License server: ar0s03
floating license starts: 1-jan-95, expires: 1-jul-2001

This license can be checked out


-----------------------------------------------------

Enter <CR> to continue:

"ModelEditor" v5.000, vendor: lmgrd.slb


License server: ar0s03
floating license starts: 1-jan-95, expires: 1-jul-2001
This license can be checked out
-----------------------------------------------------

The OFM administrator handbook____________________________________ Page 103


Enter <CR> to continue:

"CPS-3MapEditor" v5.000, vendor: lmgrd.slb


License server: ar0s03
floating license starts: 1-jan-95, expires: 1-jul-2001

This license can be checked out


-----------------------------------------------------

ar0s03:marrochi>

Ping
Ping is a utility included with standard TCP/IP network software. It is a basic command
but very useful for troubleshooting FLEXlm. You can use ping only for Windows and
UNIX servers. Novell uses SPX/IPX, and I don’t know any equivalent.

Ping is a command that takes usually one argument: the machine you want to ping. If
the TCP/IP communications are working between both machines, then ping returns the
echo of the remote computer25.

Because a network link can be seen as a chain, you can try to troubleshoot it in
sections. Be optimistic and try the full link first. If it does not work, the test the different
parts.

For example, suppose you are sitting on an OFM PC and you can’t get the license from
the server gaucho. One of the things you must check is that your OFM machine can
actually contact the gaucho server through the network, so you open a command
prompt window and type:

C:\WINDOWS>ping gaucho

Pinging gaucho [163.186.32.25] with 32 bytes of data:

Reply from 163.186.32.25: bytes=32 time=1ms TTL=128


Reply from 163.186.32.25: bytes=32 time=1ms TTL=128
Reply from 163.186.32.25: bytes=32 time=1ms TTL=128
Reply from 163.186.32.25: bytes=32 time=1ms TTL=128

Ping statistics for 163.186.32.25:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms

C:\WINDOWS>

If ping succeeds, the message finds the machine and gets its reply. This can ensure you
that you have a valid link to the server. Your problem has to be somewhere else. If it
fails, then your license process will fail as well.

25
Ping is not using the complete TCP/IP stack. In fact, it does not even use TCP (just ICMP) but
is usually enough for testing purposes.

Page 104 ____________________________________ The OFM administrator handbook


As in any network, machine names are for humans. All communications are actually
done using the network address, so if you decide to use computer names, the
mechanism for transforming any machine hostname to its network (IP) address has to
be working properly. This mechanism is usually called resolving. You should see how the
previous ping command resolved the name gaucho into 163.186.32.25, gaucho’s IP
address.

In the PC world, there are two common systems to find the correspondent IP address of
a given hostname: WINS26 (Windows Internet Name System) and DNS (Domain Name
System). WINS is only for Windows. DNS is the standard used for the Internet and any
platform running TCP/IP supports it.27
Is up to your client’s IT department, to decide which system is being implemented on
their network and you should discuss the subject with them, in case you encounter
problems resolving names to IP addresses.

If the ping command does not work (ping gaucho fails), then you have to decide
whether it failed due to a real connection problem or simply because your ping could not
figure out the corresponding IP address.

The easiest way to do this is by directly pinging to the IP address of the target machine.
The following scroll shows you an example:

C:\WINDOWS>ping 163.186.32.25

Pinging 163.186.32.25 with 32 bytes of data:

Reply from 163.186.32.25: bytes=32 time=2ms TTL=128


Reply from 163.186.32.25: bytes=32 time=1ms TTL=128
Reply from 163.186.32.25: bytes=32 time=1ms TTL=128
Reply from 163.186.32.25: bytes=32 time=1ms TTL=128

Ping statistics for 163.186.32.25:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms

C:\WINDOWS>

When you ping directly to the desired IP address, then you don’t use the name-to-IP
process and aim directly to machine. If pinging to the IP fails, then you have a network
problem. If pinging to the IP works but pinging to the name fails, then your name
resolving mechanism is failing.

When only your name resolution isn’t working but you can successfully ping to the
server’s IP, then you have two possible ways to go:

26
This is the most popular name-to-IP dynamic system. You can also use a static local file with
the equivalents between names and IPs. This file is named hosts (for the DNS system) and
lmhosts (for the WINS system).
27
When you type www.slb.com on your Internet browser, it is resolved to 192.23.80.10 by the
DNS server you are set to use.

The OFM administrator handbook____________________________________ Page 105


• Ask your client’s network administrator to fix the resolving system
• Replace hostnames by their corresponding IPs

For example, if I had this license file for gaucho

SERVER gaucho 00605301f8e6 1700


DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe
FEATURE OFM32 lmgrd.slb 3.2 1-jul-2001 3 5EAD31C6383 ck=115
FEATURE OFMMBAL lmgrd.slb 3.2 1-jul-2001 3 14401C55D53 ck=84
FEATURE OFMBA lmgrd.slb 3.2 1-jul-2001 3 404551C6354 ck=55

And I can’t ping gaucho but I can ping gaucho’s IP, then I could edit the license file to

SERVER 163.186.32.25 00605301f8e6 1700


DAEMON lmgrd.slb c:\flexlm\lmgrdslb.exe
FEATURE OFM32 lmgrd.slb 3.2 1-jul-2001 3 5EAD31C6383 ck=115
FEATURE OFMMBAL lmgrd.slb 3.2 1-jul-2001 3 14401C55D53 ck=84
FEATURE OFMBA lmgrd.slb 3.2 1-jul-2001 3 404551C6354 ck=55

And make it work.

Using IP numbers is not the best decision you can make and should be left as a last
resort. In some networks, IP addresses are dynamic28, which means that the same
machine could boot every time with a different numbers. If that happens and you are
using IP numbers, your licensing system will fail. Try to fix resolving problems and use
computer names. That is my best advice.

Another problem is that sometimes, you can ping to the IP address of your server
successfully, but when you attempt to ping its name, you get an error about a bad IP
address. This means that somehow, your computer could resolve the name into an IP
address, but the number is not the actual address of the machine. In these cases, you
can’t even use IP numbers. You need to fix your naming resolving problems.

When nothing works…


If you can’t ping the license server, then you need to get less ambitious and just test
your PC’s network setup. Then you move towards the server, checking the different
parts in between. First, to make sure that TCP/IP is installed on that machine, open a
command window and type:

C:\WINDOWS>ping localhost

Pinging milci.buenos-aires.geoquest.slb.com [127.0.0.1] with 32 bytes


of data:

Reply from 127.0.0.1: bytes=32 time<10ms TTL=128


Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128

28
It is very popular to have a network where IP addresses are given on demand to clients by a
server. The most popular implementation is known as DHCP (Dynamic Host Configuration
Protocol).

Page 106 ____________________________________ The OFM administrator handbook


Reply from 127.0.0.1: bytes=32 time<10ms TTL=128

Ping statistics for 127.0.0.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\WINDOWS>

This is a ping to your own machine (a very short trip). Localhost is a generic and
universal name for your machine, as seen from its console. The equivalent IP (also
universal) for localhost is 127.0.0.1 (see the previous scroll). This is not the real IP of
your machine. It is a universal convention. Localhost is always an equivalent for the
name of the machine. 127.0.0.1 is always an equivalent to your own IP address.

If this works, then find out the real IP of your machine and ping to it29. Doing this will
ensure that your TCP/IP software works. Notice that you don’t need the network cable
to perform this test, so no external hardware is actually tested.

If the previous step worked, then the next one will try to ping to the closest device you
can. The possibilities are now two:

• Your license server is in the same IP sub-network


• Your license server is on a different IP sub-network.

When your PC and license server are in the same sub-network, then all there is in
between is simple hardware (cables, hubs). You need to check your network cable and
connections. Try to ping the server from another machine, to make sure that the
problem is not the server’s connection. If all this is OK, then check with your client’s
network administrator and explain him your tests.

If your license server is on


another sub-network, then a
router is needed for your
ping. A router is another
computer that forwards your
ping to the server and its
replies back to you. In this
case, it is obvious that you
need to test your connection
to the router.

The router’s IP is also known


as Default Gateway and
you can find it in the same
way you found the IP address
29
From Windows NT, get your IP with the ipconfig –all command. For Windows 95, run the
winipcfg program (Start/Run/winipcfg). Windows 98 has both options available.

The OFM administrator handbook____________________________________ Page 107


(see previous footnote).

The figure shows the results of winipcfg in Windows 9x. Notice the values of the PC
and router’s IP addresses. Make sure you have properly selected the PC’s network card
(Novell 2000 Adapter, in the example).

The scroll shows how to get the same information on Windows NT.

C:\WINNT>ipconfig -all

Host Name . . . . . . . . . : milci.buenos-aires.geoquest.slb.com


DNS Servers . . . . . . . . : 163.186.32.4
Node Type . . . . . . . . . : Hybrid
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : No
WINS Proxy Enabled. . . . . : No
NetBIOS Resolution Uses DNS : Yes

0 Ethernet adapter :

Description . . . . . . . . : Novell 2000 Adapter.


Physical Address. . . . . . : 00-00-21-4D-B4-D9
DHCP Enabled. . . . . . . . : No
IP Address. . . . . . . . . : 163.186.32.15
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 163.186.32.1
Primary WINS Server . . . . : 163.186.32.4
Secondary WINS Server . . . :
Lease Obtained. . . . . . . :
Lease Expires . . . . . . . :

C:\WINNT>

The progressive checks I have previously described are in the following scroll. Notice
that I start checking the client PC and then progress to the router and finally the license
server.

C:\WINDOWS>ping localhost <-Ping to myself, without IP address yet

Pinging milci.buenos-aires.geoquest.slb.com [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<10ms TTL=128


Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128

Ping statistics for 127.0.0.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\WINDOWS>ping 163.186.32.15 <-Ping to myself, with my real IP address

Pinging 163.186.32.15 with 32 bytes of data:

Reply from 163.186.32.15: bytes=32 time<10ms TTL=128


Reply from 163.186.32.15: bytes=32 time<10ms TTL=128
Reply from 163.186.32.15: bytes=32 time<10ms TTL=128
Reply from 163.186.32.15: bytes=32 time<10ms TTL=128

Page 108 ____________________________________ The OFM administrator handbook


Ping statistics for 163.186.32.15:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\WINDOWS>ping 163.186.32.1 <- Ping to my router

Pinging 163.186.32.1 with 32 bytes of data:

Reply from 163.186.32.1: bytes=32 time=6ms TTL=255


Reply from 163.186.32.1: bytes=32 time=2ms TTL=255
Reply from 163.186.32.1: bytes=32 time=2ms TTL=255
Reply from 163.186.32.1: bytes=32 time=2ms TTL=255

Ping statistics for 163.186.32.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 6ms, Average = 3ms

C:\WINDOWS>ping gaucho <- Ping to license server (using name)

Pinging gaucho [163.186.32.130] with 32 bytes of data:

Reply from 163.186.32.130: bytes=32 time=1ms TTL=128


Reply from 163.186.32.130: bytes=32 time<10ms TTL=128
Reply from 163.186.32.130: bytes=32 time<10ms TTL=128
Reply from 163.186.32.130: bytes=32 time<10ms TTL=128

Ping statistics for 163.186.32.130:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\WINDOWS>

The OFM administrator handbook____________________________________ Page 109


Page 110 ____________________________________ The OFM administrator handbook
Chapter 3 – The OFM Database

Introduction

This chapter is intended to illustrate the OFM database model and engine, from a DBA’s
point of view. I would assume that you are familiar with basic terms and feel more or
less comfortable designing a relational database (with Access ®, for instance). If you
have been using OFM and understand a bit of its database jargon, you should be fine. At
the end of this chapter, you will understand the database model and understand the
basics of a project creation. Further information to build a professional database will be
given in other chapters.

Databases

Generally speaking, there are two basic schools for storing data: Flat File and Relational
databases.

Flat File database.


Suppose we want to store well information such as geographic coordinates, total depth,
date it started production, etc. Our database will look like:

WellName X loc. Y loc. TD DateOn Producing from SPF


BLUE_1 1243 5433 1600 Nov-94 1420 - 1440 4
RED_2 2354 2343 1520 Jul-93 1510 - 1515 4
GREEN_5 4232 1232 1500 Jan-97 1486 - 1493 6

This is just fine and I am sure that everyone has built a file like this before. However,
things get very complicated when you start storing history of values that change in time
(or depth). For example, suppose we want to add WHP history. We could start loading a
spreadsheet like this one:

WellName X loc. Y loc. TD Feb-98 Mar-98 Apr-98 May-98 Jun-98 Jul-98 Aug-98 …
BLUE_1 1243 5433 1600 2200 2200 2160 2100 2100 2060 2020 …
RED_2 2354 2343 1520 2190 2190 2140 2070 2090 2044 2010 …
GREEN_5 4232 1232 1500 2195 2195 2150 2085 2095 2052 2015 …

The OFM administrator handbook____________________________________ Page 111


Remember: the flat file database model is one big table, like the one above. There is
one row of information per well. In that line, you write everything that belongs to that
well. If you want to track also the water production, you will need to add columns for it
(one column per date). As you can guess, this is a very simple model and was adequate
for our first example but extremely inefficient for the second one. Notice that all data
goes to one file and as it grows, the computer power needed to manage will also grow.
Imagine how big your table will be if you consider having one row for every well and
columns for: Coordinates, well equipment, historic production of oil, gas and water, test
data, etc. This spreadsheet will be impossible to use and maintain.
An obvious solution will be to split the data in multiple pieces. For example, all data that
is static (values that do not change, like coordinates or names) could go in one table,
all WHP data could go to another one, etc. Then you spread the rest of the data in
multiple files, such as:

WellName X loc. Y loc. TD DateOn Producing from SPF


BLUE_1 1243 5433 1600 Nov-94 1420 – 1440 4
RED_2 2354 2343 1520 Jul-93 1510 - 1515 4
GREEN_5 4232 1232 1500 Jan-97 1486 - 1493 6

WHP BLUE_1 RED_2 GREEN_5 OIL BLUE_1 RED_2 GREEN_5


Feb-98 2200 2190 2195 Feb-98 96 86 91
Mar-98 2200 2190 2195 Mar-98 96 86 91
Apr-98 2160 2140 2150 Apr-98 94 84 89
May-98 2100 2070 2085 May-98 91 81 86
Jun-98 2100 2090 2095 Jun-98 91 81 86
Jul-98 2060 2044 2052 Jul-98 90 80 85
Aug-98 2020 2010 2015 Aug-98 88 78 83

The data is split among different files. The computer resources needed to manage these
individual files are much less, however, there is a big drawback: the maintenance and
use of this data is much more complicated. Imagine you want to put in one report all
BLUE_1 data: You will have to access all three files and synchronize them. If by mistake,
you call this well BLUE_1 in one table and BLUE-1 in another, then automating a report
will fail. This seems quite simple to solve, but when you have a few thousand wells, with
tens of years of history, then is not that simple.
Imagine also the case where you want to report, for a particular geographic region, the
cumulative oil produced: you need to access the first table and based on the
coordinates, select the list of wells. Then you need to open the oil file and based on that
list, add all oil produced by them. Although working with independent tables is feasible,
it gets hairy when the amount of data increases.

Page 112 ____________________________________ The OFM administrator handbook


Relational database
A relational database is a model that automates a system very similar to the one
described just before. The data is split among different tables but the system makes
them look as a single big one, with one line per well and all related data in columns.
The system maintains the relations between the tables to make them a consistent data
set. Imagine, if you delete a well from the main table, then all data in other tables that
belongs to that well must be deleted too. You can’t have orphan data. Also, you can’t
add data for BLUE-1, if the name of the well is BLUE_1. To avoid this kind of errors,
data must be loaded in only one place and referenced from other places. For instance,
the name BLUE_1 should be in only one table. If you change it (rename the well), then
all data that belongs to it will belong to the new name.

The system that unifies the different files is known as the database engine. The main
functions of a database engine are:

• Maintain data consistency (avoid orphan data),


• Maintain the relations between the files to make them all look as one single table,
• Implement data validity checks (for example, avoid input invalid dates),
• Maintain data sorted, even if is not loaded in the proper sequence,
• Provide search tools to quickly find desired data,
• Etc.

Lets see an example of a set of related tables, maintained by a database engine.

Notice the extra column in the main table (ID). This is very common for relational
databases. The ID is a number that is unique and identifies each row of the table
(record). Notice also that, as said before, the well names are now present in only one
table, so changing it there will change it also for all data related to it. The database

The OFM administrator handbook____________________________________ Page 113


engine keeps the links between the tables using the ID of the main table. Notice that
this ID number is also present on the other two tables, to identify the owner of the data
(same color has been used to make the figure more readable).

The previous model is not a good relational database design. Imagine that if you add a
well, you will have to modify the structure of the tables and add a column to store the
new well’s data. Changing the database structure is not something you want to do very
often, so you have to reorganize the division scheme in a more efficient way. The next
figure shows another possible scheme. Pay attention to this one because this is almost
the way OFM does it. Notice that adding a well is now simple as adding rows to existing
tables.

Table keys
One of the tasks of the database engine is to retrieve the data stored in the database.
To do this, it needs to identify every record without problems and this is implemented
around primary keys. A primary key is a column of the table (or combination, as we
will see) that has a unique value. If you look at the Main Table of the previous figure,
the column ID is used for that. No two different wells (records) can have the same ID
value. If that happened, then it would be impossible for the database to identify the
other data (for example, OIL production) related to it.

Of course, primary keys are very useful for relating tables as well. Notice that you can
inspect the OIL records and tell to which well they belong by inspecting the ID field.
When a primary key (such as the ID of the Main Table) is used to relate two tables, it
receives the name of foreign key in the related table.

Page 114 ____________________________________ The OFM administrator handbook


Notice that this field (ID) can’t be the primary key of the related table simply because it
repeats in many records. There is no single column that could be used as the primary
key. However, notice that the combination of ID and Date is unique for each record:
You can’t have two lines for the same well on the same date. Is it quite common to build
a primary key with a combination of two or more columns. OFM does that, so for
production tables, the primary key (the one that uniquely identifies each record) will be
composed of these two columns.

Remember:
• A primary key is mainly used by the database for identifying records in a table. As
a general rule, you must have a primary key defined per table.
• Primary keys are also perfect for relating tables. Primary keys that are used for a
relation between tables are known as primary keys on their native table and as
foreign key on the other side of the link.

In general, when building a relational database, you can define any number of tables
and establish the relationships between them as you please. When you use OFM, you
don’t have so much freedom but neither have so much work. OFM is a customized
relational database that automatically defines and maintains all needed relations for you.
The advantage is that you don’t have to worry about them. OFM’s engine does this
database engineering for you. The disadvantage is that you can’t do anything you want.
You have to adapt your data to the OFM model. Don’t worry, it is quite complex and
generally speaking, you will never face the limitations.

OFM Relational Database

As a customized relational database, OFM has predefined table-types: you have a list
of available table models, each one optimized to store a particular type of data, and you
have to assemble your database combining them. An OFM table-type has predefined
how this table will be related to the other ones. You still have the control over the rest
of the table parameters (such as number, names and data type of the columns). The
OFM predefined table types are:

• Static
• Static Master
• Monthly
• Daily
• Sporadic
• Filter (Sort)
• Xref
• Lookup
• Trace
• WBD
• DEV

The OFM administrator handbook____________________________________ Page 115


Static and Static Master: A static table contains data that does not have history (you
don’t record several values). For example, a well name, its coordinates or the type of
gun used to shoot an interval. There is one value for this data and it rarely changes with
time or other parameter (if it does, it is generally a correction to the value). You can
define any number of static tables and they are related to the static master table by the
primary key of the database.
The Static Master is the main table of the database and the one to which almost all
other data is related to. You can define only one static master table. As any static table,
it contains data that does not change. This is the table where you load the objects you
want to analyze in the project (wells, intervals, tanks, etc.). Each object in this table
(stored in a record) will be plotted on the base map with a symbol. The coordinates for
each of these objects are also stored in this table. Notice that I’ve been using the word
object, but the correct OFM term is entity30. The primary key of the static master table
is always the first column defined and must be an alphanumeric type of data.

Monthly, Daily: These tables store values that belong to the entities stored on the
master static table and that change with time. Monthly tables allow you to store one and
only one value per month. Daily are equivalent to monthly but they allow you to store
up to one value per day. The primary key of these tables is composed of two columns:
the static master’s primary key (a foreign key) and the Date column. Because this
relation is pre-defined for the OFM database, when you define one of these tables, OFM
automatically adds the primary key and Date columns an establishes the relation to the
static master table. You can have many monthly or daily tables.

Sporadic: A sporadic table is designed to store values sporadically. These values can be
sporadic in time or depth, so this is the type of table to use, for example, when you
want to load tests data (sporadic in time) or core data (sporadic in depth). Because it
can be used for these two purposes, OFM does not completely define primary key of the
table. OFM just adds the master table’s primary key. The first column you need to define
is the one that will be merged with the ID to generate the primary key (ID + DATE or ID
+ DEPTH). You can have may sporadic tables.

A valid question arises now: If I can store values with any time frequency, why should I
choose monthly or daily, when I have much more flexibility with sporadic tables?. The
answer is not very clear now, but I will try to justify it: sporadic data can’t be
commingled. If you put your production data in a sporadic table, you will be able to
report it only one entity at a time. You can’t report a group of wells together. Not even a
group of layers that belong to a same well. Just think: in order to add values, they have
to belong to exactly the same date, and this is by no means guaranteed with sporadic
tables.

Filter (Sort): A filter table (known also as a sort table) is not exactly a table but can be
seen as one. You can have only one filter table per database and it can have up to fifty
columns. This is a special table that you don’t create (although you can change its

30
An entity is the general name for whatever you put as a row in the static master table. They
could be perforated intervals (if you can measure production per interval), wells (if you measure
total well production), a pump, a tank, any combination of them, etc.

Page 116 ____________________________________ The OFM administrator handbook


default name SC). It will be automatically created when you need it. As filter table is
employed to categorize the entities loaded and have a quick way of “sorting” them out.
Some typical examples for sort data are:
• Have a sort column stating for each entity what kind of symbol it should get on the
map.
• If your entities are intervals, you could have a sort column stating the reservoir
being produced.
• If your entities are intervals, you could have a sort column stating what tank their
production is going.
If you look at the next figure, a filter (sort) table is an extension to the static master
table. However, OFM uses both tables in a very different way, for instance: you can’t
store coordinates in a filter table. Many operations are possible only with filter and not
with static master data and vice-versa.

Xref and Lookup: These tables contain reference data that is not related to anything.
These tables are normally used as a dictionary or a translation table. For example:

• The price of oil depending a certain quality factor,


• The average transit time of a type of rock,
• The Rw of a particular formation,
• PVT data.

You can have many Xref or Lookup tables.

Trace: These tables are designed to store log curves (i.e., data that belong to a well
and changes with depth). Beware that OFM defines just the foreign key on this table-
type. It does not create the first -mandatory- column (DEPTH). You have to manually
define this one and you should use that name. You can have many trace tables.

WBD: You can have only one of these tables and they are designed to store well
equipment information, such as casing, packers, etc. The Well Bore Diagram module
uses this data. The structure is predefined and you can’t modify it. In other words, you
can’t choose the number or names of the columns of this table. If you need a WBD
table, it will be automatically created for you by OFM.

DEV: These tables store well deviation data. OFM uses deviation data to plot well
trajectories on the base map and also to convert depth dependant data to TVD. This
table is also automatically created by OFM when you need it. You can have only one per
database and you have no control on its columns.

The following figure summarizes most of the mentioned table types and the way they
relate to the static master table. Notice that the Xref and Lookup tables are not related
to anything, so you have total freedom for loading any data there.

The OFM administrator handbook____________________________________ Page 117


An example
As said before, almost any data loaded to the project belongs to something. For
example,

• Production data belongs to a production interval or well,


• Log data belongs to a well,
• Downhole facilities data belong to a well, etc.

We will start considering simple production data measured once a month and then move
forward to more rich data sets. In order to load simple production data, you must have
(at least) two related tables (see next figure):

A static master table


A monthly table

The static master table contains a list of the possible owners of the production data to
load. First, you populate the static master table with entities and then load the
production table with the production data that belong to these entities. You can’t load
data in the production table that belongs to an entity that is not listed in the static
master table.
In order to clarify this, let’s analyze the following figure. Notice the two mentioned
tables, with some names:

• A static master table named by the user as HeaderID


• A monthly table named by the user as MonthlyProd

Page 118 ____________________________________ The OFM administrator handbook


Each line of the static master table (HeaderID) stores an entity and any data loaded in
the production table (MonthlyProd) belongs to one of these entities. When an entity is
deleted from the master table, OFM deletes all the data in the production table that
belongs to it, preserving data consistency.

Entities

Primary Key

Notice also the arrows showing you the relations kept by OFM between the two tables
(joining data with same colors). As mentioned before, in the relational database jargon,
the column (or combination of columns) that contains the data that uniquely identifies a
row is known as primary key. This key is what can’t be repeated in a table because it
identifies the record and allows the database engine to find it.
In the static master table, OFM automatically creates the primary key using the first
column of the table (you must create this column as string type). You can see the
primary key (named by the user as UID) of the static master table in the previous
figure.

For monthly tables, the primary key is a combination of two columns. The owner of the
record (the primary key of the static master table) and the date. The OFM database
engine automatically creates both columns when you define the table as MONTHLY.
This combination is unique for every row of the monthly table. You can’t have different
data (more than one record) for the same entity on the same date, but you can have as
many dates as wanted for the same entity.
Just to refresh previous statements, I would like to repeat that when a primary key is
being used in other table for a relation, in this related table it is known as a foreign
key, so:

• UID is the primary key for the HeaderID table


• UID is a foreign key for the MonthlyProd table
• UID+DATE is the primary key for the MonthlyProd table

The OFM administrator handbook____________________________________ Page 119


An ASCII file, known as definition file implements the definition of these two tables in
OFM. It is recommended to append a “def” extension to this file name.

The minimum contents of this file needed to implement our example would be:

//Contents of *.def
*TABLENAME HEADERID Static Master
UID STRING 10
X FLOAT
Y FLOAT
SYMBOL STRING 10

*TABLENAME MONTHLYPROD Monthly


OIL FLOAT
GAS FLOAT
WTR FLOAT

Each OFM command goes preceded by a *. Notice the following points:

• *TABLENAME tells OFM to create a table.


• The type of table must be specified after the given name
• The first column defined for the static master table is of STRING type and will be
automatically used by OFM as the primary key of the static master table.
• UID or DATE are not defined by the user in the monthly table. OFM creates them
automatically.

The previous file will just create the tables. To populate these tables, you need to
prepare the data files. They are also ASCII files and you should also try to stick to the
standard file name extensions. For the data that goes to the master table, the
recommended extension is “xy”. For the monthly data, try to use “prd”, “dat” or “inj”.
Remember that you first load the master table and then the monthly table. The first file
(*.xy) would then be:

//Contents of *.xy
*TABLENAME HEADERID
*UID *X *Y *SYMBOL
P1:R1 1232 3212 OIL
P1:R2 1232 3212 OIL
P3:R3 1235 3210 GAS
P3:R1 1235 3210 OIL

Once you load this file, OFM will have these four entities loaded. It will also know the
coordinates and what kind of symbol it should use to plot them on the base map.
Then, the second file you need is the *.prd file, which could have two different formats.
They are equivalent and produce the same results. You can pick the one you like.

The first possible one is:

//Contents of *.prd. Format 1

Page 120 ____________________________________ The OFM administrator handbook


*TABLENAME MONTHLYPROD
*UID *DATE *OIL *GAS *WTR
P3:R1 9601 12 144 132
P3:R1 9602 11 132 121
P3:R1 9603 10 120 110
P3:R1 9604 10 120 110
P3:R1 9605 9 108 99
P3:R1 9606 8 96 88
P3:R3 9602 18 450 432
P3:R3 9603 18 450 432
P3:R3 9604 18 450 432
P3:R3 9605 17 425 408
P3:R3 9606 16 400 384
P1:R2 9604 9 45 36
P1:R2 9605 6 30 24
P1:R2 9606 6 30 24

The other possible format for the “*.prd” file could have been:

//Contents of *.prd. Format 2


*TABLENAME MONTHLYPROD
*DATE *OIL *GAS *WTR
*KEYNAME P3:R1
9601 12 144 132
9602 11 132 121
9603 10 120 110
9604 10 120 110
9605 9 108 99
9606 8 96 88
*KEYNAME P3:R3
9602 18 450 432
9603 18 450 432
9604 18 450 432
9605 17 425 408
9606 16 400 384
*KEYNAME P1:R2
9604 9 45 36
9605 6 30 24
9606 6 30 24

Notice that:
• Because this is a monthly table, the format of the date did not include the day. If
you do, OFM will simply ignore it. Possible date formats could have been 199601,
19960123, 960101, 9601 and some other ones.
• Columns don’t need to be nicely aligned. All you need to separate one column from
another one is a space, a tab or any combination of both. For this reason, if you
have string names with spaces in between, you need to enclose them between “”.
For example, if instead of using P3:R1, you could have used P1 R1, but it should
have been enclosed in “” in the ASCII file, as “P1 R1”.

The OFM administrator handbook____________________________________ Page 121


• The entity P1:R1 has been loaded to the master table but contains no production
data yet.

Divide to Group
You choose what to store as an entity, depending you what kind of data you receive
from the field. If you receive the production figures for every perforated interval of
every well in your project, then you want to have this data available and store
production per interval (you entities will be intervals). If all you get is the total well
production and you can’t separate this figure among the different intervals of the well,
then you will have to store the production per well (you entities will be wells). If you
receive both, nothing stops you from mixing them, as long as you understand how to do
that.

Once your basic data is stored in the database, OFM gives you plenty of tools to group31
this data as pleased. The concept you need to remember is:

Store the data with as much details as you can and the use OFM features to
group it and analyze it as needed.

Say that you could store production per perforated intervals. Then you could:

• Group this data per well (group all intervals belonging to a well)
• Group this data per reservoir (group all intervals perforated on the same reservoir)
• Group this data per field (group all intervals perforated on the same field)
• Group all this data (group all intervals of all wells)
• Group only the intervals that produce oil
• Group only the intervals that have been producing during last quarter
• Etc.

Again, once you have the details, you use OFM grouping tools to analyze data together,
as needed for your study. For instance, you don’t normally report cumulative production
per interval but a summary report of cum figures per reservoir, field, etc.

How does OFM know which intervals belong to what reservoir, or well, or field, or…?
Well, you have to tell OFM this when you load the data, so you can use it later.

There are basically three ways of easily32 grouping data in OFM:


• Filter categories
• Wellbore
• Patterns
Let’s quickly review them.

31
There is a short section ahead explaining what is the meaning of grouping in OFM. Be patient.
32
Easily means by a few mouse clicks. There are other important ways of grouping data, for
example by querying the database. You could query the database to find all wells that have been
producing with a water cut greater than 30% during the their last six months of production and
then group them together.

Page 122 ____________________________________ The OFM administrator handbook


Filter Categories
The most commonly used tool for grouping data in OFM is a filter category. Based on
the following figure, we explain.

OFM lets you create one special type of table known as filter (or sort) table where each
column is known as a category. This table is related to the static master table and has
one (and only one) row per every row of the master table (see figure above). You could
think of if as an extension (extra columns) of the static master table. The big difference
is that OFM has many menus and operations associated with the filter table columns
that are not available for static master columns (and vice-versa).

Once you define the filter table and load it with data, you can quickly locate groups of
entities that interest you. For instance:
• Grouping by selecting the Reservoir 1 of the Reservoir filter category will give you
one set of data of all the intervals producing from this reservoir (P1:R1 and
P3:R1).
• Grouping by selecting the B1 of the Battery filter category will give you one set of
data of all the intervals.
• Grouping by selecting the Field A of the Field filter category will give you one set of
data of all the intervals producing from this field (P1:R1 and P1:R2).
• Grouping by selecting the Field A of the Field filter category and Reservoir 1 from
the Reservoir category will group only one interval (P1:R1).

All this is has been explained to stress how important is to store data with as much
detail as possible and how OFM lets you group it easily, once you define and load data
to the filter categories.

Filter categories are flexible and accessible through many features of OFM. You can
create up to fifty (50) filter categories and they must contain alphanumeric data.

Wellbore
When you load many intervals per well (your entities are perforated zones), you could
look at a well as a group of different zones or as a whole (the total of all the zones
perforated on that particular well). OFM has a special switch for that, under
Tools/Settings/Preferences (in OFM 2.2 was Options/Wellbore). See the next figure.

By selecting Use individual completion data, OFM maintains visibility over the
different intervals of the wells (for instance, you could select just one zone of a well for
your plot). You probably noticed this if you clicked on a well with more than one
interval: OFM pops up a window with the list of zones asking you which one you want to
use.

The OFM administrator handbook____________________________________ Page 123


However, if you choose Group all
completions by wellbore, OFM can’t
distinguish anymore the different
completions of a well and works with the
total of all the intervals that belong to the
well as one big zone. When you click on a
well with multiple zones, OFM does not
ask you any more and directly groups all
the completions together.

How does OFM knows which intervals


belong to which wells? Again, you have
to tell OFM how to do it!

This is a two step job:


• Define and load one column in the static master table with wellbore information
• Instruct OFM which column has this information.

Let’s see an example of a static master table with this information:

Notice that there is a column named


(arbitrarily by the user) WellName
that specifies to which well the entity

belongs.

So the first two intervals are physically perforated


on the well “Well P1” and so on. It is extremely
important to notice that OFM does not get this
information from the names33 nor it does get it from
the coordinates of the interval34. You have to load
this information on a column of the static master
table, as shown above.

The way to tell OFM, which of the columns contains


this wellbore information, is by selecting it as the
Wellbore column.
Go to Edit/Map/Association/Wellbore. The
Data Association window pops up.

33
In the name P1:R1, P1 means nothing to OFM
34
Coordinates are used to plot the symbol on the map when you choose to draw the symbol at
surface coordinates.

Page 124 ____________________________________ The OFM administrator handbook


Notice the figure, which corresponds to our example, where we have chosen the column
named WellName for the Wellbore association.

Wellbore information is a very important point when building the OFM database. If you
have interval data, then you load all intervals and tell OFM to which well they belong to
by associating the wellbore column as shown
before.
You can have any number of intervals per well.
However, you still need to point OFM to a valid
wellbore column.

If all you have is production data per well and


you will never have individual completion data,
then you could think of this as wells with one
interval. You could also simplify your database
by associating the wellbore column to the
primary key (see figure). This will fulfill OFM
requirements and save you one column. Now, to
OFM, your entity name will be your well name as
well.

Patterns
Patterns are another way of easily grouping entities. The main difference is that when
pattern data is grouped together, the figures will be affected by a Factor and Loss
coefficients individually (before grouping) using the following equation:
Data grouped = Data stored * Factor * (1 – Loss)

Because you assign different values to different entities (and possibly during different
time frames), each entity gets affected by it’s own set of coefficients before being
grouped for your study. Patterns deserve a full document and will not be treated here,
just mentioned. Any volunteers out there to write the Patterns Bible?

What is grouping, anyway?


Grouping (in OFM 2.2 was known as LOADING) is a also a general term in OFM. When
you group different entities (say different intervals) data is put all together as one.
Notice that I could easily say “added together as one” but this is not always true. You
specifically tell OFM how to group data when you define the column that contains the
data. This kind of information can be given to OFM in the *.def file, with special
keywords. However, it is a lot easier to do from within the program. If you notice the
following figure, you can see some definition details of the OIL column of the
MonthlyProd table.

The OFM administrator handbook____________________________________ Page 125


In the Average Type option, this variable has NONE, which means, just add the OIL
of the different entities when more than one is grouped together and return the total
addition. You could also select different types of averages (ARITHMETIC,
GEOMETRIC, etc.)

For instance, you could use an arithmetic average for production pressure, so when you
group all zones that produce from a reservoir, you will get as a group pressure a value
that is the average of all the individual pressures!

Review 1
Let’s review what has been described so far. If you understood the previous sections,
you can simply skip this one. However, if you read ahead and agree with me, you can
make sure you understood them. Off we go…

OFM has a customized relational database model. By customized we mean that although
you can imitate OFM’s database with other software, you can’t do the opposite: You
can’t build any database structure with OFM. In most cases, this is never a limitation.

Most of the OFM database is centered on a very important table: the static master
table: almost all tables hang from this one, like an inverted tree. However, there are
only two levels: the static master above and all others tables one level below. There are
tables that do not relate to the static master (Xref and Lookup). They are not connected
to this tree.
The first column of the static master table acts as the primary key, used to access the
static master table records and also to establish the relations between this table and the
other ones. The following figure summarizes this concept.

Page 126 ____________________________________ The OFM administrator handbook


Notice that the first column of the static master (in this particular example, named
WellName), is being used to link all tables in the figure. Notice also that all tables are
related to the static master table. In the Monthly, Daily and Sporadic tables, the primary
key is composed always of two values. It is interesting to see also that the monthly
tables don’t store the day of the Date (just the month and year). Daily tables store do
the day information and there is one record per day. Sporadic tables have values that
are sporadic in time or depth.

Finally, the filter table looks like an expansion of the static master table. If we had
another static table on the drawing, it would be linked as the filter table. The difference
is that the filter categories can store only alphanumeric values, not numbers. Also, there
are many OFM tools related to Filter categories that are not available unless the data is
in that table. Notice that the relationship is one-to-one, so you can’t have two (or more)
filter records related to a single static master record.
Although the Filter table looks as if it was an extension of the static master, it is still
related to it and it is not at the same master level in the tree mentioned before. Don’t
get confused by the drawing. You could still drag this table below and re-arrange it as
an inverted tree with only one top node: the static master table.
Xref and Lookup tables have no relationship to the static master table and are not
needed in the figure.

Exercise 1
Using the next figure as example, design an OFM database to store the available
information.

Notice the meters on surface. There is data available per layer (we will assume that the
values recorded are total production per month). There are also many reservoirs, some

The OFM administrator handbook____________________________________ Page 127


of them produce only oil, some produce oil and gas. There is also log information and
also wellbore equipment data. Each well has one or more layers.

Notice that production goes to more than one tank and also that there are many fields
present.

Static Data
The first thing we will do is decide what we will store as entities in our static master
table. Because we do have details of production per interval, we will put layers (or
perforated intervals, completions, etc.) on the static master.
Next, we need to decide what will be the notation to use for these entities. The
convention I will use is a short well name, followed by reservoir information. This format
is quite common. For example, the layer from well P1 producing from reservoir A will be
known as P1A or more clearly as P1:A. The “:” means nothing to OFM, just helps us to
distinguish the different parts from the name. We could also append the type of
production to the name, such as P1:A:O, for Oil. However, experience says that this
does not help much the end user and is more work.

So now, we have the names. They are: P1:A, P1:B, P2:A, P2:C, P3:A and P3:C
(check them against the figure and make sure you understand the notation). We need
the static information of these completions, such as the coordinates, date it started
production, date it was shot, well reservoir and field to which it belongs, the tank to
which is going its production, the hydrocarbon being produced, depth of the completion,
etc. Remember that these are values that are unique and will not change with time. You
decide the information you want to store, depending on how helpful it will be for your
work. OFM is quite flexible here. However, a recommendation will be made:

Page 128 ____________________________________ The OFM administrator handbook


The static master table should include just the minimum information needed by
OFM. This information could be mandatory or optional, if you decide to include
some special options in your project. The list of information that goes to the
static master table is:

• Entity Name (Mandatory)


• Entity X&Y Coordinates (Mandatory)
• Wellbore information (If you have single layered wells, it is optional)
• Alias name (Optional. You could use the Entity Name if you are happy with
these names being plotted on the base map)
• Well TD (Optional. Used for deviated wells)
• Completion Measured Depth (Optional. Used for deviated wells)
• Reference Depth (Optional. Used for TVD corrections)
• Object type (Optional. Needed for objects, if needed)
• Project (Optional. Needed for nested projects)

All other info should be placed in other tables, such as the filter table or spare
static tables. The static master table is accessed by OFM very often, so keeping it
small speeds up the project.

The name and coordinates are the values that must go in the static master table.
Because our field has several layers per well, we must include also a wellbore
information column. All other information could go to the filter table, as long as it is not
numeric data.
Remember that the split between the static master, filter and spare static tables is a
crucial point. You can review on chapter 1, on page 16 (Filter by Category) how will an
end user enjoy the Filter information. Anything that can be categorized with an
alphanumeric value should go to the Filter table, if possible. If it is a numeric value
(such as the porosity of the formation), should go to a spare static table. If the project is
small, you could place this numeric data in the master table. However, if you expect the
project to grow, then a spare static table should be seriously considered.

We can now design the static master and filter tables. Assign them some arbitrary
names and load the data. Because the project is small, extra static numeric information
(WellTD and DateOn) will be loaded to the master table. The tables should then look
like:

There are still some comments to do about them.

The OFM administrator handbook____________________________________ Page 129


• Notice that coordinates are loaded for each layer and not the well. This is redundant
data and you can’t avoid it. That’s the way it is for the time (version) being.
• For the well name, we decided to use a nice descriptive name such as Well P1,
instead of just barely P1. You could place other information there, such as the full
company notation. This name will be used to individualize data per wellbore, such as
a wellbore diagram or a log.
• Remember that OFM needs to know where is this wellbore information, so you will
have to manually point it (as shown on page 123, Wellbore section) to the Well
column of the static master table.
• The Filter table is automatically created by OFM when you load data to it. By default,
the table is named SC (Sort Categories) although you can change the name later.
• Each completion (record of the master table) will have its own symbol on the map.
Because each well has two completions with equal coordinates, OFM will draw two
symbols on each location. If you ask OFM to show the well names (Edit/Map/Well
Names), it will also place the completion name over the symbol. Because two
symbols are being plot on each location, OFM will draw both names on the same
spot and the result will be messy. The following figure
clarifies this. See how P1:A overlaps with P1:B. To solve
this problem, OFM can be instructed to use ALIAS
information for the map name, instead of the full name. If
you carefully use the same alias for different layers, then
exact names will be plotted (one over the other) and the
result will look as a single neat
name, as shown on the second
figure. In this case, OFM was told
that the ALIAS information was contained on the Well
column and instructed to use the alias name for the map.
Remember that this is a small project and a long name such
as Well P1 plots well. If you map gets crowded, then these
long names will start to overlap as well. In such case, you
will have to add another column to the static master table with suitable alias names
for the map, for instance, just P1 or 1. Having short names on the map makes it
more readable.

The ASCII files needed to build and populate the static master tables are:

• Definition file for the static master table (*.def)

// Contents of a *.def file


*TABLENAME XY Static Master
LAYER STRING 15
X FLOAT
Y FLOAT
WELL STRING 15
WELLTD FLOAT
DATEON UINT4

• Data file to populate the static master table (*.xy)

Page 130 ____________________________________ The OFM administrator handbook


// Contents of a *.xy file
*TABLENAME XY
*LAYER *X *Y *WELL *WELLTD *DATEON
P1:A 12321 82394 "Well P1" 13620 19871102
P1:B 12321 82394 "Well P1" 13620 19880108
P2:A 12483 81029 "Well P2" 13750 19700208
P2:C 12483 81029 "Well P2" 13750 19750609
P3:A 12672 84500 "Well P3" 11800 19970606
P3:C 12672 84500 "Well P3" 11800 19970606

Notice that the well names include a space, so they had to be enclosed between “”. If
not, OFM will interpret them as two different columns.

• A file with the Filter table data


Finally, the filter table is loaded with a special file, with extension srt (*.srt). We
mentioned that the filter table does not need to be created (there is nothing about it in
the definition file above). OFM creates it automatically while you attempt to load data to
it. Of course, you have to define the columns and the desired names and you do all this
with one single file, like the following one (notice the definition and data sections). Also
notice how the “” are used to enclose names with spaces.

// Contents of a *.srt file


*define
*FIELD
*RESERVOIR
*TANK
*TYPE
*end_define
*LAYER *FIELD *RESERVOIR *TANK *TYPE
P1:A "FIELD A" "RESERVOIR A" A OIL
P1:B "FIELD A" "RESERVOIR B" A OIL
P2:A "FIELD B" "RESERVOIR A" A OIL
P2:C "FIELD B" "RESERVOIR C" B OIL
P3:A "FIELD B" "RESERVOIR A" NONE GAS
P3:C "FIELD B" "RESERVOIR C" A OIL

Production Data
Once we have the master table, we can load the production data. As mentioned before,
we are assuming that the data is being measured once a month, as the total amount
produced by the completion. It is also quite normal to get the actual number of days the
completion has been produced per month (to calculate an effective rate), so our field
report could look like the following spreadsheet:

Completion Month Prod Days OIL WATER GAS


P1:A Jul-99 20 80 20 120
Aug-99 25 81 21 130
Sep-99 22 78 20 150
Oct-99 30 78 19 140
Nov-99 30 75 22 100

The OFM administrator handbook____________________________________ Page 131


Dec-99 24 74 23 110
P1:B Aug-99 21 60 16 0
Sep-99 27 59 15 0
Oct-99 28 59 13 0
Nov-99 22 60 16 0
Dec-99 23 60 17 0
P2:A Aug-99 30 120 31 150
Sep-99 30 118 33 130
Oct-99 30 140 30 145
Nov-99 30 130 30 184
Dec-99 29 128 45 123
P2:C Aug-99 29 480 120 0
Sep-99 29 500 130 0
Oct-99 30 500 128 0
Nov-99 3 60 15 0
Dec-99 29 520 160 0
P3:A Jul-99 28 0 0 600
Aug-99 29 0 0 600
Sep-99 30 0 0 630
Oct-99 30 0 0 620
Nov-99 30 0 0 580
Dec-99 31 0 0 550
P3:C Aug-99 29 80 30 0
Sep-99 30 90 31 0
Oct-99 30 85 36 0
Nov-99 30 88 40 0
Dec-99 31 85 45 0

Notice some characteristics of the data. Some completions producing from A reservoir
have been considered of type OIL in the filter table, although they also produce gas and
water, as shown in the table. The exception is well P3, that has been drilled on a sector
where only gas is present (P3:A produces only dry gas).
Completions producing from reservoir C and B produce no gas. Just oil and some water.

To simplify our design (and this is quite common), we will define just one monthly table
for production data. This table will include space for all possible data recorded monthly.
There is no need to create one table for gas production, one for oil, etc. In fact, this will
not help when implementing other features. Normally, if it is monthly production, goes
to one table.

The definition file needed to build a monthly table will be similar to:

//Contents of *.def file


*TABLENAME MONTHLYPROD Monthly
DAYS INT1
GAS FLOAT
OIL FLOAT

Page 132 ____________________________________ The OFM administrator handbook


WATER FLOAT

Notice that we used INT1 for the days column. Because is a number between 0 and 31
with no decimals, a 1 byte integer is enough for it.

Notice that you don’t need one definition file per table. You could have combined both
tables in one single definition file:

*TABLENAME XY Static Master


LAYER STRING 15
X FLOAT
Y FLOAT
WELL STRING 15
WELLTD FLOAT
DATEON UINT4

*TABLENAME MONTHLYPROD Monthly


DAYS INT1
GAS FLOAT
OIL FLOAT
WATER FLOAT

Now we need to prepare the production data file. Again, we have two possible formats
(both were shown in page 120), but we show only one of them.

*TABLENAME MONTHLYPROD
*DATE *DAYS *GAS *OIL *WATER
*KEYNAME P1:A
9907 20 120 80 20
9908 25 130 81 21
9909 22 150 78 20
9910 30 140 78 19
9911 30 100 75 22
9912 24 110 74 23
*KEYNAME P1:B
9908 21 0 60 16
9909 27 0 59 15
9910 28 0 59 13
9911 22 0 60 16
9912 23 0 60 17
*KEYNAME P2:A
9908 30 150 120 31
9909 30 130 118 33
9910 30 145 140 30
9911 30 184 130 30
9912 29 123 128 45
*KEYNAME P2:C
9908 29 0 480 120
9909 29 0 500 130
9910 30 0 500 128
9911 3 0 60 15
9912 29 0 520 160
*KEYNAME P3:A
9907 28 600 0 0

The OFM administrator handbook____________________________________ Page 133


9908 29 600 0 0
9909 30 630 0 0
9910 30 620 0 0
9911 30 580 0 0
9912 31 550 0 0
*KEYNAME P3:C
9908 29 0 80 30
9909 30 0 90 31
9910 30 0 85 36
9911 30 0 88 40
9912 31 0 85 45

This file is quite similar to our field spreadsheet. The main differences are the dates,
which instead of Aug-98 are input as 9908. Don’t worry yet. This file could have also
been prepared with different date formats and loaded producing equivalent results.
Some of the different date formats that can be loaded to OFM are displayed in the next
example

*TABLENAME MONTHLYPROD
*DATE *DAYS *GAS *OIL *WATER
*KEYNAME P1:A
199907 20 120 80 20
199908 25 130 81 21
19990902 22 150 78 20
991011 30 140 78 19
Nov-99 30 100 75 22
Dec-1999 110 74 23
*KEYNAME P1:B
9908 21 0 60 16
----------------

Log and Wellbore Equipment data


So far, we successfully designed the OFM database for the static and production data.
We are missing, however, the log and wellbore equipment data. Obviously, this type of
data does not belong to static master entities (intervals, completions, etc.) but to the
wells (Well P1, Well P2 and Well P3).

Up to now, we have never mentioned how to load data to a table and relate it to the
well name. All explanations always considered data loaded to entities (the first column
of the static master table). You can see the *.prd file, which specifies that the data will
be loaded to the different completions P1:A, P1:B, P2:A, etc. This is data is known as
loaded to the completion level.

There is some data, such as the ones in this section that has to be loaded to the
wellbore level. This is automated by the program and how data is loaded is specified
by selecting the correct table type. The next section explains this subject.

Up to know, I described how data is loaded and linked to the primary keys of the master
table or, in other words, “any data loaded is assumed to belong to one entity”. When
data belongs to an entity it is known as data loaded to the completion (or entity)
level.

Page 134 ____________________________________ The OFM administrator handbook


In the figure of page 128, we identified the production data that belong to completions.
By placing completions in the master table, the procedure of loading data was quite
simple. However, in the example, there is other data that does not belong to the
completions, but to the wells. For instance, a GR log curve of well “Well P1” does not
belong neither to P1:A nor P1:B. It belongs to the well, so we need to load data to the
wellbore level. Aha, but… how do we load this data?

Once more, OFM is a customized database. You have some available table types with
pre-defined settings. These settings include the information needed to link the table to
the existent data. The figure on page 127 shows some tables related to the master
using the primary key.

Notice that these are not all table types (listed on page 115) and some have been
omitted deliberately from the drawings until now. We will complete the picture to
include three new table types: TRACE, DEV and WBD. The way OFM links them to the
rest of the database is totally equivalent, so we will explain just the TRACE table type.

Trace Tables
The next figure displays what we have on a typical database. Notice that the colors now
are chosen to clarify how log data is linked to the master table. When you define a
TRACE table type, OFM creates the first column of it and relates it NOT to the primary
key of the static master table (as in the previous monthly and filter examples) but to the
column that contains wellbore information (blue arrows). So the owner of log data is a
wellbore and not whatever we put on the static master table lines.

This database engineering is completely handled by OFM’s database engine. Lucky we!
All we need to do is specify the new table type as TRACE.

The OFM administrator handbook____________________________________ Page 135


For trace tables, OFM just adds the first column (the foreign key). You must create the
DEPTH column, with that name and in first place. Then you are free to define as many
other columns as you please. In our example, we added four: GR, SP, ILD and DT.

The files needed to implement this log table are two: one definition file to build the table
structure and one with the log data. Here they are:

//Contents of *.def file


*TABLENAME LOGTRACES Trace
DEPTH FLOAT
GR FLOAT
SP FLOAT
ILD FLOAT
DT FLOAT

//Contents of *.log file


*TABLENAME LOGTRACES
*DEPTH *GR *SP *ILD *DT
*KEYNAME "WELL P1"
1600 60 -20 159.5 87.2
1601 65 -38 160.3 89
1602 68 -36 123.7 91.7
1603 120 -12 162.4 89.6
1604 122 -5 155.3 88.4
1605 79 -19.4 118.7 96.9
*KEYNAME "WELL P2"
1580 63.1 -36.9 157.4 98.9
1581 66 -34.9 150.3 101.9
1582 116.4 -11.6 113.7 99.6
1650 118.3 -4.9 152.4 98.2
1651 76.6 -18.8 145.3 107.7
1652 61.2 -35.8 108.7 109.9
1653 64 -33.9 147.4 113.2

There are some very important points to notice:


• The recommended extension for ASCII files containing log data is log.
• The data file syntax is totally equivalent to the ones with production data, however,
the data is loaded to well names (Well P1), not to completions (P1:A).
• The definition file can be an independent file or added to a general definition file.
• A very popular ASCII file format for log data is known as LAS (Log ASCII Standard).
The spreadsheet LAStoOFM.xls is part of the OFM Plus package and is an utility to
convert LAS files to the proper format to be loaded to OFM, so if your log data is in
LAS files, you should explore this tool.
• Log data is sporadic in depth.
• You can define many TRACE tables.

Deviation tables
• DEV is a table type to store well deviation data. You don’t define this table with a
definition file. OFM will automatically create it when you load deviation data via an
ASCII file with extension dev. The DEV table structure is fixed and you can’t fiddle

Page 136 ____________________________________ The OFM administrator handbook


with it. However, there are two possible ASCII file formats for data loading,
depending on how you have the data. The following figures list the two possible
formats available.

//Style 1
//Contents of a *.dev
//Specifying the Deltas in X and Y directions
*DEPTH *XDELT *YDELT *TVD
*KEYNAME “Well P1”
0 0 0 0
600 -20 -12.8 550
1053 -83 5.8 930
1122 -221.5 74.4 1002
1600 -250 120 1200
*KEYNAME “Well P2”
0 0 0 0
300 -20 -12.8 286
1053 -85 25.8 920
1120 -123.5 74.4 1002
1558 -140.4 699 1202

//Style 2
//Contents of a *.dev
//Specifying the Absolute coordinates in X and Y directions
// This is assuming that the static master table columns that contain
// coordinates are named X and Y.
*DEPTH *X *Y *TVD
*KEYNAME “Well P1”
0 12321 82394 0
600 12301 82381.2 550
1053 12238 82399.8 930
1122 12099.5 82468.4 1002
1600 12071 82514 1200
*KEYNAME “Well P2”
0 12843 81029 0
300 12823 81016.2 286
1053 12758 81054.8 920
1120 12719.5 81103.4 1002
1558 12702.6 81728 1202

• Notice that in any case, the recommended filename extension is dev.


• In the second format, you specify the absolute coordinates of the survey point. If
you decide to do that, then the names of the columns must match the ones you
have in your database.
• I would like to repeat that you can have only one DEV table per project and its name
is always DEV.

Well Bore Diagrams tables


• WBD is a table type to store well bore diagram information, such as casings,
packers, tubing, plugs, fish, etc. The structure is also fixed and you don’t have to
define it. It is created by OFM when you load data to it via an ASCII file of extension
wbd. The following figure gives you and example of such ASCII file.

The OFM administrator handbook____________________________________ Page 137


//Contents of a *.wbd
*well “Well P3”
*date 19950519
*kbelev 0.00
*header
*text Geoquest
*just left
*line 0

*text Well Well P1


*just left
*line 0

*text Reservoir A Completion


*just left
*line 0

*end_header
*info
*end_info
*units DEPTH '
*units DIAM in
*units WEIGHT #/ft
*casing
*top 0.00
*bottom 185.00
*od 18 5/8
*id 16
*jts 6
*cement
*top 0.00
*bottom 185.00
*od

*casing *kind surface


*top 0.00
*bottom 2630.00
*od 11 3/4
*id 10.25
*grade J-55
*weight 47.00
*thread Buttress
*jts 85
*cement
*top 500.00
*bottom 2630.00
*od

*casing *kind production


*top 0.00
*bottom 10311.00
*od 7
*id 6.25
*grade P-110
*weight 0.00
*thread Ext. Line
*jts 252

Page 138 ____________________________________ The OFM administrator handbook


*cement
*top 6200.00
*bottom 10311.00
*od
*plug *kind cibp
*top 6254.00
*bottom 6260.00
*od
*perfs
*top 5075.00
*bottom 5079.00
*od
*perfs *kind squeeze
*top 8100.00
*bottom 8105.00
*od
*perfs *kind abandoned
*top 8155.00
*bottom 8162.00
*od

*tubing *kind standard


*top 0.00
*bottom 4842.00
*od 2 3/8
*id 1.997
*grade J-55
*weight 4.70
*thread Upset
*comment New, bare 6/95
*nipple *kind seating
*top 4804.00
*bottom 4805.00
*od
*id 1.82
*packer
*top 4834.00
*bottom 4838.00
*od
*packer
*top 6260.00
*bottom 6265.00
*od
*screen
*top 6320.00
*bottom 6385.00
*od
*gravel
*top 6330.00
*bottom 6385.00
*od
*valve *kind gaslift
*top 1650.00
*bottom 1651.00
*od

*openhole

The OFM administrator handbook____________________________________ Page 139


*segment
*top 0.00
*bottom 190.00
*od 21.00

*segment
*top 185.00
*bottom 2650.00
*od 12.50

*segment
*top 2630.00
*bottom 10350.00
*od 8.50

*window 1
*top 0.00
*bottom 4500.00
*fraction 20.00
*window 2
*top 4500.00
*bottom 6400.00
*fraction 60.00
*window 3
*top 8100.00
*bottom 10400.00
*fraction 20.00

• Notice that this file has a quite complex syntax. You normally don’t load WBD via
ASCII files, so don’t worry. There are two other basic ways of inputting WBD
information to OFM. One is using the interactive interface of the Well Bore Diagram
module of the program, where you fill up all information using forms. The other one
is using the WBDBuilder.xls file, which has a spreadsheet where you can input this
data and a macro to generate the ASCII file. This utility spreadsheet is a part of the
OFM Plus package.
• You can have only one WBD table type and its name will always be WBD.

Review 2
Here comes our second review. This time will be a little shorter because we (hope it’s
not only me) are getting into speed. Take again a look at figure at page 128 and try to
think as I do. There is a variety of data to be loaded (production, logs, equipment, etc).
Before loading any data, you need to ask yourself: Who is the owner of the data? Does
it belong to an interval or to a well? Does it belong to a tank, a pipe, a field, etc? So far,
we’ve seen that either the completions or the wellbores owned data. We also gave two
data loading scenarios:
• Data loaded to the completion level (names present on the first column of the
master table)
• Data loaded to the wellbore level (names present on the wellbore column of the
master table)

Page 140 ____________________________________ The OFM administrator handbook


Remember that the OFM engine does the database engineering. Each table type accepts
data loaded to one (or more) of these levels. The list of page 115 can be repeated here
with some more details:

Table Type Data loaded to


Static Completion/Category level

Static Master Completion level

Monthly Completion/Category level

Daily Completion/Category level

Sporadic Completion/Category level

Filter (Sort) Completion level

Xref No Relation

Lookup No Relation

Trace Wellbore level

WBD Wellbore level

DEV Wellbore level

Notice that once you choose the table type (depending on your data), OFM knows how
to link the table. This is the same as saying: OFM knows where are the names that will
own the data for the table. For example,

• If it is a monthly table, the data there will be loaded to one of the names present in
the first column of the static master table. You can see this exemplified on the
figure of page 127.
• If it is a trace table, the data there will be loaded to one of the names present in
the wellbore column of the static master table. You can see this exemplified on the
figure of page 135.

Both category levels can be displayed in a single figure, such as the following one.
Notice that the table legend specifies also the possible number of tables (one or many).
Notice also that this is still an inverted tree, with the static master table as the main
node. However, the place (column) where the other tables hang depends on the table
type. Some are connected to the primary key column (red arrows) and some are
connected to the wellbore column (green arrows).

The OFM administrator handbook____________________________________ Page 141


Data levels extension – Group Tables
If you notice the previous table (page 141), there is a new data loading level that we
have not mentioned yet. This is a third possible mode of loading data and it is known as
loading data to the category level. This is only possible with STATIC, MONTHLY,
DAILY and SPORADIC tables. Using this mode, you can load data to a production table
that will be owned by one of the filter categories. For example, you could load monthly
production volumes measured at a tank. Of course, you could add the individual
productions of all completions connected to the tank and get this figure but you can also
load the total measured at the tank, to the tank. Both figures are not necessarily equal
and some analysis could be made to explain the differences (loses, leaks, etc.). OFM call
these tables, related to filter categories, group tables.

A group table is a table that contains data being owned by a sort category value. For
instance, in our example, we could load production data to a MONTHLY table that will
be owned by the tank A!

Although you could eventually (and you better have a good reason) load this data to the
same production table (MonthlyProd in our previous example, page 135), I would not
recommend this practice. Just think:

“When you group a reservoir, are you displaying the addition of the pieces or just the
data loaded to the reservoir?.”

“When you group a tank, are you displaying the addition of the perforated intervals
filling up the tank or just the values you measured on the tank itself?”

Page 142 ____________________________________ The OFM administrator handbook


It is clearer to keep this data in separate tables because the name of the variables
containing the values will be different. Also, if you want to display both together (the
total of the pieces and the total loaded) you will need these different names.

In order to access this data (you can’t click on a reservoir!), you have to activate a
special setting in OFM that instructs the software to load ALSO the group tables35. If you
don’t, OFM will ignore the values loaded there. This setting in under
Tools/Settings/Advanced (see next figure). In OFM 2.2, this setting is under
Sort/Load Control Setup.

Because accessing this data


takes extra time, this setting is
something that you want to
keep normally off unless you
need it.

Lets assume you have just


created a brand new MONTHLY
table named TankProd and you
included just one FLOAT
column named OIL. OFM adds
the rest.

All you need now is a proper ASCII file with the data that you want to load to the
different batteries. This file will look like:

*LOADBY TANK
*TABLENAME TANKPROD
*DATE *OIL
*KEYNAME A
199907 79
199908 345
199909 340
199910 340
199911 340
*KEYNAME B
199708 nnn

35
Don’t get confused by the notation. You don’t have to load this data to separate tables,
although I recommend to do that. If you decide to store this data to an existing table, then Load
group tables means “also load the data that is loaded to the filter categories”.

The OFM administrator handbook____________________________________ Page 143


Notice that the differences with a normal production file are:

• The *LOADBY TANK command (*LOADBY is a reserved word, TANK is the name
of a filter category previously defined).
• *KEYNAME A (A is one of the names that appear in the TANK sort category, not a
wellbore, not a completion)

Now let me demonstrate it. The following graph shows the results. Notice that we have
the addition of the pieces (MonthlyProduct.Oil for all the intervals producing to tank A)
and the data loaded (TankProd.Oil). Notice also that they are different.

In order to get this graph, we had to do two things:

• Make sure that the Load group tables option was on.
• Group the tank A data.

We can see the same results on a report. Just another way of seeing the same
results.

TANK: A

TANKPROD MONTHLYPRO
<DATE> OIL OIL

---------- ---------- ----------


199907 79.00 80.00
199908 345.00 341.00
199909 340.00 345.00
199910 340.00 362.00
199911 340.00 353.00
199912 331.00 347.00

Page 144 ____________________________________ The OFM administrator handbook


The previous comparative graph and report were possible because the name of the
variable holding the addition of the pieces (monthlyproduct.oil) was different than the
variable containing the total (tankprod.oil). If you decide to load both sets of data to the
same table (monthlyproduct.oil), then you will not be able to display these results
simultaneously. Only one will be available and will be as per dictated by the load group
tables setting.

Review 3
We have introduced three ways of loading information to OFM: completion, wellbore and
category levels. These modes are available depending on the type of table that will
receive the data. Some types accept only one of them (MASTER, FILTER, TRACE, WBD
and DEV), some will accept two (MONTHLY, DAILY, SPORADIC and STATIC). Notice that
this is not a limitation. It simply does note make sense try to load log data to a reservoir
or deviation data to a completion!.

Symbols
The completion level is the case when you load data to the lines of the static master
table and because of that, each data owner gets a symbol on the base map. Any line of
the static master table gets a symbol on the base map.
When you load data to the wellbore level, there is a symbol on the map indirectly
related to the wellbores. This symbol is the combination of all completions that belong to
the same well, so at first sight, you might think that each symbol on the base map is
related to the well but what it is really happening is that several completions (with equal
coordinates) are plotted on the same spot. It looks as a well symbol but it is not.
The third method does not plot any symbol at all. A filter category (such as the TANK,
used in our examples), does not get any symbol on the map. It is something that lives
inside the filter table.

Formats
There is almost no difference in the format of data ASCII files used to load the different
data. The keyword *KEYNAME is used for all of them and the argument it takes is the
name of the owner of the data. If it is a completion, the completion name (P1:B). If it is
a wellbore, the wellbore name (Well P1). If it is a filter category, the filter category
name (A).
• OFM knows that the data in the ASCII file goes to a completion once it recognizes
the destination table-type. So, when you load to a completion, OFM knows that the
name must be listed on the first column of the static master table.
• OFM knows that the data in the ASCII file goes to a wellbore once it recognizes the
destination table-type. So, when you load to a wellbore, OFM knows that the name
must be listed in the column of the static master table associated with Wellbore.
• When you load to a filter category, OFM can’t tell what you are trying to do unless
you use the *LOADBY command (notice it goes at the very beginning of the ASCII
file). This command specifies that data goes to a filter category and to which one as
well. The argument is the name of the desired filter category (*LOADBY TANK).

Remember that to use category data, you need to specifically tell OFM to load the group
tables, as explained on page 143.

The OFM administrator handbook____________________________________ Page 145


Objects
If you though that the previous data loading possibilities were enough, you should start
to worry now. As I mentioned, this customized database model is quite complex and
yes, there is some more.

Someone was surely pleased to be able to load measured tank volumes to a tank using
the filter category level. But no, no… that wasn’t enough: “I want to see the tank on my
map, and click on it and get its data!!!”. To satisfy this user, OFM programmers came
up with yet another data level: Objects!

Objects are special items in


the static master table.
Because they are loaded
there, they DO get a symbol
on the base map, as all the
others. So far so good. I
could load a tank to the static
master table and then load
data to it. The tables will then
look like the figure on the
right hand side.

Now carefully follow me on


this explanation.
• You will have a tank
symbol on the map simply
because it is loaded to
the master tables with its
coordinates.
• The tank data has been
successfully loaded to the
production table as any
other completion.
Up to now, OFM will treat the
tank exactly as another
completion, so you can click on it to gets its data, etc. The main problem arises when
you want to analyze groups of project data. For instance, if you group all data, OFM will
consider the tank as another completion and will add its production as if it was another
interval!. OFM will be reporting an excessive production because it will consider the tank
production twice!
There is a way to avoid this and it is quite simple. If you tell OFM that the line of TankA
is not a completion but an object, OFM will not mix it with the other completions, and
everything will go back to normal. If you want to group the object data, simply click on
it, but unless you do that, OFM will not use it. Cute.

Objects are defined by adding another column to the static master table that OFM uses
to tell the difference between them and completions. This column must be a string type

Page 146 ____________________________________ The OFM administrator handbook


column. OFM expects to see a c (or a C) on the entities that are really completions. Any
other letter will tell OFM that that line is an object.
If you see the list of mandatory columns of the static master table (the boxed text on
page 129), you will see this column (Object type). As specified there, this column is
optional and it is only needed if you decide to use objects in your database. So, if you
decide to use them, this information must go in the static master table.

Our modified tables will now look like:

Notice the last column of the static master table. I decided to name it Object and it is
of type string with room for only one char. As
mentioned before, a c tells OFM that the line is a
completion. Anything else (such as the T) is considered
an object.

You could use any name you want instead of Object.


OFM will accept it. However, in all cases you will have
to tell it in what column is the object information. This
procedure is similar to the wellbore information and is
done from the same place:
Edit/Project/Association. The next figure shows the
association made for our example.

The OFM administrator handbook____________________________________ Page 147


The Data Association is a very important part of a project. So far, we have discussed the
Wellbore, Alias Name, Object, X Coordinate and Y Coordinate buttons. The next section
will review them and also cover the other ones.

Data Associations
This section explains a very important aspect of a project: the Data Association settings.
You reach these settings from Edit/Map/Association. You can see the Data
Association window used in the previous figure.
Data association is a place you have to visit once, after creating a project and return
only if you change the table structure of your database. OFM needs to know certain data
to perform normal actions and unless you specifically tell it where is this data, the
results you will get will be erroneous. For instance, the base map module needs to know
where is the X and Y coordinates data. If you don’t, it will not know how to draw the
map! Remember that OFM is very flexible and lets you choose any name for columns, so
your X coordinate could be in a column named X, Xcoor, Long, Xposition, etc. You
can use ANY name you like, but then you need to tell OFM about it. There are no default
names, so you have to go through this, at least once.

We will explain each of the settings of this window. Notice that this will give us more
reasons to justify what should go on the static master table and what should not.

Well Type – Sort/Table/Exp: When OFM plots a symbol on the map, it can use
different shapes or colors, depending on your preferences. Because each line of the
static master table will be plot on the base
map, you need to specify which symbol you
want for each of them.

The symbol information is an acronym string,


usually three or four characters long. Typical
examples are OIL, GAS, INJ, WINJ, etc. This
string will be associated with a characteristic symbol shape, color and human description
(see the figure). For instance, OIL will be plot using a green, filled circle and the
description will be “Oil Producer”. How OFM goes from the OIL string to this other
information will be covered later, in the Basemap Symbols chapter. For now, all you
have to do is tell OFM where are these strings.

OFM is very flexible with symbols and gives you three possible places to store the
acronyms. The information could be in one of the columns of the static master table
(Well Type – Table), in one of the columns of the filter table (Well Type – Sort) or it
could be the result of some algorithm (Well
Type – Exp.)
It is very important that you use only ONE of
these three options. You should not activate
more than one at a time. That will confuse OFM.
Beware of this because unfortunately, you CAN
select more than one, as shown on the next
figure.

Page 148 ____________________________________ The OFM administrator handbook


Because the information could be outside the static master table (remember to keep it
small), you should consider moving this outside to one of the other available options.
The most common one is loading it to one column of the Filter table and selecting the
column with Well Type-Sort. This is because the same information could be used to
quickly filter data using this information.
The third option (Expression) could be used for very specific applications. It will be
covered in the Basemap Symbols chapter.

Wellbore: Use this button to tell OFM which column of the static master table contains
the wellbore information. Wellbore information is used to group completions that belong
to a well. It is also used to establish links to data loaded to the wellbore level, such as
logs, deviation or wellbore diagram information.

Alias Name: Use this button to tell OFM which column of the static master table
contains the alias information. The alias name is used for plotting names on the base
map.

Object Type: Use this button to tell OFM which column of the static master table
contains the object information. A c (or C) in this column will tell OFM to treat that
entity as a completion. Any other letter will instruct OFM to consider it an object.

X Coordinate, Y Coordinate: Use these buttons to tell OFM which column of the static
master table contains the X and Y coordinate values.

Reference Depth: If you ask OFM to convert depth information to TVD, it will consider
the reference depth as offset. If needed, this value must be stored on the static master
table and this button is to tell OFM the name of this column.

Completion Depth: If you work with deviated wells and load deviation information,
OFM could eventually plot the completion at surface (using the X and Y coordinates) or
in the correct spot of the well trajectory. In order to do that, OFM needs to know the
trajectory and the measured depth of the completion: the completion depth. In those
cases, you need to store this information in the static master table and this button is to
tell OFM the name of this column.

Bottom Depth: If you work with deviated wells and load deviation information, OFM
could eventually plot the completion at the bottom of the well. In order to do that, OFM
needs to know the well trajectory and the TD value. In those cases, you need to store
this information in the static master table and this button is to tell OFM the name of this
column.

Project: You could nest several projects. This is basically a project that acts as a main
menu, where each symbol on the map is actually a pointer to another project. The main
project contains no data and is just an entry point to other projects. If you decide to do
that, you must tell OFM where is the project that the symbol makes reference to by
specifying the full path to it (for instance, C:\OFM\Projects\Porj1.ofm). This info goes in
a column of the static master table and you need to tell OFM about it with this button.

The OFM administrator handbook____________________________________ Page 149


In general, you should associate ONLY the data that you need to and clear all other
setting. When certain data is not associated, there is no text to the right of the
respective button. Notice the example of figure:

Well Type-Sort is associated with the sort


category TYPE.
Well Type–Table is not associated.
Well Type–Exp is not associated.
Wellbore is associated with the column WELL.
Alias Name is associated with the column
WELL.
X Coordinate is associated with the column X.
Y Coordinate is associated with the column Y.
Reference Depth is not associated.
Completion Depth is not associated.
Bottom Depth is associated with the column
WELLTD.
Project is not associated.

Exercise 2
This exercise will guide you through the needed steps to build a project and associate its
data. The project will be similar to the one we have been describing in this chapter,
although we will also include other stuff, such as static, daily and some sporadic data.
I hope that at the end of it, you feel comfortable building on your own, a simple project.

Before starting, I need to warn you that we are not covering some important details of
any real-life project (such as units, multipliers, imputed variables, etc). They will be
covered in other chapters.

First of all, we need to prepare a definition file with all the tables we want to put in the
project. Remember that this information could be split in different files but if we know in
advance what are the tables we will need, we can just create one big file, like the
following one:

//Contents of exercise2.def
*TABLENAME XY Static Master
LAYER STRING 15
X FLOAT
Y FLOAT
WELL STRING 15
WELLTD FLOAT
ALIAS STRING 5

*TABLENAME MONTHLYPROD Monthly


DAYS INT1
GAS FLOAT

Page 150 ____________________________________ The OFM administrator handbook


OIL FLOAT
WATER FLOAT

*TABLENAME MONTHLYINJ Monthly


DAYS INT1
WATER FLOAT

*TABLENAME DAILYPROD Daily


OIL FLOAT
GAS FLOAT
WATER FLOAT

*TABLENAME LOGTRACES Trace


DEPTH FLOAT
GR FLOAT
SP FLOAT
ILD FLOAT
DT FLOAT

*TABLENAME TANKPROD Monthly


OIL FLOAT

*TABLENAME TESTS Sporadic


DATE UINT4
HOURS FLOAT
OIL FLOAT
GAS FLOAT
WATER FLOAT

*TABLENAME PROPERTIES Static


POROSITY FLOAT
TTIME FLOAT
RW FLOAT
DATEON UINT4

Notes:
• Prepare ASCII files with a reliable PURE ASCII editor. For small files, Notepad is the
best. For the ones that are too big for it, you could use WordPad, but make sure
you save as Text Only.
• The first table defined is the static master table and its first column will be used as
the primary key of the project. This column is named LAYER and is of STRING type,
so LAYER is the primary key of the static master table.
• We do not define the LAYER or the DATE for Monthly or Daily tables.
• For the TESTS table (sporadic) we define DATE as the first column.
• Information that is not strictly needed in the static master table (such as the date it
started production) was moved to another static table named Properties.
• Notice that every time we need to define a column that will contain a date, we use
an UINT4, i.e., an unsigned 4 bytes integer number. That’s the recommended type
for a date variable. Don’t confuse a DATE variable (like 2-Feb-98) with a DAYS
variable (the number of days per month).

The OFM administrator handbook____________________________________ Page 151


Second, we should prepare some ASCII data files to populate these tables. The first one
needed is the one for the static master table. Remember that the standard extension for
this file is xy, so:

// Contents of a exercise2.xy file


*TABLENAME XY
*LAYER *X *Y *WELL *ALIAS *WELLTD
P1:A 12321 82394 "Well P1" P1 1810
P1:B 12321 82394 "Well P1" P1 1810
P2:A 12483 81029 "Well P2" P2 2500
P2:C 12483 81029 "Well P2" P2 2500
P3:A 12672 84500 "Well P3" P3 1985
P3:C 12672 84500 "Well P3" P3 1985
P4:D 13000 82000 "Well P4" P4 2100
P5:A 12000 83200 "Well P5" P5 1790

This file should populate the XY table with eight completions that belong to five wells.
Notice that only names that have spaces are enclosed between “”.

The next step will decide the Filter categories that we need, and prepare the srt file to
define and load them with data. The next figure shows the contents of our file.

// Contents of a exercise2.srt file


// Definition section
*define
*FIELD
*RESERVOIR
*TANK
*TYPE
*end_define
// Data section
*LAYER *FIELD *RESERVOIR *TANK *TYPE
P1:A "FIELD A" "RESERVOIR A" A OIL
P1:B "FIELD A" "RESERVOIR B" A OIL
P2:A "FIELD B" "RESERVOIR A" A OIL
P2:C "FIELD B" "RESERVOIR C" B OIL
P3:A "FIELD B" "RESERVOIR A" NONE GAS
P3:C "FIELD B" "RESERVOIR C" A OIL
P4:D "FIELD A" "RESERVOIR D" B OIL
P5:A "FIELD B" "RESERVOIR A" NONE WINJ

Notice that there is a new TYPE: WINJ. I will use this string to identify water injectors. I
need is to assign them a unique TYPE, because we will use this column for map symbol
information. Having a unique string for the injectors allows me to assign them a unique
symbol on the map. The water injected will be loaded to a separate table: the
MonthlyInj.

Creating the project and loading the first files

Page 152 ____________________________________ The OFM administrator handbook


After you have these three files
prepared, you need to create a
directory to store the new OFM
project. Once you have it created,
proceed with the next steps.

1) Start OFM and select File/New.


The Open36 window pops up. Type in
the name you want to give it to the
project and select the desired
directory. Click OK.

2) The New OFM Project window


appears where you basically define how
do you want to create the project.
There are multiple options to create
projects and we will cover them in a
separate chapter. We will be using the
default one, where the user defines the
tables via an ASCII file and the data will
also come from files. Just click OK and
proceed to the next step.

3) The next window that appears is the


OFM Data Loader. This is a very
popular window and we will come back
to it very often, every time we want to add data to the project.

The window consists basically of two different sections. The section above (Look in) is
a file navigator that allows you to find the files you want to load (they don’t need to be
all in the same folder). Once you find the desired file, you highlight it and click the Add
button. This moves the file to the second section of the window, the lower box with the
list of the files OFM will load (Files to Load).

36
Although you are creating a NEW project, the window title is OPEN. It is not clear, but that’s
how it is in OFM 3.0. OFM 3.1 fixed this detail.

The OFM administrator handbook____________________________________ Page 153


For the time being, just
find the three files we
created and add them to
the list. Your window
should look like the one
in the figure (obviously,
with the filenames that
you decided to give to
these files).

At this point, it is very


important to make the
following comment:

Beware that OFM takes


ASCII files with some
commands that instruct
the program what to do
with the data inside it
(*TABLENAME, etc).
However, it also needs to
know, before hand, what
kind of data comes in the
file. OFM guesses based
on the file name
extension.
Notice that in the figure, the exercise2.def file is highlighted and OFM guessed a
DEFINITION Data Type. The extension you use for the file name is irrelevant, but, if
you use the standards, OFM will guess correctly. Notice the details for the other two
files.

*.def is recognized as DEFINITION


*.srt is recognized as SORT (Filter)
*.xy is recognized as data for the static master table (KEYDATA)

Verify that your three files are being recognized as well. If you have given them
different extensions and OFM did not guess them correctly, select the Data Type
manually. After verifying the three files, click LOAD.

Page 154 ____________________________________ The OFM administrator handbook


4) OFM loads the files and acts accordingly. The def file is read first and the tables are
built based on it. Then the xy data file is loaded to populate the master table and finally
the filter data is processed. OFM displays a base map and some results of the load
operation.

Notice that five spots are already on the map. You could have them or not. This
depends on the names you have chosen for coordinate columns and how OFM
interpreted them. That is not important yet. Notice the tabs of the status windows
looking for errors.

My Status tab displays a log of what OFM has done while loading and processing the
files. I will reproduce it here because it is very important that you get familiar with these
messages. I will add my comments in bold.

Loading >DEFINITION< File: <- It first loads the definition file


C:\WINDOWS\Desktop\Exercise\Data\exercise2.def <- filename
Adding Table: XY <- Adds first defined table
Added Variable >> LAYER << <- Adds table variables
Added Variable >> X <<
Added Variable >> Y <<
Added Variable >> WELL <<
Added Variable >> WELLTD <<
Added Variable >> ALIAS <<
Adding Table: MONTHLYPROD <- Adds second table

The OFM administrator handbook____________________________________ Page 155


Added Variable >> DAYS <<
Added Variable >> GAS <<
Added Variable >> OIL <<
Added Variable >> WATER <<
Adding Table: MONTHLYINJ <- Adds third table
Added Variable >> DAYS <<
Added Variable >> WATER <<
Adding Table: DAILYPROD <- Adds fourth table
Added Variable >> OIL <<
Added Variable >> GAS <<
Added Variable >> WATER <<
Adding Table: LOGTRACES <- Adds fifth table
Added Variable >> DEPTH <<
Added Variable >> GR <<
Added Variable >> SP <<
Added Variable >> ILD <<
Added Variable >> DT <<
Adding Table: TANKPROD <- Adds sixth table
Added Variable >> OIL <<
Adding Table: TESTS <- Adds seventh table
Added Variable >> DATE <<
Added Variable >> HOURS <<
Added Variable >> OIL <<
Added Variable >> GAS <<
Added Variable >> WATER <<
Adding Table: PROPERTIES <- Adds eighth table
Added Variable >> POROSITY <<
Added Variable >> TTIME <<
Added Variable >> RW <<
Added Variable >> DATEON <<
Loading Completed <- Definition file loaded
Loading >KEY< File: C:\WINDOWS\Desktop\Exercise\Data\exercise2.xy
<- Second file loaded: Master data
Processing TABLE >> XY << <- States the name of target table
Added 0 ==> P1:A <- List of entities loaded
Added 1 ==> P1:B
Added 2 ==> P2:A
Added 3 ==> P2:C
Added 4 ==> P3:A
Added 5 ==> P3:C
Added 6 ==> P4:D
Added 7 ==> P5:A
Loading Completed <- Master data file loaded
Loading >SORT< File: <- Filter data load start
C:\WINDOWS\Desktop\Exercise\Data\exercise2.srt
Sort Field >> FIELD << Added <- Categories
Sort Field >> RESERVOIR << Added <- added to the filter
Sort Field >> TANK << Added <- table (first section
Sort Field >> TYPE << Added <- of srt file)
Processing Completion >> P1:A <- Detail of the
Processing Completion >> P1:B <- entities that received
Processing Completion >> P2:A <- some kind of filter

Page 156 ____________________________________ The OFM administrator handbook


Processing Completion >> P2:C <- data
Processing Completion >> P3:A
Processing Completion >> P3:C
Processing Completion >> P4:D
Processing Completion >> P5:A
Loading Completed <- Filter file loaded

Make sure you follow and understand the previous OFM information outputs. This is the
first place to check after a data load and generally where you discover any errors in the
process. If you had the same results, go ahead. If not, review your ASCII files and
procedures against our examples and try again.

5) The next thing you should do is to associate the data of the project. This will make
sure that OFM knows where to find important data such
as coordinates, wellbore names, alias names, object
information, etc. Select Edit/Map/Association and
associate the data as shown in the Data Association
window figure. You associate them by clicking on each
button and selecting the proper column. If you make a
mistake, there is a Clear option to de-associate.

When you select the first option (WellType – Sort), you


must select the TYPE column of the filter table. Once you
do that, OFM asks you to specify how is it supposed to
map these acronym strings (OIL, GAS, WINJ) to symbols and colors. Select Create
from data, as shown in the previous figure. We will
explain the rest of the options when we cover
basemap symbols. For now, this is the simplest
option. Go for it.

After you are done, and your Data Association


windows looks like the one in the figure, click OK
and wait until OFM draws the final map. Should be
quick.

You should have now different symbols for


completions. Let’s apply some cosmetics, to make
the map look nicer.

Select Edit/Map/Limits/Grid and select the Grid


and Frame option. This will draw a frame, grid and
coordinate numbers around your symbols.

Right click on the map and select Legend/Draw. A legend with the symbols’
description comes in the map.

Select Edit/Map/Well Names and select to show Alias names. Click OK. Your map
should look more or less like this:

The OFM administrator handbook____________________________________ Page 157


If you don’t like the size of the grid that OFM automatically created (I personally
don’t), then you could re-arrange it. Click on the Zoom in button and draw a
frame around the map, where you would like (more or less) to see your grid.
When you release the mouse, OFM will redraw the grid. If you don’t like the result, you
can undo the zoom (with the Zoom out button) and start again. Make sure that all
symbols are within your final map. Once you have a final nice grid shape, tell OFM to
remember it by selecting Edit/Map/Limits/Grid and clicking on the Set Limit button.

Your final base map could look like the one shown in the following figure:

6) Now it’s time to verify your data. To view that al the desired tables are actually
present in the project, do an Edit/Project/Definition. This opens a window named
Edit Tables Definition.

This window is very important. First, it lists the tables available in the project and their
type (notice in the next figure that the TANKPROD table is of MONTHLY type). When the
table type is grayed out, OFM indicates that there is data already loaded to the table.
Try the XY table to see what I mean.

Page 158 ____________________________________ The OFM administrator handbook


Finally, you can verify the different columns of each
table by selecting it and clicking the Fields button.
Make sure that all columns are there. Do not change
anything for now. Be happy to be able to see what are
the columns of each table.

Notice that there is no filter table on the list. Remember


that a filter table looks like a table (and it is very useful
to consider it like one), but is treated as a different
thing. This is also the place where you could change the
name given by OFM to the filter table (SC). You could
replace this name by any other one you like, although I
won’t recommend it. Stay simple.

7) Check the data loaded to your master table. Do an


Edit/Project/Data/XY and click OK. You will see a spreadsheet with the contents of
the static master table. Check the values and verify they are what you expect.

After your revision, select File Close to return to the map.

8) Now check your filter data. Do an Edit/Project/Sort. The filter table information
will be displayed. Make sure you check the values.

The OFM administrator handbook____________________________________ Page 159


After your revision, select File Close to return to the map.

9) You could verify that OFM associates completions to their respective wells. You
should remember that OFM does that using the master table column associated with
wellbore (in our case, the WELL
column).

Click on a symbol. If the symbol you


choose is a well with more than one
completion, then OFM should ask you
which of the completions associated
with that well you want to work with.
The figure displays what happened
after I clicked on P3. P3 has two
associated layers: P3:A and P3:C and
OFM asks me which one I want to
use. This proves that the wellbore
association is working. If you want to
experiment, go and re-associate the
wellbore setting with another column (such as LAYER) and repeat the experiment of
clicking on a well. Try to explain what happens (hint: If OFM discovers only one interval
per well, then it does not ask you to select the completions).

10) At this point, the project is almost finished, except that it contains no useful data to
analyze, just some names and coordinates. It is time to load some production data.

Page 160 ____________________________________ The OFM administrator handbook


Again, first we prepare a file and then we load it to the project.
The ASCII file we need to prepare is:

//Contents of exercise2.prd file


// The name could have been exercise2.dat
*TABLENAME MONTHLYPROD
*DATE *DAYS *GAS *OIL *WATER
*KEYNAME P1:A
9907 20 120 80 20
9908 25 130 81 21
9909 22 150 78 20
9910 30 140 78 19
9911 30 100 75 22
9912 24 110 74 23
*KEYNAME P1:B
9908 21 0 60 16
9909 27 0 59 15
9910 28 0 59 13
9911 22 0 60 16
9912 23 0 60 17
*KEYNAME P2:A
9908 30 150 120 31
9909 30 130 118 33
9910 30 145 140 30
9911 30 184 130 30
9912 29 123 128 45
*KEYNAME P2:C
9908 29 0 480 120
9909 29 0 500 130
9910 30 0 500 128
9911 3 0 60 15
9912 29 0 520 160
*KEYNAME P3:A
9907 28 600 0 0
9908 29 600 0 0
9909 30 630 0 0
9910 30 620 0 0
9911 30 580 0 0
9912 31 550 0 0
*KEYNAME P3:C
9908 29 0 80 30
9909 30 0 90 31
9910 30 0 85 36
9911 30 0 88 40
9912 31 0 85 45

When you select a file with extension prd, the Data Loader assigns it a Data Type of
DATA (see the next figure).
To add the data in this file to the project, load the file with File/Get External
Data/Data Loader. This is the same window we used before. If you still have the old
files left in the lower section, clear them with the Clear All button and just add the new
file with the production data.

The OFM administrator handbook____________________________________ Page 161


This is shown in the figure. Notice that
OFM detects this file as Data Type:
DATA. If it does not do it with yours,
then manually select it.

Finally click Load and wait until OFM


loads the production to the project.

Again, it is extremely important that you


verify that there are no error messages.
My Status tab displays the next scroll:

Loading >DATA< File:


C:\WINDOWS\Desktop\Exercise\Data\exercise2.prd
Processing TABLE >> MONTHLYPROD <<
Processing Completion >> P1:A
Processing Completion >> P1:B
Processing Completion >> P2:A
Processing Completion >> P2:C
Processing Completion >> P3:A
Processing Completion >> P3:C
Loading Completed

11) The production data of the completions has been loaded. It is time to verify it.
Select Edit/Project/Data. Then select the table MonthlyProd and click OK.

A grid appears with the MonthlyProd columns. The data shown in the grid belongs to
whatever is being grouped by OFM. Group the first completion (P1:A) to populate the
grid with its data. Review the others by selecting them one by one. The grid displays
only one completion at a time. If you want to quickly cycle them, you could use the
Next and Previous arrows.

Page 162 ____________________________________ The OFM administrator handbook


Select the
desired
completion
from this
menu

After you are happy with your monthly production data, do a File/Close and return to
the base map.

12) The next step will be to prepare the file with the static data for the PROPERTIES
table. The file contents will look like the following one

// Contents of a ex2Properties.dat file


*TABLENAME PROPERTIES
*LAYER *POROSITY *TTIME *RW *DATEON
P1:A 0.12 51 0.2 19961203
P1:B 0.13 53 0.21 19970105
P2:A 0.09 52.3 0.5 19950203
P2:C 0.25 54.6 1.1 19940306
P3:A 0.27 53 0.05 19970106
P3:C 0.19 54.4 1.2 19970306
P4:D 0.2 52.6 0.9 19940226
P5:A 0.29 55 0.02 19921016

After you prepare the file, load it with the data loader. With a dat extension, OFM will
assign it a Data Type of DATA. Load it and inspect the Status tab. After loading this file,
my Status tab displays:

Loading >DATA< File: C:\WINDOWS\Desktop\Exercise\Data\ex2Properties.dat


Processing TABLE >> PROPERTIES <<
Processing Completion >> P1:A
Processing Completion >> P1:B
Processing Completion >> P2:A
Processing Completion >> P2:C
Processing Completion >> P3:A
Processing Completion >> P3:C
Processing Completion >> P4:D
Processing Completion >> P5:A

The OFM administrator handbook____________________________________ Page 163


Loading Completed

If I wanted to view this data, I can do Edit/Project/Data. Then select the table
Properties and click OK. The next figure shows the results.

13) Let’s load some logs data to the table LOGTRACES. The ASCII file with log data
looks like:

//Contents of exercise2.log file


*TABLENAME LOGTRACES
*DEPTH *GR *SP *ILD *DT
*KEYNAME "WELL P1"
1600 60 -20 159.5 87.2
1601 65 -38 160.3 89
1602 68 -36 123.7 91.7
1603 120 -12 162.4 89.6
1604 122 -5 155.3 88.4
1605 79 -19.4 118.7 96.9
*KEYNAME "WELL P2"
1580 63.1 -36.9 157.4 98.9
1581 66 -34.9 150.3 101.9
1582 116.4 -11.6 113.7 99.6
1650 118.3 -4.9 152.4 98.2
1651 76.6 -18.8 145.3 107.7
1652 61.2 -35.8 108.7 109.9
1653 64 -33.9 147.4 113.2

Page 164 ____________________________________ The OFM administrator handbook


When you attempt to load this file, OFM will guess (based on its log extension) a Data
Type of TRACES. After loading it, the Status tab displays:

Loading >TRACE< File: C:\WINDOWS\Desktop\Exercise\Data\exercise2.log


Processing Wellbore >> WELL P1
Processing Wellbore >> WELL P2
Loading Completed

Notice that this log data has been loaded to the Wellbores and not the completions.

To check this data, you can’t do an Edit/Project/Data/LogTraces because you can’t see
this kind of data in the OFM spreadsheets. The only way you have to verify it is doing a
log report.

Select Analysis\Log Report. When the Edit Report window comes up, add the
desired data to
the report.
First, add the
depth and
then the other
log curves, as
shown in the
figure.

You can select


the different
columns from
the list:
highlight them
and click Add,
one at a time.
Then click OK.

You will get an


empty report.
Click the next
button until
you get the
data. Verify it
against your ASCII file.

14) In this step, you will load data to the TANK filter category. The reason why we have
to do this is because when we add all productions from all intervals producing to a tank,
it never matches the values that our field technicians measure at the tanks. So it
became a standard procedure in the company to report both: the total measured and
the total of the completions that fill the tanks.

The OFM administrator handbook____________________________________ Page 165


Having described the requirement (our boss wants a report with both figures and an
explanation of the difference, such as leaks, etc.), we need to review the options we
have in OFM.
If I define tank objects, then I will be able to see them on the map and load production
to them. However, I must specify them as objects (to prevent OFM considering the data
twice). The measured tank total could then be loaded easily. The important drawback is
that you can’t do anything with objects’ data, but to use it alone. You can’t report an
object tank and some completion data. When you group completions, OFM ignores
objects and vice-versa. When you group an object, OFM ignores any other data and only
groups the object data. So if you decide to create tank objects, you won’t be able to do
a report like the following one, because it is considering objects and completions data
simultaneously.

MONTHLYPRO TANKPROD
OIL OIL
DATE (Addition)(Measured)
---------- ---------- ----------
19990801 480.0 475.0
19990901 500.0 479.0
19991001 500.0 492.0
19991101 60.0 37.0
19991201 520.0 501.0

The other way of achieving our boss’ requirements is to load the tank measured-values
to the tank filter category. This was described as loading data to the category level. The
file we need to do this is:

//Contents of a tanks.dat file


*LOADBY TANK
*TABLENAME TANKPROD
*date *oil
*KEYNAME A
199907 79
199908 345
199909 340
199910 340
199911 340
*KEYNAME B
199908 475
199909 479
199910 492
199911 37
199912 501

Notice that the file starts with the LOADBY command. Also, notice that the production
goes to a separate monthly table named TANKPROD, which has been created with our
definition file. This is a must if we want to report this data simultaneously with
completion production data.

After loading this data (Data Type is DATA), I get the following log on the Status tab:

Loading >DATA< File: C:\WINDOWS\Desktop\Exercise\Data\exercise2tank.dat

Page 166 ____________________________________ The OFM administrator handbook


Processing TABLE >> TANKPROD <<
Processing TANK >> A
Processing TANK >> B
Loading Completed

Again, you can’t check this data from the OFM spreadsheets. You have to report it out.
The steps needed to do this are:

a- Go to Tools\Settings\Advanced and select Load group tables.


b- Go to Step/Category and select TANK.
c- Create a report with Date, MonthlyProd.Oil, TankProd.Oil
d- Group tank data by doing Step/Select and select the tank A.

You report should look like the one shown below.

TANK: A

MONTHLYPRO TANKPROD
OIL OIL
DATE
---------- ---------- ----------
19990701 80.0 79.0
19990801 341.0 345.0
19990901 345.0 340.0
19991001 362.0 340.0
19991101 353.0 340.0
19991201 347.0 0.0

e- Group the other tanks data by doing Step/Select and select the tank B. Inspect the
results for the other tank.
f- Remember to reset the Step/Category to LAYER after you finish. To leave the
report module and go back to the base map, do a File/Close.

15) Finally, the last data we want to add to our project is test data. In our case, tests
are performed periodically to different layers to estimate their total monthly production.
Because these tests are not done every day (or every month) but a few times a month,
we decided to store this data in a sporadic table called Tests.

The ASCII file format with the data needed to load our test information is the following
one:

*TABLENAME TESTS
*DATE *HOURS *OIL *GAS *WATER
*KEYNAME P1:A
19990707 11 1.16 1.9 0.26
19990712 14 1.3 2 0.35
19990722 24 3 4 0.80
19990807 11 2 0.26
19990812 14 1.3 2.2 0.35
19990822 3 4.4 0.9
19990907 12 1.2 2.1 0.36
19990912 15 1.3 2.75 0.35

The OFM administrator handbook____________________________________ Page 167


19990922 24 3.1 5 0.9
19991007 12 1.2 2.1 0.26
19991012 15 1.3 2.75 0.35
19991022 24 3.1 5 0.8
19991101 13 1.17 1.9 0.4
19991112 15 1.25 2 0.43
19991122 20 2.6 2.5 0.6
19991207 13 1.1 2 0.45
19991212 15 1.3 2.4 0.43
19991222 20 2.57 2.6 0.6
*KEYNAME P1:B
19990707 24 1.9 0 0.45
19990712 24 2 0 0.5
19990722 24 1.9 0 0.6
19990807 11 2 0.26
19990812 14 1.3 2.2 0.35
19990822 3 4.4 0.9
19990907 12 1.2 2.1 0.36
19990912 15 1.3 2.75 0.35
19990922 24 3.1 5 0.9
19991007 12 1.2 2.1 0.26
19991012 15 1.3 2.75 0.35
19991022 24 3.1 5 0.8
19991101 13 1.17 1.9 0.4
19991112 15 1.25 2 0.43
19991122 20 2.6 2.5 0.6
19991207 13 1.1 2 0.45
19991212 15 1.3 2.4 0.43
19991222 20 2.57 2.6 0.6

Notice that there is only data for two layers (to keep our example short) and that data is
a not formatted in column. Remember that as long as there is a space or tab (or any
combination of them) between numbers, OFM will process the file correctly.
Notice as well that the dates include the day of the month (year – month and day).
Sporadic (in time) tables store the complete date data.

After loading this data (Data Type is DATA), I get the following log on the Status tab:

Loading >DATA< File: C:\WINDOWS\Desktop\Exercise\Data\tests.dat


Processing TABLE >> TESTS <<
Processing Completion >> P1:A
Processing Completion >> P1:B
Loading Completed

This concludes our second exercise. Hopefully now you have an idea on how to create a
basic project and decide to get your hands dirty experimenting with your own data.

Page 168 ____________________________________ The OFM administrator handbook


OFM Database Binary Files

OFM gets its data from various sources (ASCII files, ODBC connections, Production
Analyst files, PI/Dwights files, etc.) and store it in a proprietary database. This means
that the OFM database files can be opened (and understood) only by OFM.
A project consists of several files that you can recognize by their extension. The main
file is the *.ofm one. In our previous exercise example, the main file was named
“exercise 2.ofm”.
When you load data (from a ASCII file or any other possible source), the data goes to
the respective OFM binary file and once is there, the source is not needed anymore. This
means that, for our previous exercise, you can safely delete all the ASCII files you
prepared for the build (*.def, *.xy, *.srt, *.prd, *.dat, etc.). Once you loaded the data,
you don’t need them anymore.

As a good advice, always keep your data in its original format. They could help you to
rebuild a project from zero, in case the OFM binary files get corrupted.

The following table describes the meaning of the OFM binary files, according to their
extensions. Binary means that these files can’t be opened with any other program but
OFM.

Configuration project.o3 Data Registers project.o89 Monthly project.i22


project.d22
Multipliers project.o13 Decline project.o14
project.i35 Notes project.i34
Static project.i21 project.d35 project.d34
project.d21 project.dca
ODBC Configurationproject.o17
Symbols project.o10 Deviation project.i27
project.d27 Parser project.o4
Units project.o12
project.o16
Internal Date Range Patterns project.i28
Static Master project.o11 project.d28
project.i20 Log Intervals project.o19
project.d20 Sorts project.o6
Log project.i29
Cross-reference project.i26 project.d29 Sporadic project.i24
project.d26 project.d24
Lookup project.i25
Daily project.i23 Wellbore Diagram project.o82
project.d23 Marker project.i30
project.d30

Project is the name you have given to your project. In the previous section, we created
one named “Exercise 2”, so our configuration file for that particular project will be
named “Exercise 2.o3”.

The OFM administrator handbook____________________________________ Page 169


For the time being, we can identify just a few of all the available files. For instance:

Exercise 2.ofm Main file. Is the file you open with OFM to load the project. It
contains, among other stuff, your tables’ definitions.
Exercise 2.o3 Configuration file. It keeps values such as the grid settings, the
option of displaying the names and legend on the map, you data
associations, etc. You can safely delete this file and OFM will create
a new one with the default settings.
Exercise 2.o11 These files hold the information of the static master table (XY) as
Exercise 2.i21 well as any other static table of the project (Properties). If you
Exercise 2.d21 delete these files, your project becomes useless.
Exercise 2.i23 These files keep daily data. In our project, just the DailyProd
Exercise 2.d23 table. Notice that because we have not added any data to this table
yet, these files have not been created.
Exercise 2.i29 These files hold data loaded to log tables (LogTraces). If you
Exercise 2.d29 delete these files, your log data will be lost. However, the rest of
the data will work fine.
Exercise 2.i24 These files store sporadic data (our Tests table). Again, you could
Exercise 2.d24 delete them and loose only that data.
Exercise 2.i22 These files have the monthly data (our MonthlyProd and
Exercise 2.d22 TankProd tables). If you delete these files you will loose the data
of both tables.

After this quick revision, you should have a better understanding of an OFM database
file structure. The data is split in different files, according to its nature. This gives you, in
some cases, the freedom of deleting the files to get rid of the data and re-load it.
Sometimes, this is the only way of recovering a partially corrupted project. However,
there are some files that, even in extreme situations, you can’t delete without corrupting
the whole project. We will mention them as we move along.
As a final remark, notice that there is no relation between files and tables. The relation
is file to data type: If you delete monthly data type, you delete all tables that store
monthly data.
I can’t close this section without repeating once more:

Although after loading it to a project you don’t need it, always keep your data in its
original format. It could help you to rebuild a project from zero, in case the OFM binary
files get corrupted.

If you don’t have your ASCII files, you can generate most of them exporting the data
from an OFM project to ASCII files. This is a very recommended practice if you don’t
have your own source data files. We will cover this subject in a separate section.

Page 170 ____________________________________ The OFM administrator handbook


Conclusions

If you have gone through the whole chapter, I expect you to have the minimum
knowledge to start experimenting with your data before the real project. You could start
preparing your ASCII data files and even attempt to build your first database. However,
I have skipped important points that you will also need to know to build your final-
professional project. The next chapters will cover them, one at a time: OFM Project
Variables, Units and Multipliers, Basemap Symbols and Project Optimization.
If you need to build more than one project, you should also visit the Reusing Projects
chapter. It will basically cover how to use a nicely designed project as a template for
others.

The OFM administrator handbook____________________________________ Page 171


Page 172 ____________________________________ The OFM administrator handbook
Chapter 4 – OFM Project Variables

Introduction

In the previous chapter, I described the OFM database structure and I deliberately used
general terms, such as tables, relations, columns, fields, rows, etc. Most people normally
understand these. However, I completely ignored a very important word in the OFM
jargon: a variable. Now it is time to introduce this keyword and you better get used to
it quick.

A variable in OFM is, as you would expect, something that has a name and stores a
value (a number, a string, etc.). OFM don’t use the term column to reference a value.
For instance, you won’t find anybody in the OFM world talking about the OIL column of
the MONTHLYPROD table. They will refer to the MONTLHYPROD.OIL input variable,
instead.
OFM variables come in three flavors: Input, Calculated and Imputed. The next
sections will explain them carefully, so be patient.

Suppose that you have a table loaded with the oil production of a completion and you
want produce a report out of it. This table is named MONTHLYPROD and the column is
OIL. If you were using a low level programming, you would have to write some code,
like:

/* This function retrieves the OIL value for a */


/* Specific WELL and DATE from the MONTHLYPROD table */
Function OIL(Date, Well)
SELECT TABLE MONTHLYPROD;
SELECT RECORDS THAT BELONG TO Well;
MOVE FIRST RECORD;
OIL = 0;
DO WHILE (MONTHLYPROD.DATE <> Date) AND NOT (LAST RECORD)
MOVE NEXT RECORD;
END DO
If MONTHLYPROD.DATE = Date Then
OIL = MONTHLYPROD.OIL;
End If
End Function

With this function, you could then report oil production for well P1 with code like:

FirstDate = 199001;
LastDate = Today;
PRINT “Oil Production Report for Well P1”

The OFM administrator handbook____________________________________ Page 173


For Date = FirstDate to LastDate Step Monthly
PRINT Date, OIL(Date, “P1”)
Next

As you can see, you have to manually sweep the needed dates; and retrieve and print
the OIL value that corresponds to that particular Date and Well.

Because these database operations in OFM are quite common, they are well known in
advance. OFM was created to do many of these things for you. For example, it does the
walking through the table and gets the OIL value that corresponds to the date and well
being processed. All you have to do to generate a report like the previous one will be
specify the DATE and MONTHLYPROD.OIL variables. OFM does the rest!

This is a very obscure subject for OFM beginners: Most variables don’t have one unique
value, but are indexed. They don’t have a single value because their value changes with,
at least, one external index. In our previous example, the OIL changes with the date
and the well, however the name of the variable is just one: MONTHLYPROD.OIL.
Another commonly used index is depth. If you report log curves, you specify the names
of the variables (LOGTRACES.DEPTH, LOGTRACES.GR, LOGTRACES.SP, etc). The GR, SP
and any other log curve will have the proper value, depending on the well selected and
the depth being reported. Very cute.

OFM Variables: Types

OFM has three types of variables (yeah, I’ve said that already). The use of each type
should be clear after you go through this chapter. Usually, once you know what you
want to do with the variable, there is only one type that would do the work.

Input Variables
These variables have already been introduced to you in previous chapters. These are
basically the table columns. The names they get are completely defined after you create
them. If you create a table named MonthlyProd and in that table you define a column
named Days, then you have an input variable named MonthlyProd.Days.
Another example will be the variable that holds the well names of our last exercise. It
would be XY.Well.

Always, an input variable’s name is the table_name.column_name. You can’t change


that unless you rename either the table or the column.

These are also the only variables you can load with data. Anything that you load to a
project goes to an input variable. Input variables hold the raw data. Whatever you load
to them is what their value will be.

Page 174 ____________________________________ The OFM administrator handbook


Imputed Variables
Imputed variables are variables which value is the result of a simple calculation. The
available operators are +, -, / and *. You don’t load data to an imputed variable, but it
becomes available (and they look as any other input variable) and its value is the result
of this simple calculation.
Imputed variables are defined in the tables (as extra columns) although you don’t load
them with data. The name they receive is also totally defined after creation and the
syntax is similar to input variables: table_name.column_name. There are some
restrictions on these variables: the mathematics is limited (four operators and very few
functions) and the only pieces you can use to build the equation are input variables
(they must belong to the same table) and constants.

So, suppose that I have a table named MProd like the following one:

DATE DAYS OIL GAS WATER


199001 30 160 1800 40
199002 23 120 1600 23

The OIL value is the total volume produced by the completion during the month. If I
want to have the effective producing rate, I have to divide this value by the number of
days that the zone produced during that month. For instance,

DATE DAYS OIL OILRATE


(days) (bbl) (bbl/day)
199001 30 160 5.33
(160/30)
199002 23 120 5.21
(120/23)

This figure is a value that can be calculated from the raw data and you don’t have to
load. OFM calculates it. One way of doing these calculations is using Imputed Variables.
For this particular example, you could create a imputed variable in the MProd table
named OILRATE as an imputed variable which equation would be:

OILRATE = OIL /DAYS

This variable will be accessed as any other Input variable and its name will be
MProd.Oilrate. Your final MProd table could then look like:

DATE DAYS OIL GAS WATER OILRATE GASRATE WATERRATE


199001 30 160 1800 40 5.33 60.00 1.33
199002 23 120 1600 23 5.21 69.56 1.00

Notice that highlighted values have not been loaded. OFM calculates these figures based
on the existent data and the specified equation.
Notice also that when you specify the equation OIL/DAYS, OFM knows that all
calculations refer to the month selected. It is not possible to divide February’s OIL value
by December’s DAYS. It is done ONE RECORD AT A TIME. This keeps the equations

The OFM administrator handbook____________________________________ Page 175


simple but limits you to the values available in that record. Also, if you have OIL in
another table (such as PRD), then you can’t use the OIL/DAYS (more clearly
PRD.OIL/MPROD.DAYS) because they are in different tables. You can only use the Input
Variables of the same table and the values of the current record.

Calculated Variables
This is where OFM power really shines. Calculated variables are variables that you define
completely: the name and the equation. You can virtually use them to calculate anything
you can imagine. To build your calculated variables you can use constants, simple
operators, input and imputed (and even other calculated) variables, and more than 250
system functions. You can also use user functions, which are functions that you code in
a special scripting language.

For instance, imagine that you want to report, once a month, the total oil accumulated
from beginning of production. You don’t externally calculate this value and load it. You
ask OFM to calculate it for you! Example, say that you have a MonthlyProd table like:

DATE OIL CumOIL


199001 60 60
199002 55 115
199003 58 173

The left-hand side is your input table. The highlighted values on the right hand side are
calculated by OFM. If a value changes for the OIL input variable, OFM will show the
changes in the CumOil variable.

A calculated variable is defined as a stand-alone equation with a name (it is not


associated with a table). For example, the following line shows a possible definition of
CumOil:

CumOil = @CumInput(MonthlyProd.OIL)

Notice the @ sign. This identifies one of the available system functions37 as part of the
definition. This function is CumInput and is designed to accumulate an input variable,
such as MonthlyProd.OIL.

OFM does not have any pre-defined calculated variables. They have to be defined by
you for every project you build. Don’t’ worry now about this. There are some tricks and
tools to quickly create a set with the most popular variables.

37
System Functions is a world in itself and will be covered in later chapters. For now, just
believe that is a pool of available functions that you can use to build your own calculated
variables. There are system functions for mathematics, statistics, database access, file
manipulation, etc. More than 250 functions are available in this pool and the number gets bigger
in every new OFM release.

Page 176 ____________________________________ The OFM administrator handbook


Summary and reflections
We can now summarize that the available variable types in OFM are three (have I said
this, already?):

• Input Variables
• Imputed Variables
• Calculated Variables

The Input type is easy to understand. They are the columns of the tables that you need
to fill in (load) with your raw data.

Imputed are variables that you don’t load with data, you just define the equation and
OFM calculates the values. The equation you can specify is very limited.

Calculated variables are extremely powerful and the equation can calculate virtually
anything.

“Ok”, you’ll say. “I got them but… why is that we have a Imputed type, very limited
compared to the Calculated ones? Why can’t I just ignore the Imputed ones and build all
my equations using Calculated Variables?”.
This question is intimately related to the Group procedure of OFM38 and the main
difference between them is when the equation is actually calculated. The answer is NO,
you can’t ignore them. I’ll explain:

Suppose that we have this data:

Completion Month Prod Days OIL WATER GAS


P1:A Jul-99 20 80 20 120
Aug-99 25 81 21 130
Sep-99 22 78 20 150
Oct-99 30 78 19 140
Nov-99 30 75 22 100
Dec-99 24 74 23 110
P1:B Aug-99 21 60 16 0
Sep-99 27 59 15 0
Oct-99 28 59 13 0
Nov-99 22 60 16 0
Dec-99 23 60 17 0

If you Group these two completions together, OFM will load their data and consider it as
only ONE set (i.e., a group) The result will be a unique set of values, like the following
one:

38
Grouping is the bread-and-butter of OFM operations. You can’t do anything without grouping
the desired data, so you better understand very clearly what’s coming now.

The OFM administrator handbook____________________________________ Page 177


Completion Month Prod Days OIL WATER GAS
P1:A & P1:B Jul-99 20 80 20 120
Aug-99 46 141 37 130
Sep-99 49 137 35 150
Oct-99 58 137 32 140
Nov-99 52 135 38 100
Dec-99 47 134 40 110

This is a group. The input variables ProdDays, OIL, WATER and GAS have been defined
in a way that a group of values is the addition of values, so, the OIL of the group for
Nov-99 is 135 which is the addition of 75 (for P1:A) and 60 (for P1:B). The same
happened to the other figures.

Let’s go back to our OILRATE equation. To simplify the point, I will just consider one
month: Nov-99.

Completion Month Prod Days OIL WATER GAS OILRATE


P1:A Nov-99 30 75 22 100 2.50
P1:B Nov-99 22 60 16 0 2.72
P1:A & P1:B Nov-99 52 135 38 200 2.60

At this point you should detect a mistake here. If P1:A produced at 2.50 bbl/day and
P1:B at 2.72 bbl/day, how can you get the group of both to produce only 2.6 bbl/day?
Both together, they should report a total rate of 5.22 bbl/day!

The difference is because some calculations (particularly the rates) can’t be carried out
from total figures. They must be performed to all individual components and then added
to get the group value. This is the same as pointing out that:

∑ Volumes ≠ ∑ (Volumes / Days )


∑ Days
The previous table is calculating OILRATE using the totals (as per the left-hand side of
the equation). However, the proper procedure is the one specified on the right-hand
side of it: first calculate the rates for the individual wells and then group them together.

Calculated Variables are calculated using the group values, i.e., after the data has been
grouped. Imputed variables are calculated before the data is grouped. Although this
seems to be a big limitation, it is not. The rates example is about the only type of
equation that suffers this difference so it is more or less the only type of variables that
you have to define as Imputed. All the other operations can be normally done over the
group figures with Calculated values with no difference in the results.

Loosen up your eyebrows! There is an exercise to prove you this. Imagine the case of a
CumOil. Adding the individual accumulated values or accumulating the monthly value of
the group leads to exactly the same result, as shown in the next tables:

Page 178 ____________________________________ The OFM administrator handbook


Raw data
Completion Month OIL CumOil
P1:A Jul-99 80 80
Aug-99 81 161
Sep-99 78 239
Oct-99 78 317
Nov-99 75 392
Dec-99 74 466
P1:B Aug-99 60 60
Sep-99 59 119
Oct-99 59 178
Nov-99 60 238
Dec-99 60 298

The grouping of the accumulated values (Imputed variable style) leads to:

Completion Month OilCum


P1:A & P1:B Jul-99 80=80+0
Aug-99 221=161+60
Sep-99 358=239+119
Oct-99 495=317+178
Nov-99 630=392+238
Dec-99 764=466+298

And accumulating the group values (Calculated variable style), leads to

Completion Month OIL OilCum


P1:A & P1:B Jul-99 80=80+0 80
Aug-99 141=81+60 221=80+141
Sep-99 137=78+59 358=221+137
Oct-99 137=78+59 495=358+137
Nov-99 135=75+60 630=495+135
Dec-99 134=74+60 764=630+134

Remember that most of the time, any calculated value works the same if calculated over
the group value (Calculated variable style), so almost all your calculations can use all the
OFM power of calculated variables. The only (well known) exception is rates, that you
will have to calculate using imputed variables and where just a division is enough.

The OFM administrator handbook____________________________________ Page 179


Input Variables

As mentioned before, these are the table columns. Chapter 3 covered a database
construction and plenty of input variables were created. The examples just showed how
to create the variables but mentioned nothing about other attributes you normally set to
complete the definition. This section will tell you all there is to know about these
variables.

Remember that in Chapter 3, the table-structure of the projects was created from ASCII
definition files. The next figure repeats one of the files used.

//Contents of exercise2.def
*TABLENAME XY Static Master
LAYER STRING 15
X FLOAT
Y FLOAT
WELL STRING 15
WELLTD FLOAT
ALIAS STRING 5

*TABLENAME MONTHLYPROD Monthly


DAYS INT1
GAS FLOAT
OIL FLOAT
WATER FLOAT

*TABLENAME DAILYPROD Daily


OIL FLOAT
GAS FLOAT
WATER FLOAT

*TABLENAME LOGTRACES Trace


DEPTH FLOAT
GR FLOAT
SP FLOAT
ILD FLOAT
DT FLOAT

*TABLENAME TANKPROD Monthly


OIL FLOAT

*TABLENAME TESTS Sporadic


DATE UINT4
HOURS FLOAT
OIL FLOAT
GAS FLOAT
WATER FLOAT

*TABLENAME PROPERTIES Static


POROSITY FLOAT
TTIME FLOAT

Page 180 ____________________________________ The OFM administrator handbook


RW FLOAT
DATEON UINT4

Notice that we create the table specifying the name and table type (Static, Monthly,
etc.) and then the input variables, specifying the name and also variable type. There are
many variable types in OFM: FLOAT, STRING, UINT4, etc. The next section is dedicated
to them.

OFM Input Variable Types


When you decide to add an input variable to your project, you need to think about the
typical value it will contain. Based on that analysis, you choose the most efficient type to
store your data. The Input Variables available types are:

Variable Holds a Space Range Example


Type on file
FLOAT Floating 4 Bytes 7 digits of 123.456
Point precision
Number
DOUBLE Floating 8 Bytes 19 digits of 123456.1234568
Point precision
Number
INT1 Integer 1 Byte -128 to 127 24
Number
INT2 Integer 2 Bytes -32768 to 13653
Number 32767
INT4 Integer 4 Bytes Could be used
Number to store dates.
UINT1 Positive 1 Byte 0 to 255 243
Integer
Number
UINT2 Positive 2 Bytes 0 to 65536 43652
Integer
Number
UINT4 Positive 4 Bytes Preferred type 19981203
Integer for storing
Number dates
STRING n String User “String that takes 26
of n defined chars”
chars (n Bytes)

Notes:
In the FLOAT and DOUBLE types, the decimal point counts as a digit. The sign does not.

These are some examples for FLOAT type:

1234.67 7 digits: OK
-1234.67 7 digits plus sign: OK

The OFM administrator handbook____________________________________ Page 181


1234567 7 digits: OK
-1234567 7 digits: OK
0.1234567 9 digits (8 plus the dot): BAD
123.5678 8 digits: BAD

For DOUBLE, there are extra limitations:


• The number can’t have more than 13 digits in its integer part.
• The number can’t have more than 6 digits in its decimal part.
• The total can’t exceed 17 digits (the decimal dot counts as one, but the sign does
not)

These are some examples that can be loaded to DOUBLE variables:

1234567890123 13 digits, no decimal point


123.123456 6 digits after the decimal point
1234567890.123456 Total of 17 digits (decimal dot counts as one), with
the maximum of decimal digits allowed.
-1234567890.123456 Total of 17 digits (decimal dot counts as one), with
the maximum of decimal digits allowed. The sign
does not count.

• The difference between INT and UINT is the possibility of using a sign. UINT means
Unsigned INT, and integer that uses all bits for the number and there is no sign
involved. They go from zero to 2n-1, where n=8 for 1 byte, 16 for 2 bytes and 32 for
4 bytes. An unsigned integer of 4 bytes (UINT4) is the preferred type for storing
variables that will store dates.
• Choosing the correct type can change your project performance dramatically. For
instance, if you store the number of days of production per month, this number goes
from 0 to 31. If you don’t need decimal precision, then INT1 (or UINT1) is enough.
If you choose a DOUBLE for this variable, the size will increase eight times.
• For variables that will store alphanumeric string values, you have to specifically
choose the size. If you need to store a 3 or 4 chars alias name, then defining the
variable as STRING 20 is a total waste. Think about your future needs but don’t over
dimension your variables.
• If your numbers are big but without much definition (like 25,000,000), then you
don’t need precision. Later on you will see that you can load just 25 (an UINT1 is
enough) and then tell OFM that the data is in millions!. This is another good reason
to sit down and think before choosing your variable types. Most of the time, FLOAT
is enough for values that have some kind of decimal precision. You need to have a
good reason to choose DOUBLE. Remember that a poorly designed database can
easily be two, three or even more times bigger than another one that does the same
thing but was designed properly. Because OFM uses index technology to access the
files, you will not notice a huge performance increase with smaller files that are
located on your local hard disk (the indexes stay the same size). However, when
your files are on a network drive, definitely it is not equivalent to move 30MB than
100MB (at a rate typically much less than 10 Mbps).

Page 182 ____________________________________ The OFM administrator handbook


Input Variables Attributes
When you define an input variable, you not only define the type (i.e. FLOAT, STRING,
etc.) but also many attributes. This can be done specifying additional data in the ASCII
definition file or from within the program. Doing this from the definition file is quite
cumbersome and will not be explained. It is a lot
easier to do it from within the interface. If you need
to create more projects based on an existing one,
there are many tricks and tools to reuse the variable
attributes, so all the manual work of setting the
attributes can be done only once.
To edit the attributes of an Input Variable, select
Edit/Project/Definition. This opens the Edit
Table Definition window. Highlight the table that
contains the variable (XY in the figure) and click on
the Fields button.

This brings the Variable Definitions window. This


is where you set all the attributes for each of the
variables of the selected table. Notice that this
window has four tabs: Define, Report, Plot and Math.
Each one has a different function.

The Define Tab


This is where you can do the basic variable setup, including adding a new one to the
table or delete an
existent one. The name
of the target variable is
displayed on the
Variable Name combo
box. In the figure, it is
WELL. WELL is a variable
of type STRING and with
a maximum length of 15
characters. It has no
units associated (it’s a
STRING type, not a
number, so it does not
take any units). The
following example shows
other example, the OIL
variable of the
MONTHLYPROD table.
Remember that this
variable stores the measured oil volumes monthly.
We defined this number as FLOAT and here is where you assign it a unit. Notice that the
Type is now FLOAT and that Unit and System become available. The Unit is set to bbl
(barrels) and the System to Current.

The OFM administrator handbook____________________________________ Page 183


Units will be covered in a separate chapter. For now, all you need to know is that OFM
can switch between two units systems: English and Metric.
You should assign a
unit to every variable
that has one. If you
do that, OFM can
report its values in
any of the two units
systems, depending
on your preferences:
If you set OFM to
Metric mode, all
variables will be
reported in metric
units. If you set it to
English, then all units
will be expressed in
English units.

This is the normal


behavior and happens
only if you select
Current in the System combo box. The other two possibilities are English and
Metric. If you select English instead of Current, even if you switch OFM to metric mode,
this particular variable will always be output in English units (same goes for the Metric
option). The System setting of an input variable allows you to fix a particular variable to
a unit system (English or Metric) or to follow the general user selected setting (Current).

Below you can see a Carry Forward option and a parameter. This comes only in
Monthly and Daily table types and it is basically to create a staircase effect on the curve.
Suppose that you have a monthly table with an OIL input variable (OFM expects one
value per month). Now suppose that you received the following data from the field:

Date OilVolume
199801 50
199803 48
199810 51

After loading it, OFM will report:

Date OilVolume
199801 50
199802 0
199803 48
199804 0
199805 0
199506 0
199807 0

Page 184 ____________________________________ The OFM administrator handbook


199808 0
199809 0
199810 51

A month with no loaded value appears with a zero value. This is by no means the real
thing because we know that the field reports only when there is a change in the
production. It production stays as the previous month, they don’t send any information.
In other words, the well maintains the production until you are told a new value. You
could decide to synthetically create a load file with the last month value repeated (a lot
of manual work every month) or simply use the Carry Forward feature.

If you activate this for the OIL variable, OFM will maintain the value of the variable up to
a maximum of records that you specify. Suppose that you activate this setting with a
parameter of 3. Then OFM will repeat the value up to three times. If it’s a monthly table,
three months. If it’s a daily table, up to three days. In our monthly table, the result will
be:

Date OilVolume
199801 50
199802 50
199803 48
199804 48
199805 48
199506 48
199807 0
199808 0
199809 0
199810 51

The bolded values are generated by OFM. This feature can save you a lot of work,
depending on what you want to do. The maximum number of times that OFM can
repeat the value is 255 (255 months or 255 days, depending on the table type).
Although these values are generated by OFM, they behave exactly the same way as if
you loaded them.

Finally, notice that the name of the variable appears in the Variable Name combo box
but also in the Name text box. If you want to rename a variable, just select it, correct
its name and click on any other part of the window, out of the Name box.

Beware that variables can be being referenced by their name from other places of the
database. Changing the name will turn all these references invalid.

The Report tab


This tab allows you preset how your variable will look in a report. You can manually
override them from the report module, however, if you pre set the format, you could
save a lot of work and also standardize your results. Notice the following report. For the
second column (MONTHLYPROD.OIL) we have pre defined the first three lines of the
column header (the fourth line is the unit and it is put there automatically by OFM), a
ten characters width and 1 decimal point.

The OFM administrator handbook____________________________________ Page 185


Monthly
Oil Volume
Produced
Date bbl
---------- ----------
19990801 60.0
19990901 59.0
19991001 59.0

All this was done from the Report


tab displayed in the figure. Notice
that you can also preset the
Justification (RIGHT, LEFT or
CENTER) and a Case. The case
here is disallowed because it
applies only to variables of STRING
type. Suppose that you have a
STRING variable that keeps a value
like “Well P1”. With Case, you
control how this value will appear
in the reports. The next table
shows the available options and the
results.

MIXED: Well P1
LOWER: well p1
UPPER: WELL P1

The Plot tab


The plot tab controls the default attributes when you use the variable in a plot. The
following figure shows you the
settings. The Plot Name is the
description that will come up in plot
legends. OFM will use this string and
automatically append the unit label.
You can also define the color of the
curve, the line type, the width and if
you want symbols at the measured
points (like diamonds, etc.).
The next figure is a plot of the
MONTHLYPROD.OIL variable
generated with the default settings
shown in the example.

Page 186 ____________________________________ The OFM administrator handbook


The Math tab
This tab controls some other aspects of the variable, related to mathematics. The first
you can see is the Multiplier box. In this section you specify how OFM will interpret
data in the loading process (Input) and in any operation you do with it in OFM
(Output).
For instance, the GAS
variable shown specifies that
the input comes in M
(Thousands), so a value of
23.5 read from an ASCII file
will be stored as 23500.
We also specify the Output
in Thousands (M), when you
report this variable, it will be
reported in thousands.
Example, suppose that the
variable unit was defined as
cf (cubic feet). If your ASCII
file has a value of 23.5, OFM
will load it as 23500
(Input=M). When you use
this variable, OFM will
express it in Mcf (Output=M).
You can use any other combination of these two, as long as you know what you are
doing and test the results. Once the data is loaded, changing Input does not produce
any effect until you reload the data. Be prepared for that in your experiments.

The second part of the window is the Math Options box. This is where you define
what will OFM do with the variable when you group several pieces together as one set.
In the Average Type, you can select NONE (simply addition, the most common option
and the default), ARITHMETIC (arithmetic average), GEOMETRIC (geometric
average) and HARMONIC (harmonic average). Remember, most of the time, you want
to add all data together so NONE is the proper choice. However, if you have a variable
that does not add together to get the group value (such as the pressure), then you need
to select the proper averaging method.

The OFM administrator handbook____________________________________ Page 187


The Multiply by Factor options has to be normally checked. Under some analyses,
OFM multiplies the variables by some factors that you select. A typical case is pattern
analysis, where you must affect the curves by the pattern allocation factors. If you don’t
have this setting checked, OFM will not apply the factors to the variable.
Normally, you leave this setting on until you find a situation where this is inconvenient
for your study.

At the bottom of the window, you have the last section, related to data checking. The
Data Range box. You can specify a minimum and maximum values for a variable, so
anything outside the range will be rejected. For instance, if your variable stores the days
of production per month, you could set the valid range from 0 to 31.

Finally, the Default Value could be confusing. This is not the value that OFM will report
if no value is ever loaded. It is the value that OFM will load if an attempt is done to load
a value that is out of range. Obviously, this value works in combination with the Data
range mentioned before.

Suppose that you define a data range from 0 to 31 and a default value of 30 for the
DAYS variable. If you try to load the value 45, it does not fall in the valid range, so the
default value of 30 is assigned. You need to be very careful about this default range. I
would still use a range and a default value of –99999. Why?, well, if anything goes
wrong during the load, I am sure that I will know about it. Try to plot a variable that has
values between 0 and 31 with a –99999 spike and you’ll see what I mean.

Reusing attributes
To close the Input Variables section, I would like to come back to the subject of reusing
the attributes. If you set your input variables attributes from within the program, you
can export them to an ASCII definition file that includes all these settings. If you do
File/Export/Table Definitions, you will generate a detailed definition file. The
following example shows you a detailed definition of the DAYS and OIL variables. Notice
that there is a command to define every attribute. I will not cover the commands in this
book but you should know that you can load a definition file with all these attributes and
they will be properly interpreted by OFM.

*TABLENAME MONTHLYPROD Monthly


DAYS INT4
*pn "Producing Days"
*pa "Black" "Solid " "None " 4
*u "days"
*mu "1" "1"
*id 0
*ma Yes None
*da 0 0 -99999
*rh "" "Producing" "Days"
*rf 10 0 Right
OIL FLOAT
*pn "Monthly Oil Produced"
*pa "Green" "Solid " "None " 4
*u "m3"
*mu "1" "1"

Page 188 ____________________________________ The OFM administrator handbook


*id 0
*ma Yes None
*da 0 0 -99999
*rh "Monthly" "Oil Volume" "Produced"
*rf 10 1 Right

Imputed Variables

These are variables which value is not loaded but calculated by OFM. They have to be
defined in the tables and the procedure is very similar to one used for input variables.
Remember that these variables are calculated before grouping the data and they are
normally used for rate calculations, such as oil rate, gas rate, etc. Although you don’t
load these variables, they are actually created on the tables and occupy space. The
difference is that OFM calculates/refreshes the values automatically for you.

Imputed Variable Types


There are three basic types of calculated variables and you need to think which one fits
best your needs. The following table lists the different options. Remember that they take
up space in the file, so better think about the precision you need before creating them.
Notice that there are values suited for storing results that fit in an INT1 type (i.e., a
normal integer), FLOAT or DOUBLE.

Variable Type Holds a Space Range Example


on file
CALCULATED*1 Integer 1 Byte -128 to 127 56
Result
CALCULATED*4 Floating 4 Bytes 7 digits of -123.456
Point precision
Result
CALCULATED*8 Floating 8 Byte 19 digits of 123456.1234568
Point precision
Result

An Imputed variable can be defined from within the program. To do this, select the
desired table after Edit/Project/Definition and click Fields. The Variable
Definition window comes up. Click New and type the name of the new variable. For
example, we will create the OILRATE variable, so type in this name. So far, it looks as
any Input variable.
In the Type combo box, select one of the available Imputed Variable types. In the
example, we are using CALCULATED*4. Notice that when you select one of the
Imputed types, an Equation box appears for typing in the equation.

The OFM administrator handbook____________________________________ Page 189


In our example, we just
typed in the classic equation:

OIL/DAYS

This is assuming that in that


table, there are two columns
with those names. If not,
then the equation would not
work.

As mentioned before,
equations must be simple. All
you can use are the basic
four operators and very few
system functions. The master
rule is that equations must
have all they need in the
variables of the table and in that particular record. You can’t use a system function that
needs values that are present in other tables or records. Complete the rest of the
definition and click OK. OFM will add the column to the table and fill it with the correct
calculated values. This might take some time. If it does, OFM places a message in the
status bar asking you to wait until de operation is finished.

As I said before, you can use the operators and also some simple system functions.
Here is a nice application: suppose that your rate is defined as above. If in one month,
there are no days loaded, OFM assumes a zero value and the equation can’t be solved.
In those cases, you could use a conditional solution, depending on your data. These are
two typical examples:

OILRATE = OIL / @IF(DAYS>0, DAYS, 30)


OILRATE = @IF(DAYS = 0, 0, OIL/DAYS)

Both use a system function: @IF. This function takes a condition and the two possible
results. If the condition is satisfied, then the first result is returned. If not, the second
one is used.

For instance, the first one translates into:


OILRATE equals to OIL divided by:
If DAYS > 0, then divide by DAYS.
If DAYS <= 0, then divide by the constant value 30.

The second one can be read as:


OILRATE equals to:
If DAYS = 0, then equals to 0
If DAYS not 0, then equals to OIL/DAYS.

The following figure shows the previous trick applied to the variable GASRATE.

Page 190 ____________________________________ The OFM administrator handbook


Remember, you can’t access data that is not present in that table and that record.

Another sad drawback is that


you can use only the columns
that you define in the table,
not the automatic ones, such
as the DATE of a monthly
table: You can’t use DATE in
an Imputed Variable
definition.

Imputed Variables Attributes


There is no difference between the attributes you set for a Input and an Imputed
variable. The rest of the settings are equivalent to the ones we mentioned before.
Basically this means that I am not repeating every tab again. You will have to browse
the previous pages.
The only comment that I will do is about multipliers. They work the same way as they
do for input variables. For instance, say that you have OIL = 90 and DAYS = 30. The
division turns into 3. If you set an input multiplier of 1 for the OILRATE, then the value
will be 3. If you set an input multiplier of M, the 3 will be stored as 3000. Be careful.
The OILRATE example should be simple enough to understand. For Imputed variables,
you usually leave all Input and Output multipliers in 1. All the multiplying factors are
already set while loading the data to the Input variables.

Reusing Attributes
Imputed variables are part of tables and as such, they can go in the definition file.
Because of that, you can completely define an Imputed variable with all its attributes in
a def file. This is an example:

*TABLENAME MONTHLYPROD Monthly


PDOIL CALCULATED*4 OIL/DAYS
*pn "MONTHLYPROD.PDOIL"
*pa "Black" "Solid " "None " 4
*u "None"
*mu "1" "1"
*id 0
*ma No None

The OFM administrator handbook____________________________________ Page 191


*da 0 0 0
*rh "" "MONTHLYPROD" "PDOIL"
*rf 10 2 Right
PDGAS CALCULATED*4 “GAS/@IF(DAYS>0, DAYS,30.42)”
*pn "Effective Gas Rate"
*pa "Red" "Solid " "None " 4
*u "cf/d"
*mu "1" "1"
*id 0
*ma No None
*da 0 0 0
*rh "Effective" "Producing " "Gas Rate"
*rf 10 2 Right

It is extremely important to notice that when the equation has spaces inside, you need
to enclose it between “”. If not, OFM will read just up to the space and if that part is
invalid, it will not load it properly.

Calculated Variables

Calculated variables probably deserve a whole book. It is not my intention to cover them
completely here. Really, I don’t have so much drag. Ideally, you learn them as you need
and basically you start by paying a nice read to all the available system functions. 99%
of the calculated variables use system functions.

Remember that OFM does not create any calculated variable. That is your job. The idea
of this section is to show you what they are, how to create them and give default
attributes and finally show you some tricks and tools that can help you quickly create a
common set. What do I mean by a common set, when I have not even explained them?
All right, here is a list of some of the most common things you will do with calculated
variables:

• Cumulative Oil Production


• Oil Rate (as per Calendar Days)
• Cumulative Gas Production
• Gas Rate (as per Calendar Days)
• Cumulative Water Production
• Water Rate (as per Calendar Days)
• Monthly Liquid Production
• Cumulative Liquid Production
• Liquid Rate (as per Calendar Days)
• Gas / Oil Ratio
• Water / Oil Ratio
• Gas / Liquid Ratio
• Liquid / Gas Ratio
• Cumulative GOR

Page 192 ____________________________________ The OFM administrator handbook


• Cumulative OGR
• Cumulative GLR
• Cumulative LGR
• Cumulative WOR
• Oil Cut
• Cumulative Oil Cut
• Water Cut
• Cumulative Water Cut
• First Month of Production
• Elapsed Time Since Initial Production
• Cumulative Liquid Per Foot
• Prior Cumulative Oil Production
• Prior Cumulative Gas Production
• Prior Cumulative Water Production
• Variables that retrieve values calculated in Decline Case Analysis
• Variables that perform log analysis calculations
• Etc.

This list is quite trivial and happens to be a subset of what is already included in the
Demo database that installs with OFM. By no means, this list is about all you can do.
There are virtually no limits on the calculations you can perform with these variables.

Calculated variables are pure equations. They take no more space than what the
definition does (a few bytes) and they are calculated on demand, when they are
needed. This takes some computation time, but I have not noticed any delay ever. Feel
free to use them because there is no real performance penalty.

Because they are calculated, they are not related to tables and you can assign them any
name. You need to decide a naming convention, because it is very easy to have tens
(even hundreds) of calculated variables and start getting confused with what they do.

During normal work, the end user sees all the variables (input, imputed and calculated)
in a sorted list, so it is a very smart decision to split calculated variable names in two
parts: Subject.Function. For instance, for the variables listed above, I would choose
theses names:

Oil.Cum
Oil.CalDayRate
Oil.Cut
Oil.CutCum
Gas.Cum
Gas.CalDayRate
Gas.Cut
Water.CutCum
Water.Cum
Water.CalDayRate
Water.Cut
Water.CutCum
Etc.

The OFM administrator handbook____________________________________ Page 193


Or you could decide to do it the other way round: Function.Subject.

Cum.Oil
Cum.Gas
Cum.Water
Cut.Oil
Cut.Water
CalDayRate.Oil
CalDayRate.Gas
CalDayRate.Water
Etc.

What is the purpose of splitting the name: remember that the list will be presented
sorted to the user and having a prefix splits it in sections (the Oil.xxx section, the
Gas.xxx section, etc.). This helps the end user a lot.

As we will see, OFM suggests a CV prefix. Using this default will ruin all your efforts to
make your users’ lives easier. If all of them start with CV, then there is no way of quickly
find anything on the list.

OFM Calculated Variable types


There are no different types of calculated variables. If they are numbers, they are
calculated with the maximum available precision. If they are strings, they have all the
characters. I could try to catalog calculated variables considering what they do
(database access, string manipulation, DCA database access, etc.) but it will needless
complicate this part. Basically, you should not worry about their types. There are not.

Calculated Variables Attributes


When you create calculated variables, you can also pre set many attributes, same as for
the other types we have seen. This section will show you how to create a calculated
variable (one that calculates the Water Oil Ratio) and set all its attributes.
Select Edit/Project/Calculated
Variables. If you have no calculated
variables in the project, you will see an
empty list, like the one in the figure. In the
upper part, you type the name. Notice that
below there is an option to automatically
add a CV prefix. Try to avoid this practice.
You can either disallow this and type the
prefix and suffix above, or replace CV by
your desired string.
In this example, I will create a Ratio and I
decided to name it Ratio.WOR.
I uncheck the Append Prefix box, and
type the full name above. Then I click Add
to create a new variable with that name.

Page 194 ____________________________________ The OFM administrator handbook


OFM comes up with a complex window (Edit Calculated Variable) that will allow you
to define the equation of the variable. If you pay attention, it actually opened two
windows. The first one was one named Calculated Variable and is probably
underneath this one. This is the one we will use later to set the attributes, but first of
all, you need to define the equation.

Notice the following figure that OFM is already displaying the name of the variable we
are creating (Ratio.WOR) on the top of the window. The list in the middle shows all the
project variables. So far, because there are not any calculated variables, the list only
includes Input and Imputed variables. From that list, you can directly select with the
mouse (double clicking or click/Add) the desired pieces to assemble your equation. The
same list is used to display three different sets: Project Variables (Input, Imputed and
Calculated), System Functions and User Functions. Notice that there is one button
for each. Try clicking on them and see how the content of the list changes accordingly.
After you are done, return to the Project Variables list.

Notice also
that you have
a numeric
keypad and
some logical
operators. This
can be used to
build the
equation with
the mouse.

For the time


being, lets just
build our
simple ratio
equation. The
following
explanation
assumes that
your tables
have the same
names as the
example. In
most cases, they won’t and your names will be different. Don’t worry about this. The
procedure is the same, so try it with your own data.

From the list, double click on MonthlyProd.Water. This should move it to the big white
box above. This box is where you will define the equation. Then click on the division
button of the numeric keypad. Finally, double click on MonthlyProd.Oil to complete the
equation. Your window will look like the following figure.

The OFM administrator handbook____________________________________ Page 195


At this point, I would like to give some advice. First, you could have typed in the
equation instead of building it with the mouse. However, the mouse procedure is a
much faster and safer. You will save a lot of typos.
Second, you can
jump very quickly
within the selection
list if you know the
first letter of what
you are looking for.
Just select an item
of the list and
press the
correspondent key.
I pressed “m” to
jump to the
MonthlyProd part
of the list.

Click OK to finish
your equation and
go back to the
Calculated
Variable window.

This is the window where you set all that there is to set for calculated variables. Mainly
the units, output multiplier and report format. There are two other buttons. One is the

Equation Definition, that sends you back to the Edit Calculated Variable window,
to modify the equation. The other one is the Plot Attributes, where you set the
cosmetics of how the variable will appear in plots.

Page 196 ____________________________________ The OFM administrator handbook


Notice that I have filled the report
section and assigned a multiplier.
Fill up your own settings and click
the Plot Attributes button. In the
upper box, type in a nice
descriptive legend (it will come up
in plots) and then select the
desired curve attributes. Click OK
and then return to the previous
window. Click OK again and you
will go back to the Create
Calculated Variables window.
The brand new Ratio.WOR should
be now in the list. Click OK to return to the base map and prepare a report and graph to
see the results. These are some examples.

P1:A
Monthly Monthly Water
Water Vol Oil Volume Oil
Produced Produced Ratio
DATE bbl bbl %
---------- ---------- ---------- ----------
19990701 20.0 80.0 25.00
19990801 21.0 81.0 25.93
19990901 20.0 78.0 25.64
19991001 19.0 78.0 24.36
19991101 22.0 75.0 29.33
19991201 23.0 74.0 31.08

Notice the multiplier (%), report column header and plot attributes (legend, color, etc.).
This is about all there is to set about a calculated variable. Report and plot attributes
and the unit/multiplier couple. The most important part is the equation.

The OFM administrator handbook____________________________________ Page 197


Reusing Calculated Variables
Calculated variables are easily created from within the program, as shown in the
previous section. However, this creates the variable only in the project you have active.
The variable goes to the project, not to OFM, If you need the same variable in another
project, you have to create it again!.
Luckily, Calculated Variables can be loaded via ASCII files too. This file is known as a
parser file and the usual extension is par. All you have to do is dump the calculated
variables definition into a file and load it in every project you need it. You can load tens
of variables at a time (one parser file can contain any number of variables), with all their
individual attributes (colors, descriptions, etc).

A typical parser file looks like:

c [Oil.Cum=@Cuminput(MonthlyProd.Oil)]
*pn "Cumulative Oil Production"
*pa green solid none 0
*u bbl
*mu M
*rh "Cumulative" "Oil" "Production"
*rf 10 1 Right
c [Oil.CalDay=MonthlyProd.Oil/@dom(date)]
*pn "Oil Rate (Cal. Day)"
*pa green solid none 0
*u bbl/d
*mu 1
*rh "Oil" "Rate" "(Cal. Day)"
*rf 10 0 Right
c [Oil.WellCount=@countinput(MonthlyProd.Oil)]
*pn "Wells Producing Oil"
*pa green solid none 0
*u wells
*mu 1
*rh "Wells" "Producing" "Oil"
*rf 10 0 Right
c [Oil.ProDay=MonthlyProd.Oil/MonthlyProd.Days]
*pn "Oil Rate (Pro. Day)"
*pa green solid none 0
*u bbl/d
*mu 1
*rh "Oil" "Rate" "(Pro. Day)"
*rf 10 0 Right
c [Gas.Monthly= MonthlyProd.Gas]
*pn "Monthly Gas Production"
*pa red solid none 0
*u cf
*mu M
*rh "Monthly" "Gas" "Production"
*rf 10 0 Right
c [Gas.Cum=@Cuminput(MonthlyProd.Gas)]
*pn "Cumulative Gas Production"
*pa red solid none 0
*u cf
*mu MM
*rh "Cumulative" "Gas" "Production"

Page 198 ____________________________________ The OFM administrator handbook


*rf 10 1 Right
c [Gas.CalDay=MonthlyProd.Gas/@dom(date)]
*pn "Gas Rate (Cal. Day)"
*pa red solid none 0
*u cf/d
*mu M
*rh "Gas" "Rate" "(Cal. Day)"
*rf 10 0 Right

Notice that every definition starts with a c (calculated). Then you have the given name
and the equation. Below this line come the attributes, which look pretty much like the
ones we’ve seen for input/imputed variables.
What is very interesting is that if you have one of these files with all your variables, all
you have to check is that your table names and variable names match those you have in
the target project. If they do, you can load it directly. If not, you can easily do a Search
& Replace with any text editor and adjust the file to your needs.
Suppose that you production table is not named MonthlyProd but Mprod instead. If you
attempt to load this file, OFM will complain because it makes reference to a table that
does not exist. If you replace
MonthlyProd for Mprod in the file
and load it again, it will probably
work. This is a harmless procedure.
If the variable was there and you
load it again, it will overwrite it, so
you can repeat the load process as
many times as needed, without
destroying what is already loaded.

To load a parser file, just go the


data loader (Files/Get External
Data/Data Loader), select the file
(make sure that OFM assigns it a
PARSER Data Type) and load it.
The figure shows a Data Loader
window while attempting to load a
parser file. The next scroll displays a
log with the results of the load
operation, as displayed in the
Status tab:

Loading >PARSER< File: C:\WINDOWS\Desktop\Exercise\Data\CVariables.par


Equation >> Oil.Monthly= MonthlyProd.Oil
Equation >> Oil.Cum=@Cuminput(MonthlyProd.Oil)
Equation >> Oil.CalDay=MonthlyProd.Oil/@dom(date)
Equation >> Oil.WellCount=@countinput(MonthlyProd.Oil)
Equation >> Oil.ProDay=MonthlyProd.Oil/MonthlyProd.Days
Equation >> Gas.Monthly= MonthlyProd.Gas
Equation >> Gas.Cum=@Cuminput(MonthlyProd.Gas)
Equation >> Gas.CalDay=MonthlyProd.Gas/@dom(date)
Equation >> Gas.WellCount=@countinput(MonthlyProd.Gas)
Equation >> Gas.ProDay= MonthlyProd.Gas/MonthlyProd.Days
Equation >> Water.Monthly= MonthlyProd.Water

The OFM administrator handbook____________________________________ Page 199


Equation >> Water.Cum=@Cuminput(MonthlyProd.Water)
Equation >> Water.CalDay=MonthlyProd.Water/@dom(date)
Equation >> Water.WellCount=@countinput(MonthlyProd.Water)
Equation >> Water.ProDay= MonthlyProd.Water/MonthlyProd.Days
Equation >> Liq.Monthly=MonthlyProd.Oil+MonthlyProd.Water
Equation >> Liq.Cum=Oil.Cum+Water.Cum
Equation >> Liq.CalDay=Liq.Monthly/@dom(date)
Equation >> Liq.ProDay=Oil.ProDay+Water.ProDay
Equation >> Ratio.GOR=MonthlyProd.Gas/MonthlyProd.Oil
Equation >> Ratio.OGR=MonthlyProd.Oil/MonthlyProd.Gas
Equation >> Ratio.WOR=MonthlyProd.Water/MonthlyProd.Oil
Equation >> Ratio.GasLiq=MonthlyProd.Gas/Liq.Monthly
Equation >> Ratio.LiqGas=Liq.Monthly/MonthlyProd.Gas
Equation >> Ratio.WaterYield=MonthlyProd.Water/MonthlyProd.Gas
Equation >> Ratio.GORCum=Gas.Cum/Oil.Cum
Equation >> Ratio.OGRCum=Oil.Cum/Gas.Cum
Equation >> Ratio.GLRCum=Gas.Cum/Liq.Cum
Equation >> Ratio.LGRCum=Liq.Cum/Gas.Cum
Equation >> Ratio.WORCum=Water.Cum/Oil.Cum
Equation >> Ratio.WatYieldCum=Water.Cum/Gas.Cum
Equation >> Oil.Cut=MonthlyProd.Oil/(MonthlyProd.Oil+MonthlyProd.Water)
Equation >> Oil.CumCut=Oil.Cum/(Oil.Cum+Water.Cum)
Equation >> Water.Cut=MonthlyProd.Water/Liq.Monthly
Equation >> Water.CumCut=Water.Cum/Liq.Cum
Equation >> PZ=MonthlyProd.Pressure/@pvtz(MonthlyProd.Pressure)
Equation >> Oil.Case1Fcst=@forecast(date,"oil","Case1")
Equation >> Oil.Case1FcstCum=@forecast(date,"oil cum","Case1")
Equation >> Oil.Case1FcstRes=@DCAResults("oil res","Case1")
Equation >> Oil.Case1FcstEUR=@DCAResults("oil eur","Case1")
Equation >> Gas.Case1Fcst=@forecast(date,"gas","Case1")
Equation >> Gas.Case1FcstCum=@forecast(date,"gas cum","Case1")
Equation >> Gas.FromGOR=@DCACalc(Oil.Case1FcstCum,"GOR","Case1")*Oil.Case1Fcst
Equation >> Gas.Case1FcstRes=@DCAResults("gas res","Case1")
Equation >> Gas.Case1FcstEUR=@DCAResults("gas eur","Case1")
Equation >> MonthsOfProd= @ElapsedMonths(date,InitialProdMonth)
Equation >> Recovery.LiqPerFT = (Oil.Cum+Water.Cum)/ResProperty.PerfInterval
Equation >> Oil.CumAtDay = @reg(1,date,"date")
Loading Completed

In my personal exercise, there were some errors in the process. They were listed in the
Errors tab. Let’s try to analyze what happened.

>>undefined name: MonthlyProd.Pressure


>>syntax error: expecting Eol, found Label: MonthlyProd.Pressure
>>undefined name: ResProperty.PerfInterval
>>syntax error: expecting Eol, found Label: ResProperty.PerfInterval

What happened here is that I attempted to load a variable that uses


MonthlyProd.Pressure, an input variable that does not exist in my project. The same
goes for ResProperty.PerfInterval. Obviously, this affected the total load and calculated
variables that made reference to them were just ignored. As a result, see the next figure
showing you all these new variables available in the calculated variables list.

Page 200 ____________________________________ The OFM administrator handbook


Preparing a parser file
Ok, so far you’ve seen two ways of adding calculated variables to your project. One is
from within the project, where you manually define the equation and all the attributes.
Another one is by loading a “magic” parser file.

Many calculated variables are quite common (such as accumulated oil) and are present
in almost any project. Some other variables are the result of your own analysis methods
and you can’t find them in any parser file. You will have to create those special ones. No
escape.

If you work with only one project, then may be you should consider modifying one of
the parser files provided with the demo data sets. This could be a good starting point.
Just edit it, modify any needed table and column names and attempt to load it. The rest
of your variables will probably be created by hand, one by one using the provided
interface.

Exporting
If you work with many projects, then the goal will be trying to re use the variables as
much as possible. You can not only load a parser file, but you can also export it. If you
have a project with all you calculated variables, then select File/Export/Parser Data,
choose the destination and filename and OFM will create a parser file with all the
calculated variables. This file could be inspected, modified (if necessary) and then
loaded to all your other projects. You can even split your calculated variables in several
parser files and load only the ones that apply to a particular project. For instance, you
could have parser files for standard projects, for log interpretation, for decline analysis
data access, etc.

OFM Plus – Calculated Variables Builder


New to OFM 3.0 is the OFM Plus package. This is a set of three smart spreadsheets
and templates. One of these files is the CVBuilder.xls, an Excel® file with macros that
will help you to prepare a typical (quite extensive, actually) parser file to load to your

The OFM administrator handbook____________________________________ Page 201


project. Make sure you don’t overlook this section because CV Builder and what comes
behind it is one of the greatest ideas I’ve seen for people maintaining OFM projects.
The following table is the list of standard calculated variables that this tool can prepare,
depending on your raw data. Notice that this is quite a nice list, with very little work, as
you will see.

CV Builder Calculated Variables Description OFM CV Name


Formatted Date Field for Reports ReportDate
Monthly Oil Rate OilMnthly
Monthly Gas Rate GasMnthly
Monthly Condensate Rate CondMnthly
Monthly Water Rate WaterMnthly
Monthly CO2 Rate CO2Mnthly
Monthly Liquid Rate LiquidMnthly
Monthly Water Injection Rate InjWtrMnthly
Days on Water Injection InjWtrDays
Water Injection Pressure InjWtrPress
Water Injection Temperature InjWtrTemp
Monthly CO2 Injection Rate InjCO2Mnthly
Days on CO2 Injection InjCO2Days
CO2 Injection Pressure InjCO2Press
CO2 Injection Temperature InjCO2Temp
Monthly Gas Injection Rate InjGasMnthly
Days on Gas Injection InjGasDays
Gas Injection Pressure InjGasPress
Gas Injection Temperature InjGasTemp
Monthly Steam Injection Rate InjSteamMnthly
Days on Steam Injection InjSteamDays
Steam Injection Pressure InjSteamPress
Steam Injection Temperature InjSteamTemp
Daily Oil Rate OilDaily
Daily Gas Rate GasDaily
Daily Condensate Rate CondDaily
Daily Water Rate WaterDaily
Daily CO2 Rate CO2Daily
Daily Liquid Rate LiquidDaily
Daily Water Injection Rate InjWtrDaily
Daily CO2 Injection Rate InjCO2Daily
Daily Gas Injection Rate InjGasDaily
Daily Steam Injection Rate InjSteamDaily
Calendar Day Oil Rate OilCD
Calendar Day Gas Rate GasCD
Calendar Day Condensate Rate CondCD
Calendar Day Water Rate WaterCD
Calendar Day CO2 Rate CO2CD
Calendar Day Liquid Rate LiquidCD
Calendar Day Water Injection Rate InjWtrCD

Page 202 ____________________________________ The OFM administrator handbook


Calendar Day CO2 Injection Rate InjCO2CD
Calendar Day Gas Injection Rate InjGasCD
Calendar Day Steam Injection Rate InjSteamCD
Producing Days Oil Rate*ls OilPD
Producing Days Gas Rate*ls GasPD
Producing Days Condensate Rate*ls CondPD
Producing Days Water Rate*ls WaterPD
Producing Days CO2 Rate*ls CO2PD
Producing Days Liquid Rate*ls LiquidPD
Injection Days Water Injection Rate*ls InjWtrID
Injection Days CO2 Injection Rate*ls InjCO2ID
Injection Days Gas Injection Rate*ls InjGasID
Injection Days Steam Injection Rate*ls InjSteamID
Producing Days Oil Rate (Single Well) OilPDsw
Producing Days Gas Rate (Single Well) GasPDsw
Producing Days Condensate Rate (Single Well) CondPDsw
Producing Days Water Rate (Single Well) WaterPDsw
Producing Days CO2 Rate (Single Well) CO2PDsw
Producing Days Liquid Rate (Single Well) LiquidPDsw
Injection Days Water Injection Rate (Single Well) InjWtrIDsw
Injection Days CO2 Injection Rate (Single Well) InjCO2IDsw
Injection Days Gas Injection Rate (Single Well) InjGasIDsw
Injection Days Steam Injection Rate (Single Well) InjSteamIDsw
Date of First Production InitProdMonth
Date of First Production (daily) InitprodDay
Months of Production MonthsOfProd
Date of First Water Injection InitWtrInjMonth
Date of First Water Injection (daily) InitWtrInjDay
Date of First CO2 Injection InitCO2InjMonth
Date of First CO2 Injection (daily) InitCO2InjDay
Date of First Steam Injection InitSteamInjMonth
Date of First Steam Injection (daily) InitSteamInjDay
Date of Initial Stimulation Complete
Elapsed Time for Normalized Plots ElapsedMonths
Cumulative Oil Production OilCum
Cumulative Oil Production (daily) OilCumd
Cumulative Gas Production GasCum
Cumulative Gas Production (daily) GasCumd
Cumulative Condensate Production CondCum
Cumulative Condensate Production (daily) CondCumd
Cumulative Water Production WaterCum
Cumulative Water Production (daily) WaterCumd
Cumulative CO2 Production CO2Cum
Cumulative CO2 Production (daily) CO2Cumd
Cumulative Liquid Production LiquidCum
Cumulative Liquid Production (daily) LiquidCumd
Cumulative Water Injection InjWtrCum
Cumulative Water Injection (daily) InjWtrCumd

The OFM administrator handbook____________________________________ Page 203


Cumulative Gas Injection InjGasCum
Cumulative Gas Injection (daily) InjGasCumd
Cumulative CO2 Injection InjCO2Cum
Cumulative CO2 Injection (daily) InjCO2Cumd
Cumulative Steam Injection InjSteamCum
Cumulative Steam Injection (daily) InjSteamCumd
Oil rate 6 Month Moving Average Oil6MoMvAve
Gas rate 6 Month Moving Average Gas6MoMvAve
Condensate rate 6 Month Moving Average Cond6MoMvAve
Water rate 6 Month Moving Average Water6MoMvAve
CO2 rate 6 Month Moving Average CO26MoMvAve
Current # of Oil Producers*ls OilWellcount
Current # of Oil Producers*ls (daily) OilWellcountd
Current # of Gas Producers*ls GasWellcount
Current # of Gas Producers*ls (daily) GasWellcountd
Current # of Condensate Producers*ls CondWellcount
Current # of Condensate Producers*ls (daily) CondWellcountd
Current # of Water Producers*ls WaterWellcount
Current # of Water Producers*ls (daily) WaterWellcountd
Current # of Water Injectors*ls InjWtrWellcount
Current # of Water Injectors*ls (daily) InjWtrWellcountd
Current # of Gas Injectors*ls InjGasWellcount
Current # of Gas Injectors*ls (daily) InjGasWellcountd
Current # of CO2 Injectors*ls InjCO2Wellcount
Current # of CO2 Injectors*ls (daily) InjCO2Wellcountd
Current # of Steam Injectors*ls InjSteamWellcount
Current # of Steam Injectors*ls (daily) InjSteamWellcountd
Daily Per Well Oil Production*ls OilPerWell
Daily Per Well Oil Production*ls (daily) OilPerWelld
Daily Per Well Gas Production*ls GasPerWell
Daily Per Well Gas Production*ls (daily) GasPerWelld
Daily Per Well Condensate Production*ls CondPerWell
Daily Per Well Condensate Production*ls (daily) CondPerWelld
Daily Per Well Water Production*ls WaterPerWell
Daily Per Well Water Production*ls (daily) WaterPerWelld
Daily Per Well Water Injection*ls InjWtrPerWell
Daily Per Well Water Injection*ls (daily) InjWtrPerWelld
Daily Per Well Gas Injection*ls InjGasPerWell
Daily Per Well Gas Injection*ls (daily) InjGasPerWelld
Daily Per Well CO2 Injection*ls InjCO2PerWell
Daily Per Well CO2 Injection*ls (daily) InjCO2PerWelld
Daily Per Well Steam Injection*ls InjSteamPerWell
Daily Per Well Steam Injection*ls (daily) InjSteamPerWelld
Gas Oil Ratio RatioGOR
Gas Oil Ratio (daily) RatioGORd
Water Oil Ratio RatioWOR
Water Oil Ratio (daily) RatioWORd
Gas Liquid Ratio RatioGLR

Page 204 ____________________________________ The OFM administrator handbook


Gas Liquid Ratio (daily) RatioGLRd
Cumulative Gas Oil Ratio RatioGORCum
Cumulative Gas Oil Ratio (daily) RatioGORCumd
Cumulative Gas Liquid Ratio RatioGLRCum
Cumulative Gas Liquid Ratio (daily) RatioGLRCumd
Cumulative Water Oil Ratio RatioWORCum
Cumulative Water Oil Ratio (daily) RatioWORCumd
Water Cut WaterCut
Water Cut (daily) WaterCutd
Oil Cut OilCut
Oil Cut (daily) OilCutd
Cumulative Water Cut WaterCutCum
Cumulative Water Cut (daily) WaterCutCumd
Cumulative Oil Cut OilCutCum
Cumulative Oil Cut (daily) OilCutCumd
Pattern Allocation Factor PatternAllocFactor
Maximum Calculated Daily Oil Rate OilMax
Maximum Calculated Daily Oil Rate (daily) OilMaxd
Months to Reach Max Oil Rate OilMaxMonths
Months to Reach Max Oil Rate (daily) OilMaxMonthsd
Date of Max Oil Rate OilMaxDate
Date of Max Oil Rate (daily) OilMaxDated
Maximum Calculated Daily Gas Rate GasMax
Maximum Calculated Daily Gas Rate (daily) GasMaxd
Months to Reach Max Gas Rate GasMaxMonths
Months to Reach Max Gas Rate (daily) GasMaxMonthsd
Date of Max Gas Rate GasMaxDate
Date of Max Gas Rate (daily) GasMaxDated
Cumulative Oil Production at Pr OilCumPr
Cumulative Oil Production at Pr (daily) OilCumPrd
Cumulative Water Injection at Pr InjWtrCumPr
Cumulative Water Injection at Pr (daily) InjWtrCumPrd
Test Date DateTest
Daily Oil from Test OilTest
Daily Gas from Test GasTest
Gas Oil Ratio from Test GORTest
Daily Water from Test WaterTest
Bottom Hole Pressure BHP
Z Factor Zfactor
P/Z for Gas Phase Decline Curve Analysis PZ
Barrels of Oil Equivalent BOE
Barrels of Oil Equivalent (daily) BOEd
Current Decline Case from DCA CurrentDCACase
Forecasted Oil Production OilFcst
Forecasted Cumulative Oil Production OilFcstCum
Forecasted Oil Reserves OilFcstRes
Forecasted Ultimate Oil Recovery OilFcstEUR
Forecasted Gas Production GasFcst

The OFM administrator handbook____________________________________ Page 205


Forecasted Cumulative Gas Production GasFcstCum
Forecasted Gas Production from GOR GasFromGOR
Forecasted Gas Reserves GasFcstRes
Forecasted Ultimate Gas Recovery GasFcstEUR
Forecasted Water Production WaterFcst
Cumulative Liquid Recovery / Producing Interval LiqPerFtRecovery
Cumulative Liquid Recovery / Producing Interval (daily) LiqPerFtRecoveryd
Hall Plot Cumulative Pressure (Y Axis) HallPlot
Log Depth LogDepth
Log Curve - Gamma Ray LogGR
Log Curve - Spontaneous Potential LogSP
Log Curve - Neutron LogNeu
Log Curve - Deep Resistivity LogRLD
Log Curve - Deep Induction LogILD
Log Curve - Medium Resistivity LogRLM
Log Curve - Medium Induction LogILM
Log Curve - Shallow Resistivity LogSFLU
Log Curve - Acoustic Travel Time LogDT
Log Curve - Neutron Porosity LogNPOR
Log Curve - Density Porosity LogDPOR
Density Porosity from Shale LgDPorSh
Neutron Porosity from Shale LgNPorSh
Well Drainage Radius in Acres LgAcres
Log Sample Rate LgFeet
Recovery Factor LgRF
Oil Formation Volume Factor LgBo
Gas Formation Volume Factor LgBg
Porosity Cutoff for Net Sand Flag Calculation LgPorCut
Water Saturation Cutoff for Net Sand Flag Calc. LgSwCut
Shale Volumes from the SP Log LgSPVsh
Shale Volumes from the GR Log LgGRVsh
Composite Shale Curve from both GR & SP Logs LgCVCompSh
Water Resistivity from SP Log LgRwa
NPHI Corrected for Shale LgPhinc
DPHI Corrected for Shale LgPhidc
Effective Porosity LgPhie
Effective Gas Porosity LgPhige
Simandoux Water Saturation LgSw
Water Saturation Based on Gas Effective Porosity LgSwg
Bulk Volume Water LgBVW
Bulk Volume Oil LgBVO
Original Oil in Place LgOOIP
Original Gas in Place LgOGIP
Recoverable Oil in Place LGRecovOil
Pay Sand Based on Porosity Cutoff LgPayPor
Pay Sand Based on Porosity and Saturation Cutoff LgPayPorSw
Well Name WellName
Alias Name WellAlias

Page 206 ____________________________________ The OFM administrator handbook


Spud Date - *gh ghSpud
Completion Date - *gh ghComplete
Working Interest - *gh ghWorkInterest
Township - *gh ghTownship
Range - *gh ghRange
County - *gh ghCounty
State - *gh ghState
Top Producing Interval - *gh ghTopInt
Bottom Producing Interval - *gh ghBotInt
Field Name - *gh ghField
Basin Name - *gh ghBasin
Railroad Commission District - *gh ghRRCDist
KB Elevation - *gh ghKB
Total Well Depth - *gh ghTD
Reservoir Name - *gh ghReservoir
Well Type - *gh ghWellType
Completion Status - *gh ghCompStatus
Lease Name - *gh ghLease
Operator - *gh ghOperator
Section - *gh ghSection
Platform - *gh ghPlatform
Block - *gh ghBlock
Well Status - *gh ghWellStatus
Subsea Depth - *gh ghSubsea
Last Monthly Oil Production - *gh ghOilLastM
Last Daily Oil Production - *gh ghOilLastD
Last Monthly Gas Production - *gh ghGasLastM
Last Daily Gas Production - *gh ghGasLastD
Last Monthly Condensate Production - *gh ghCondLastM
Last Daily Condensate Production - *gh ghCondLastD
Last Monthly Water Production - *gh ghWaterLastM
Last Daily Water Production - *gh ghWaterLastD
Last Monthly Water Injection - *gh ghInjWaterLastM
Last Daily Water Injection - *gh ghInjWaterLastD
Last Monthly Gas Injection - *gh ghInjGasLastM
Last Daily Gas Injection - *gh ghInjGasLastD
Last Monthly CO2 Injection - *gh ghInjCO2LastM
Last Daily CO2 Injection - *gh ghInjCO2LastD
Last Monthly Steam Injection - *gh ghInjSteamLastM
Last Daily Steam Injection - *gh ghInjSteamLastD
Cumulative Oil Production - *gh ghOilCum
Cumulative Oil Production - *gh (daily) ghOilCumd
Cumulative Gas Production - *gh ghGasCum
Cumulative Gas Production - *gh (daily) ghGasCumd
Cumulative Condensate Production - *gh ghCondCum
Cumulative Condensate Production - *gh (daily) ghCondCumd
Cumulative Water Production - *gh ghWaterCum
Cumulative Water Production - *gh (daily) ghWaterCumd

The OFM administrator handbook____________________________________ Page 207


Cumulative Water Injection - *gh ghInjWaterCum
Cumulative Water Injection - *gh (daily) ghInjWaterCumd
Cumulative Gas Injection - *gh ghInjGasCum
Cumulative Gas Injection - *gh (daily) ghInjGasCumd
Cumulative CO2 Injection - *gh ghInjCO2Cum
Cumulative CO2 Injection - *gh (daily) ghInjCO2Cumd
Cumulative Steam Injection - *gh ghInjSteamCum
Cumulative Steam Injection - *gh (daily) ghInjSteamCumd
Gas Oil Ratio - *gh ghGOR
Gas Oil Ratio - *gh (daily) ghGORd
Water Oil Ratio - *gh ghWOR
Water Oil Ratio - *gh (daily) ghWORd
Water Cut - *gh ghWaterCut
Water Cut - *gh (daily) ghWaterCutd
Forecasted Oil Reserves - *gh ghOilFcstRes
Forecasted Ultimate Oil Recovery - *gh ghOilFcstEUR
Forecasted Gas Reserves - *gh ghGasFcstRes
Forecasted Ultimate Gas Recovery - *gh ghGasFcstEUR
Oil FVF PVTBo
Gas FVF PVTBg
Total FVF PVTBt
Water FVF PVTBw
Oil Compressibility PVTCo
Water Compressiblity PVTCw
Gas Compressibility PVTCg
Oil Viscosity PVTVo
Gas Viscosity PVTVg
Water Viscosity PVTVw
Solution Gas Oil Ratio PVTRs
Solution Gas Water Ratio PVTsw
Z Factor PVTZfact
User function -- Creates graph fixed to 3 log cycles Lcycle
3 Log Cycle Oil Rate Oil3Cycle
3 Log Cycle Oil Multiplier ghOil3CycleMult
3 Log Cycle Oil Min ghOil3CycleMin
3 Log Cycle Oil Max ghOil3CycleMax
3 Log Cycle Gas Rate Gas3Cycle
3 Log Cycle Gas Multiplier ghGas3CycleMult
3 Log Cycle Gas Min ghGas3CycleMin
3 Log Cycle Gas Max ghGas3CycleMax
3 Log Cycle Water Rate Water3Cycle
3 Log Cycle Water Multiplier ghWater3CycleMult
3 Log Cycle Water Min ghWater3CycleMin
3 Log Cycle Water Max GhWater3CycleMax

Notice that the OFM variable names chosen do not include a prefix and suffix. However,
the names are chosen to locate them easily on a long list.

Page 208 ____________________________________ The OFM administrator handbook


The following paragraphs will show you a typical CV Builder run to prepare a parser file
for a project.
Start the CV Builder tool (it’s in the same program group as OFM 3.x). Excel starts and
eventually asks you if you want to enable the spreadsheet macros. Answer Enable and
wait until the workbook
loads.

The workbook has four


basic tabs: Output,
Input, Altinput and
Samples.

The fifth tab shown in


the figure is added after you use it. Don’t worry about it now.
The idea of the tool is that you have to basically do two steps:

1. Define (somehow) you project input/imputed variable names.


2. Generate the parser file.

CV Builder comes with many


standard templates pre loaded.
You can see the list on the
upper right hand corner of the
Output sheet. There is a
menu (see figure) showing you
the available templates.

If you are using one of these


templates, your life is very
easy. Just select it from the list
and then click on the Apply
button below the menu. CV
Builder asks you for a name
Select

and destination of the parser file is about to create.


Make your choices and click OK.

Because CV Builder knows the table structure and


names of these templates, it can generate a valid
parser file. In a few seconds, your file with hundreds
Generate of new variables will be ready to be loaded.

If you are not using any of the standard templates (most of the cases), you need to get
some information before proceeding. It is mainly the need to tell CV Builder what are
the names of your input and imputed variables. Once you have them, you will be ready
to proceed.

The OFM administrator handbook____________________________________ Page 209


CV Builder helps you a bit to do this. If you follow on-line the instructions, you will find
yourself exporting the table definitions from your project (Edit/Export Data/Table
Definitions) and loading this file with CV Builder. CV Builder does not interpret this
file. All it does is present it to you (on the fifth sheet) in a readable format where you
can pick up the needed information. If you know all your variable names already, you
can skip this part and proceed directly to the Alt Input sheet. This is where you input
your non standard project structure.

The Alt Input sheet has four sections, all equivalent, where you can store up to four of
your custom database structures. This is nice because you can maintain up to four
different databases and keep all your info in the file. If you maintain more than four,
then just copy the spreadsheet CVBuilder.xls to a second file and you can store another
four.
Each of the four custom sections has three different parts:

A name, a constants and the tables structure sections.

Name

Constants

Table and
variable
names

Give it a name, fill up the appropriate values for the constants and then input your
tables information. This utility generates up to 323 variables, depending on the data you
have available. The following table is all that CV Builder takes as input. While
producing the file, if the data is not available (you left the corresponding cell blank),
then the related variables are not created. So, if you leave the Monthly Gas Production
information blank, there will be no variables associated to monthly gas (not accumulated
gas, not gas/oil ratio, etc.)

Most projects will have just a few of the required input data, so you might end up filling
just 10 or 20 lines.

Page 210 ____________________________________ The OFM administrator handbook


Some comments regarding this part:
• Date Label is always Date (no table name) unless you change it.
• Your sort table is called SC, unless you change it.

The next table is the full list that can be input to CV Builder. If you have additional
information, then CV Builder will not be able to create any variable using it. That will
be your manual work.

Input Variable Description Table Name Variable Name


Date Label
Well Type
Well Name
Well Alias
Completion Status
Well Status
Spud Date
Completion Date
KB Elevation
Total Well Depth
Top of Producing Interval
Bottom of Producing Interval
Field Name
Basin Name
Railroad Commission District
Lease Name
Operator
Working Interest
Reservoir Name
Township
Range
Block
Section
Platform
Subsea Depth
County
State
Monthly Oil Production
Monthly Gas Production
Monthly Condensate Production
Monthly Water Production
Monthly CO2 Production
Days on Production
Producing Days Oil Rate
Producing Days Gas Rate
Producing Days Condensate Rate

The OFM administrator handbook____________________________________ Page 211


Producing Days Water Rate
Producing Days CO2 Rate
Producing Days Liquid Rate
Daily Oil Production
Daily Gas Production
Daily Condensate Production
Daily Water Production
Daily CO2 Production
Hours on Production
Test Date
Daily Oil from Test
Daily Gas from Test
Gas Oil Ratio from Test
Daily Water from Test
Bottom Hole Pressure
Z Factor
P/Z
Monthly Water Injection
Days on Water Injection
Injection Days Water Injection Rate
Water Injection Pressure
Water Injection Temperature
Monthly Gas Injection
Days on Gas Injection
Injection Days Gas Injection Rate
Gas Injection Pressure
Gas Injection Temperature
Monthly CO2 Injection
Days on CO2 Injection
Injection Days CO2 Injection Rate
CO2 Injection Pressure
CO2 Injection Temperature
Monthly Steam Injection
Days on Steam Injection
Injection Days Steam Injection Rate
Steam Injection Pressure
Steam Injection Temperature
Daily Water Injection
Daily Gas Injection
Daily CO2 Injection
Daily Steam Injection
Hours on Injection
Initial Stimulation Volume
Date From Stimulation Table
Log Depth
Log Curve - Gamma Ray

Page 212 ____________________________________ The OFM administrator handbook


Log Curve - Spontaneous Potential
Log Curve - Neutron
Log Curve - Deep Resistivity
log Curve - Deep Induction
Log Curve - Medium Resistivity
Log Curve - Medium Induction
Log Curve - Shallow Resistivity
Log Curve - Acoustic Travel Time
Log Curve - Neutron Porosity
Log Curve - Density Porosity

Finally, after you fill up the three sections of one of the four Alt Input areas, you can go
back to the Output sheet, select your customized
model from the menu and click Apply to generate the
parser file based on your template.

CV Builder Example
The next section is based on the project described on Chapter 3, under the exercise 2.
Because we have not used any standard template, we have to fill up one of the four
areas of the Alt Input sheet.
I select one of then, I give it a name (“Exercise 2”) and fill up the constants section.
Finally, on the variables section, I fill as much as I can, based on my structure. This is a
summary of what I had and input there.

Input Variable Description Table Name


Date Label date
Well Type sc type
Well Name xy layer
Well Alias xy alias
Completion Date properties dateon
KB Elevation
Total Well Depth xy welltd
Field Name sc field
Reservoir Name sc reservoir
Monthly Oil Production monthlyprod oil
Monthly Gas Production monthlyprod gas
Monthly Water Production monthlyprod water
Days on Production monthlyprod days
Producing Days Oil Rate monthlyprod oilrate
Producing Days Gas Rate monthlyprod gasrate
Producing Days Water Rate monthlyprod waterrate

The OFM administrator handbook____________________________________ Page 213


Daily Oil Production dailyprod oil
Daily Gas Production dailyprod gas
Daily Water Production dailyprod water
Log Depth logtraces depth
Log Curve - Gamma Ray logtraces gr
Log Curve - Spontaneous Potential logtraces sp
log Curve - Deep Induction logtraces ild
Log Curve - Acoustic Travel Time logtraces dt

This is a nice set to start with. I then go to the Output sheet, select “Exercise 2” from
the menu and click Apply to generate the file. CV Builder thinks a bit and writes the
file. I finally load this file to my
project and get the entire standard
CV Builder calculated variables, as
displayed on the next figure.

Save Days of work with CV builder


Yes, and I am not overestimating this tool. You better read this part very careful and
open up your mind.
What is the beauty of this tool? No matter what names your database has, they are all
mapped to standard calculated variables. From the moment you load a CV Builder parser
file, you have not only new variables available but also your input and imputed variables
as well, but with standard names.
For instance, my MonthlyProd.Oil input variable is mapped to the standard OilMnthly
name. You should train your users to use the calculated variable instead of your input
variable. Why? Because input variables are not standard. CV Builder calculated variables
are.
If your project has the monthly oil in an input variable named Prd.Oil, it will also be
mapped to OilMnthly. A different table structure maps to the same variable names.

Page 214 ____________________________________ The OFM administrator handbook


Examples that might save you some time
• If you decide to write documentation on how to produce some kind of work, you can
write it specifying the standard CV Builder variables and everyone (without caring
about the real table structure of the project) can immediately do it.
• If your company is trying to standardize plots or reports, for instance, build all your
templates based on the standard CV variables and everyone in your organization will
be able to use them. It will not matter how their database is built. They will have the
variables available to run any standard plot or template.
• Even more, half of OFM Plus package is that: a tool to standardize names and a big
set of standard plot and report templates. You will find plenty of templates under the
OFM\OFMPlus directory.
• Another juicy trick comes for free. In any project, before performing any Decline
Curve Analysis, you must set it up associating the variables needed for the module.
For instance, when you want to decline oil-rate vs. oil-cum, the DCA module needs
to be trained on what are the names of these variables. This information goes to a
binary file with extension o14. Because your variables now have standard names, all
this can be pre set in a standard o14 file. The file has also been provided in the
OFMPlus package. All you have to do is change the file name to whatever your
project name is, with the extension 014 and replace your o14 file with it.

The OFM administrator handbook____________________________________ Page 215


Page 216 ____________________________________ The OFM administrator handbook
Chapter 5 – Units and Multipliers

Introduction

OFM primary task is to process and display numbers. These numbers are usually based
on quantities we measure and as such, they have units.
OFM can also work with multipliers, which are simply a different way of displaying the
variables. For instance, 10,000,000 barrels could be expressed as 10,000,000 barrels
(multiplier 1), 10,000 M barrels (multiplier M), 10E+6 barrels (multiplier 10E+6) etc.

Regarding units, you can configure OFM to work with two different units systems. For
multipliers, you have three different sets. Any combination of these (six in total) is
possible and the user can select the one that best fits his/her needs. The interesting
part of all this is that OFM allows the user to modify both systems and allows simple
creation of new units and multipliers.

This chapter will explain all there is to know about units and multipliers. Units could be a
real troublemaker subject unless you understand how it works. Please follow the
explanations in detail.

Units

OFM has two different unit systems. They are called English (some times Field) and
Metric. The user selects the desired system and OFM will convert the variable figures
accordingly. The next listing is an example of a report in english units.

BLUE_1:He
Cumulative Cumulative Cumulative
Oil Gas Water
Production Production Production
DATE Mbbl MMcf Mbbl
---------- ---------- ---------- ----------
19950701 0.6 18.3 0.0
19950801 3.6 26.7 0.1
19950901 5.8 32.2 1.9
19951001 8.0 37.9 6.1
19951101 10.7 41.2 11.8
19951201 14.5 41.8 22.1

The OFM administrator handbook____________________________________ Page 217


19960101 18.7 44.7 38.3
19960201 23.0 45.4 54.3

Notice that the values are expressed in bbl (barrels) and cf (cubic feet). Also, the final
figures are expressed using multipliers. For instance, in Mbbl (thousands of barrels) and
MMcf (millions of cubic feet).

The user selects the desired unit system


from Tools/Settings/Units. The figure
shows this window and a selection of the
metric system. After clicking OK, OFM
converts all figures to the equivalent ones
expressed in metric units. This results in
the same report translated to metric
units, such as the following one

BLUE_1:He
Cumulative Cumulative Cumulative
Oil Gas Water
Production Production Production
DATE Mm3 MMscm Mm3
---------- ---------- ---------- ----------
19950701 0.1 0.5 0.0
19950801 0.6 0.8 0.0
19950901 0.9 0.9 0.3
19951001 1.3 1.1 1.0
19951101 1.7 1.2 1.9
19951201 2.3 1.2 3.5
19960101 3.0 1.3 6.1
19960201 3.7 1.3 8.6
19960301 4.3 1.3 11.5

Notice that the multipliers have not changed. They are independent from the unit
system but all figures now are expressed in m3 (cubic meters) and scm (standard cubic
meters). Notice also that numbers have been all affected by proper the conversion
factor. (18.3 MMcf -> 0.5 MMscm)

OFM is flexible
OFM knows absolutely nothing about units (Hugh?). The units system is all based on
user defined rules. However, it comes with a default set of rules to let you start up with
something. The whole thing is based on a table like this one

Metric English Op Factor


m3 bbl * 1.59E-01

Page 218 ____________________________________ The OFM administrator handbook


m3 gal * 3.79E-03
m3/d bbl/d * 1.59E-01
m3/m3 bbl/bbl * 1
m/sec ft/sec * 3.05E-01
scm cf * 2.83E-02
scm/d cf/d * 2.83E-02
kpa psia * 6.89E+00
kpa psig * 6.89E+00
kpa psi * 6.89E+00
cm inch * 2.54E+00
m ft * 3.05E-01
kg lb * 4.54E-01
scm/m3 cf/bbl * 1.78E-01
m3/scm bbl/cf * 5.61E+00
m2 acre * 4.05E+03
bar psia * 6.89E-02
bar psig * 6.89E-02
kPa/m psi/ft * 2.26E+01
kg/kg wt% * 100
m3 acre-ft * 1.23E+03
$US $US * 1
$US/m3 $US/bbl * 6.29E+00
$US/E3scm $US/Mcf * 3.53E+01
$US/m3OE $US/BOE * 6.29E+00
fraction fraction * 1
months months * 1
years years * 1
days days * 1
hours hours * 1
minutes minutes * 1
seconds seconds * 1
ohm-m ohm-m * 1
mmhos/m mmhos/m * 1
PU PU * 1
GAPI GAPI * 1
Barns/Elec Barns/Elec * 1
API API * 1
mV mV * 1
m3/d/w bbl/d/w * 1.59E-01
scm/d/w cf/d/w * 2.83E-02
wells wells * 1
m3/m bbl/ft * 5.22E-01

The OFM administrator handbook____________________________________ Page 219


scm/m cf/ft * 9.29E-02
ton ton * 1
ton/d ton/d * 1
ton/d/w ton/d/w * 1
cp cp * 1
btu btu * 1
btu/d btu/d * 1
btu/d/w btu/d/w * 1
md md * 1

Notice that there are a Metric, an English, an Operator and a Factor columns. They
define the labels for a particular unit in both systems and how to convert between them.
For instance,

m3 bbl * 1.59E-01

Means that [bbl] = [m3] * 1.59E-01.

If you are thinking “Ah…, so OFM knows about units” I can tell you again. Not really,
nothing stops you from defining something like [bbl] = [miles] * 3 (a volumetric unit
equivalent to a length unit!). Don’t be scared. It is not that bad. This is the price of
flexibility, because you can define your own units and the equivalent in both systems.

The only limitation you have is that the both systems units must be related by a simple
equation, such as E=M*k or E=M/c. The classic exception is the temperature units
equation, from Fahrenheit to Centigrade and because it can’t be implemented with a
simple factor, is the only equation pre defined in the OFM code (Ok, Ok, it knows about
units…but just this one!)

When you define a variable, you assign it a unit. OFM lets you pick one from a list that
displays all the available ones. These are either the first column (if you are set to work
in metric units) or the second one (if you are set to the english system).
When you assign a unit to a variable, you are giving OFM the power to convert it, as per
the unit system selected by the user. After a unit has been assigned, OFM knows:

What unit label it should report in any of the two systems


How to convert the value from one system to the other

Notice the following two figures. They display the list with units available for the same
variable on the same table. However, the first one shows the units available when you
are set to metric (Tools/Settings/Units/Use Metric Units checked) and the other is
the available list when the english unit system is active. Notice that the list of available
units matches the active unit system and that they are what is listed in the above table.

Page 220 ____________________________________ The OFM administrator handbook


If you don’t define a unit for a variable, then OFM will not report any unit label and will
report the same number in metric or english. If it does not know the unit, it can’t
convert so it does not. A variable with no unit assigned will have the same value
disregarding the unit system selected by the user.

How does it work?


When you load data to OFM, it is saved internally in the project binary files. The input
number (from an ASCII file) for instance, is read by the Data Loader and stored.
However, if the destination variable has units defined, OFM will store the value internally
in english units. This is a very important point and you should not miss it. If you load
numbers in english units, the same number goes to the binary file. However, if you load
numbers in metric units, the number gets converted and stored in english units. Let’s
see a couple of examples.

Loading data in English Units


The next figure shows you the parts involved in loading data from an ASCII file. The file
has the needed commands to load some monthly data to the PRD.OIL input variable.
The first frame, on the left, displays the contents of a typical load file. When OFM reads
this file, it detects that data is going to the OIL variable of the PRD table. Because there
is no *METRIC command in the file, OFM knows that all values are in english units and
proceeds with the load. As a result, the actual numbers stored internally in the OFM
binary files, are the same as the ones of the load file (as shown by the last frame). The
loading of data in english units is quite simple. The same number that gets read is
stored in the database.

Using data loaded in English Units

The OFM administrator handbook____________________________________ Page 221


The reporting process varies, depending on the unit system selected by the end user.

If the user selects the English Units system, the program just reads the number from
the binary file and appends the corresponding english unit label. Notice that it
gets this information from the definition of the variable. In this case, it will report
100bbl.

If the user selects the Metric Units system, the OFM must perform a conversion. It
will read the number from the database (100), check the definition of the
variable to get the unit (bbl), then get the conversion factor and the metric unit
label (1.59E-01 and m3). As a result, OFM performs the calculation and correctly
reports 1.59 m3.

Loading data in metric units. The *METRIC command


Because OFM always store the numbers in english units, if your data file specifies metric
values, then the loading process is a bit more complex.
You must tell OFM that your data is expressed in metric units. You do that by placing
the *METRIC command as the first line of the load file (see the Load file frame of the
figure). When OFM finds this command, it knows that the loading process now involves

a possible conversion. Before loading any data, it will check how the target variable is
defined. In our example, it is defined in bbl (or m3, depending the system). Because
OFM already knows that the numbers are metric, it will consider the numbers to be m3.
The 100 of the file now means 100 m3 to OFM. However, because the program must
store this value in english, it goes to the units table, gets the conversion factor and
applies it to the number before storing it. As a result, OFM stores 100/1.59E-01, i.e.,
628.93.

Notice the big difference between this case and the previous one. The number that goes
to the database is completely different than the one you loaded. You loaded 100 and
OFM stored 628.93!. This is not a problem, because OFM will report this value correctly:
100m3 or 628.93bbl, depending on the system selected by the user.

Using Data in English units


The reporting process varies, depending on the unit system selected by the end user.

If the user selects the English Units system, the program just reads the number from
the binary file and appends the corresponding english unit label. Notice that it
gets this information from the definition of the variable. In this case, it will report
628.93bbl.

Page 222 ____________________________________ The OFM administrator handbook


If the user selects the Metric Units system, the OFM must perform a conversion. It
will read the number from the database (628.93), check the definition of the
variable to get the unit (bbl), then get the conversion factor and the metric unit
label (1.59E-01 and m3). As a result, OFM performs the calculation and correctly
reports 100 m3.

Summary
When you load data, OFM knows what are the units of the input file based only in the
*METRIC command. It does not care about the Tools/Settings/Units user selection.
This is used only for “using” the data. This means that you could be set to english units
and load a file with the *METRIC command. OFM will correctly load it in metric units.
Input units and output units are independent.
For using the data, select the desired unit system via Tools/Settings/Units
For loading data in metric units, you must specify the *METRIC command in the first
line of the file. No *METRIC means that data comes in english units.

Problems
Well, hopefully the previous explanation was enough to show you how the unit system
works in OFM. It is very simple. However, it is very easy to run into problems,
particularly when you work with metric units.

Problem 1
Suppose that you are loading data in metric units (your file includes a *METRIC
command) but you have not assigned a proper unit to the target variable. The next
figure displays this scenario.

Notice that the load file includes the metric command but the target variable (PRD.OIL)
has no units defined. Because OFM does not know anything about how to convert
PRD.OIL, it does not convert! The final number that goes to the binary file is the same
as the one in the load file (100), but this 100 are 100 m3! You ended up with a metric
number in your binary file!
If you use this number, the results vary and can produce serious errors.
For example, suppose that you have not defined any units for PRD.OIL yet. If you use it
in english units, OFM does not calculate any conversion. It just displays the internal
number: 100. Although it will not append any unit label (it is still undefined), it displays
the expected number.
If you switch OFM to metric units, OFM will attempt to convert the internal number but
because there is no unit defined yet, it does not do any conversion and it displays again
the 100 (still with no unit label).
A week later, you discover that you forgot to assign units to your PRD.OIL, so you go
into Edit/Project/Definition and assign a bbl (and it’s equivalent m3) unit to it: Big
mistake... The data loaded does not change and the number 100 is still in the database.

The OFM administrator handbook____________________________________ Page 223


Now, when you report, OFM knows the units and can append labels and perform
conversions. The 100 reports as 100 bbl or 1.59 m3.
Your load file had 100m3 and OFM reports 100bbl or 1.59 m3.

The story ends up with a reflection: You can’t assign a unit after loading metric data.
If you discover that you are missing a unit after you loaded metric data, you can fix it by
defining the unit and reloading the data file. OFM will be then able to perform the
conversion and store the numbers correctly.

If you load english data, the number that is stored is the same as what you had in your
load file. If you define a unit later, you should not have major problems.

Problem 2
Take a look at the default units table on page 218. On the english side, you normally
have one line for each unit. However, some of them have the same metric equivalent
(with a different factor, of course).
Here is a classic example:

Metric English Op Factor


m3 bbl * 1.59E-01
m3 gal * 3.79E-03
m3 acre-ft * 1.23E+03

All bbl, gal and acre-ft have the same metric equivalent: m3. If you notice the figure of
page 221, the list of available units in the metric system lists three m3. Although their
labels are the same, their factors are not!. These are the three m3 labels present on the
table on the Metric side.

Imagine that you initially defined PRD.OIL in bbl. Then you load 100m3 to it and this
number gets properly stored as 628.93. The conversion factor used for the load was the
one for bbl (i.e., 1.59E-01).
Now suppose that you, by mistake, change the PRD.OIL units from the initial m3 unit to
one of the other two available m3 (for instance, the one for gal). This is not difficult. In
the available metric units list, there are three m3 and they all look the same. You can’t
tell the difference from the list!
When you report again in metric, OFM will use a new conversion factor!. It will use
3.79E-03 instead of the original 1.59E-01 and it will innocently report 2.38m3
(2.38=628.93*3.79E-03)

You loaded 100m3, you used it and checked that you had 100m3 and one day, OFM
reports 2.38m3. Simply because you selected a different m3 from the available metric
units list.

Even more confusing is that after seeing this funny behavior, you decide to switch to
english units and re generate the report. Your eyes will open wide when your oil now
reports as 100 gal. A real confusing situation if you don’t understand the system.

Page 224 ____________________________________ The OFM administrator handbook


This story also ends with an advice: When you assign units to variables, do it with OFM
set in a unit system (Tools/Settings/Units/) that provides just one possible option.
For example, if you need the bbl-m3 couple, do it in english units (there is only one bbl
label and three m3 ones). Having only one choice ensures that you pick up the right
unit pair. When you switch back to the other unit system, OFM will display the correct
equivalent unit. If there is more than one, it will select the correct one.

Most of the cases, this is only relevant for people working with metric units because
there is clear conflict with m3, a very popular unit in the field. This is easy to fix by
assigning units in the english unit system. However, notice that for people working in
the english unit system, also have some conflicts (they are two psia on the english unit
list). Fortunately, because their numbers are loaded and stored in english units, there is
no conversion involved and any psia can do the job. They will never face a problem
unless they start reporting in metric units and the pressure comes in a different metric
unit than the one desired.

OFM implementation of Units


We’ve discussed the unit system in OFM, how it works and how to prevent major errors.
This section will explain how OFM implements all this and where to find and change
settings related to units.
When you install OFM, in the program directory it stores a reference file: Units.def.
This is and ASCII file and its contents should be familiar to you by now.

/*metric *english *operation *factor


/*Contents of the OFM\Units.def ASCII file
/* [M] [E] * f

/* Unit conversion, from English to Metric units.


/* To be interpreted as : [M] equals [E] multiplied by f
/* i.e., [m] = [ft] * 0.3048 , [m3] = [acre-ft] * 1233.489

m3 bbl * 1.589874E-01
m3 gal * 3.785412E-03
m3/d bbl/d * 1.589874E-01
m3/m3 bbl/bbl * 1
m/sec ft/sec * 3.048000E-01
scm cf * 2.831685E-02
scm/d cf/d * 2.831685E-02
kpa psia * 6.894757E+00
kpa psig * 6.894757E+00
kpa psi * 6.894757E+00
cm inch * 2.540000E+00
m ft * 3.048000E-01
kg lb * 4.535924E-01
scm/m3 cf/bbl * 1.781080E-01
m3/scm bbl/cf * 5.614586E+00
m2 acre * 4.046873E+03
bar psia * 6.894757E-02
bar psig * 6.894757E-02
kPa/m psi/ft * 2.262059E+01
kg/kg wt% * 100

The OFM administrator handbook____________________________________ Page 225


m3 acre-ft * 1.233489E+03
$US $US * 1
$US/m3 $US/bbl * 6.289807E+00
$US/E3scm $US/Mcf * 3.531466E+01
$US/m3OE $US/BOE * 6.289807E+00
fraction fraction * 1
months months * 1
years years * 1
days days * 1
hours hours * 1
minutes minutes * 1
seconds seconds * 1
ohm-m ohm-m * 1
mmhos/m mmhos/m * 1
PU PU * 1
GAPI GAPI * 1
Barns/Elec Barns/Elec * 1
API API * 1
mV mV * 1
m3/d/w bbl/d/w * 1.589874E-01
scm/d/w cf/d/w * 2.831685E-02
wells wells * 1
m3/m bbl/ft * 5.216122E-01
scm/m cf/ft * 9.290304E-02
ton ton * 1
ton/d ton/d * 1
ton/d/w ton/d/w * 1
cp cp * 1
btu btu * 1
btu/d btu/d * 1
btu/d/w btu/d/w * 1
md md * 1
*eof

When you create a project, OFM builds a binary file that belongs to the project based on
this ASCII file. The binary file that contains the units has a o12 extension.
In our example of Chapter 3, we built a project named exercise 2, so its binary file
containing the units defined for the project was exercise 2.o12.
Once you build a project, the ASCII Units.def has no further use, until you build another
one. If you need to change something of the
units table of a particular project, you need to
modify the binary file. This is done from
Edit/Project/Units. The following window
displays the results of this command. The list
displays all the units available and the equivalent
labels on both systems. You can Delete or Edit
and existent unit or Add a new one.

Let’s edit the definition of the bbl-m3 pair. Select


it from the list and click Edit. A simple window
pops up with the active information. If you want
to change the factor or change any of the labels,
this is the place to do it.

Page 226 ____________________________________ The OFM administrator handbook


Any changes you do on
this window will affect only
the active project.
Remember that OFM
knows nothing about units.
It gets all this information
from the project, so any
modification you do to a
project goes with it.
For instance, if your company don’t use bbl but the full word barrel, you could edit the
label directly on this window and anything that was previously being displayed in bbl will
now be expressed in barrel, as the following example.

BLUE_12:Ad_4
Cumulative
Oil
Production
DATE Mbarrel
---------- ----------
19670101 2.0
19670201 3.9
19670301 5.9

If you find yourself creating projects and modifying the default units from this section,
you should consider editing your Units.def file to include your new units settings in all
the future projects you want to create. Remember, the Units.def is a template file that
OFM uses only to create the o12 file of new projects. Changes in this file will not be
translated into existent projects.

Multipliers

OFM has also the possibility of expressing the numeric variables using multipliers. This
consists in affecting the value by a factor and modifying the label including the multiplier
symbol used. For instance,

10,000 cf can be expressed as 10 Mcf (M multiplier)


0.24 can be expressed as 24% (% multiplier).

Multipliers are independent from the unit system and any unit/multiplier combination is
valid. There are three different multiplier sets that a user can select via
Tools/Settings/Units/Units Multiplier Style. The next figure displays the three
available options:

The OFM administrator handbook____________________________________ Page 227


Field style multipliers
Metric style multipliers
Scientific style multipliers

The multiplier information is stored


within the project in a binary file with
extension o13. The o13 file gets built
also using an ASCII file as a template,
the Mult.def present in the OFM
directory. This file is used only when
creating a new project and contains a
standard set of multipliers. The next
listing displays the contents of the
OFM\Mult.def file.

*METRIC *SCIENTIFIC *ENGLISH *FACTOR


1 1 1 1
% % % 0.01
K E+3 M 1.E3
M E+6 MM 1.E6
G E+9 B 1.E9
T E+12 T 1.E12
G E+9 MMM 1.E9
1/K E-3 1/M 1.E-3
1/M E-6 1/MM 1.E-6
1/G E-9 1/MMM 1.E-9
K E+3 K 1.E3
*EOF

Notice that there are four columns. The first three are the labels and the fourth is the
factor column, the number that will be used to format the outputs. Notice that the
Scientific column lists values like E+3, etc. These are just the labels to be used, the only
numeric information is stored on the factor column.

As we mentioned before, once the project is created, this information goes to the o13
file. If you want to modify the multipliers of a
project, then do Edit/Project/Multipliers.
A window comes up with the list of multipliers that
are available in the style you have active. Click on
any of them to Delete or Edit it. You can also Add a
new one to the list.

When you edit or add a new one, you are presented


a window to input all the needed information for the
multiplier. This window is displayed below. Notice the
four parts of it.

Page 228 ____________________________________ The OFM administrator handbook


The first box displays the
label that will be used when
the user selects the Metric
multiplier style. The second
one stores the label for the
Scientific style, the third the
one for the Field option and
the last one the multiplying
factor.

Notice that there is some inconsistency between the names, reason why I will repeat
again the equivalencies between the two windows.

Metric 1 – Metric
Metric 2 – Scientific
English – Field

As a final explanation, this is an example of all Units-Multipliers combinations. They


where done based on the same data, just changing the settings in the Units tab of the
Settings window.
Notice the bbl/m3 and the M/K/E+3 combinations.

The OFM administrator handbook____________________________________ Page 229


English Units Metric Units
Field Cumulative
Oil Cumulative
Multipliers Production Oil
Style DATE Mbbl Production
---------- ---------- DATE Mm3
19670101 2.0 ---------- ----------
19670201 3.9 19670101 0.3
19670301 5.9 19670201 0.6
19670401 7.8 19670301 0.9
19670501 9.7 19670401 1.2
19670601 11.9 19670501 1.5
19670601 1.9

Scientific Cumulative
Oil
Cumulative
Oil
Multipliers Production Production
Style DATE E+3bbl DATE E+3m3
---------- ---------- ---------- ----------
19670101 2.0 19670101 0.3
19670201 3.9 19670201 0.6
19670301 5.9 19670301 0.9
19670401 7.8 19670401 1.2
19670501 9.7 19670501 1.5
19670601 11.9 19670601 1.9

Metric Cumulative
Oil
Cumulative
Oil
Multipliers Production Production
Style DATE Kbbl DATE Km3
---------- ---------- ---------- ----------
19670101 2.0 19670101 0.3
19670201 3.9 19670201 0.6
19670301 5.9 19670301 0.9
19670401 7.8 19670401 1.2
19670501 9.7 19670501 1.5
19670601 1.9

Problems
Generally speaking, multipliers never bring problems. You could eventually face some
trouble related to data if you loose control over your multipliers (a user changes the
setting). Notice that M means 1,000 in the Field style but also 1,000,000 in the Metric
one. You should verify your multiplier style if you notice these kinds of problems with
your database. Normally, once a multiplier style is set, users rarely change it. However,
keep an eye on it and be ready to solve problems with them.

Page 230 ____________________________________ The OFM administrator handbook


Chapter 6 – Basemap Symbols

Introduction

When you open an OFM project, you have available a set of modules, each one
implementing a different set of specialized tools. Modules talk to each other (when they
have to) and share the results. These modules are available through the Analysis menu
and you open them as you need. However, there is one module that is always opened
and is the starting point of almost anything you can do with your data: The basemap
module.

The base map is the only module that must be opened. Although you can de-activate
the map to save OFM some work, you can’t completely get rid of it because if you close
it, you close the project.

The main function of the basemap is giving a graphic representation of your field. Every
entity in the static master table is plotted on the map, so you generally see a symbol
representing each of them. You can also superimpose a grid, names and annotations to
represent geographic details, such as rivers, borders, etc. Anything but the symbols is
optional.

The OFM administrator handbook____________________________________ Page 231


This chapter covers how OFM comes to the symbols you see on the map. As you will
see, OFM is also very flexible and lets you customize the symbol information in various
ways. The previous figure shows you a typical base map.
Every symbol you see in the map has a particular color and
shape, depending on the kind of information it represents.
It is possible to ask OFM to draw a legend on the base map
to explain the meaning of each symbol as in the shown
figure. Notice that on the map shown, these are the only basemap symbols (four). All
other information (such as well names, borders, the river, the grid, etc) is optional and
the user selects whether to plot it or not.

Symbol information comes from the combination of two different sources of data: The
well type info and the symbol mapping info.

Well Type Information

This information specifies, for every entry in the static master table (every entity) what
symbol should be used. This information is given as an acronym, usually a three to six
characters string. You should not include spaces in these acronyms. OILPRO is a valid
one, however OIL PRO could create problems.
OFM allows you to provide this information through three different methods:

Data stored in a column in the filter (sort) table.


Data stored in a column in the static master table.
Data dynamically generated by a calculated variable or user function.

You must decide which method you want to use and tell OFM about it. This is done with
the Data Association window. Do a
Edit/Map/Association to reach this part of the
program. The figure shows an example of this
window. Notice the three top buttons. They allow
you to select one of the three options mentioned
above. In this particular example, the sort (filter)
table was chosen, particularly the WELLTYPE
column of this table.

This setting is done normally once for every


project. Normally means that although this is
intended to be set once, you can implement some
attractive features on your project if you prepare
it to take several options and allow the users to
change the source according to their needs.

Page 232 ____________________________________ The OFM administrator handbook


Well Type – Sort
This is the first option and is the one you use if you decide to store the information on
the filter (sort) table. In this case, one of the filter categories store the acronyms that
will describe the symbols. OIL, GAS, WINJ are some examples of the acronyms needed.
These are some standard ones, but you can use any ones you like. We will cover this in
further sections of this chapter.

The next figure shows an example of a filter table that keeps the well type information
on a (highlighted) column named WELLTYPE.

This option is the most popular one. Normally you already have a filter category that can
be used to quickly recover wells (or completions) based on the symbol information (for
instance, filter by category to get all oil producers).

The way of telling OFM to look for well


type information in this table is by
selecting the first option in the Data
Association window (Well Type – Sort).
The next figure shows the upper section of
this window with the association needed
for our example (the WELLTYPE column).

The OFM administrator handbook____________________________________ Page 233


Well Type – Table
This is the second option and is the one you use if you decide to store the information
on the static master table. In this case, you have to create a column of STRING type
with appropriate size (usually ~6 characters). In this column you must store the
acronyms that will be used to draw the symbols. OIL, GAS, WINJ are examples of the
acronyms you could use. Again, you could use these standard ones or have your own
ones. All you need to consider is that their size must fit in the static master column that
will hold their values.

The next figure shows an example of a static master table that keeps the well type
information on a (highlighted) column named TYPE.

This is the option I would use if my database is so simple that I don’t have any filter
categories defined (no filter table at all). Also, you want to store the well type
information on the static master table only if you project will be not only simple but
small. Remember that the static master table is used very frequently by OFM and you
must keep it to a minimum size. If you can store this information on a different place,
do it.

Again, if your project is simple, with no filter


(sort) categories, then using the master table
is not a bad idea. The way of telling OFM to
look for well type information in this table is
by selecting the second option in the Data
Association window (Well Type – Table).
The figure shows how this association was

Page 234 ____________________________________ The OFM administrator handbook


made for our example of selecting the column TYPE of the static master table.

Well Type – Expression


This is the third option. It is basically there to implement some particular cases where
you can’t have this information either in the static master nor the filter tables. The idea
behind it is that all you need is a function (a calculated variable or a user function) that
returns the needed acronym, depending on some policy you decide to implement. How
your function chooses the acronym it returns is up to you, so this is a very powerful
method and symbols can be changed almost dynamically39, based on your function’s
result.

For instance, you could create a calculated variable that inspects the accumulated GOR
value to date and decides, based on it, if it should return a GAS or an OIL acronym.
Another application could be to retrieve the acronym from a particular table. The next
paragraphs will give you a couple of examples implementing some ideas.

Value based symbol


This example shows how to implement a symbol that changes based on a value. In this
case we choose the last value of the accumulated Gas Oil Ratio. If the value is greater
than 200000, then we consider a GAS symbol. Else, an OIL one.
To implement this, we need to build a calculated variable such as:

Map.Symbol = @IfStr(@Last(Ratio.GORCum)>200000 ,"GAS" ,"OIL" )

This variable inspects the last value of the cum GOR and compares is to the constant
200000. If it is greater, it returns a GAS acronym, else an OIL one.
Notice that all acronyms (symbols) you will get from this function are only these two. In
the cases where you don’t have a GOR (an injector well, for instance), the function will
not return a proper value. You should be careful when designing this kind of variables.
We could create a new improved variable, such as the following one

Map.Symbol2 = @IfStr( Oil.Cum > 0 & Gas.Cum > 0,Map.Symbol , "UNDEF" )

This variable first tests if there are Oil and Gas values. If both are greater than zero,
then it will return whatever our first function (Map.Symbol) decides, based on the GOR.
If one (or both) is zero, then it will ignore the GOR and return an “UNDEF” acronym.

Notice that is completely up to you


what acronyms will be generated. You
should consider your data and
carefully set the policies when
designing this calculated variable.

Finally, for this example, I need to tell


OFM that the symbol information is
given by the results of the Map.Symbol2 calculated variable. The Data Association

39
Symbols do not automatically update. Refer to the Symbols are not Dynamic section ahead.

The OFM administrator handbook____________________________________ Page 235


window should look like the one in the previous figure. Notice that none of the other
two options (Sort or Type) are selected, just the third one.

The following map displays the results of this variable and the symbols representing
these three possible values.

Sporadic Table value


Suppose that you decide to store the symbols’ history on a sporadic table. You will have
to create a table and store the acronyms there, with the date they become active.
Finally construct a calculated variable that returns (for each entity), the last value of the
history and use it for the well type info.
The advantage of this method is that you could recover symbol history, because the
current and all previous values are stored.

The following section displays the definition of a possible sporadic table to hold map
symbol acronyms.

*TABLENAME WELLTYPE Sporadic


DATE UINT4
*u "Date"
*mu "1" "1"
WELLTYPE STRING 6
*rh "" "WELLTYPE" "WELLTYPE"
*rf 8 0 Right
REMARKS STRING 80
*rh "" "WELLTYPE" "REMARKS"
*rf 80 0 Left

Page 236 ____________________________________ The OFM administrator handbook


After creating this table, we load it with the symbols data. The file you need to load will
be similar to:

*TABLENAME WELLTYPE
*DATE *WELLTYPE *REMARKS
*KEYNAME "BLUE_10:Ad_1A"
19590101 "OIL" ""
*KEYNAME "BLUE_11:Li_1C"
19590101 "OIL" ""
*KEYNAME "BLUE_12:Ad_4"
19670101 "OIL" ""
*KEYNAME "BLUE_12:Li_1C"
19590101 "OIL" ""
*KEYNAME "ORANGE_14:Li_1C"
19670101 "OIL" ""
*KEYNAME "ORANGE_15:Ge_1"
19291401 "" ""
19590101 "DRY" "Original State of the well (Shot Off depth by Western)"
19841201 "OIL" "Re-perforated on depth (By Schlumberger)"
19841203 "OIL" ""
*KEYNAME "ORANGE_27:Ge_1"
19590101 "DRY" "Original State of the well (Shot Off depth by Western)"
19701201 "OIL" "Re-perforated on depth (By Schlumberger)"
19951201 "DRY" "Production finished"
*KEYNAME "ORANGE_28:SWD"
19590101 "SWDIS" ""
. . .

Once the data is loaded, you should verify that it was accepted properly. The next figure
shows the results for one of the completions.

The next part would be to build a calculated function that returns the last of the
acronyms (for the example above, the ORANGE_27:Ge_1 completion, it would return
DRY for Dec-95) and associate it in the Data Association window.

The calculated variable can be one like the following one:


Map.Symbol = @LastStr(Welltype.Welltype)

The OFM administrator handbook____________________________________ Page 237


As the association will then look like the one in the figure below.

The other figure displays a section of the map,


particularly the completion of the example and
the DRY symbol assigned.

Symbol Mapping Information

This is the second source of information that OFM needs to draw the symbols on the
basemap. This information can come from two sources:

An ASCII file
The acronyms themselves

ASCII file
For the first option, you must have an ASCII file like the following one:

OIL Oil_Producer 3 3
GAS Gas_Producer 5 2
GINJ Gas_Injector 73 2
WINJ Water_Injector 11 4
CINj Carbon_Dioxide_Injector 18 1
DRY Dry_Hole 2 1
SPROD Steam_Production 21 1
DISCV Discovery_Well 32 1
MON Monitor_Well 60 1
WACO2 WACO2 50 5
ITA TA'd_Injector 51 5
PTA TA'd_Producer 52 5

Take a close look at this file. It has four columns:


The first column contains the acronyms that OFM will be able to translate to a
symbol. This is a standard file, so the OIL, GAS and other ones mentioned before
are there. If you decide to use other acronyms, they should be listed in this
column.
The second column contains the description that will appear in the map legend.
Notice that there are no spaces (it is a single piece of information), an

Page 238 ____________________________________ The OFM administrator handbook


underscore is used to separate words. OFM will replace it by a space to draw the
legend.
The third column contains the symbol number. Each shape has a number (for
instance, a filled circle is number three). Unfortunately, there is no easy way of
displaying all available symbols with their numbers. However, there is a nice
interface to preview the symbols. We will cover this later in the Creating a
custom symbol file section.
The fourth column contains the color that will be used to draw the symbol. There are
sixteen basic colors, starting from 0. For your reference, this is the list of these
standard colors, although you can easily expand it to suit your needs. The color
information is stored in the OFMColor.def ASCII file.

0 White
1 Black
2 Red
3 Green
4 Blue
5 Yellow
6 Magenta
7 Cyan
8 Gray
9 Brown
10 Dark Red
11 Dark Green
12 Dark Blue
13 Dark Gray
14 Dark Brown
15 Purple

Acronyms
The second method is purely controlled by OFM. It scans all available acronyms and
assigns them randomly a symbol and a color. The description is the acronym itself.
There is no ASCII file involved in this method.

Putting it all together

When OFM draws the symbols, it scans the database finding the acronyms, as specified
in the Data Association window. Then, depending on the user decision, it will match
each acronym with a symbol based on a reference ASCII file or randomly.
Let’s see all the possible options.

Using Default mapping information

The OFM administrator handbook____________________________________ Page 239


In this case, you select the desired acronym source (Static Master table column, Filter
table column or Expression). Once you select the desired option, OFM pops up a window
asking you where is the symbol mapping information. The next figure shows you this
step. If you select the first option (Default), OFM will use a standard ASCII file included

with the program. This file is the OFM\Symbols\Welltype.def. The content of this
file is listed next.

95 Total Symbols symbol-id color


*CLEAR
OIl Oil_Producer 3 3
GAS Gas_Producer 5 2
GINJ Gas_Injector 73 2
WINJ Water_Injector 11 4
CINj Carbon_Dioxide_Injector 18 1
CO2PRD Carbon_Dioxide_Producer 19 1
DRY Dry_Hole 2 1
PROSP Prospect 1 1
SWDIS Salt_Water_Disposal 57 4
P&A Plugged_&_Abandoned 4 1
SCYCL Cyclic_Steam 28 1
ObSer Observation 93 6
N2INJ Nitrogen_Injector 70 1
WSUPP Water_Supply 48 4
SINJ Steam_Injection 20 1
SPROD Steam_Production 21 1
GEOTH Geothermal_Producer 30 1
HORIZ Horizontal 47 1
DISCV Discovery_Well 32 1
MON Monitor_Well 60 1
WACO2 WACO2 50 5

Page 240 ____________________________________ The OFM administrator handbook


ITA TA'd_Injector 51 5
PTA TA'd_Producer 52 5
SWD SWD 53 5
*END

This file is standard and included with the OFM program. Notice that the first column
lists all the acronyms that will be recognized by OFM, so if you want to create your own
ones, they will have to be listed there as well. If you use one like OILPRO, OFM will not
know how to draw its symbol because it is not listed in the default file.

Finally, once you click OK on both windows, OFM calculates the new symbols and colors
and updates the map.

Using a User Supplied mapping information


In this case, you pick the desired acronym source (Static Master table column, Filter
table column or Expression). Once you select the desired option, OFM pops up a window
asking you where is the symbol mapping information. The next figure shows you this
step. If you select the second option (User Supplied), OFM will use an ASCII file that
you must supply.

Notice that this file must have a sym extension and the syntax is similar to the standard
OFM\Symbols\Welltype.def file. Select the desired symbol file, click OK on all
windows, and wait while OFM calculates the new symbols and colors and updates the
map.

The OFM administrator handbook____________________________________ Page 241


The next frame lists a possible user supplied symbol file.

*clear
DRY Dry_Well 9 1
GINJ Gas_Injector_Well 73 2
GAS Gas_Producer_Well 46 2
HORIZ Horizontal_Well 47 1
OIl Oil_Producer_Well 3 4
P&A Plugged_&_Abandoned_Well 4 1
SWDIS Salt_Water_Disposal_Well 60 6
WINJ Water_Injector_Well 11 4
WSUPP Water_Supply_Well 48 4
*eof

The following map displays the results of using the previous file. Notice that the symbols
and colors are now different. Notice also that the legend descriptions have changed as
well, reflecting the contents of the user defined symbol file.

Using Create from data mapping information


In this case, you select the desired acronym source (Static
Master table column, Filter table column or Expression).
Once you select the desired option, OFM pops up a window
asking you where is the symbol mapping information. The
figure shows you this step. If you select the third option
(Create from data), OFM will not use any ASCII file. It
will assign randomly a different symbol and color to every
acronym it finds. For the legend description, it will use the
acronym itself.

The next map shows you the results of symbols assigned

Page 242 ____________________________________ The OFM administrator handbook


by OFM using this technique. This technique could be a quick starting point, if your
acronyms are not standard and you have no symbol file prepared with them.

Using Merge with current mapping information


If you have map working and include a new acronym not recognized by the current
configuration, you can use a *.sym file with only the data for the new acronym and
select this option. OFM will just append the new data to the project (i.e., it will start
recognizing the new acronym) without modifying your existing configuration.

Symbol-Shape Files

Symbol shapes come from ASCII files as well. The syntax of these files is similar to the
annotation files and is basically a set of commands that instruct OFM how to draw the
symbol. OFM comes with almost 100 pre defined shapes, each one in its own file. This
information is located in the OFM\Symbols directory. The file name is the number of
the symbol and the extension is ano (an annotation file). The following figure displays
the contents of this directory, as installed with OFM. Notice that you have 94 valid
symbols (1.ano to 94.ano) and the welltype.def file mentioned before, in the Using
Default mapping information section.

The OFM administrator handbook____________________________________ Page 243


Examples
If you review our previous examples, you will see that
the default symbol for the Oil Producer is 3 (a filled
circle). The contents of the 3.ano file that describes
this figure is:

LI 1
ARC 5.000000 5.000000 1.000000 0 360

The figure on the right hand side displays this symbol.

The standard Gas Producer symbol is 5. The


contents of the 5.ano file is

ARC 5.000000 5.000000 1.000000 0 360


LW 1
L 5.000000 6.0000 5.000000 6.500000
L 6.000000 5.000000 6.500000 5.000000
L 5.000000 4.000000 5.000000 3.500000
L 4.0 5.0 3.5 5.0
L 5.7071 5.7071 6.06066 6.06066
L 5.7071 4.29289 6.06066 3.93934
L 4.2929 5.7071 3.93934 6.06066
L 4.2929 4.2929 3.93934 3.93934

Notice that the gas symbol commands are more complex because each part of the
symbol must be described (the main circle and the eight spikes).

Page 244 ____________________________________ The OFM administrator handbook


As you can see, you can create your own symbols. All you need to do is learn the
commands needed to describe your shape (the on line help describes them) and create
the description file. You must name it with the same syntax (for example, 100.ano) and
then specify the 100 number as the desired shape.

Notes on Basemap Symbols Customization


There are some precautions you need to take when you decide to customize your map
symbols. These are some important considerations.
If you decide to create new symbols, beware that the nn.ano files belong to the
OFM installation tree. OFM will display your custom symbols properly as long as
your new symbol file is present in your installation tree. If you send your file to a
co-worker and the custom symbol file is not in his/her OFM tree, then the symbol
could have problems. When you distribute your OFM database, you must also
provide any custom symbol (*.ano) files that go with it.
If you decide to use a User Defined (*.sym) file (the one that matches acronyms to
symbols) or a customized version of the Welltypes.def file, you should also
include this file when you distribute your projects. If the user goes to
Edit/Map/Association and attempts to change (or changes) the symbols’
configuration, OFM will need this file to reconstruct your original configuration. If
you don’t supply this file, the user will end up with different symbols than the
ones you specified in your custom symbol file.

Map Symbols Roadmap


The next figure summarizes what has been described so far. Notice that the final symbol
comes after two data sources are specified: where the acronym will come from and how
this acronym will be mapped to a shape/color/legend.

Well Type Information Symbol Mapping Information

The OFM administrator handbook____________________________________ Page 245


Basemap Symbols Customization

You can do further customization to map symbols. All options are selected using the
Well Symbols window,
that you can reach it with
Edit/Map/Symbols. This
window has four important
sections.

Size frame: Use the


information here to
decide the size that
your symbols will
have on the
basemap. You can
specify the value
and the units.
Centimeters and
Inches are fixed
units. A third option
is Map Units,
where the symbol
size is expressed in
the same units of the map. When you zoom into the map, the units appear
bigger and so will the symbols. The next two pictures display symbols using
1200 Map Units for the size. Notice that zooming in increases the symbol size.
Because Map Units are relative to your values, 1200 works well with this
example. In your case, you might have to experiment different figures to get
similar results.

Control frame: This is the section where you can overwrite the current shape
settings. You can pick up one of the legends (from the Name combo box) and
set the values accordingly. You can change the legend itself (editing the name
on the combo box), change the shape, color and the acronym (Abbreviation)
associated. Your changes will be reflected on the map immediately after clicking
OK.

Page 246 ____________________________________ The OFM administrator handbook


Map speed-up options: You can ask OFM to draw the corresponding symbol only
when the number of symbols on the map is less than a certain value. If you have
1000 symbols on the map, drawing the 1000 different shapes and colors takes
time. Also, the map gets so crowded that all you see is a big cloud of symbols,
almost impossible to distinguish. In these cases, you can activate the Use Fast
Symbol when well count is greater than and choose a number, for instance
150. In this case, OFM will use a simple symbol (a red dot) for all wells, without
considering the well type. This speeds up considerably the map drawing process.
As soon as you make a selection (filter, zoom, query, etc.) and leave less than
150 symbols, OFM will draw the symbols.
The second option (Do not Show Names if well count is greater than) has the
same effect but relates to names. If the number of symbols exceeds the limit, no
names will be displayed (even if they are set to be displayed). The next figure
displays the same map with fast symbols.

Action buttons: These are the buttons on the right hand side of the window. OK
will apply the changes, Cancel will close the window without applying the
changes, Undo will undo the last change.
Save File and Get File will allow you to work with symbol files (the ones with sym
extension). This is the best place to generate custom *.sym files because you can
input all the information (acronym, shape, color, and legend) and save it to a symbol
file. Because this is an interesting task, it will be the subject of the following section.

The OFM administrator handbook____________________________________ Page 247


Creating a custom symbol file

This section will give you an example of how to easily create a symbol file. This is the
ASCII file with sym extension that can be used to match acronyms to shapes/colors
/legends.

The idea is to generate an ASCII file like the following one:

*clear
DESC1 Description_1 89 4
DESC2 Description_2 61 6
DESC3 Description_3 9 15
DESC4 Description_4 40 4
DRY Dry_Hole 2 1
GINJ Gas_Injector 73 2
GAS Gas_Producer_Well 5 2
OIL Oil_Producer 3 3
P&A Plugged_&_Abandoned 4 1
PROSP Prospect 1 1
SWD SWD 53 5
ITA TA'd_Injector 51 5
PTA TA'd_Producer 52 5
WACO2 WACO2 50 5
WINJ Water_Injector 11 4
WSUPP Water_Supply 48 4
WATER WATER 60 6
GAS GAS 61 7
*eof

The main problem is to find out the shape/color numbers you want. This can be easily
done from within OFM. Open any OFM project and go the Well Symbols window
(Edit/Map/Symbols).

The symbols that you want to


define will overwrite existing ones,
so pick up one symbol you will not
need and change it’s current data
with yours. For instance, the figure
displays an example.

Type in the legend description in


the Name combo box. Choose the
desired color and shape and finally
type in the acronym in the
Abbreviation box.

Click OK and your new information


will replace the previous one.

Page 248 ____________________________________ The OFM administrator handbook


Re open the Well Symbols window and select another symbol (from the Name
combo) that you will not need and proceed to replace its information with another
custom symbol. Click OK. Repeat the steps to add other desired symbols. Finally, export
the results to a symbol file with the Save File button.

This will create the file with the correct information (acronym, shape number, color
number and legend description) and a sym extension. It will include your current
symbols (the ones you modified and the remaining ones). If you want, you can edit out
the undesired parts with any standard editor.

Symbols are not Dynamic. Refreshing symbols

As the title of this section states, basemap symbols are not dynamic. This means that
OFM does not update the basemap symbols every time it re-draws it, but only some
times. This is a very important point and I could have added it as a note on previous
sections, but I decided to use a chapter section to remark this subject.

OFM scans the acronyms, find the matching symbols/shapes/colors and updates the
map only when you ask it to do so. Beware of this, because if you change one acronym,
you might not see the results one the map immediately.
The same applies to acronyms generated by functions. If your function returns a new
acronym, the map will not reflect the changes.
The only way of forcing OFM to re-scan your data and calculate all your symbols again is
to cycle it through the entire symbol process. This task takes time and justifies why OFM
does not do it automatically.
The map symbol refresh cycle can be done following the next steps:

Select Edit/Map/Association
Re-select the well type option (table, sort or
expression) with the corresponding button.
Re-select the same name as before and click OK.
Re-select the same Well Symbol File information
Click OK as needed (select the sym file if you select
this option) to return to the base map.
OFM spends some time recalculating your symbols. The
basemap should reflect now the changes.

The OFM administrator handbook____________________________________ Page 249


Some applications with map symbols

The last section of this chapter will hopefully bring up new ideas of what you can do
with the flexibility that OFM has to handle map symbols.

Filter Categories
If you have defined filter categories, you could use any of them to quickly change the
kind of information that the basemap symbols display. For instance, suppose that you
have a RESERVOIR filter category. If you select it as the source of acronyms (first
figure) and then ask OFM to create the symbols from this data (second figure), you map
symbols reflect immediately the geographic location of your reservoirs!

The next base map shows the results for the demo
database.

Page 250 ____________________________________ The OFM administrator handbook


The next figure displays another example with a filter category: a basemap that is using
the lease filter category for the symbols.

The OFM administrator handbook____________________________________ Page 251


Calculated Variables and Filter Categories
You could use a calculated variable to combine two or more filter categories to generate
new symbol information. For instance, create this calculated variable:

Map.Symbol = Sc.Lease + ":" + Sc.Welltype

And use it for the symbols. If you create the previous variable set OFM to use it (Well
Type – Exp = Map.Symbol and Create from Data), you get the following map.

Page 252 ____________________________________ The OFM administrator handbook


Notice that the symbol comes as a combination of the well type (oil, gas, etc) and the
lease it belongs to. Giving the users this kind of facilities could help them do their work
more efficiently.

Remember that OFM basemap symbols model is customizable and could allow you to
represent different views of your data on the same base map. Make sure you explore
the possibilities. I’ve seen users doing bubble maps for applications that could have
been done with the base map.

The OFM administrator handbook____________________________________ Page 253


Page 254 ____________________________________ The OFM administrator handbook
Chapter 7 – Project Optimization

Introduction

We all know that when we work with a project of respectable size, the performance of
the program suffers. In these cases, there are some tips and tricks that you could apply
to optimize the use of OFM resources and improve the overall performance. This brief
chapter will list some well-known examples. Some are just an adjustment, some require
a redesign of your database.

Basemap Symbols and Well Names


OFM spends resources (computing time) drawing the base map. When you zoom in and
out, OFM needs to redraw the map with the new dimensions and almost process every
symbol again. When your map displays hundreds (or thousands) of symbols, the map
gets so crowded that you can’t distinguish any symbol at all! Not even to mention what
do you get if you try to display a base map with names for a thousand symbols.
In this cases, you can tell OFM to spend time drawing symbol details and names only
when the number of
symbols to plot on the
basemap is less than a
certain figure.
Do an Edit/Map/Symbols
and you will get a window
(Well Symbols) like the
one in the figure.

The two options on the


lower part of the window
could be used to speed up
OFM’s map handling. This
window displays an example
where:

“If the symbols on the map


are less than 100, OFM will
draw the symbols and
names with all the details.
However, if there are more than 100 to draw, OFM will just draw a Fast Symbol (a red
dot) representing each entity” This map is not as raw as you may think. When your
number of well is big, a simple red dot makes it more readable.

The OFM administrator handbook____________________________________ Page 255


The next figures display the same basemap twice. On the left-hand side, OFM is using
the Fast Symbols. On the right-hand side, OFM is displaying normally.

Every time you do a zoom or a filter that leaves less than 100 symbols on the map, OFM
turns automatically into the detailed mode.

Deactivating the Basemap


OFM updates continuously all opened windows. If you group new set of wells and you
have several modules opened, in most cases they will all be updated with the new data.
So, although you don’t see them (their windows might be covered up), OFM is investing
time to update them.
Many times, you left the modules opened and you don’t realize they are until you check
the Window menu. When you find modules there that you don’t need, you can close
them and work faster. However, the basemap is a module you can’t get rid of. If you
close it, you close the project. For this module, OFM has also a way of suspending any
work on it: Deactivation. Deactivating the map iconizes its window and suspends any
work done on it. If you don’t need the map, you can do almost all your work without
activating it and saving precious time to OFM.
Previous OFM versions had many tasks that could be done only from the base map

Page 256 ____________________________________ The OFM administrator handbook


module. Version 3.0 broke this limitation and many of these options can now be reached
from any module of the program, without the need of visiting the base map.
The previous figure displays an OFM session with the basemap de-activated. Notice that,
with the basemap window selected, you can switch the map on and off with the
Activate Map option of the View menu.
In this example, the map is not activated and its window is iconized. All other work
continues normally (see the plot and DCA windows), although the basemap is not
updated.

Table Manager
When you select a group of wells and group them together, OFM scans all available
information and builds the group’s set of data. The set includes data from all the tables
of the project. For instance, if you are grouping for a production plot, OFM will also get
all the information for logs, wellbore diagrams, tests, etc. If your project is big, this
takes considerable time. By default, OFM uses all tables of the project. However, you
can suspend any one that you consider
not useful for your work. For instance, if
all you do is declines, you can safely
ignore the log data. To do this, you use
the Table Manager window you open
using the Edit/Project/Table
Manager menu. De selecting a table
does not affect the information loaded to
it. Data is left untouched, just ignored as
if it was not there.

Notice that the window presents a list of


all available tables of your project. A tick
on the checkbox means that OFM will
scan this table when grouping data. If
you want to ignore a particular table,
uncheck it. The only exception is your
static master one, that you can’t stop
using. If you uncheck it, OFM will re
allow it automatically.

The option of Decline Cases (in the lower part of the window) is for the DCA
information that is stored to the cases database. This information does not go to a table,
so is not listed with the rest of them. However, every time you group data, if there is
any DCA data saved to any case of the database, OFM will retrieve this data (unless, of
course, you uncheck it).

Consider this optimization trick if your OFM database includes information that is not
intended for all users. If you work with only a section of the database, disallow the rest.

The OFM administrator handbook____________________________________ Page 257


Filter Files
When you work with groups of wells and these groups are very often the same, it is
recommended to save the list on a filter file. OFM has two different filter file formats:
Well List and Filter File.
Well List is a simple ASCII file that can be generated from within OFM (saving a filter as
a Well List file) or with any text editor. Because it’s ASCII, any text editor can read it.
Well List files don’t have any extension name, although you can give them any one you
like.
Filter (sort) files are equivalent to Well Lists, however, they are written in binary format.
Only OFM understands them. These files always have a srt extension.

Although their functionality is equivalent, there are some differences between them:

The advantage of Well Lists is that you can read or prepare them with any text
editor.
The advantage of Filter Files is performance. Filter Files are much, much faster
than Well Lists.

If it you are given a list of wells that will be analyzed together (for instance, you receive
an email with a list of wells to perform some kind of analysis), you could easily create a
Well List file from it. However, try to use it only the first time. After you open the well
list and have the desired wells on the base map, save it as a Filter File. The following
time that you need to filter the same group, use the binary filter srt file. This will save
you some time.

Auto Grouping
Grouping data takes time and you should do it only when you have to. In the
Tools/Settings/Auto Group window you have some options to automate the
grouping of wells. Be careful
with them, because with these
options, you give OFM the
power of automatically loading
groups of wells and that is not
always what you need.

For instance, if you select the


first option (Auto group
selected wells) and you do a
filter operation (for instance, a
filter by category), OFM will not
only leave the desired wells on
the map, but will also scan all
tables and automatically group
all their data.
If you want to analyze them as
a group, that’s fine. If all you
wanted to do was to do

Page 258 ____________________________________ The OFM administrator handbook


individual analyses, you just wasted your time. You don’t need to group all wells
together to perform individual analyses!

The second option (Auto group wells that meet your query criteria) will do a
similar thing, although it will auto group all wells information after a filter using the
query tool.

The third option (Auto group wells after map zoom in) groups all data of all the
wells left on the map after a zoom.

The fourth option (Sum individual well forecasts when grouping wells) relates to
how OFM will act regarding the data for DCA groups’ forecasts. If you leave it
unchecked, it will retrieve the forecast of the group. If you select it, it will retrieve the
individual forecasts of the wells that belong to the group and add them together. This
second option takes longer and should be activated only when you need it.

Tables design
Finally, this part relates to the proper design of the project and not an optimized use of
it. These tips have been mentioned in the previous chapters of this handbook, however,
I would like to put them all together in one section.

When you design tables, you need to make sure that the data type you choose is
enough for what you need to store, but not too big. Increasing the size of strings or
numbers precision without need, increases the database size. A bigger project works
slower, so you should carefully choose your data types.

For input variables, the available data types are:

Variable Holds a Space Range Example


Type on file
FLOAT Floating 4 Bytes 7 digits of 123.456
Point precision
Number
DOUBLE Floating 8 Bytes 19 digits of 123456.1234568
Point precision
Number
INT1 Integer 1 Byte -128 to 127 24
Number
INT2 Integer 2 Bytes -32768 to 13653
Number 32767
INT4 Integer 4 Bytes Could be used
Number to store dates.
UINT1 Positive 1 Byte 0 to 255 243
Integer
Number
UINT2 Positive 2 Bytes 0 to 65536 43652
Integer

The OFM administrator handbook____________________________________ Page 259


Number
UINT4 Positive 4 Bytes Preferred type 19981203
Integer for storing
Number dates
STRING n String User “String that takes 26
of n defined chars”
chars (n Bytes)

Pay attention to the size they take on the file. For strings, every character you want to
store takes a byte. For numbers, it depends on the precision. Precision does not only
affect the disk space, but also the computational time. It does not take the same time to
add two integers (INT1) than two floating-point numbers (DOUBLE). The same applies
to any other numeric calculation.

For imputed variables, the list is smaller, but the same ideas apply.

Variable Type Holds a Space Range Example


on file
CALCULATED*1 Integer 1 Byte -128 to 127 56
Result
CALCULATED*4 Floating 4 Bytes 7 digits of -123.456
Point precision
Result
CALCULATED*8 Floating 8 Byte 19 digits of 123456.1234568
Point precision
Result

For any of these variables, also remember that multipliers can also help you to reduce
your requirements. If you need to store a quantity that is a big number but with lots of
zeroes at the end (like 25,000,000), then you could efficiently use output and input
multipliers to cover the “thousands” or “millions” part and reserve space to store only
25.

The last design advice I can give you is: keep your static master table as small as
possible. Don’t add columns there that are not strictly needed. OFM accesses the static
master table for almost any operation and you can speed up this task if you reduce the
size to a minimum. The next table displays what is the mandatory information that
should go to the static master table.

Entity Name (Mandatory)


Entity X&Y Coordinates (Mandatory)
Wellbore information (Optional. You could use the Entity Name in single layered wells)
Alias name (Optional. You could use the Entity Name if you are happy with these
names being plotted on the base map)
Well TD (Optional. Used for deviated wells)
Completion Measured Depth (Optional. Used for deviated wells)
Reference Depth (Optional. Used for deviated wells or TVD corrections)
Object type (Optional. Needed for objects, if needed)

Page 260 ____________________________________ The OFM administrator handbook


Project (Optional. Needed for nested projects)

All other info should be placed in separate tables, such as the filter table or spare static
tables.

The OFM administrator handbook____________________________________ Page 261


Page 262 ____________________________________ The OFM administrator handbook
Chapter 8 – Project templates

Introduction

OFM provides several tools to simplify the task of creating new projects. Some will let
you create a project from zero with a few mouse clicks producing a database based on
pre-defined templates. You can also define your own templates and build databases
based upon them. This chapter discusses the different possibilities that OFM provides.

A project consists of several parts: A database structure (input and imputed variables), a
set of calculated variables, the data associations for the base map and decline curve
analysis, units, multipliers,
the data that goes in it, etc.
When you build a new project
using a template, most of
them (except the actual data
and some other ones) can be
easily pre-set using a project
template. The following
sections will describe how
you can create a new OFM
project based on a template.

When you select File/New,


OFM opens a dialog box
where you can select the
desired folder and name for
the new project you want to
create. After you make these
selections, it opens the New
OFM Project window (shown in the figure). This is the place where you can select the
different options that will be covered in this chapter.

Notice that the window consists of four different parts:


The Path contains the information selected in the previous step (i.e., the path and
the project name).
The Password frame allows you to assign passwords to the new project you are
about to create. Notice that you can assign read and/or write passwords.
The Template contains six different options. Two of them are, by default,
disallowed and will be available once you set up OFM to use them. This is the
section where you define how are you going to define the project structure (your
tables, your variables, etc.)

The OFM administrator handbook____________________________________ Page 263


Finally, the Data Source frame allows you to define where will be the actual project
data coming from.

The Production Analyst template

If you select the Production Analyst® template, OFM will not ask you for any of the
information needed to build your new
project. It will create it based on the
Production Analyst database model.
This model is well known by the PA
users and it is a quite simple database
structure.

If you want to base your projects on


this model, select it from the Template
list.
Once you define the template, you must
also have to tell OFM where will be your
data coming from. The window displays
the Ascii Flat Files option, which
means that all your data will come from
ASCII files.
This combination will build a project with the PA structure and expect you to supply the
data in ASCII files (*.xy, *.prd, etc).

When you click OK, OFM builds a PA-like project. The next listing displays the structure
of this template. The figure displays just the names and types of the input/imputed
variables. Of course, it also defines all other attributes as well, such as report formats,
curves colors, units, etc.

*TABLENAME XY Static Master


WELL STRING 30
XCOORD FLOAT
YCOORD FLOAT
KBELEV FLOAT
TDEPTH FLOAT
INTEREST FLOAT
REGION INT2
CDATE FLOAT
GCORR FLOAT
ALIAS STRING 30
WELLBORE STRING 30
TYPE STRING 6

*TABLENAME PRD Monthly


DAYS FLOAT
OIL FLOAT
GAS FLOAT
WATER FLOAT

Page 264 ____________________________________ The OFM administrator handbook


PRESS FLOAT
STATU STRING 4
PDOIL CALCULATED*4 oil/days
PDGAS CALCULATED*4 gas/days
PDWATER CALCULATED*4 water/days

*TABLENAME GINJ Monthly


GIDAY FLOAT
GINJ FLOAT
GIPRE FLOAT
GISTA STRING 4
PDGINJ CALCULATED*4 ginj/giday

*TABLENAME WINJ Monthly


WIDAY FLOAT
WINJ FLOAT
WIPRE FLOAT
WISTA STRING 4
PDWINJ CALCULATED*4 winj/widay

*TABLENAME CINJ Monthly


CIDAY FLOAT
CINJ FLOAT
CIPRE FLOAT
CISTA STRING 4
PDCINJ CALCULATED*4 cinj/ciday

*TABLENAME SINJ Monthly


SIDAY FLOAT
SINJ FLOAT
FLT FLOAT
QUAL FLOAT
PDSINJ CALCULATED*4 sinj/siday

*TABLENAME MINJ Monthly


MINJ FLOAT
MIPRE FLOAT
MISTA STRING 4
PDMINJ CALCULATED*4 minj/miday

*TABLENAME TEST Sporadic


DATE INT4
OIL FLOAT
GAS FLOAT
WATER FLOAT
GCUM FLOAT
OCUM FLOAT
API FLOAT
HOURS FLOAT

*TABLENAME EVENT Sporadic


DATE INT4
DESC STRING 60

*TABLENAME LOG Trace


DEPTH FLOAT
SP FLOAT
RES FLOAT
LAT FLOAT
FDL FLOAT
SNP FLOAT
SONIC FLOAT
DENS FLOAT

The OFM administrator handbook____________________________________ Page 265


GR FLOAT

*TABLENAME DEV Deviation


MD FLOAT
TVD FLOAT
X FLOAT
Y FLOAT

*TABLENAME WBD WBD


DATE INT4
STRING STRING 20
TYPE STRING 12
KIND STRING 12
OPTION STRING 10
COMMENT STRING 60
GRADE STRING 10
THREAD STRING 10
WEIGHT STRING 10
JOINTS INT2
TOP FLOAT
BOTTOM FLOAT
ID FLOAT
OD FLOAT

The following figure displays the list of calculated variables that are also created when
you select this template.

CV.LIQUID=prd.oil+prd.water
CV.CUMOIL=@cuminput(prd.oil)
CV.CUMGAS=@cuminput(prd.gas)
CV.CUMWAT=@cuminput(prd.water)
CV.CUMWINJ=@cuminput(winj.winj)
CV.CUMLIQ=@tsum(cv.liquid)
CV.CDOIL=prd.oil/@dom(date)
CV.CDGAS=prd.gas/@dom(date)
CV.CDWAT=prd.water/@dom(date)
CV.CDWINJ=WINJ.WINJ/@dom(date)
CV.CDLIQ=cv.liquid/@dom(date)
CV.CNTOILW=@countinput(prd.oil)
CV.CNTGASW=@countinput(prd.gas)
CV.CNTWATW=@countinput(prd.water)
CV.CNTWINJ=@countinput(winj.winj)
CV.CDOILW=cv.cdoil/cv.cntoilw
CV.CDGASW=cv.cdgas/cv.cntgasw
CV.CDWATW=cv.cdwat/cv.cntwatw
CV.CDLIQW=cv.cdoilw+cv.cdwatw
CV.PDOIL=@if(prd.days=0,cv.cdoil,prd.pdoil)
CV.PDGAS=@if(prd.days=0,cv.cdgas,prd.pdgas)
CV.PDWAT=@if(prd.days=0,cv.cdwat,prd.pdwater)
CV.PDLIQ=cv.pdoil+cv.pdwat
CV.PDOILW=prd.oil/prd.days
CV.PDGASW=prd.gas/prd.days
CV.PDWATW=prd.water/prd.days
CV.PDWINJW=winj.winj/winj.widay
CV.PDLIQW=cv.pdoilw+cv.pdwatw
CV.GOR=prd.gas/prd.oil
CV.OGR=prd.oil/(prd.gas)
CV.WOR=prd.water/prd.oil
CV.GLR=prd.gas/cv.liquid
CV.LGR=cv.liquid/prd.gas
CV.WGR=prd.water/(prd.gas)
CV.WCUT=100*prd.water/cv.liquid

Page 266 ____________________________________ The OFM administrator handbook


CV.OCUT=100*prd.oil/(prd.oil+prd.water)
CV.PZ=prd.press/@pvtz(prd.press)
CV.GORCUM=cv.cumgas/cv.cumoil
CV.OGRCUM=cv.cumoil/(cv.cumgas)
CV.GLRCUM=cv.cumgas/cv.cumliq
CV.LGRCUM=cv.cumliq/cv.cumgas
CV.WORCUM=cv.cumwat/cv.cumoil
CV.WGRCUM=cv.cumwat/(cv.cumgas)
CV.WCTCUM=100*cv.cumwat/cv.cumliq
CV.OCTCUM=100*cv.cumoil/(cv.cumoil+cv.cumwat)
CV.IPRESS=@first(prd.press)
CV.STPRES=@step(prd.press,prd.press=0)
CV.LPRESS=@Last(prd.press)
CV.PALLOC=@alloc(date)

Beware that OFM does not complete the Map/DCA associations for this project template.
Map associations are not completely defined and you should check them against the
next figure (Edit/Map/Associations)
DCA associations are usually defined in the template as per the next figure (From
the DCA module, Edit/Scenario). However, it is a good idea to double-check
them.

Map Associations
Well Type - Sort None
Well Type - Table TYPE
Well Type - Expression None
Wellbore WELLBORE
Alias Name ALIAS
Object Type None
X Coordinate XCOORD
Y Coordinate YCOORD
Reference Depth KBELEV
Completion Depth CDEPTH
Bottom Depth TDEPTH
Project None

DCA Associations
Date Date
Oil Rate CV.CDOIL
Gas Rate CV.CDGAS
Water Rate CV.CDWAT
Cumulative Oil CV.CUMOIL
Cumulative Gas CV.CUMGAS
Cumulative Water CV.CUMWAT
Gas Oil Ratio CV.GOR
Water Oil Ratio CV.WOR
Water Cut CV.WCUT
Oil Cut CV.OCUT

The OFM administrator handbook____________________________________ Page 267


The GeoQuest Standard template

If you select the GeoQuest Standard template, OFM will not ask you for any of the
needed information to build your project. It will all be based on a template suggested by
GeoQuest. This template creates a quite
extensive database structure, with many
tables and variables. The menu on the
right hand side allows you to select a
language. For now, the only available one
is English.
The GeoQuest template is very interesting
and could be considered as a case study.
It is prepared to work with monthly and/or
daily data. It also has room for PVT,
financial calculations, etc.
Once you select this template, you must
also have to tell OFM where will be your
data coming from. The window displays
the Ascii Flat Files option, which means
that all your data will come from ASCII files.
This combination will build a project with the GeoQuest-type structure and expect you to
supply the data in ASCII files (*.xy, *.prd, etc).

When you click OK, OFM builds the project. The next listing displays the structure of this
template. The figure displays just the names and types of the input/imputed variables.
Of course, it also defines all other attributes as well.

*TABLENAME COMPLETION Static Master


ID STRING 20
ALIAS STRING 30
WELLBORE STRING 20
XCOORD DOUBLE
YCOORD DOUBLE
TOPPERF FLOAT
BOTTOMPERF FLOAT
TOTALDEPTH FLOAT
KB FLOAT
INTEREST FLOAT
*TABLENAME COMPROP Static
POROSITY FLOAT
H FLOAT
SWI FLOAT
SOI FLOAT
PI FLOAT
T FLOAT
K FLOAT
DRAINAREA FLOAT
DRAINRADIUS FLOAT

Page 268 ____________________________________ The OFM administrator handbook


*TABLENAME MTHPROD Monthly
DAYS FLOAT
OIL FLOAT
GAS DOUBLE
GASLIFT FLOAT
WATER FLOAT
CONDENSATE FLOAT
CO2 FLOAT
ACTIVE CALCULATED*1 oil|gas|water|condensate|co2
PDOILRATE CALCULATED*4 oil/days
PDGASRATE CALCULATED*4 gas/days
PDWATERRATE CALCULATED*4 water/days
PDCO2RATE CALCULATED*4 co2/days
PDGASLIFTRATE CALCULATED*4 gaslift/days
STATUS STRING 4
PRESSURE FLOAT
*TABLENAME MTHWATERINJ Monthly
DAYS FLOAT
VOLUMEN FLOAT
PRESSURE FLOAT
STATUS STRING 4
ACTIVE CALCULATED*1 Volumen>0
IDRATE CALCULATED*4 Volumen/days
*TABLENAME MTHGASINJ Monthly
DAYS FLOAT
VOLUMEN FLOAT
PRESSURE FLOAT
STATUS STRING 4
ACTIVE CALCULATED*1 Volumen>0
IDRATE CALCULATED*4 Volumen/days
*TABLENAME MTHCO2INJ Monthly
DAYS FLOAT
VOLUMEN FLOAT
PRESSURE FLOAT
STATUS STRING 4
ACTIVE CALCULATED*1 Volumen>0
IDRATE CALCULATED*4 volumen/days
*TABLENAME MTHSTEAMINJ Monthly
DAYS FLOAT
VOLUMEN FLOAT
PRESSURE FLOAT
TEMPERATURE FLOAT
QUALITY FLOAT
CYCLE INT1
STATUS STRING 4
ACTIVE CALCULATED*1 Volumen>0
IDRATE CALCULATED*4 Volumen/days
*TABLENAME DLYPROD Daily
HOURS FLOAT
OIL FLOAT
GAS FLOAT
WATER FLOAT

The OFM administrator handbook____________________________________ Page 269


THP FLOAT
CHP FLOAT
STATUS STRING 4
ACTIVE CALCULATED*1 oil|gas|water
PDOILRATE CALCULATED*4 oil/(hours/24.)
PDGASRATE CALCULATED*4 gas/(hours/24.)
PDWATERRATE CALCULATED*4 water/(hours/24.)
*TABLENAME WELLTEST Sporadic
DATE INT4
HOURS FLOAT
OIL FLOAT
BSW FLOAT
GOR FLOAT
CHOKE FLOAT
API FLOAT
BTU FLOAT
THP FLOAT
CHP FLOAT
*TABLENAME EVENT Sporadic
DATE INT4
CODE STRING 10
DESCRIPTION STRING 60
FILE STRING 60
*TABLENAME ZOILPVT Lookup
PRESSURE FLOAT
FVF FLOAT
VISCOSITY FLOAT
RS FLOAT
*TABLENAME ZGASPVT Lookup
PRESSURE FLOAT
FVF FLOAT
VISCOSITY FLOAT
Z FLOAT
*TABLENAME ZWATERPVT Lookup
PRESSURE FLOAT
FVF FLOAT
VISCOSITY FLOAT
RS FLOAT
*TABLENAME ZPATTPROP Xref
NAME STRING 20
HPCV FLOAT
POROSITY FLOAT
H FLOAT
SW FLOAT
SO FLOAT
AREA FLOAT
RRES FLOAT
EUR FLOAT
*TABLENAME ZRESPROP Xref
NAME STRING 20
OOIP DOUBLE
POROSITY FLOAT

Page 270 ____________________________________ The OFM administrator handbook


H FLOAT
SW FLOAT
SO FLOAT
PI FLOAT
T FLOAT
K FLOAT
*TABLENAME ZECON Lookup
DATE INT4
OILPRICE FLOAT
GASPRICE FLOAT
CO2PRICE FLOAT
OILCOST FLOAT
CO2COST FLOAT
WATERCOST FLOAT
GASCOST FLOAT
WATERINJ FLOAT
GASINJ FLOAT
CO2INJ FLOAT
WATERDISP FLOAT

As you can see, the structure is quite big. So it is the list of calculated variables that are
created with this template:

/* Calculated Variables
frequency.Monthly = @change(@month(date))
frequency.Yearly = @change(@year(date))
frequency.Quarterly = @change(date)
cumDlyProd.Oil = @CumInput(DlyProd.Oil)
cumDlyProd.Gas = @CumInput(DlyProd.Gas)
cumDlyProd.Water = @CumInput(DlyProd.Water)
cumMthProd.Days = @CumInput(MthProd.Days )
cumMthProd.Oil = @cuminput(MthProd.oil)
cumMthProd.Gas = @cuminput(MthProd.gas)
cumMthProd.Water = @cuminput(MthProd.water)
cumMthProd.Co2 = @cuminput(MthProd.Co2)
cumMthProd.Condensate = @cuminput(MthProd.condensate)
cumMthProd.GasLift = @cuminput(MthProd.GasLift)
cumMthWaterInj.Days = @cuminput(MthWaterInj.Days)
cumMthWaterInj.Volumen = @cuminput(MthWaterInj.Volumen)
cumMthGasInj.Days = @cuminput(MthGasInj.Days)
cumMthGasInj.Volumen = @cuminput(MthGasInj.Volumen)
cumMthCo2Inj.Days = @cuminput(MthCo2Inj.Days)
cumMthCo2Inj.Volumen = @cuminput(MthCo2Inj.Volumen)
cumSteamInj.Days = @cuminput(MthSteamInj.Days)
cumSteamInj.Volumen = @cuminput(MthSteamInj.Volumen)
cdMthProd.OilRate = MthProd.Oil/@dom(date)
cdMthProd.GasRate = MthProd.Gas/@dom(date)
cdMthProd.WaterRate = MthProd.Water/@dom(date)
cdMthProd.GasLiftRate = MthProd.GasLift/@dom(date)
cdMthProd.CondRate = MthProd.Condensate/@dom(date)
cdMthProd.Co2Rate = MthProd.Co2/@dom(date)
cdMthWaterInj.Rate = MthWaterInj.Volumen/@dom(date)
cdMthGasInj.Rate = MthGasInj.Volumen/@dom(date)
cdMthCo2Inj.Rate = MthCo2Inj.Volumen/@dom(date)
cdSteamInj.Rate = MthSteamInj.Volumen/@dom(date)
pwMthProd.OilRate = cdMthProd.OilRate/Mthprod.Active
pwMthProd.GasRate = cdMthProd.GasRate/Mthprod.Active
pwMthProd.WaterRate = cdMthProd.WaterRate/MthProd.Active
pwMthProd.GasLiftRate = cdMthProd.GasLiftRate/MthProd.Active
pwMthProd.CondRate = cdMthProd.CondRate/MthProd.Active
pwMthProd.Co2Rate = cdMthProd.Co2Rate/MthProd.Active

The OFM administrator handbook____________________________________ Page 271


pwMthWaterInj.Rate = cdMthWaterInj.Rate/MthWaterInj.Active
pwMthGasInj.Rate = cdMthGasInj.Rate/MthGasInj.Active
pwMthCo2Inj.Rate = cdMthCo2Inj.Rate/MthCo2Inj.Active
pwSteamInj.Rate = cdSteamInj.Rate/MthSteamInj.Active
GOR = MthProd.Gas/MthProd.Oil
WOR = MthProd.Water/MthProd.Oil
mthProd.Liquid = MthProd.oil+MthProd.Water
GLR = MthProd.Gas/MthProd.Liquid
OGR = MthProd.oil/MthProd.gas
cdMthProd.LiquidRate = cdMthProd.OilRate+cdMthProd.waterRate
cumMthProd.Liquid = cumMthProd.Oil+cumMthProd.Water
cumMthProd.Gor = cumDlyProd.Gas/cumDlyProd.Oil
cumProd.Wor = cumMthProd.Water/cumMthProd.Oil
cumMthProd.Wcut = cumMthProd.Water/cumMthProd.Liquid
cumMthProd.Ocut = cumMthProd.Oil/cumMthProd.Liquid
cumMthProd.Glr = cumMthProd.Gas/cumMthProd.Liquid
mthProd.PDLiqRate = MthProd.pdoilRate+MthProd.pdWaterRate
cumDlyProd.Liquid = cumDlyProd.oil + cumDlyProd.Water
cumDlyProd.GOR = cumDlyProd.Gas/cumDlyProd.Oil
cumDlyProd.GLR = cumDlyProd.Gas/ cumDlyProd.Liquid
cumDlyProd.WOR = cumDlyProd.Water/ cumDlyProd.Oil
cumDlyProd.WCUT = cumDlyProd.Water/ cumDlyProd.Liquid
cumDlyProd.OCUT = cumDlyProd.Oil/ cumDlyProd.Liquid
dlyProd.Liquid = DlyProd.oil + DlyProd.Water
dlyProd.Liq = DlyProd.Oil + DlyProd.Water
dlyProd.GOR = DlyProd.Gas/ DlyProd.Oil
dlyProd.GLR = DlyProd.Gas/ DlyProd.Liquid
dlyProd.WOR = DlyProd.Water/ DlyProd.Oil
dlyProd.WCUT = DlyProd.Water/ DlyProd.Liquid
dlyProd.OCUT = DlyProd.Oil/ DlyProd.Liquid
Wcut = MthProd.water/MthProd.liquid
Ocut = MthProd.oil/MthProd.liquid
forecast.Case = "base"
forecast.Oil = #RateFcst("oil" , Forecast.Case)
forecast.Gas = #RateFcst("gas",Forecast.Case)
forecast.Water = #RateFcst("Water",Forecast.Case)
forecast.Oilcum = #CumFcst("oil", Forecast.Case)
forecast.Gascum = #CumFcst("Gas",Forecast.Case)
forecast.Watercum = #CumFcst("Water" , Forecast.Case)
forecast.Gor = Forecast.Gas/Forecast.Oil
forecast.Wor = Forecast.Water/(Forecast.Water+Forecast.Oil)
forecast.OilRRes = #RResFcst("Oil",Forecast.case)
forecast.OilTRes = #TResFcst("Oil",Forecast.case)
forecast.GasRRes = #RResFcst("Gas",Forecast.case)
forecast.GasTRes = #TResFcst("Gas",Forecast.case)
forecast.GasDecl = #DeclFcst("Gas",Forecast.case)
forecast.OilDecl = #DeclFcst("Oil",Forecast.case)
yrlyCumMth.Oil = @ClrRSum(MthProd.oil ,@change(@year(date)))
yrlyCumMth.Gas = @clrrsum(MthProd.gas,@change(@year(date)))
yrlyCumMth.Water = @clrrsum(MthProd.water,@change(@year(date)))
yrlyCumMth.Wor = YrlyCumMth.Water/YrlyCumMth.Oil
yrlyCumMth.Gor = YrlyCumMth.Gas/YrlyCumMth.Oil
qtryCumMth.Oil = @ClrRSum(MthProd.oil ,@quarterly(date))
qtryCumMth.Gas = @clrrsum(MthProd.gas,@quarterly(date))
qtryCumMth.Water = @clrrsum(MthProd.water,@quarterly(date))
qtryCumMth.Wor = QtryCumMth.Water/QtryCumMth.Oil
qtryCumMth.Gor = QtryCumMth.Gas/QtryCumMth.Oil
pvt.Correlation = 1
pvtTable.KeyName = @name()
date1st.Prod = @cfirst(date,MthProd.Active)
date1st.MthWaterInj = @cfirst(date,MthWaterInj.Active)
date1st.MthGasinj = @cfirst(date,MthGasInj.Active)
date1st.MthSteamInj = @cfirst(date,MthSteamInj.Active)
dateMaxMth.Oil = @cfirst(date,MthProd.Oil = @tmax(MthProd.Oil,Mthprod.oil>0))
dateMaxMth.Water = @cfirst(date,MthProd.Water = @tmax(MthProd.Water,Mthprod.water>0))
dateMaxMth.Gas = @cfirst(date,MthProd.Gas = @tmax(MthProd.Gas,Mthprod.gas>0))
dateMaxCum.YrlyOil = @cfirst(date,YrlyCumMth.Oil = @tmax(YrlyCumMth.Oil,1))
dateMaxCum.YrlyGas = @cfirst(date,YrlyCumMth.gas = @tmax(YrlyCumMth.Gas,1))
dateMaxCum.YrlyWater = @cfirst(date,YrlyCumMth.Water = @tmax(YrlyCumMth.Water,1))
maxMthProd.Oil = @tmax(MthProd.Oil,MthProd.oil>0)
MaxMthProd.Water = @tmax(MthProd.Water,MthProd.water>0)

Page 272 ____________________________________ The OFM administrator handbook


maxMthProd.Gas = @tmax(MthProd.Gas,MthProd.gas>0)
maxCum.YrlyOil = @tmax(YrlyCumMth.Oil,1)
maxCum.YrlyGas = @tmax(YrlyCumMth.Gas,1)
maxCum.YrlyWater = @tmax(YrlyCumMth.Water,1)
dateFmt.Yymm = @fmtdate(date,"yy/mm")
dateFmt.Yymmm = @fmtdate(date,"yy/Mmm")
dateFmt.Yymmmdd = @fmtdate(date,"yyyy/Mmm/dd")
dateFmt.Mmmddyyyy = @fmtdate(date,"Mmm dd yyyy")
dateFmt.Mmmyyyy = @fmtdate(date,"Mmm yyyy")
pvt.Bo = #pvtbo(MthProd.pressure)
pvt.Vo = #pvtvo(MthProd.pressure)
pvt.Rs = #pvtRs(MthProd.pressure)
pvt.Bg = #pvtbg(MthProd.pressure)
pvt.Vg = #pvtvg(MthProd.pressure)
pvt.Z = #pvtz(MthProd.pressure)
pvt.Bw = #pvtbw(MthProd.pressure)
pvt.Rsw = #pvtRsw(MthProd.pressure)
pvt.Vw = #pvtvw(MthProd.pressure)
res.Oil = MthProd.Oil * Pvt.Bo
res.Water = MthProd.Water * Pvt.Bw
res.Gas = (MthProd.Gas - MthProd.Oil * Pvt.rs - MthProd.Water * Pvt.Rsw ) * Pvt.Bg
resCum.Oil = @rsum(Res.Oil)
resCum.Gas = @rsum(Res.Gas)
resCum.Water = @rsum(Res.Water)
resCum.Prod = ResCum.Oil+ResCum.Water+ResCum.Gas
res.Fluid = Res.Oil+Res.Water+Res.Gas
pattPropKey.Name = @name()
pattProp.Hcpv = @XrefValue(pattPropKey.Name , zPattProp.Hpcv )
pattProp.Porosity = @XrefValue(pattPropKey.Name , zPattProp.Porosity )
pattProp.H = @XrefValue(pattPropKey.Name , zPattProp.H )
pattProp.Sw = @XrefValue(pattPropKey.Name , zPattProp.Sw )
pattProp.So = @XrefValue(pattPropKey.Name , zPattProp.So )
pattProp.Area = @XrefValue(pattPropKey.Name , zPattProp.Area )
pattProp.RRes = @XrefValue(pattPropKey.Name , zPattProp.RRes )
pattProp.EUR = @XrefValue(pattPropKey.Name , zPattProp.EUR )
resPropKey.Name = @name()
resProp.OOIP = @XrefValue(resPropKey.Name , zResProp.OOIP )
resProp.Porosity = @XrefValue(resPropKey.Name , zResProp.Porosity )
resProp.k = @XrefValue(resPropKey.Name , zResProp.k )
resProp.H = @XrefValue(resPropKey.Name , zResProp.H )
resProp.Sw = @XrefValue(resPropKey.Name , zResProp.Sw )
resProp.So = @XrefValue(resPropKey.Name , zResProp.So )
resProp.Pi = @XrefValue(resPropKey.Name , zResProp.Pi )
resProp.T = @XrefValue(resPropKey.Name , zResProp.T )
finTableKey.Name = @name()
finPrice.Oil = @Lookup(zEcon.OilPrice ,finTableKey.Name,date , "date step")
finPrice.Gas = @Lookup(zEcon.GasPrice,finTableKey.Name,date , "date step")
finLiftCost.Oil = @Lookup(zEcon.OilCost ,finTableKey.Name,date , "date step")
finLiftCost.Gas = @Lookup(zEcon.GasCost ,finTableKey.Name,date , "date step")
finLiftCost.Water = @Lookup(zEcon.WaterCost ,finTableKey.Name,date , "date step")
finRev.Oil = MthProd.Oil * finPrice.oil
finRev.Gas = MthProd.Gas * finPrice.Gas
finRev.Total = finRev.Oil + finRev.Gas
finExpense.oil = MthProd.oil * finLiftCost.oil
finExpense.gas = MthProd.gas * finLiftCost.gas
finExpense.water = MthProd.water * finLiftCost.Water
finExpense.Total = finExpense.Oil + finExpense.Gas + finexpense.Water
finRev.Gross = finRev.Total - @if(finexpense.Total=@null(),0,finExpense.total)
finRev.CumGross = @rsum(finRev.Gross)
finDiscount.Rate = 15.
finDiscount.RefDate = @first(@monthly(date))
finRev.GrossDisc = finRev.Gross * @discount(finDiscount.Rate,date,finDiscount.RefDate)
finRev.CumGrossDisc = @rsum(finRev.GrossDisc)
elapsed.Days = @elapsedDays(date,@first(date))
elapsed.Months = @elapsedmonths(date,@first(date))
mthRCumDly.Oil = @ClrRSum(DlyProd.oil ,frequency.Monthly)
mthRCumDly.Gas = @clrrsum(DlyProd.gas,frequency.Monthly)
mthRCumDly.Water = @clrrsum(DlyProd.water,frequency.Monthly)
mthRCumDly.Wor = MthRCumDly.Water/MthRCumDly.Oil
mthRCumDly.Gor = MthRCumDly.Gas/MthRCumDly.Oil
mthCumDly.Oil =@if( frequency.Monthly,MthRCumDly.oil,@null())

The OFM administrator handbook____________________________________ Page 273


mthCumDly.Gas = @if( frequency.Monthly,MthRCumDly.gas,@null())
mthCumDly.Water =@if( frequency.Monthly,MthRCumDly.Water,@null())
mthCumDly.Wor = MthCumDly.Water/MthCumDly.Oil
mthCumDly.Gor = MthCumDly.Gas/MthCumDly.Oil
/*User Functions
RateFcst(alpha phase,alpha caseName)
CumFcst(alpha phase,alpha caseName)
RResFcst(alpha phase,alpha caseName)
TResFcst(alpha phase,alpha caseName)
DeclFcst(alpha phase,alpha caseName)
Pvtbo(p)
Pvtvo(p)
PvtRs(p)
Pvtbg(p)
PvtZ(p)
Pvtvg(p)
Pvtbw(p)
PvtRsw(p)
PvtVw(p)

Pay close attention to the previous list. It does not only include more than 180
calculated variables but also some user functions. This model is quite complete and it is
a good advice to experiment with it.

As with the PA template, OFM does not complete the data/DCA associations for this
project template. Make sure you review them as per the next tables.
Map associations (Edit/Map/Associations)
DCA associations are defined in the template as per the next table (from the DCA
module, Edit/Scenario)

Map Associations
Well Type - Sort None (Your Filter
category)
Well Type - Table None
Well Type - Expression None
Wellbore None (WELLBORE)
Alias Name None (ALIAS)
Object Type None
X Coordinate None (XCOORD)
Y Coordinate None (YCOORD)
Reference Depth None (KB)
Completion Depth None (INTEREST)
Bottom Depth None (TOTALDEPTH)
Project None

DCA Associations
Date Date
Oil Rate cdMthProd.OilRate
Gas Rate cdMthProd.GasRate
Water Rate cdMthProd.WaterRate
Cumulative Oil cumMthProd.Oil

Page 274 ____________________________________ The OFM administrator handbook


Cumulative Gas cumMthProd.Gas
Cumulative Water cumMthProd.Water
Gas Oil Ratio GOR
Water Oil Ratio WOR
Water Cut Wcut
Oil Cut Ocut

Notice that the GeoQuest template is a general-purpose template and is prepared to


work with either monthly or daily data. The DCA associations listed above are the ones
you will need if your data is monthly. If your data is daily, then the needed DCA
variables will be those ones prepared to work with daily tables. Make sure you select the
right type.

The Finder template

Finder® is a GeoQuest master database designed to store corporate information. It


handles almost any data you can imagine and also, production. OFM has capabilities to
connect to Finder and retrieve data from it using ODBC. When you want OFM to read
data from Finder, you have two possibilities:
You can build your own project structure and then manually select the ODBC
connection to map the data from Finder into your custom project structure.
You can build your project using the OFM Finder template. OFM knows very well
how to connect to a standard Finder database. It knows what kind of data it can
get from there and how to build a project structure to allocate this data.

The Finder project template is based on production views offered by Finder. The OFM-
Finder link is being aggressively improved with each version and this is the reason why
you have to specify what Finder version you want to connect to (7.3, 8.0 or 8.5). The
table structure that OFM builds to receive all this possible data is quite extensive and
varies depending on the Finder version you are connecting to. We will not cover this link
now, but decided to include this short description to complete the templates section.

The Company Standard template

This template is a user-defined template. It is based on any project you have and you
want to use a model. If you have spent a lot of work on a project and you want to re-
use it as a model for your next databases, then you can “steal” the information from it
and turn it into your Company Standard template.
The files you need to get from the model project are the ones that contain the database
structure (*.ofm), the calculated variables (*.04) and DCA associations (*.14).

The OFM administrator handbook____________________________________ Page 275


Suppose that your OFM project is called Model. Then, all you have to do is copy three
project binary files to the OFM directory and rename them as stated in the following
table:

Source Project file Copied to OFM directory as


Model.ofm Ivdef.std
Model.04 Cvdef.std
Model.14 Dcadef.std

Once you add these three files to the OFM


directory, then OFM allows the Company
Standard template option, as shown in the
next figure.

Now, when you select this new template,


OFM will create the project based on your
custom model. From the project you used
to build the template files, the new one will
inherit:

Input variables
Imputed variables
Calculated variables
DCA associations

In the figure, you can see the Company Standard template option allowed (the three
needed files have been copied to the OFM directory). The figure also has the Data
Source option set to Ascii Flat Files. OFM will then create a project using your custom
template and expect the data to populate it to be supplied with ASCII files (*.xy, *.prd,
etc.)

The Company ODBC Standard template

The Company ODBC Standard works like the Company Standard template but is though
to be used with projects that connect to data sources using ODBC technology. Your new
project will be based on an existent ODBC project selected as a model. In order activate
this option in the New OFM Project window, you need to copy four files from your
desired ODBC project to the OFM directory and rename them as indicated in the next
table.
Source Project file Copied to OFM directory as
Model.ofm Ivdef.cdb
Model.o4 Cvdef.cdb

Page 276 ____________________________________ The OFM administrator handbook


Model.o17 Tblcnf.cdb
Model.14 Dcadef.cdb

The User Defined template

This is the most popular template and the one


that has been used in Chapter 3 of this book. It
is completely defined by the user via ASCII file.
These files are basically two:

A *.def file, that defines the input and


imputed variables.
A *.par file, that defines the calculated
variables.

You will have to manually revise the


associations (Map or DCA) because there is no
way of defining them via ASCII files when you
create a project using this method.

When you select User Defined template, the Data Source can be set to different options:

Ascii Flat Files: Project structure (*.def & .par) and project data (*.xy, *.prd, etc.)
information will be supplied via ASCII files.

ODBC options: This creates a project that will connect to an external database via
ODBC. In general, you have two ways to go with these options:
You can select an ODBC project template (*.dbt file), build the structure based on it
and populate it with data through the ODBC link.
You can manually build your project structure based on the data offered by your
ODBC data source and then populate it with data also coming from the ODBC
source.

The OFM administrator handbook____________________________________ Page 277


Production Analyst Database: Use this option if you have the binary files of a PA
database and you want to
import its data into a new OFM
project.
Notice that the window
enlarges with a new bottom
section where you pick up the
PA database you want to
convert (dbxydir.*).

The project structure that OFM


will create will be one imitating
your PA database, not the
same one presented in the PA
template.
OFM opens the binary PA files,
creates the needed ASCII files
to build a new project and
finally builds it. If you uncheck
the Delete Temporary Load
Files box, these intermediate
ASCII files will be left for you
to inspect them.

Dwights and PI98 options


are similar to the Production Analyst Database option, but they will import data from
PI/Dwights databases. I have no experience with them, so I don’t really know what it
does.

Data Sources

Although you can pick up several templates and several Data Sources, you can’t select
any combination you want. For instance, you can’t build a project based on the PA
template and an ODBC data source. The next table shows the valid combinations.

Template Data Sources


Production Analyst Ascii Flat Files
GeoQuest Standard Ascii Flat Files
Company Standard Ascii Flat Files
Finder x.x ODBC Direct Connect

Page 278 ____________________________________ The OFM administrator handbook


ODBC Permanent Data Download
Company ODBC Standard ODBC Direct Connect
ODBC Permanent Data Download
User Defined Ascii Flat Files
ODBC Direct Connect
ODBC Permanent Data Download
Dwights PCD Detail Export File
PI98 Production Download Fixed-Format File

The OFM administrator handbook____________________________________ Page 279


Page 280 ____________________________________ The OFM administrator handbook
Chapter 9 - Back Allocation

Introduction

Back Allocation (BA) is an OFM optional module. Although the module is always installed
with the program, it has its own license and you have to order it as a separate product.
BA’s main function is to calculate and distribute some total measured production among
the entities (wells, completions, etc.) that contributed to it. A common example would
be a total production measured at a tank that comes from several wells. If you can’t
measure directly how much has been actually produced by each well, you can use back
allocation to calculate it.
The result will be the individual well production and it can be:

• Dumped into an ASCII file


• Dumped into an OFM ASCII load file
• Directly written back to OFM tables

Suppose you have a situation like the one in the following picture. All you have is the
periodically measured volume (shown in the graph) that goes into the tank. You don’t

know what percentage of this total come from each of the three wells.

The OFM administrator handbook____________________________________ Page 281


Of course, you need some information from the wells. For instance, the hours they have
been (each) opened per day and some coefficient to rate how good producers they are.
From that data, you want to calculate how much, each of the wells produced every day.
Obviously, these calculated productions added together must match, at all times, the
total40 that goes to the tank. Back Allocation does exactly that.

The previous paragraphs explained the problem that back allocation needs to solve. The
OFM proposed solution is based on three legs:

1. Individual Production Uptime


2. Total measured Production
3. Distribution Policy

The production uptime must be measured (or assumed) for every well. You need this
as an input data for the algorithm. For instance, if well A was shut in one day, obviously
the production that went into the tank that day came from wells B and C only. The
algorithm should allocate no production to A on that day because it was closed. The
total measured that day should be that one of B + C.

The total measured production is the amount of production that needs to be


allocated (distributed) among individual wells. In our example, it is the volume
measured daily at the tank. You need this as an input data for the algorithm.

Finally, the distribution policy is the key of the whole trick and it is where you have to
put all you effort and knowledge of your field. All the algorithm converges to what
percentage of the total production goes to each well and how OFM does this must be
properly analyzed and defined. OFM implements four different methods to implement a
distribution policy. You should pick up the one that best fits your particular case. Before
we go into the details of each of the individual techniques, let’s explain the simplest of
the back allocation algorithms.

Simple Back Allocation

The purpose of this section is not to explain how OFM does allocation, but guide you
through a numerical example to give you some idea of the job. Try to follow not only
the explanations but the numbers as well. The example is quite simple, with a small
number of wells.

The easiest distribution policy could be as simple as a numeric constant per well. For
example, suppose that somehow, you came to a set of numbers that rate your well
production. For instance: KH (layer width times layer permeability). These numbers

40
You can set up the back allocation to consider a custom difference between the total measured
and the sum of the allocated values. This is set with a shrinkage factor.

Page 282 ____________________________________ The OFM administrator handbook


could be anything else, as long as they are proportional to the desired final wells’
production. In our example, the constants we decided to use are:

Arbitrary allocation constants


A=80 B=21 C=69

Then, you can easily calculate that each well contributes to the total with a percentage
of:

Allocation Percentages
A=47% B=12% C=41%.

If the total per-day measured production at the tank was:

Total Volume Measured


17.0
19.0
18.5
18.5
16.0
16.0
16.0
16.0
18.5
19.5
19.5
20.3
18.8
18.8
11.3
11.0

Then you can easily allocate the production into each of the wells by calculating the
respective percentage from that total. The results will be something like:

Allocated volumes
Total A B C
17.0 7.99 2.04 6.97
19.0 8.93 2.28 7.79
18.5 8.70 2.21 7.59
18.5 8.70 2.21 7.59
16.0 7.52 1.92 6.56
16.0 7.52 1.92 6.56
16.0 7.52 1.92 6.56
16.0 7.52 1.92 6.56
18.5 8.70 2.21 7.59
19.5 9.17 2.33 8.00

The OFM administrator handbook____________________________________ Page 283


19.5 9.17 2.33 8.00
20.3 9.54 2.44 8.32
18.8 8.84 2.25 7.71
18.8 8.84 2.25 7.71
11.3 5.31 1.36 4.63
11.0 5.17 1.32 4.51

For example, the first A volume was calculated as the 47% of 17.
This is the most basic algorithm you can implement, but not the most accurate. As
mentioned before, you need to include the uptime to get closer to reality. Suppose that
on the last day, well A was closed. The total measured production (11.0) should be
distributed only among B and C. In our primitive solution, A got 5.17!

If you notice the results graph, you will see that the total production was actually

12.00

10.00
8.00 A
6.00 B
C
4.00
2.00

0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

distributed following the calculated individual percentages. All wells have the shape of
the measured production because they are just related by constants.

As mentioned before, you should use the individual well uptimes to get closer to real
life. Uptime is input data and you need to supply it. If you don’t have it available, OFM
can assume default values.

For our example, let’s assume that the uptime table is:

Production Uptime
A B C
24.0 19.2 16.8
24.0 19.2 21.6
24.0 14.4 21.6
24.0 14.4 21.6
21.0 0.0 21.6
21.0 0.0 21.6

Page 284 ____________________________________ The OFM administrator handbook


21.0 0.0 21.6
21.0 0.0 21.6
21.0 24.0 21.6
24.0 24.0 21.6
24.0 24.0 21.6
24.0 22.1 24.0
24.0 22.1 20.4
24.0 22.1 20.4
0.0 24.0 21.1
0.0 19.2 21.6

Look at the numbers closely. They represent the hours per day that each of the wells
was producing. If our algorithm honors this data, Well B should not get any production
during the days that it was opened 0 hours. The same goes for well A, the last two days
of the period.

We can build a complex allocation table based on the fixed percentages and the uptime.
This is what OFM calls theoretical values and it is just a new table, like the following
one:

Theoretical Values
A B C
11.3 2.3 6.89
11.3 2.3 8.86
11.3 1.73 8.86
11.3 1.73 8.86
9.87 0 8.86
9.87 0 8.86
9.87 0 8.86
9.87 0 8.86
9.87 2.88 8.86
11.3 2.88 8.86
11.3 2.88 8.86
11.3 2.65 9.84
11.3 2.65 8.36
11.3 2.65 8.36
0 2.88 8.66
0 2.3 8.86

This table contains a coefficient that not only honors the percentages but also the
uptimes. For instance, the first value for A was calculated as

11.3 = Allocation % * Uptime = 0.47 * 24

The same was done for each well, each day. As expected, for the dates where the
uptime was zero, the theoretical value was also zero.

The OFM administrator handbook____________________________________ Page 285


With this table, we can calculate another one with the percentages that each number
represents of the total. For example, on the first day (row) the total gives:

11.3 + 2.3 + 6.89 = 20.49

So each well’s percentage was:


A = 11.3/20.49 = 55.1%
B = 2.3/20.49 = 11.3%
C = 6.89/20.49 = 33.6%

If you do this for the complete allocating period, you get a table like:

Total A B C
17.0 55.14% 11.24% 33.61%
19.0 50.27% 10.27% 39.47%
18.5 51.59% 7.90% 40.50%
18.5 51.59% 7.90% 40.50%
16.0 52.71% 0.00% 47.29%
16.0 52.71% 0.00% 47.29%
16.0 52.71% 0.00% 47.29%
16.0 52.71% 0.00% 47.29%
18.5 45.68% 13.33% 40.99%
19.5 49.01% 12.51% 38.48%
19.5 49.01% 12.51% 38.48%
20.3 47.46% 11.15% 41.40%
18.8 50.60% 11.89% 37.52%
18.8 50.60% 11.89% 37.52%
11.3 0.00% 24.96% 75.04%
11.0 0.00% 20.65% 79.35%

The first column lists the measured (input data) production and the three other ones
show what percentage of this total each well gets for every day of the period. Notice
that the resulting percentage is zero for wells with zero hours of production.

The final calculation is now quite simple and is shown on the next table. The graph also
displays the result of the algorithm.

A B C
9.374 1.911 5.714
9.551 1.951 7.498
9.544 1.462 7.493
9.544 1.462 7.493
8.433 0.000 7.567
8.433 0.000 7.567
8.433 0.000 7.567
8.433 0.000 7.567
8.451 2.466 7.583

Page 286 ____________________________________ The OFM administrator handbook


9.557 2.440 7.503
9.557 2.440 7.503
9.633 2.263 8.404
9.512 2.234 7.053
9.512 2.234 7.053
0.000 2.820 8.480
0.000 2.271 8.729

Where 9.374 is the 55.14% of 17 and so on.

12

10

8
A
6 B
C
4

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Notice that now, the curves are not similar to the total because they are not only
proportional to the allocation constant but also to the uptime. When the uptime is zero,
they get no production.

Complex Back Allocation

I use the word complex, just to differentiate the next technique from the previous one.
This one is not difficult to understand and is the natural expansion of the simple back
allocation introduced before.

The technique explained before assumes that the allocation constants are exactly that:
constants. The only factor that was allowed to change was the uptime. OFM allows you
not only to specify a varying uptime, but also varying allocation constants.
The four different allocation options are related to different techniques of specifying how
these constants vary in time.

The OFM administrator handbook____________________________________ Page 287


For our previous example, suppose that the original factors vary somewhere in the
middle of the period. For instance:

Initial allocation constants


A=80 B=21 C=69

And after the eighth day, B goes from 21 to 40. Using this coefficient change, we can
obtain, that for the first week, the percentages are (as in the previous example):

Initial Allocation Percentages


A=47% B=12% C=41%.

However, after the B change, the numbers turn into:

Second period allocation constants


A=80 B=40 C=69

Second Period Allocation Percentages


A=42% B=21% C=37%.

Notice that this variation is independent from the uptime. A coefficient change could be,
for instance, due to some successful work-over performed on B, duplicating its
production.
The uptime has the same effect than before. If B is closed, B’s production will be zero.
However, when it produces, the volume that it gets should be double than before the
work over.

If you use this change in the allocation constants for our previous example, the resulting
numbers will be (different periods shown with different colors):

Theoretical Values
A B C
11.3 2.3 6.9
11.3 2.3 8.9
11.3 1.7 8.9
11.3 1.7 8.9
9.9 0.0 8.9
9.9 0.0 8.9
9.9 0.0 8.9
8.8 0.0 8.0
8.8 5.0 8.0
10.1 5.0 8.0
10.1 5.0 8.0
10.1 4.6 8.9
10.1 4.6 7.5
10.1 4.6 7.5
0.0 5.0 7.8

Page 288 ____________________________________ The OFM administrator handbook


0.0 4.0 8.0

Notice that the first part uses the original allocation constants and the correspondent
uptime. The numbers are the same as in our initial example. The other section (with
colored cells) uses the new coefficients and the theoretical values vary.

For instance, the first B theoretical volume was calculated as:

0.23 = Allocation % * Uptime = 0.12 * 19.2

However, for the second part of the table, the B percentage changes from 12% to
21%. The first non-zero value of B, in this new period was calculated as:

5.0 = Allocation % * Uptime = 0.21 * 24

Using these new theoretical volumes, we can calculate the new final allocation
percentages and calculate what part of the total goes to each well. The result is shown
on the next table:

Allocated Values
A B C
9.37 1.91 5.72
9.55 1.95 7.50
9.54 1.46 7.49
9.54 1.46 7.49
8.43 0.00 7.57
8.43 0.00 7.57
8.43 0.00 7.57
8.39 0.00 7.61
7.47 4.27 6.77
8.50 4.25 6.74
8.50 4.25 6.74
8.67 3.99 7.64
8.51 3.92 6.37
8.51 3.92 6.37
0.00 4.43 6.87
0.00 3.69 7.31

Notice that B actually doubled its allocated production and that A and C had decreased
them slightly to keep the total consistent with the measured values. The first section of
the table matches the previous example, but the second uses the new set of
coefficients. The graph displaying the allocated values is displayed in the next figure.

The OFM administrator handbook____________________________________ Page 289


12

10

8
A
6 B
C
4

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

OFM Back Allocation Module

The next section is based on the batest database supplied with the OFM installation. It
is under the OFM\Samples\BA folder. The idea is to work some examples trough, so
you can practice and run a back allocation job.

First of all, you need to understand how to load data to a Filter Category level. This was
explained on Chapter 3, under the Data levels extension - Group tables section. This
is important because the measured data that will be allocated back must be loaded to a
filter category. If you are not familiar with this, you should read the mentioned chapter,
specially that section before continuing.

The batest database has 9 wells that allocate their productions to two tanks. These
tanks are called POM (Point Of Measurement), so there are POM1 and POM2. These are
the points where production is measured daily

Wells are named POM1:01,…POM1:04, POM2:01,… POM2:05. The next figure displays a
general overview of the project’s basemap.

Page 290 ____________________________________ The OFM administrator handbook


There are tables on this project with some data loaded. The next paragraphs will
describe them:

• XY table: standard Static Master table.


• WELLTEST table: A sporadic table with well tests, which can be used for one of the
back allocation techniques.
• PRODTIME table: A daily table with the production uptime, in hours, per well.
• PRD table: A monthly table with monthly production data. We can ignore completely
this table for the exercise. If production is allocated to a monthly figure, then it could
be eventually loaded to this table but is not needed to run a job.
• FLOWSTATION table: this daily table contains the measured volumes at POM1 and
POM2. These are the values that will be allocated to the nine wells. The data there is
loaded to the Filter Category of FS (FlowStation) and it belongs to either POM1 of
POM2.
• EQUATIONS table: A sporadic table with well coefficients that can be used for the
other back allocation techniques.

The OFM administrator handbook____________________________________ Page 291


• DLYPROD table: A daily table with daily production data. We can ignore completely
this table for the exercise. If production is allocated to daily values, then they could
be eventually loaded to this table.

For the rest of this section, we will concentrate only on POM1. Because POMs are
independent, you can study them one at a time without problems. Remember that
anything that is explained for POM1 will have its equivalent for POM2.

The next figure displays the filter table of the project. Notice that it is here where you
define to which FlowStation (POM1 or POM2) each well is connected to. So, when OFM
back allocates the daily measure volume at POM1, it will be allocated to the first four
wells of the project (the ones with FS=POM1). Same applies to other FSs.

The demonstration will be done using the daily values for one month. Generally
speaking, OFM allocates one month at a time. The daily values measured on one month
could be then allocated to a daily table (one value per day, per well) or to a monthly
table (the result of the month, per well). The next tables show the values loaded to this
database for the important tables.

Flowstation daily table: These are the measured values that will be allocated among
the wells connected to POM1.

Page 292 ____________________________________ The OFM administrator handbook


FS: POM1

FLOWSTATION FLOWSTATION FLOWSTATION


OIL GAS WATER
DATE bbl Mcf bbl
---------- ------------ ------------ ------------
19980701 10000.0 5000.0 6000.0
19980702 10000.0 5000.0 6000.0
19980703 10000.0 5000.0 6000.0
19980704 10000.0 5000.0 6000.0
19980705 10000.0 5000.0 6000.0
19980706 10000.0 5000.0 6000.0
19980707 10000.0 5000.0 6000.0
19980708 10000.0 5000.0 6000.0
19980709 10000.0 5000.0 6000.0
19980710 10000.0 5000.0 6000.0
19980711 10000.0 5000.0 6000.0
19980712 10000.0 5000.0 6000.0
19980713 10000.0 5000.0 6000.0
19980714 10000.0 5000.0 6000.0
19980715 10000.0 5000.0 6000.0
19980716 10000.0 5000.0 6000.0
19980717 10000.0 5000.0 6000.0
19980718 10000.0 5000.0 6000.0
19980719 10000.0 5000.0 6000.0
19980720 10000.0 5000.0 6000.0
19980721 10000.0 5000.0 6000.0
19980722 10000.0 5000.0 6000.0
19980723 10000.0 5000.0 6000.0
19980724 10000.0 5000.0 6000.0
19980725 10000.0 5000.0 6000.0
19980726 10000.0 5000.0 6000.0
19980727 10000.0 5000.0 6000.0
19980728 10000.0 5000.0 6000.0
19980729 10000.0 5000.0 6000.0
19980730 10000.0 5000.0 6000.0
19980731 10000.0 5000.0 6000.0

Welltest sporadic table: This table contains different factors per well that change
sporadically. Only the wells from POM1 are listed.
POM1

XY WELLTEST WELLTEST WELLTEST WELLTEST WELLTEST WELLTEST


WELL DATE OIL GOR bsw STATUS THP
bbl cf/bbl psi
---------- ---------- ---------- ---------- ---------- ---------- ----------
POM1:01 19980506 2700 400.00 0.250 good 0.00
POM1:01 19980706 2600 400.00 0.280 ok 0.00
POM1:01 19980727 2550 425.00 0.300 bad 0.00
POM1:02 19980209 2350 450.00 0.320 g 0.00
POM1:02 19980701 2297 460.00 0.320 * 0.00
POM1:02 19980722 2269 462.00 0.330 * 0.00
POM1:03 19980101 2455 412.00 0.310 * 0.00
POM1:03 19980705 2455 426.00 0.260 1 0.00
POM1:04 19970628 2163 560.00 0.160 * 0.00
POM1:04 19980711 3160 319.00 0.360 good 0.00

ProdTime daily table: this table contains the uptime per well, in hours during the
month that will be allocated.

Date POM1:01 POM1:02 POM1:03 POM1:04


19980701 24 24 24 24
19980702 24 24 24 24
19980703 24 24 24 24

The OFM administrator handbook____________________________________ Page 293


19980704 24 24 24 24
19980705 24 24 24 24
19980706 24 24 24 24
19980707 24 24 24 24
19980708 24 24 24 24
19980709 24 24 24 24
19980710 24 24 24 24
19980711 24 24 24 24
19980712 24 24 24 24
19980713 24 24 24 24
19980714 24 24 24 24
19980715 24 24 24 24
19980716 24 24 24 8
19980717 24 24 24 8
19980718 24 18 24 8
19980719 24 18 24 8
19980720 24 18 24 8
19980721 22 18 24 0
19980722 21 18 24 0
19980723 24 18 24 0
19980724 24 18 24 24
19980725 24 18 24 24
19980726 24 18 24 24
19980727 18 18 24 24
19980728 8 18 24 24
19980729 6 24 24 24
19980730 0 24 24 24
19980731 24 24 24 24

Equations sporadic table: table with coefficients to implement the different BA


techniques.

XY EQUATIONS EQUATIONS EQUATIONS EQUATIONS EQUATIONS EQUATIONS EQUATIONS EQUATIONS


WELL DATE DI KH N QI REFDATE SLOPE Y0
DATE DATE
---------- ---------- --------- --------- --------- --------- ---------- --------- ---------
POM1:01 19980605 * 10.00 * * * * *
POM1:01 19980810 * 30.00 * * * * *

POM1:02 19980605 * 10.00 * * * * *


POM1:02 19980710 0.00 30.00 * 200.00 19980101 * *

POM1:03 19980605 * 20.00 * * * * *


POM1:03 19980710 0.00 30.00 * 200.00 19980101 * *

POM1:04 19980705 * 20.00 * * * * *


POM1:04 19980725 * 30.00 * * * * *

Having introduced the available data, we can summarize what our back allocation run
will do: the FLOWSTATION group daily table data for POM1 will be allocated to the
different wells (four) that are connected to it. The job will be done using uptime
information from the daily table PRODTIME. The allocation policy will be based on
extra data contained sporadic tables, either EQUATIONS or WELLTEST, depending on
the technique chosen. Finally, the results could be just reported, dumped into a ready-
to-load OFM ASCII file or written directly back to the OFM project tables.

Having explained the data in the batest project, we will run some back allocation jobs
and check the results.

Page 294 ____________________________________ The OFM administrator handbook


Back Allocation Using KH or Values

This is the first of the methods and resembles very much the examples we’ve been
talking about. The allocation constant comes from a sporadic table. In this example, the
variable that holds the constants is EQUATIONS.KH. Notice that whether this constant
is actually the KH of the well or any other rating number is irrelevant for OFM. This
constant will be used just as a weighting factor. Notice that because this constant comes
from a sporadic table, OFM will step its value along the month. In other words, the value
of the constant remains constant through the days until a new value appears in the
sporadic table.

For instance, looking at the equations table of the previous pages, we can say the for
POM1:02, the month we will allocate (July), will start with a value of 10 and stay
constant during the month. On August 10th, it will go to 30. So July will have a constant
value of 10.
For POM1:04, the first value (20) is given on July 5th. OFM will consider a zero value
until then, the keep it to 20 from July 5th to July 24th and then fix it at 30 from July 25th
onwards.

OFM calculated Back Allocation


To perform a back allocation run using KH data, follow the next steps.

Open the OFM\Samples\BA\batest.ofm project and select Analysis\Back


Allocation\Setup. The Back Allocation Setup window appears.

• On the first tab (Control), set up the correct date interval to allocate (the complete
month of July 1998).
• Select Daily Allocation, to generate daily data that can be later loaded to the
individual wells.
• Select Create Report and choose a file name. This file will be created with all the
information of the run. I had experienced some problems using long filenames with
spaces. If you don’t get your report file generated, choose a simple name.
• Select Create BA Input File and choose a file name. This file has a special syntax
and can be opened by OFM to recalculate an OFM BA run. All BA settings go there,
so it could be convenient to have one made. This is like a template of the run. If you
change some data (for instance, add a new KH value to tables), then you can open
this file to quickly recalculate the run. OFM automatically runs the case when you
open the file. There is nothing else to do. Just open and close it.
• Fill up the Report Header lines with some descriptive information. This will be used
to describe the run in the report file.

The OFM administrator handbook____________________________________ Page 295


• On the second tab (Measurements), you need to specify where is the measured
data (the FLOSWSTATION.xxx variables). Notice that you also specify the Filter
category (Point of Measurement) used to identify wells and the variables that
contain the data loaded to the selected filter category. Select FS filter category, as
shown in the next figure.

Page 296 ____________________________________ The OFM administrator handbook


• Notice also that there is a Shrinkage factor. If you leave it to 0, the addition of the
allocated data will match the data loaded. If you specify a certain value (for
instance, 0.9), then the total addition will be only a percentage of the measured
value (90%, for 0.1).
• The next step is to tell OFM where to get the production uptime. This is done in the
Production Times tab. Select there the variable with the production times. Notice
also some other settings. If your time is not hours opened but hours closed, the you
can still use this data, but you need to check the Down Time option. With this
option checked, a value of 4 will be interpreted as 20 hours of production.

• The Status options lets you specify an “on” or “off” status from a sporadic table.
OFM will consider only the days within an “on” status and allocate zero production to
the well during the “off” periods.
• You can also specify a default value for the uptime. This can be used in combination
with the Status options, so you can build a production schedule with the status and
default uptime hours value.
• Once you set this tab as shown, proceed to the next one.
• The Welltest tab is used when you want to allocate production based on well test
data. We are not using that data now, so make sure you clear all settings with the
Clear All button. Your tab should look like in the next figure.
• Go to the Equations tab and also clear all settings using the Clear All button.
Because our allocation policy will be just based on the coefficients (KH or Value) of
the EQUATIONS.KH variable, set that one as displayed in the figure. You need to
also set the variable that contains the date when these constants need to be applied,
so OFM can create a step function properly. Make sure you set the Date properly, as
shown in the figure (EQUATIONS.DATE).

The OFM administrator handbook____________________________________ Page 297


• Finally, select the last tab (Write back to OFM) and select Clear All. This tab is
used in the cases where the BA needs to know the tables that will receive the data.
This is needed in two cases and both are set in the Control tab:
1. When you select Write back to OFM, the algorithm needs to know what tables
will be receiving the data. Then, you will have to set this tab.
2. When you select Create OFM Load File, the file contains commands (such as
*TABLENAME xxx) etc, and OFM needs to know what tables will be receiving the
data. Then, you will have to set this tab.
Because we have not selected any of these options, we can clear the last tab, as
shown in the picture above.
• Once you click OK, OFM runs the back allocation job using the specified data. When
its finished, it opens a window with the results. The window is split in two panels.
The left-hand side is to navigate through the data and the right-hand side panel
displays the selection. The next figure displays the results of the data allocated to

Page 298 ____________________________________ The OFM administrator handbook


POM1:02. You can navigate the results and perform a quick check. This window

opens once, after the job. If you close it, the only way to recover it is to re-run the
job. However, because we selected to create a report file, all this information is also
in this file, which can be opened with any text editor.

Manually Calculated Back Allocation


This section will show you the steps that OFM did to reach the previous results. It will
also display a comparison between the manual and OFM calculations and explain the
differences. The explanation will be done only for POM1 and the oil phase. The gas and
water numbers are got in the same way. If you follow this section, you should be able to
completely understand what OFM does, interpret the report file and understand and
check its results.

First of all, we will display all input data in tables, so you can reference them while
following the explanations.
The first table displays the input uptime and sporadic KH values. Notice that the KH
constant has been stepped by OFM as stated before. The KH keeps its value until a new
one is specified. Notice also the zero values for POM1:04. There was no previous value,
so zero was assumed until a new value was loaded (July 5th).

Input KH and Uptime values


Date POM1:01 POM1:02 POM1:03 POM1:04 POM1
KH Uptime KH Uptime KH Uptime KH Uptime Measured OIL
Previous 10 10 20 ?
19980701 10 24 10 24 20 24 0 24 10000
19980702 10 24 10 24 20 24 0 24 10000
19980703 10 24 10 24 20 24 0 24 10000

The OFM administrator handbook____________________________________ Page 299


19980704 10 24 10 24 20 24 0 24 10000
19980705 10 24 10 24 20 24 20 24 10000
19980706 10 24 10 24 20 24 20 24 10000
19980707 10 24 10 24 20 24 20 24 10000
19980708 10 24 10 24 20 24 20 24 10000
19980709 10 24 10 24 20 24 20 24 10000
19980710 10 24 30 24 30 24 20 24 10000
19980711 10 24 30 24 30 24 20 24 10000
19980712 10 24 30 24 30 24 20 24 10000
19980713 10 24 30 24 30 24 20 24 10000
19980714 10 24 30 24 30 24 20 24 10000
19980715 10 24 30 24 30 24 20 24 10000
19980716 10 24 30 24 30 24 20 8 10000
19980717 10 24 30 24 30 24 20 8 10000
19980718 10 24 30 18 30 24 20 8 10000
19980719 10 24 30 18 30 24 20 8 10000
19980720 10 24 30 18 30 24 20 8 10000
19980721 10 22 30 18 30 24 20 0 10000
19980722 10 21 30 18 30 24 20 0 10000
19980723 10 24 30 18 30 24 20 0 10000
19980724 10 24 30 18 30 24 20 24 10000
19980725 10 24 30 18 30 24 30 24 10000
19980726 10 24 30 18 30 24 30 24 10000
19980727 10 18 30 18 30 24 30 24 10000
19980728 10 8 30 18 30 24 30 24 10000
19980729 10 6 30 24 30 24 30 24 10000
19980730 10 0 30 24 30 24 30 24 10000
19980731 10 24 30 24 30 24 30 24 10000

With this data, OFM calculates the theoretical values, which are just the multiplication
of KH and the percentage of uptime. The next table displays the results of these
calculations.
OFM Theoretical Values

Date POM1:01 POM1:02 POM1:03 POM1:04


19980701 10.00 10.00 20.00 0.00
19980702 10.00 10.00 20.00 0.00
19980703 10.00 10.00 20.00 0.00
19980704 10.00 10.00 20.00 0.00
19980705 10.00 10.00 20.00 20.00
19980706 10.00 10.00 20.00 20.00
19980707 10.00 10.00 20.00 20.00
19980708 10.00 10.00 20.00 20.00
19980709 10.00 10.00 20.00 20.00
19980710 10.00 30.00 30.00 20.00
19980711 10.00 30.00 30.00 20.00
19980712 10.00 30.00 30.00 20.00
19980713 10.00 30.00 30.00 20.00
19980714 10.00 30.00 30.00 20.00
19980715 10.00 30.00 30.00 20.00
19980716 10.00 30.00 30.00 6.67

Page 300 ____________________________________ The OFM administrator handbook


19980717 10.00 30.00 30.00 6.67
19980718 10.00 22.50 30.00 6.67
19980719 10.00 22.50 30.00 6.67
19980720 10.00 22.50 30.00 6.67
19980721 9.17 22.50 30.00 0.00
19980722 8.75 22.50 30.00 0.00
19980723 10.00 22.50 30.00 0.00
19980724 10.00 22.50 30.00 20.00
19980725 10.00 22.50 30.00 30.00
19980726 10.00 22.50 30.00 30.00
19980727 7.50 22.50 30.00 30.00
19980728 3.33 22.50 30.00 30.00
19980729 2.50 30.00 30.00 30.00
19980730 0.00 30.00 30.00 30.00
19980731 10.00 30.00 30.00 30.00

Notice that these values are calculated, normalizing them against a 24 hours day, as

Theoretical value = KH * Uptime / 24

Using these theoretical values, you can calculate a percentage table, where each cell will
have the percentage of the total that each of these theoretical KH values represent. For
instance, in the first day, we can calculate:

OFM Theoretical Values


Date POM1:01 POM1:02 POM1:03 POM1:04
19980701 10.00 10.00 20.00 0.00

Allocated Percentages
Date POM1:01 POM1:02 POM1:03 POM1:04
19980701 25% 25% 50% 0%

If you do that for the complete month period, the table you get is like the following one:

Allocated Percentages
POM1
Date POM1:01 POM1:02 POM1:03 POM1:04 OIL
19980701 25% 25% 50% 0% 10000
19980702 25% 25% 50% 0% 10000
19980703 25% 25% 50% 0% 10000
19980704 25% 25% 50% 0% 10000
19980705 17% 17% 33% 33% 10000
19980706 17% 17% 33% 33% 10000
19980707 17% 17% 33% 33% 10000
19980708 17% 17% 33% 33% 10000
19980709 17% 17% 33% 33% 10000
19980710 11% 33% 33% 22% 10000
19980711 11% 33% 33% 22% 10000
19980712 11% 33% 33% 22% 10000
19980713 11% 33% 33% 22% 10000

The OFM administrator handbook____________________________________ Page 301


19980714 11% 33% 33% 22% 10000
19980715 11% 33% 33% 22% 10000
19980716 13% 39% 39% 9% 10000
19980717 13% 39% 39% 9% 10000
19980718 14% 33% 43% 10% 10000
19980719 14% 33% 43% 10% 10000
19980720 14% 33% 43% 10% 10000
19980721 15% 36% 49% 0% 10000
19980722 14% 37% 49% 0% 10000
19980723 16% 36% 48% 0% 10000
19980724 12% 27% 36% 24% 10000
19980725 11% 24% 32% 32% 10000
19980726 11% 24% 32% 32% 10000
19980727 8% 25% 33% 33% 10000
19980728 4% 26% 35% 35% 10000
19980729 3% 32% 32% 32% 10000
19980730 0% 33% 33% 33% 10000
19980731 10% 30% 30% 30% 10000

Now, simply allocating the calculated percentage of the measured value (displayed on
the last column) to each well, each date, you get the final manual results:

Manually Calculated Allocated Values

Date POM1:01 POM1:02 POM1:03 POM1:04


19980701 2500.0 2500.0 5000.0 0.0
19980702 2500.0 2500.0 5000.0 0.0
19980703 2500.0 2500.0 5000.0 0.0
19980704 2500.0 2500.0 5000.0 0.0
19980705 1666.7 1666.7 3333.3 3333.3
19980706 1666.7 1666.7 3333.3 3333.3
19980707 1666.7 1666.7 3333.3 3333.3
19980708 1666.7 1666.7 3333.3 3333.3
19980709 1666.7 1666.7 3333.3 3333.3
19980710 1111.1 3333.3 3333.3 2222.2
19980711 1111.1 3333.3 3333.3 2222.2
19980712 1111.1 3333.3 3333.3 2222.2
19980713 1111.1 3333.3 3333.3 2222.2
19980714 1111.1 3333.3 3333.3 2222.2
19980715 1111.1 3333.3 3333.3 2222.2
19980716 1304.3 3913.0 3913.0 869.6
19980717 1304.3 3913.0 3913.0 869.6
19980718 1445.8 3253.0 4337.3 963.9
19980719 1445.8 3253.0 4337.3 963.9
19980720 1445.8 3253.0 4337.3 963.9
19980721 1486.5 3648.6 4864.9 0.0
19980722 1428.6 3673.5 4898.0 0.0
19980723 1600.0 3600.0 4800.0 0.0
19980724 1212.1 2727.3 3636.4 2424.2
19980725 1081.1 2432.4 3243.2 3243.2
19980726 1081.1 2432.4 3243.2 3243.2
19980727 833.3 2500.0 3333.3 3333.3

Page 302 ____________________________________ The OFM administrator handbook


19980728 388.3 2621.4 3495.1 3495.1
19980729 270.3 3243.2 3243.2 3243.2
19980730 0.0 3333.3 3333.3 3333.3
19980731 1000.0 3000.0 3000.0 3000.0

Differences between the manual and OFM calculation


“Measure with a micrometer, mark with a piece of chalk and cut with an axe”. This is a
very well known phrase in the oil industry. No matter how accurate you are in your
calculations. At the end, all is based on based on measurements that are far from being
perfectly accurate. In back allocation calculations, total allocated data will have to match
the one measured. Remember that your data will be loaded to variables that have finite
precision, so there is no way to store the exact results of a manual calculation to OFM
and get the addition to match the measured value. At one point, you need to round off
the values.

Rounding off numbers and keeping its addition under control is not that trivial. You can’t
just apply a simple rounding algorithm because all numbers will be rounded off the
same way and the addition will not match. For instance, say you have these three exact
values:

16.6666…
16.6666…
66.6666…

Added together, they are equal to 100. If you decide to round to one decimal, then you
might end up with:

16.7
16.7
66.7

But now, added together equal 100.1, not 100. This will introduce undesired errors!

OFM has a particular way of rounding the BA result values. It takes the smaller numbers
and truncates the decimals. Finally, it will adjust the bigger value to create a proper final
result. In our three numbers previous example, OFM will adjust the values to:

16.6
16.6
66.8

Now the addition gives the correct number: 100. That’s how OFM rounds off the back
allocation result numbers.

By default, OFM produces allocated values with no decimals. The following table displays
the manual and OFM calculations. Notice that OFM rounded off the decimals following
the explained rounding procedure.

The OFM administrator handbook____________________________________ Page 303


Manual Calculation OFM Calculation
POM1-01 POM1-02 POM1-03 POM1-04 POM1-01 POM1-02 POM1-03 POM1-04
2500.00 2500.00 5000.00 0.00 2500.00 2500.00 5000.00 0.00
2500.00 2500.00 5000.00 0.00 2500.00 2500.00 5000.00 0.00
2500.00 2500.00 5000.00 0.00 2500.00 2500.00 5000.00 0.00
2500.00 2500.00 5000.00 0.00 2500.00 2500.00 5000.00 0.00
1666.67 1666.67 3333.33 3333.33 1666.00 1666.00 3335.00 3333.00
1666.67 1666.67 3333.33 3333.33 1666.00 1666.00 3335.00 3333.00
1666.67 1666.67 3333.33 3333.33 1666.00 1666.00 3335.00 3333.00
1666.67 1666.67 3333.33 3333.33 1666.00 1666.00 3335.00 3333.00
1666.67 1666.67 3333.33 3333.33 1666.00 1666.00 3335.00 3333.00
1111.11 3333.33 3333.33 2222.22 1111.00 3334.00 3333.00 2222.00
1111.11 3333.33 3333.33 2222.22 1111.00 3334.00 3333.00 2222.00
1111.11 3333.33 3333.33 2222.22 1111.00 3334.00 3333.00 2222.00
1111.11 3333.33 3333.33 2222.22 1111.00 3334.00 3333.00 2222.00
1111.11 3333.33 3333.33 2222.22 1111.00 3334.00 3333.00 2222.00
1111.11 3333.33 3333.33 2222.22 1111.00 3334.00 3333.00 2222.00
1304.35 3913.04 3913.04 869.57 1304.00 3914.00 3913.00 869.00
1304.35 3913.04 3913.04 869.57 1304.00 3914.00 3913.00 869.00
1445.78 3253.01 4337.35 963.86 1445.00 3253.00 4339.00 963.00
1445.78 3253.01 4337.35 963.86 1445.00 3253.00 4339.00 963.00
1445.78 3253.01 4337.35 963.86 1445.00 3253.00 4339.00 963.00
1486.49 3648.65 4864.86 0.00 1486.00 3648.00 4866.00 0.00
1428.57 3673.47 4897.96 0.00 1428.00 3673.00 4899.00 0.00
1600.00 3600.00 4800.00 0.00 1600.00 3600.00 4800.00 0.00
1212.12 2727.27 3636.36 2424.24 1212.00 2727.00 3637.00 2424.00
1081.08 2432.43 3243.24 3243.24 1081.00 2432.00 3244.00 3243.00
1081.08 2432.43 3243.24 3243.24 1081.00 2432.00 3244.00 3243.00
833.33 2500.00 3333.33 3333.33 833.00 2500.00 3334.00 3333.00
388.35 2621.36 3495.15 3495.15 388.00 2621.00 3496.00 3495.00
270.27 3243.24 3243.24 3243.24 270.00 3244.00 3243.00 3243.00
0.00 3333.33 3333.33 3333.33 0.00 3334.00 3333.00 3333.00
1000.00 3000.00 3000.00 3000.00 1000.00 3000.00 3000.00 3000.00

As mentioned before, the explanation followed the oil phase. For gas or water, OFM
applies the same ideas.

Back Allocation Files


The report file (*.prn) created by the back allocation run contains a detailed
explanation of all the numbers, including the theoretical values, the results of stepping
the coefficients, uptimes used and the results. It also provides some factors, which are
just the relation between the numbers. The report file is the major source for verifying
the results of a run. Get used to generate one when you run a BA job.

The back allocation file (*.ba) is an ASCII file with all the commands needed by OFM
to perform a back allocation run. This purpose of this file is to quickly run (or repeat) an
unattended job. You create it by running a BA job and the, by just opening it again,
OFM repeats the run.
Normally, you should not touch this file because corrupting it can easily produce a
program crash. However, there is a very interesting parameter there called precision. By
default, the *.ba file says:

*Precision 0

Page 304 ____________________________________ The OFM administrator handbook


If you edit the file and change precision to 1, then the rounding algorithm will consider
one decimal in the final values. It is a pity that you can’t set this from some other place
but if you want you allocated numbers with one decimal, just do the following steps:

• Run your back allocation job as normal and ask OFM to create a BA file. OFM runs
the job, produces the results and the *.ba file.
• Open this file with a good text editor and change the precision from 0 to 1
• Open this modified file with OFM (Analysis/Back Allocation/Open…). OFM will
re run the complete back allocation job, but using the new precision.

You can’t set any number of decimals. It is zero by default and you can change it to 1.

Back Allocation Using Well Test data

This is the second method and resembles very much the previous one. However, when
you use KH or a Value, the same allocation constant applies to all produced or injected
phases (oil, gas, steam or water). When you use well test data, you can specify different
values for different phases, so it requires more data but gives you more control over the
final allocated values.

The allocation test data usually comes from a sporadic table. In this example, the
variables are different for each phase. For oil, is WELLTEST.OIL, for gas
WELLTEST.GAS and for water is WELLTEST.WATER. These values are sporadic and
handled the same way the KH constant was: The values are used to build a step
function that changes when a new value is found. To specify the dates of these sporadic
test values, you need to set also the correspondent date variable. For our case, is
WELLTEST.DATE.

With this method, there is also another control tool and it is the possibility of discarding
test data, based on its quality. If you suspect that some values are wrong, then you
can exclude them from the run and ignore them as if they were not there. In order to do
this, you need an extra column in the well test table to “certify” the quality of each test.
In our example, this column will be WELLTEST.STATUS. This kind of data can’t be
anything. OFM expects some pre-defined values to consider a test as valid. Some of the
values that OFM will interpret as a good test are:

• “good”
• “g”
• “ok”
• “1”

Almost anything else will be taken as bad and ignored.


The next scroll reproduces the contents of the well test table we are about to use:

The OFM administrator handbook____________________________________ Page 305


XY WELLTEST WELLTEST WELLTEST WELLTEST WELLTEST WELLTEST
WELL DATE OIL GOR bsw STATUS THP
bbl cf/bbl psi
---------- ---------- ---------- ---------- ---------- ---------- ----------
POM1:01 19980506 2700 400.00 0.250 good 0.00
POM1:01 19980706 2600 400.00 0.280 ok 0.00
POM1:01 19980727 2550 425.00 0.300 bad 0.00
POM1:02 19980209 2350 450.00 0.320 g 0.00
POM1:02 19980701 2297 460.00 0.320 * 0.00
POM1:02 19980722 2269 462.00 0.330 * 0.00
POM1:03 19980101 2455 412.00 0.310 * 0.00
POM1:03 19980705 2455 426.00 0.260 1 0.00
POM1:04 19970628 2163 560.00 0.160 * 0.00
POM1:04 19980711 3160 319.00 0.360 good 0.00

Notice that whether these values are actually the test values of the well or any other
rating system is equivalent for OFM. These constants will be used just as a weighting
factor, but this time, one per phase. Notice that because they come from a sporadic
table, OFM will step its values along the month. In other words, the value of the
constant remains constant through the days until a new value (of good quality) appears
in the sporadic table.

Consider the oil phase, for instance. For POM1:01, the month we will allocate (July), will
start with a value of 2700 and on July 6th, it will go to 2600. There is another test on
July (2550 on July 27th), but it is considered bad and OFM will ignore it. The value of
2600 will be maintained until the end of the month.

For POM1:03, the first value (2455) is given on January 1st. However, because the test is
bas (“*”), OFM will consider a zero value until the next valid one, on July 5th.

OFM calculated Back Allocation


To perform a back allocation run using well test data, follow the next steps.

Open the OFM\Samples\BA\batest.ofm project and select Analysis\Back


Allocation\Setup. The next Back Allocation Setup window appears.

• On the first tab (Control), set up the correct date interval to allocate (the complete
month of July 1998).
• Select Daily Allocation, to generate daily data that can be later loaded to the
individual wells.
• Select Create Report and choose a file name. This file will be created with all the
information of the run.
• Select Create BA Input File and choose a file name. This file has a special syntax
and can be opened by OFM to recalculate an OFM BA run. All BA settings go there,
so it could be convenient to have one made. This is like a template of the run. If you
change some data (for instance, change some well test value), then you can open
this file to quickly recalculate the run. OFM automatically runs the case when you
open the file. There is nothing else to do. Just open and close it.
• Fill up the Report Header lines with some descriptive information. This will be used
to describe the run in the report file.

Page 306 ____________________________________ The OFM administrator handbook


• On the second tab (Measurements), you need to specify where is the measured
data (FLOWSTATION.xxx). Notice that you specify the Filter category (Point of
Measurement) used to identify wells and the variables that contain the data loaded
to the selected filter category. This part is equivalent to our previous example. Select
FS and the rest of the variables as shown in the next figure.

The OFM administrator handbook____________________________________ Page 307


• Notice also that there is a Shrinkage factor. If you leave it to 0, the addition of the
allocated data will match the data loaded. If you specify a certain value (for
instance, 0.9), then the total addition will be only a percentage of the measured
value (90% for 0.9).
• The next step is to tell OFM where to get the production uptime. This is done in the
Production Times tab. Select there the variable with the production times. Notice
also some other settings. If your time is not hours opened but hours closed, the you
can still use this data, but you need to check the Down Time option. With this
option checked, a value of 4 will be interpreted as 20 hours of production.

• The Status options lets you specify an “on” or “off” status from a sporadic table.
OFM will consider only the days within an “on” status and allocate zero production to
the well during the “off” periods.
• You can also specify a default value for the uptime. This can be used in combination
with the Status options, so you can build a production schedule with the status and
default uptime hours value.
• Once you set this tab as shown, proceed to the WellTest one. Here is the tab
where you specify where is your well test data. Notice the settings I have done in
the example window. The welltest.date and welltest.status columns provide the
date and quality of the test. The rates are provided by the welltest.oil,
welltest.gor and welltest.bsw variables.
• Notice that you can specify the gas either as a rate or as a ratio (in this case, we
used a ratio so GOR must be checked).
• The same applies to the water, where you can specify it as a rate or bsw/fraction. In
this case, the water is given as bsw and fraction, so check both.

Page 308 ____________________________________ The OFM administrator handbook


• The Equations tab is used when you want to allocate production based on other
methods. We are not using those now, so make sure you clear all settings with the
Clear All button. Your tab should look like in the next figure.

• Finally, select the last tab (Write back to OFM) and select Clear All. This tab is
used in the cases where the BA needs to know the tables that will receive the data.
This is needed in two cases and both are set in the Control tab:
3. When you select Write back to OFM, the algorithm needs to know what tables
will be receiving the data.
4. When you select Create OFM Load File, the file contains commands (such as
*TABLENAME xxx) etc, and OFM needs to know what tables will be receiving the
data.

The OFM administrator handbook____________________________________ Page 309


Because we have not selected any of these options, we can clear the last tab, as
shown in the picture above.
• Once you click OK, OFM runs the back allocation job using the specified data. When
its finished, it opens a window with the results. The window is split in two panels.
The left-hand side is to navigate through the data and the right-hand side panel
displays the selection. The next figure displays the results of the data allocated to
POM1:01.

• You can navigate the results and perform a quick check. This window opens once,
after the job. If you close it, the only way to recover it is to re-run the job. However,
because we selected to create a report file, all this information is also in this file,
which can be opened with any text editor.

Manual Calculated Back Allocation


This section will show you the steps that OFM did to reach the previous results. It will
also display a comparison between the manual and OFM calculations. The explanation
will be done only for POM1 and the oil phase. The gas and water numbers are obtained
in the same way.

First of all, we will display all input data in tables. Notice that the WELLTEST.OIL
value has been stepped by OFM as stated before. The WELLTEST.OIL keeps its value
until a new (and valid) one is specified.
Notice also in this table, that bad test data (such as the one for POM1:01 of July 27th)
has been ignored.

Stepped (and quality checked) test data


Date POM1:01 POM1:02 POM1:03 POM1:04
Oil Uptime Oil Uptime Oil Uptime Oil Uptime

Page 310 ____________________________________ The OFM administrator handbook


Previous 2700 2350 ? ?
19980701 2700 24 2350 24 0 24 0 24
19980702 2700 24 2350 24 0 24 0 24
19980703 2700 24 2350 24 0 24 0 24
19980704 2700 24 2350 24 0 24 0 24
19980705 2700 24 2350 24 2455 24 0 24
19980706 2600 24 2350 24 2455 24 0 24
19980707 2600 24 2350 24 2455 24 0 24
19980708 2600 24 2350 24 2455 24 0 24
19980709 2600 24 2350 24 2455 24 0 24
19980710 2600 24 2350 24 2455 24 0 24
19980711 2600 24 2350 24 2455 24 3160 24
19980712 2600 24 2350 24 2455 24 3160 24
19980713 2600 24 2350 24 2455 24 3160 24
19980714 2600 24 2350 24 2455 24 3160 24
19980715 2600 24 2350 24 2455 24 3160 24
19980716 2600 24 2350 24 2455 24 3160 8
19980717 2600 24 2350 24 2455 24 3160 8
19980718 2600 24 2350 18 2455 24 3160 8
19980719 2600 24 2350 18 2455 24 3160 8
19980720 2600 24 2350 18 2455 24 3160 8
19980721 2600 22 2350 18 2455 24 3160 0
19980722 2600 21 2350 18 2455 24 3160 0
19980723 2600 24 2350 18 2455 24 3160 0
19980724 2600 24 2350 18 2455 24 3160 24
19980725 2600 24 2350 18 2455 24 3160 24
19980726 2600 24 2350 18 2455 24 3160 24
19980727 2600 18 2350 18 2455 24 3160 24
19980728 2600 8 2350 18 2455 24 3160 24
19980729 2600 6 2350 24 2455 24 3160 24
19980730 2600 0 2350 24 2455 24 3160 24
19980731 2600 24 2350 24 2455 24 3160 24

With this data, OFM calculates the theoretical values, which are just the multiplication
of the test oil value and the percentage of uptime. The next table displays the results of
these calculations.

Theoretical Values
Date POM1:01 POM1:02 POM1:03 POM1:04
Oil Oil Oil Oil
19980701 2700.00 2350.00 0.00 0.00
19980702 2700.00 2350.00 0.00 0.00
19980703 2700.00 2350.00 0.00 0.00
19980704 2700.00 2350.00 0.00 0.00
19980705 2700.00 2350.00 2455.00 0.00
19980706 2600.00 2350.00 2455.00 0.00
19980707 2600.00 2350.00 2455.00 0.00
19980708 2600.00 2350.00 2455.00 0.00
19980709 2600.00 2350.00 2455.00 0.00
19980710 2600.00 2350.00 2455.00 0.00

The OFM administrator handbook____________________________________ Page 311


19980711 2600.00 2350.00 2455.00 3160.00
19980712 2600.00 2350.00 2455.00 3160.00
19980713 2600.00 2350.00 2455.00 3160.00
19980714 2600.00 2350.00 2455.00 3160.00
19980715 2600.00 2350.00 2455.00 3160.00
19980716 2600.00 2350.00 2455.00 1053.33
19980717 2600.00 2350.00 2455.00 1053.33
19980718 2600.00 1762.50 2455.00 1053.33
19980719 2600.00 1762.50 2455.00 1053.33
19980720 2600.00 1762.50 2455.00 1053.33
19980721 2383.33 1762.50 2455.00 0.00
19980722 2275.00 1762.50 2455.00 0.00
19980723 2600.00 1762.50 2455.00 0.00
19980724 2600.00 1762.50 2455.00 3160.00
19980725 2600.00 1762.50 2455.00 3160.00
19980726 2600.00 1762.50 2455.00 3160.00
19980727 1950.00 1762.50 2455.00 3160.00
19980728 866.67 1762.50 2455.00 3160.00
19980729 650.00 2350.00 2455.00 3160.00
19980730 0.00 2350.00 2455.00 3160.00
19980731 2600.00 2350.00 2455.00 3160.00

Notice that these values are calculated as

Theoretical value = WELLTEST.OIL * Uptime / 24

Using these theoretical values, you can calculate a percentage table, where each cell will
have the percentage of the total that each of these theoretical oil values represent. For
instance, in the first day, we can calculate:

Theoretical Values
Date POM1:01 POM1:02 POM1:03 POM1:04
19980701 2700.00 2350.00 0.00 0.00

Allocated Percentages
Date POM1:01 POM1:02 POM1:03 POM1:04
19980701 53% 47% 0% 0%

If you do that for the complete period, the table you get is like the following one:

Allocated percentages
Date POM1:01 POM1:02 POM1:03 POM1:04 POM1
Oil Oil Oil Oil Oil
19980701 53% 47% 0% 0% 10000
19980702 53% 47% 0% 0% 10000
19980703 53% 47% 0% 0% 10000
19980704 53% 47% 0% 0% 10000
19980705 36% 31% 33% 0% 10000

Page 312 ____________________________________ The OFM administrator handbook


19980706 35% 32% 33% 0% 10000
19980707 35% 32% 33% 0% 10000
19980708 35% 32% 33% 0% 10000
19980709 35% 32% 33% 0% 10000
19980710 35% 32% 33% 0% 10000
19980711 25% 22% 23% 30% 10000
19980712 25% 22% 23% 30% 10000
19980713 25% 22% 23% 30% 10000
19980714 25% 22% 23% 30% 10000
19980715 25% 22% 23% 30% 10000
19980716 31% 28% 29% 12% 10000
19980717 31% 28% 29% 12% 10000
19980718 33% 22% 31% 13% 10000
19980719 33% 22% 31% 13% 10000
19980720 33% 22% 31% 13% 10000
19980721 36% 27% 37% 0% 10000
19980722 35% 27% 38% 0% 10000
19980723 38% 26% 36% 0% 10000
19980724 26% 18% 25% 32% 10000
19980725 26% 18% 25% 32% 10000
19980726 26% 18% 25% 32% 10000
19980727 21% 19% 26% 34% 10000
19980728 11% 21% 30% 38% 10000
19980729 8% 27% 28% 37% 10000
19980730 0% 30% 31% 40% 10000
19980731 25% 22% 23% 30% 10000

Now, simply allocating the calculated percentage of the measured value (shown on the
last column) to each well, each date, you get the final manual results:

Manually Calculated Allocated Volumes


Date POM1:01 POM1:02 POM1:03 POM1:04
Oil Oil Oil Oil
19980701 5346.53 4653.47 0.00 0.00
19980702 5346.53 4653.47 0.00 0.00
19980703 5346.53 4653.47 0.00 0.00
19980704 5346.53 4653.47 0.00 0.00
19980705 3597.60 3131.25 3271.15 0.00
19980706 3511.14 3173.53 3315.33 0.00
19980707 3511.14 3173.53 3315.33 0.00
19980708 3511.14 3173.53 3315.33 0.00
19980709 3511.14 3173.53 3315.33 0.00
19980710 3511.14 3173.53 3315.33 0.00
19980711 2460.96 2224.33 2323.71 2991.01
19980712 2460.96 2224.33 2323.71 2991.01

The OFM administrator handbook____________________________________ Page 313


19980713 2460.96 2224.33 2323.71 2991.01
19980714 2460.96 2224.33 2323.71 2991.01
19980715 2460.96 2224.33 2323.71 2991.01
19980716 3073.89 2778.33 2902.46 1245.32
19980717 3073.89 2778.33 2902.46 1245.32
19980718 3303.34 2239.28 3119.11 1338.27
19980719 3303.34 2239.28 3119.11 1338.27
19980720 3303.34 2239.28 3119.11 1338.27
19980721 3610.66 2670.12 3719.23 0.00
19980722 3504.04 2714.67 3781.29 0.00
19980723 3813.71 2585.26 3601.03 0.00
19980724 2605.86 1766.47 2460.54 3167.13
19980725 2605.86 1766.47 2460.54 3167.13
19980726 2605.86 1766.47 2460.54 3167.13
19980727 2090.59 1889.57 2632.00 3387.83
19980728 1051.25 2137.88 2977.86 3833.01
19980729 754.50 2727.80 2849.68 3668.02
19980730 0.00 2950.41 3082.23 3967.36
19980731 2460.96 2224.33 2323.71 2991.01

Differences between the manual and OFM calculation


The same discussion done for the previous method applies here. OFM needs to round
off the values and it does the same way we explained before. To complete this section,
we display the final comparison table.

Manual Calculation OFM Calculation


POM1-01 POM1-02 POM1-03 POM1-04 POM1-01 POM1-02 POM1-03 POM1-04
5346.53 4653.47 0.00 0.00 5347.00 4653.00 0.00 0.00
5346.53 4653.47 0.00 0.00 5347.00 4653.00 0.00 0.00
5346.53 4653.47 0.00 0.00 5347.00 4653.00 0.00 0.00
5346.53 4653.47 0.00 0.00 5347.00 4653.00 0.00 0.00
3597.60 3131.25 3271.15 0.00 3598.00 3131.00 3271.00 0.00
3511.14 3173.53 3315.33 0.00 3512.00 3173.00 3315.00 0.00
3511.14 3173.53 3315.33 0.00 3512.00 3173.00 3315.00 0.00
3511.14 3173.53 3315.33 0.00 3512.00 3173.00 3315.00 0.00
3511.14 3173.53 3315.33 0.00 3512.00 3173.00 3315.00 0.00
3511.14 3173.53 3315.33 0.00 3512.00 3173.00 3315.00 0.00
2460.96 2224.33 2323.71 2991.01 2460.00 2224.00 2323.00 2993.00
2460.96 2224.33 2323.71 2991.01 2460.00 2224.00 2323.00 2993.00
2460.96 2224.33 2323.71 2991.01 2460.00 2224.00 2323.00 2993.00
2460.96 2224.33 2323.71 2991.01 2460.00 2224.00 2323.00 2993.00
2460.96 2224.33 2323.71 2991.01 2460.00 2224.00 2323.00 2993.00
3073.89 2778.33 2902.46 1245.32 3075.00 2778.00 2902.00 1245.00
3073.89 2778.33 2902.46 1245.32 3075.00 2778.00 2902.00 1245.00

Page 314 ____________________________________ The OFM administrator handbook


3303.34 2239.28 3119.11 1338.27 3304.00 2239.00 3119.00 1338.00
3303.34 2239.28 3119.11 1338.27 3304.00 2239.00 3119.00 1338.00
3303.34 2239.28 3119.11 1338.27 3304.00 2239.00 3119.00 1338.00
3610.66 2670.12 3719.23 0.00 3610.00 2670.00 3720.00 0.00
3504.04 2714.67 3781.29 0.00 3504.00 2714.00 3782.00 0.00
3813.71 2585.26 3601.03 0.00 3814.00 2585.00 3601.00 0.00
2605.86 1766.47 2460.54 3167.13 2605.00 1766.00 2460.00 3169.00
2605.86 1766.47 2460.54 3167.13 2605.00 1766.00 2460.00 3169.00
2605.86 1766.47 2460.54 3167.13 2605.00 1766.00 2460.00 3169.00
2090.59 1889.57 2632.00 3387.83 2090.00 1889.00 2632.00 3389.00
1051.25 2137.88 2977.86 3833.01 1051.00 2137.00 2977.00 3835.00
754.50 2727.80 2849.68 3668.02 754.00 2727.00 2849.00 3670.00
0.00 2950.41 3082.23 3967.36 0.00 2950.00 3082.00 3968.00
2460.96 2224.33 2323.71 2991.01 2460.00 2224.00 2323.00 2993.00

Notice the rounding done by OFM that corresponds to what was explained for the KH
allocating method. You can also edit the *.ba file, change the precision to 1 and re run
the case. However, remember the axe. It might not be worth the effort to add just one
decimal. After all, these results are all approximations.

Back Allocation Using Well Characteristics data

This is the third method and it is quite different from the others seen so far. The method
is based on the well-characteristics plot. This plot is the Pressure-Rate plot shown in the
next figure.

120

100
Pressure

80

60 Pressure

40

20

0
1 2 3 4 5Rate 6 7 8 9 10

The equation of this relationship can be put as:

The OFM administrator handbook____________________________________ Page 315


Pressure = Rate * Slope + Yo

If pressure, slope and Yo are given, you can easily calculate the rate as:

Rate = (Pressure – Yo) / Slope

This is how OFM calculates the theoretical values for this method. Remember that these
values are used to calculate the allocation percentages, so at the end, your allocated
values added together match the measured one.

The needed inputs for this method are pressure (from the well tests), and the slope/Yo
pair (from the well characteristic).

This method calculates an allocation percentage that is used for all phases, so you don’t
have as much control as with the previous well test method.

The input data usually comes from sporadic tables. In this example, the pressure
variable comes from the test table (WELLTEST.THP). The rest of the data will come
from the EQUATIONS sporadic table. In out case, EQUATIONS.SLOPE and
EQUATIONS.Y0.
All data is allowed to change in time, so each set will be associated with its respective
date column (WELLTEST.DATE and EQUATIONS.DATE)

As usual, the algorithm needs the uptime, so the PRODTIME.UPTIME variable will also
be used.

Unfortunately, there is no complete data loaded to our bademo project, so we will start
the explanation by loading some data to the mentioned variables.
The next table displays the well characteristic equations. Notice that they will be added
to the EQUATIONS table and complete the present records.

Well Characteristic Coefficients


Well Date Slope Yo
POM1:01 19980605 -3 5000
POM1:01 19980810 -4 6000
POM1:02 19980605 -3.5 5000
POM1:02 19980710 -3 5000
POM1:03 19980605 -5 4000
POM1:03 19980710 -4 4500
POM1:04 19980705 -10 8000
POM1:04 19980725 -12 9000

Also, we need to load some pressure data to the WELLTEST table. The values loaded
are displayed next.

Production Pressure Test Data


Well Date THP

Page 316 ____________________________________ The OFM administrator handbook


POM1:01 19980506 1000
POM1:01 19980706 1100
POM1:01 19980727 950
POM1:02 19980209 1100
POM1:02 19980701 980
POM1:02 19980722 1073
POM1:03 19980101 1215
POM1:03 19980705 1190
POM1:04 19970628 980
POM1:04 19980711 1200

Once you get this data loaded to the project, we can go on with the explanation.

OFM calculated Well Characteristics Allocation


To perform a back allocation run using well char data, follow the next steps.

Open the OFM\Samples\BA\batest.ofm project and select Analysis\Back


Allocation\Setup. The next Back Allocation Setup window appears. Make sure you
load the needed data, as stated in the previous section.

• On the first tab (Control), set up the correct date interval to allocate (the complete
month of July 1998).
• Select Daily Allocation, to generate daily data that can be later loaded to the
individual wells.
• Select Create Report and choose a file name. This file will be created with all the
information of the run.
• Select Create BA Input File and choose a file name. This file has a special syntax
and can be opened by OFM to recalculate an OFM BA run. All BA settings go there,
so it could be convenient to have one made. This is like a template of the run. If you
change some data (for instance, change some well test value), then you can open
this file to quickly recalculate the run. OFM automatically runs the case when you
open the file. There is nothing else to do. Just open and close it.
• Fill up the Report Header lines with some descriptive information. This will be used
to describe the run in the report file.

The OFM administrator handbook____________________________________ Page 317


• On the second tab (Measurements), you need to specify where is the measured
data (FLOWSTATION.xxx). Notice that you specify the Filter category (Point of
Measurement) used to identify wells and the variables that contain the data loaded
to the selected filter category. This part is equivalent to our previous example. Select
FS and the rest of the variables as shown in the next figure.

• Notice also that there is a Shrinkage factor. If you leave it to 0, the addition of the
allocated data will match the data loaded. If you specify a certain value (for

Page 318 ____________________________________ The OFM administrator handbook


instance, 0.9), then the total addition will be only a percentage of the measured
value (90% for 0.9).
• The next step is to tell OFM where to get the production uptime. This is done in the
Production Times tab. Select there the variable with the production times. Notice
also some other settings. If your time is not hours opened but hours closed, the you
can still use this data, but you need to check the Down Time option. With this
option checked, a value of 4 will be interpreted as 20 hours of production.

• The Status options lets you specify an “on” or “off” status from a sporadic table.
OFM will consider only the days within an “on” status and allocate zero production to
the well during the “off” periods.
• You can also specify a default value for the uptime. This can be used in combination
with the Status options, so you can build a production schedule with the status and
default uptime hours value.
• Once you set this tab as shown, proceed to the WellTest one. Here is the tab
where you specify where is your pressure data. Notice the settings I have done in
the example window. The WELLTEST.DATE and WELLTEST.THP columns provide
the date and test pressure needed by the algorithm. The rest of the test data is not
needed.
Notice that to keep the exercise simple, we have not associated the quality variable
for the well test data (the WELLTEST.STATUS). Because OFM now does not know
how to differentiate good tests from bad ones, all tests will be used (all THP values
will be used, even the ones from the status variable signals them as bad. If you
want to apply quality to test data, then associate the variable.

The OFM administrator handbook____________________________________ Page 319


• The Equations tab is used for defining where are the well-characteristics
coefficients. Ensure you loaded the data as requested and then select the variables
as shown.

• Finally, select the last tab (Write back to OFM) and select Clear All. This tab is
used in the cases where the BA needs to know the tables that will receive the data.
This is needed in two cases and both are set in the Control tab:
5. When you select Write back to OFM, the algorithm needs to know what tables
will be receiving the data.

Page 320 ____________________________________ The OFM administrator handbook


6. When you select Create OFM Load File, the file contains commands (such as
*TABLENAME xxx) etc, and OFM needs to know what tables will be receiving the
data.
Because we have not selected any of these options, we can clear the last tab, as
shown in the picture above.

• Once you click OK, OFM runs the back allocation job using the specified data. When
its finished, it opens a window with the results. The window is split in two panels.
The left-hand side is to navigate through the data and the right-hand side panel
displays the selection. The next figure displays the results of the data allocated to
POM1:01.

• You can navigate the results and perform a quick check. This window opens once,
after the job. If you close it, the only way to recover it is to re-run the job. However,
because we selected to create a report file, all this information is also in this file,
which can be opened with any text editor.

Manually Calculated Back Allocation


This section will show you the steps that OFM did to reach the previous results. It will
also display a comparison between the manual and OFM calculations. The explanation
will be done only for POM1 and the oil phase. The gas and water numbers are obtained
in the same way.

First of all, we will display all input data in tables. Notice that now we have two sporadic
tables (WELLTEST and EQUATIONS) and each one has its respective date. OFM will
step the values before starting the calculations.

The OFM administrator handbook____________________________________ Page 321


The next table displays the results of the stepped values that will be used by OFM.
Notice that THP steps at different dates than Yo/Slope because the dates used for them
are different (EQUATIONS.DATE and WELLTEST.DATE)

Input (stepped) data for Well Char Allocation


POM1:01 POM1:02 POM1:02 POM1:02
Date THP Yo Sl Ut THP Yo Sl Ut THP Yo Sl Ut THP Yo Sl Ut
19980701 1000 5000 -3 24 980 5000 -3.5 24 1215 4000 -5 24 980 0 0 24
19980702 1000 5000 -3 24 980 5000 -3.5 24 1215 4000 -5 24 980 0 0 24
19980703 1000 5000 -3 24 980 5000 -3.5 24 1215 4000 -5 24 980 0 0 24
19980704 1000 5000 -3 24 980 5000 -3.5 24 1215 4000 -5 24 980 0 0 24
19980705 1000 5000 -3 24 980 5000 -3.5 24 1190 4000 -5 24 980 8000 -10 24
19980706 1100 5000 -3 24 980 5000 -3.5 24 1190 4000 -5 24 980 8000 -10 24
19980707 1100 5000 -3 24 980 5000 -3.5 24 1190 4000 -5 24 980 8000 -10 24
19980708 1100 5000 -3 24 980 5000 -3.5 24 1190 4000 -5 24 980 8000 -10 24
19980709 1100 5000 -3 24 980 5000 -3.5 24 1190 4000 -5 24 980 8000 -10 24
19980710 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 980 8000 -10 24
19980711 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 24
19980712 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 24
19980713 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 24
19980714 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 24
19980715 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 24
19980716 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 8
19980717 1100 5000 -3 24 980 5000 -3 24 1190 4500 -4 24 1200 8000 -10 8
19980718 1100 5000 -3 24 980 5000 -3 18 1190 4500 -4 24 1200 8000 -10 8
19980719 1100 5000 -3 24 980 5000 -3 18 1190 4500 -4 24 1200 8000 -10 8
19980720 1100 5000 -3 24 980 5000 -3 18 1190 4500 -4 24 1200 8000 -10 8
19980721 1100 5000 -3 22 980 5000 -3 18 1190 4500 -4 24 1200 8000 -10 0
19980722 1100 5000 -3 21 1073 5000 -3 18 1190 4500 -4 24 1200 8000 -10 0
19980723 1100 5000 -3 24 1073 5000 -3 18 1190 4500 -4 24 1200 8000 -10 0
19980724 1100 5000 -3 24 1073 5000 -3 18 1190 4500 -4 24 1200 8000 -10 24
19980725 1100 5000 -3 24 1073 5000 -3 18 1190 4500 -4 24 1200 9000 -12 24
19980726 1100 5000 -3 24 1073 5000 -3 18 1190 4500 -4 24 1200 9000 -12 24
19980727 950 5000 -3 18 1073 5000 -3 18 1190 4500 -4 24 1200 9000 -12 24
19980728 950 5000 -3 8 1073 5000 -3 18 1190 4500 -4 24 1200 9000 -12 24
19980729 950 5000 -3 6 1073 5000 -3 24 1190 4500 -4 24 1200 9000 -12 24
19980730 950 5000 -3 0 1073 5000 -3 24 1190 4500 -4 24 1200 9000 -12 24
19980731 950 5000 -3 24 1073 5000 -3 24 1190 4500 -4 24 1200 9000 -12 24

With this data, OFM calculates the theoretical values, using the already introduced
rate equation, now affected by the uptime value:

Uptime * (Pressure − Yo )
Rate =
Slope * 24

Applying this equation to each day and each well, we can calculate the OFM theoretical
rates, listed on the next table:

Page 322 ____________________________________ The OFM administrator handbook


Theoretical Rates
Date POM1-01 POM1-02 POM1-03 POM1-04
19980701 1333.33 1148.57 557.00 0.00
19980702 1333.33 1148.57 557.00 0.00
19980703 1333.33 1148.57 557.00 0.00
19980704 1333.33 1148.57 557.00 0.00
19980705 1333.33 1148.57 562.00 702.00
19980706 1300.00 1148.57 562.00 702.00
19980707 1300.00 1148.57 562.00 702.00
19980708 1300.00 1148.57 562.00 702.00
19980709 1300.00 1148.57 562.00 702.00
19980710 1300.00 1340.00 827.50 702.00
19980711 1300.00 1340.00 827.50 680.00
19980712 1300.00 1340.00 827.50 680.00
19980713 1300.00 1340.00 827.50 680.00
19980714 1300.00 1340.00 827.50 680.00
19980715 1300.00 1340.00 827.50 680.00
19980716 1300.00 1340.00 827.50 226.67
19980717 1300.00 1340.00 827.50 226.67
19980718 1300.00 1005.00 827.50 226.67
19980719 1300.00 1005.00 827.50 226.67
19980720 1300.00 1005.00 827.50 226.67
19980721 1191.67 1005.00 827.50 0.00
19980722 1137.50 981.75 827.50 0.00
19980723 1300.00 981.75 827.50 0.00
19980724 1300.00 981.75 827.50 680.00
19980725 1300.00 981.75 827.50 650.00
19980726 1300.00 981.75 827.50 650.00
19980727 1012.50 981.75 827.50 650.00
19980728 450.00 981.75 827.50 650.00
19980729 337.50 1309.00 827.50 650.00
19980730 0.00 1309.00 827.50 650.00
19980731 1350.00 1309.00 827.50 650.00

Using these theoretical values, you can calculate a percentage table, where each cell will
have the percentage of the total that each of these theoretical oil values represent. For
instance, in the first day, we can calculate:

Theoretical Values
Date POM1:01 POM1:02 POM1:03 POM1:04
19980701 1333.33 1148.57 557.00 0.00

Allocated Percentages
Date POM1:01 POM1:02 POM1:03 POM1:04
19980701 44% 38% 18% 0%

If you do that for the complete period, the table you get is like the following one:

Allocated percentages
POM1-01 POM1-02 POM1-03 POM1-04 POM1
44% 38% 18% 0% 10000
44% 38% 18% 0% 10000
44% 38% 18% 0% 10000
44% 38% 18% 0% 10000
36% 31% 15% 19% 10000
35% 31% 15% 19% 10000
35% 31% 15% 19% 10000
35% 31% 15% 19% 10000

The OFM administrator handbook____________________________________ Page 323


35% 31% 15% 19% 10000
31% 32% 20% 17% 10000
31% 32% 20% 16% 10000
31% 32% 20% 16% 10000
31% 32% 20% 16% 10000
31% 32% 20% 16% 10000
31% 32% 20% 16% 10000
35% 36% 22% 6% 10000
35% 36% 22% 6% 10000
39% 30% 25% 7% 10000
39% 30% 25% 7% 10000
39% 30% 25% 7% 10000
39% 33% 27% 0% 10000
39% 33% 28% 0% 10000
42% 32% 27% 0% 10000
34% 26% 22% 18% 10000
35% 26% 22% 17% 10000
35% 26% 22% 17% 10000
29% 28% 24% 19% 10000
15% 34% 28% 22% 10000
11% 42% 26% 21% 10000
0% 47% 30% 23% 10000
33% 32% 20% 16% 10000

Now, simply allocating the calculated percentage of the measured value (shown on the
last column) to each well, each date, you get the final manual results:

Manually Calculated Allocated Volumes


POM1-01 POM1-02 POM1-03 POM1-04
4387.55 3779.56 1832.90 0.00
4387.55 3779.56 1832.90 0.00
4387.55 3779.56 1832.90 0.00
4387.55 3779.56 1832.90 0.00
3559.44 3066.21 1500.31 1874.05
3501.62 3093.74 1513.78 1890.87
3501.62 3093.74 1513.78 1890.87
3501.62 3093.74 1513.78 1890.87
3501.62 3093.74 1513.78 1890.87
3117.88 3213.81 1984.65 1683.66
3134.42 3230.86 1995.18 1639.54
3134.42 3230.86 1995.18 1639.54
3134.42 3230.86 1995.18 1639.54
3134.42 3230.86 1995.18 1639.54
3134.42 3230.86 1995.18 1639.54
3519.06 3627.34 2240.02 613.58
3519.06 3627.34 2240.02 613.58
3870.01 2991.81 2463.41 674.77
3870.01 2991.81 2463.41 674.77
3870.01 2991.81 2463.41 674.77
3940.48 3323.23 2736.29 0.00
3860.18 3331.64 2808.18 0.00
4181.07 3157.51 2661.41 0.00
3430.76 2590.88 2183.81 1794.55
3458.14 2611.56 2201.24 1729.07
3458.14 2611.56 2201.24 1729.07
2916.40 2827.82 2383.52 1872.25
1546.79 3374.58 2844.38 2234.25
1080.35 4190.14 2648.85 2080.67
0.00 4697.65 2969.68 2332.68
3263.63 3164.51 2000.48 1571.38

Page 324 ____________________________________ The OFM administrator handbook


Differences between the manual and OFM calculation
The same discussion done for the previous method applies here. OFM needs to round
off the values and it does the same way we explained before. To complete this section,
we display the final comparison table.

Manually Allocated Values Allocated Values BY OFM


POM1-01 POM1-02 POM1-03 POM1-04 POM1-01 POM1-02 POM1-03 POM1-04
4387.55 3779.56 1832.90 0.00 4389.00 3779.00 1832.00 0.00
4387.55 3779.56 1832.90 0.00 4389.00 3779.00 1832.00 0.00
4387.55 3779.56 1832.90 0.00 4389.00 3779.00 1832.00 0.00
4387.55 3779.56 1832.90 0.00 4389.00 3779.00 1832.00 0.00
3559.44 3066.21 1500.31 1874.05 3560.00 3066.00 1500.00 1874.00
3501.62 3093.74 1513.78 1890.87 3504.00 3093.00 1513.00 1890.00
3501.62 3093.74 1513.78 1890.87 3504.00 3093.00 1513.00 1890.00
3501.62 3093.74 1513.78 1890.87 3504.00 3093.00 1513.00 1890.00
3501.62 3093.74 1513.78 1890.87 3504.00 3093.00 1513.00 1890.00
3117.88 3213.81 1984.65 1683.66 3117.00 3216.00 1984.00 1683.00
3134.42 3230.86 1995.18 1639.54 3134.00 3232.00 1995.00 1639.00
3134.42 3230.86 1995.18 1639.54 3134.00 3232.00 1995.00 1639.00
3134.42 3230.86 1995.18 1639.54 3134.00 3232.00 1995.00 1639.00
3134.42 3230.86 1995.18 1639.54 3134.00 3232.00 1995.00 1639.00
3134.42 3230.86 1995.18 1639.54 3134.00 3232.00 1995.00 1639.00
3519.06 3627.34 2240.02 613.58 3519.00 3628.00 2240.00 613.00
3519.06 3627.34 2240.02 613.58 3519.00 3628.00 2240.00 613.00
3870.01 2991.81 2463.41 674.77 3872.00 2991.00 2463.00 674.00
3870.01 2991.81 2463.41 674.77 3872.00 2991.00 2463.00 674.00
3870.01 2991.81 2463.41 674.77 3872.00 2991.00 2463.00 674.00
3940.48 3323.23 2736.29 0.00 4151.00 3208.00 2641.00 0.00
3860.18 3331.64 2808.18 0.00 4182.00 3157.00 2661.00 0.00
4181.07 3157.51 2661.41 0.00 4182.00 3157.00 2661.00 0.00
3430.76 2590.88 2183.81 1794.55 3433.00 2590.00 2183.00 1794.00
3458.14 2611.56 2201.24 1729.07 3459.00 2611.00 2201.00 1729.00
3458.14 2611.56 2201.24 1729.07 3459.00 2611.00 2201.00 1729.00
2916.40 2827.82 2383.52 1872.25 3545.00 2577.00 2172.00 1706.00
1546.79 3374.58 2844.38 2234.25 3545.00 2577.00 2172.00 1706.00
1080.35 4190.14 2648.85 2080.67 3265.00 3164.00 2000.00 1571.00
0.00 4697.65 2969.68 2332.68 3265.00 3164.00 2000.00 1571.00
3263.63 3164.51 2000.48 1571.38 3265.00 3164.00 2000.00 1571.00

Notice the rounding done by OFM that corresponds to what was explained for the
previous allocating methods. You can also edit the *.ba file, change the precision to 1
and re run the case.

Back Allocation using Decline Curve data

Finally, this is the fourth method available (at this time) to calculate allocation volumes.
The method is based on two possible equations:

-Di * t
( )
Rate = Qi * e 30.4

Where:
Rate = Theoretical rate calculated by OFM

The OFM administrator handbook____________________________________ Page 325


Qi = Initial Rate
Di = Decline rate per month. If decline rate is nominal, you must tell OFM.
t = Time in days since a reference date

Or:

Qi
Rate = 1
 
 Di * N * t   N 
1 + 
 30.4 

Where:
Rate = Theoretical rate calculated by OFM
Qi = Initial Rate
Di = Decline rate per month. If decline rate is nominal, you must tell OFM.
t = Time in days since a reference date
N = Hyperbolic/Harmonic exponent

OFM chooses one or the other, depending on the existence of N. If N is 0 or undefined,


OFM uses the first equation. When a valid N is available, OFM uses the second one.

The following table lists the coefficients that will be used for this method. Again, the
batest project does not contain adequate data for this technique, so you will have to
load these values before proceeding.

XY EQUATIONS EQUATIONS EQUATIONS EQUATIONS EQUATIONS


WELL DATE Di N Qi REFDATE
DATE DATE
---------- ---------- ---------- ---------- ---------- ----------
POM1:01 19980605 0.00300 0.00 600.00 19980610
POM1:01 19980810 0.00400 0.00 500.00 19980726
POM1:02 19980605 0.00700 0.00 300.00 19980615
POM1:02 19980710 0.00450 0.00 200.00 19980101
POM1:03 19980605 0.00500 0.00 300.00 19980616
POM1:03 19980710 0.00450 0.00 200.00 19980101
POM1:04 19980705 0.00600 0.00 600.00 19980605
POM1:04 19980725 0.00600 0.00 500.00 19980601

Notice that we will not be using N (all null values), so the equation used will be the first
one.

OFM calculated Decline Curve Allocation


To perform a back allocation run using well decline curve data, follow the next steps.

Open the OFM\Samples\BA\batest.ofm project and select Analysis\Back


Allocation\Setup. The next Back Allocation Setup window appears. Make sure you
load the needed data, as stated in the previous section.

• On the first tab (Control), set up the correct date interval to allocate (the complete
month of July 1998).

Page 326 ____________________________________ The OFM administrator handbook


• Select Daily Allocation, to generate daily data that can be later loaded to the
individual wells.
• Select Create Report and choose a file name. This file will be created with all the
information of the run.
• Select Create BA Input File
and choose a file name. This file
has a special syntax and can be
opened by OFM to recalculate an
OFM BA run. All BA settings go
there, so it could be convenient
to have one made. This is like a
template of the run. If you
change some data (for instance,
change some well test value),
then you can open this file to
quickly recalculate the run. OFM
automatically runs the case when
you open the file. There is
nothing else to do. Just open and
close it.
• Fill up the Report Header lines with some descriptive information. This will be used
to describe the run in the report file.
• On the second tab (Measurements), you need to specify where is the measured
data (FLOWSTATION.xxx). Notice that you specify the Filter category (Point of
Measurement) used to identify wells and the variables that contain the data loaded
to the selected filter category. This part is equivalent to our previous example. Select
FS and the rest of the variables as shown in the next figure.
• Notice also that there is a
Shrinkage factor. If you leave
it to 0, the addition of the
allocated data will match the
data loaded. If you specify a
certain value (for instance, 0.9),
then the total addition will be
only a percentage of the
measured value (90% for 0.9).
• The next step is to tell OFM
where to get the production
uptime. This is done in the
Production Times tab. Select
there the variable with the
production times. Notice also
some other settings. If your
time is not hours opened but
hours closed, the you can still use this data, but you need to check the Down Time
option. With this option checked, a value of 4 will be interpreted as 20 hours of
production.

The OFM administrator handbook____________________________________ Page 327


• The Status options lets you specify an “on” or “off” status from a sporadic table.
OFM will consider only the
days within an “on” status and
allocate zero production to the
well during the “off” periods.
• You can also specify a default
value for the uptime. This can
be used in combination with
the Status options, so you can
build a production schedule
with the status and default
uptime hours value.
• Once you set this tab as
shown, proceed to the
WellTest one. Because no
test data is required for this
method, simply clear all
settings using the Clear All
button.
• The Equations tab is used for defining where are the decline curve coefficients.
Ensure you loaded the data as requested and then select the variables as shown.

Notice that although there is no data loaded for N, it is still associated. This is not a
requirement. Because all our n data is 0, OFM will use the n-less (first) equation. If
you clear the n field from this window, OFM will also select the same one.
• Finally, select the last tab (Write back to OFM) and select Clear All. This tab is
used in the cases where the BA needs to know the tables that will receive the data.
This is needed in two cases and both are set in the Control tab:

Page 328 ____________________________________ The OFM administrator handbook


1. When you select Write back to OFM, the algorithm needs to know what tables
will be receiving the data.
2. When you select Create OFM Load File, the file contains commands (such as
*TABLENAME xxx) etc, and OFM needs to know what tables will be receiving the
data.
Because we have not selected any of these options, we can clear the last tab, as
shown in the picture above.
• Once you click OK, OFM runs the back allocation job using the specified data. When
its finished, it opens a window with the results. The window is split in two panels.
The left-hand side is to navigate through the data and the right-hand side panel
displays the selection. The next figure displays the results of the data allocated to
POM1:01.

• You can navigate the results and perform a quick check. This window opens once,
after the job. If you close it, the only way to recover it is to re-run the job. However,
because we selected to create a report file, all this information is also in this file,
which can be opened with any text editor.

Manually Calculated Back Allocation


This section will show you the steps that OFM did to reach the previous results. It will
also display a comparison between the manual and OFM calculations. The explanation
will be done only for POM1 and the oil phase. The gas and water numbers are obtained
in the same way.

First of all, we will display the input data in tables.

The next figure displays the results of the stepped values that will be used by OFM.

The OFM administrator handbook____________________________________ Page 329


Input Decline Data, Wells 01 & 02
POM1:01 POM1:02
Date RefDate Di Qi t Up time RefDate Di Qi t Up time
07/01/98 06/10/98 0.003 600 21 24 06/15/98 0.007 300 16 24
07/02/98 06/10/98 0.003 600 22 24 06/15/98 0.007 300 17 24
07/03/98 06/10/98 0.003 600 23 24 06/15/98 0.007 300 18 24
07/04/98 06/10/98 0.003 600 24 24 06/15/98 0.007 300 19 24
07/05/98 06/10/98 0.003 600 25 24 06/15/98 0.007 300 20 24
07/06/98 06/10/98 0.003 600 26 24 06/15/98 0.007 300 21 24
07/07/98 06/10/98 0.003 600 27 24 06/15/98 0.007 300 22 24
07/08/98 06/10/98 0.003 600 28 24 06/15/98 0.007 300 23 24
07/09/98 06/10/98 0.003 600 29 24 06/15/98 0.007 300 24 24
07/10/98 06/10/98 0.003 600 30 24 01/01/98 0.0045 200 190 24
07/11/98 06/10/98 0.003 600 31 24 01/01/98 0.0045 200 191 24
07/12/98 06/10/98 0.003 600 32 24 01/01/98 0.0045 200 192 24
07/13/98 06/10/98 0.003 600 33 24 01/01/98 0.0045 200 193 24
07/14/98 06/10/98 0.003 600 34 24 01/01/98 0.0045 200 194 24
07/15/98 06/10/98 0.003 600 35 24 01/01/98 0.0045 200 195 24
07/16/98 06/10/98 0.003 600 36 24 01/01/98 0.0045 200 196 24
07/17/98 06/10/98 0.003 600 37 24 01/01/98 0.0045 200 197 24
07/18/98 06/10/98 0.003 600 38 24 01/01/98 0.0045 200 198 18
07/19/98 06/10/98 0.003 600 39 24 01/01/98 0.0045 200 199 18
07/20/98 06/10/98 0.003 600 40 24 01/01/98 0.0045 200 200 18
07/21/98 06/10/98 0.003 600 41 22 01/01/98 0.0045 200 201 18
07/22/98 06/10/98 0.003 600 42 21 01/01/98 0.0045 200 202 18
07/23/98 06/10/98 0.003 600 43 24 01/01/98 0.0045 200 203 18
07/24/98 06/10/98 0.003 600 44 24 01/01/98 0.0045 200 204 18
07/25/98 06/10/98 0.003 600 45 24 01/01/98 0.0045 200 205 18
07/26/98 06/10/98 0.003 600 46 24 01/01/98 0.0045 200 206 18
07/27/98 06/10/98 0.003 600 47 18 01/01/98 0.0045 200 207 18
07/28/98 06/10/98 0.003 600 48 8 01/01/98 0.0045 200 208 18
07/29/98 06/10/98 0.003 600 49 6 01/01/98 0.0045 200 209 24
07/30/98 06/10/98 0.003 600 50 0 01/01/98 0.0045 200 210 24
07/31/98 06/10/98 0.003 600 51 24 01/01/98 0.0045 200 211 24

Input Decline Data, Wells 03 & 04


POM1:03 POM1:04
Date RefDate Di Qi t Up time RefDate Di Qi t Up time
07/01/98 06/16/98 0.005 300 15 24 ? ? ? ? 24
07/02/98 06/16/98 0.005 300 16 24 ? ? ? ? 24
07/03/98 06/16/98 0.005 300 17 24 ? ? ? ? 24
07/04/98 06/16/98 0.005 300 18 24 ? ? ? ? 24
07/05/98 06/16/98 0.005 300 19 24 06/05/98 0.006 600 30 24
07/06/98 06/16/98 0.005 300 20 24 06/05/98 0.006 600 31 24
07/07/98 06/16/98 0.005 300 21 24 06/05/98 0.006 600 32 24
07/08/98 06/16/98 0.005 300 22 24 06/05/98 0.006 600 33 24
07/09/98 06/16/98 0.005 300 23 24 06/05/98 0.006 600 34 24
07/10/98 06/16/98 0.005 300 24 24 06/05/98 0.006 600 35 24
07/11/98 01/01/98 0.005 200 191 24 06/05/98 0.006 600 36 24
07/12/98 01/01/98 0.005 200 192 24 06/05/98 0.006 600 37 24

Page 330 ____________________________________ The OFM administrator handbook


07/13/98 01/01/98 0.005 200 193 24 06/05/98 0.006 600 38 24
07/14/98 01/01/98 0.005 200 194 24 06/05/98 0.006 600 39 24
07/15/98 01/01/98 0.005 200 195 24 06/05/98 0.006 600 40 24
07/16/98 01/01/98 0.005 200 196 24 06/05/98 0.006 600 41 8
07/17/98 01/01/98 0.005 200 197 24 06/05/98 0.006 600 42 8
07/18/98 01/01/98 0.005 200 198 24 06/05/98 0.006 600 43 8
07/19/98 01/01/98 0.005 200 199 24 06/05/98 0.006 600 44 8
07/20/98 01/01/98 0.005 200 200 24 06/05/98 0.006 600 45 8
07/21/98 01/01/98 0.005 200 201 24 06/05/98 0.006 600 46 0
07/22/98 01/01/98 0.005 200 202 24 06/05/98 0.006 600 47 0
07/23/98 01/01/98 0.005 200 203 24 06/05/98 0.006 600 48 0
07/24/98 01/01/98 0.005 200 204 24 06/05/98 0.006 600 49 24
07/25/98 01/01/98 0.005 200 205 24 06/01/98 0.006 500 54 24
07/26/98 01/01/98 0.005 200 206 24 06/01/98 0.006 500 55 24
07/27/98 01/01/98 0.005 200 207 24 06/01/98 0.006 500 56 24
07/28/98 01/01/98 0.005 200 208 24 06/01/98 0.006 500 57 24
07/29/98 01/01/98 0.005 200 209 24 06/01/98 0.006 500 58 24
07/30/98 01/01/98 0.005 200 210 24 06/01/98 0.006 500 59 24
07/31/98 01/01/98 0.005 200 211 24 06/01/98 0.006 500 60 24

Notice that we added a column (t) with the elapsed days between the equation
reference date and the date of the allocation.

With this data, OFM calculates the theoretical values, using the already introduced
(first) rate equation, now affected by the uptime value:

-Di * t
( )
Uptime * Qi * e 30.4
Rate =
24

Applying this equation to each day and each well, we can calculate the OFM theoretical
rates, listed on the next table:

Theoretical Rates
POM1-01 POM1-02 POM1-03 POM1-04
598.76 298.90 299.26 0.00
598.70 298.83 299.21 0.00
598.64 298.76 299.16 0.00
598.58 298.69 299.11 0.00
598.52 298.62 299.06 596.46
598.46 298.55 299.01 596.34
598.40 298.48 298.97 596.22
598.34 298.42 298.92 596.10
598.29 298.35 298.87 595.99
598.23 194.45 298.82 595.87
598.17 194.42 194.42 595.75
598.11 194.40 194.40 595.63
598.05 194.37 194.37 595.52
597.99 194.34 194.34 595.40
597.93 194.31 194.31 595.28
597.87 194.28 194.28 198.39
597.81 194.25 194.25 198.35
597.75 145.67 194.22 198.31
597.70 145.65 194.19 198.27

The OFM administrator handbook____________________________________ Page 331


597.64 145.62 194.17 198.23
547.78 145.60 194.14 0.00
522.83 145.58 194.11 0.00
597.46 145.56 194.08 0.00
597.40 145.54 194.05 594.23
597.34 145.52 194.02 494.70
597.28 145.50 193.99 494.60
447.92 145.47 193.96 494.50
199.05 145.45 193.94 494.41
149.28 193.91 193.91 494.31
0.00 193.88 193.88 494.21
596.99 193.85 193.85 494.11

Using these theoretical values, you can calculate a percentage table, where each cell will
have the percentage of the total that each of these theoretical oil values represent. For
instance, in the first day, we can calculate:

Theoretical Values
POM1-01 POM1-02 POM1-03 POM1-04
598.76 298.90 299.26 0.00

Percentages of Total
POM1-01 POM1-02 POM1-03 POM1-04
50% 25% 25% 0%

If you do that for the complete period, the table you get is like the following one:

Allocated percentages
POM1-01 POM1-02 POM1-03 POM1-04
50% 25% 25% 0%
50% 25% 25% 0%
50% 25% 25% 0%
50% 25% 25% 0%
33% 17% 17% 33%
33% 17% 17% 33%
33% 17% 17% 33%
33% 17% 17% 33%
33% 17% 17% 33%
35% 12% 18% 35%
38% 12% 12% 38%
38% 12% 12% 38%
38% 12% 12% 38%
38% 12% 12% 38%
38% 12% 12% 38%
50% 16% 16% 17%
50% 16% 16% 17%
53% 13% 17% 17%
53% 13% 17% 17%
53% 13% 17% 17%
62% 16% 22% 0%
61% 17% 23% 0%
64% 16% 21% 0%
39% 10% 13% 39%
42% 10% 14% 35%
42% 10% 14% 35%
35% 11% 15% 39%
19% 14% 19% 48%
14% 19% 19% 48%
0% 22% 22% 56%

Page 332 ____________________________________ The OFM administrator handbook


40% 13% 13% 33%

Now, simply allocating the calculated percentage of the measured value to each well,
each date, you get the final manual results:

Manually Calculated Allocated Volumes


POM1-01 POM1-02 POM1-03 POM1-04
5002.51 2497.23 2500.27 0.00
5002.75 2497.02 2500.23 0.00
5003.00 2496.81 2500.18 0.00
5003.25 2496.61 2500.14 0.00
3338.73 1665.80 1668.26 3327.21
3338.94 1665.69 1668.26 3327.10
3339.16 1665.58 1668.26 3326.99
3339.38 1665.47 1668.26 3326.88
3339.60 1665.36 1668.26 3326.77
3545.32 1152.41 1770.91 3531.36
3779.25 1228.38 1228.38 3763.99
3779.43 1228.38 1228.38 3763.80
3779.62 1228.38 1228.38 3763.61
3779.81 1228.38 1228.38 3763.43
3779.99 1228.38 1228.38 3763.24
5046.09 1639.75 1639.75 1674.41
5046.26 1639.72 1639.72 1674.30
5262.13 1282.33 1709.78 1745.75
5262.30 1282.31 1709.75 1745.64
5262.47 1282.29 1709.72 1745.52
6172.03 1640.56 2187.41 0.00
6061.65 1687.86 2250.48 0.00
6375.63 1553.30 2071.07 0.00
3901.48 950.47 1267.30 3880.74
4172.60 1016.48 1355.30 3455.62
4172.80 1016.47 1355.30 3455.44
3494.28 1134.86 1513.15 3857.71
1927.24 1408.26 1877.68 4786.82
1447.32 1880.04 1880.04 4792.60
0.00 2198.25 2198.25 5603.50
4036.97 1310.86 1310.86 3341.31

Differences between the manual and OFM calculation


Unfortunately, for this method, I could not figure out how OFM does the rounding off.
Although the manual numbers are similar to the ones calculated by OFM, I can’t see any
pattern about how/when is done. I would appreciate any ideas on this. I would not give
any further explanations and limit myself to display the final comparison table, which is
not that bad, after all.

Manually Allocated Values Allocated Values BY OFM


POM1-01 POM1-02 POM1-03 POM1-04 POM1-01 POM1-02 POM1-03 POM1-04
5002.51 2497.23 2500.27 0.00 5003.00 2497.00 2500.00 0.00
5002.75 2497.02 2500.23 0.00 5003.00 2497.00 2500.00 0.00
5003.00 2496.81 2500.18 0.00 5003.00 2497.00 2500.00 0.00
5003.25 2496.61 2500.14 0.00 5004.00 2497.00 2499.00 0.00
3338.73 1665.80 1668.26 3327.21 3340.00 1666.00 1668.00 3326.00
3338.94 1665.69 1668.26 3327.10 3340.00 1666.00 1668.00 3326.00
3339.16 1665.58 1668.26 3326.99 3341.00 1665.00 1668.00 3326.00
3339.38 1665.47 1668.26 3326.88 3341.00 1665.00 1668.00 3326.00
3339.60 1665.36 1668.26 3326.77 3341.00 1665.00 1668.00 3326.00
3545.32 1152.41 1770.91 3531.36 3781.00 1228.00 1228.00 3763.00

The OFM administrator handbook____________________________________ Page 333


3779.25 1228.38 1228.38 3763.99 3781.00 1228.00 1228.00 3763.00
3779.43 1228.38 1228.38 3763.80 3781.00 1228.00 1228.00 3763.00
3779.62 1228.38 1228.38 3763.61 3781.00 1228.00 1228.00 3763.00
3779.81 1228.38 1228.38 3763.43 3781.00 1228.00 1228.00 3763.00
3779.99 1228.38 1228.38 3763.24 3782.00 1228.00 1228.00 3762.00
5046.09 1639.75 1639.75 1674.41 5048.00 1639.00 1639.00 1674.00
5046.26 1639.72 1639.72 1674.30 5048.00 1639.00 1639.00 1674.00
5262.13 1282.33 1709.78 1745.75 5264.00 1282.00 1709.00 1745.00
5262.30 1282.31 1709.75 1745.64 5264.00 1282.00 1709.00 1745.00
5262.47 1282.29 1709.72 1745.52 5264.00 1282.00 1709.00 1745.00
6172.03 1640.56 2187.41 0.00 6173.00 1640.00 2187.00 0.00
6061.65 1687.86 2250.48 0.00 6063.00 1687.00 2250.00 0.00
6375.63 1553.30 2071.07 0.00 6377.00 1553.00 2070.00 0.00
3901.48 950.47 1267.30 3880.74 3903.00 950.00 1267.00 3880.00
4172.60 1016.48 1355.30 3455.62 4174.00 1016.00 1355.00 3455.00
4172.80 1016.47 1355.30 3455.44 4174.00 1016.00 1355.00 3455.00
3494.28 1134.86 1513.15 3857.71 3494.00 1134.00 1513.00 3859.00
1927.24 1408.26 1877.68 4786.82 1927.00 1408.00 1877.00 4788.00
1447.32 1880.04 1880.04 4792.60 1447.00 1880.00 1880.00 4793.00
0.00 2198.25 2198.25 5603.50 0.00 2198.00 2198.00 5604.00
4036.97 1310.86 1310.86 3341.31 4040.00 1310.00 1310.00 3340.00

Read me Last

This section should have gone in the first part of the chapter because it contains very
important issues you need to know before attempting to do any back allocation job.
After reviewing the four methods, you should now get the idea of how it works: Every
method calculates a theoretical value and then, it is used to calculate a final allocation
percentage.

You can do a back allocation job supplying different sources of data for different wells.
I.e., you can back allocate a group of wells using well test data, another one using DCA
parameters, etc.
If you set OFM to combine methods (by associating all the input variables in the BA
setup), the program will attempt to use them in sequence (well per well, date per date)
until it finds one that can be applied. This is an extremely important point because the
theoretical values that are calculated by the different methods are numerically different.
Very different.

For example, for POM01:01, July 1st, the four methods calculated these theoretical
values:

Method Theoretical Value


KH or Values: 10.00
Well Test Data: 2700.00
Well Characteristic Curve: 1333.33
Decline Curve Data: 598.76

Page 334 ____________________________________ The OFM administrator handbook


Notice that the difference is up to some orders of magnitude. Trying to allocate mixing
these kind of different techniques could be tricky. Remember that you might end up
getting 2700 (WT) for POM1:01 and 600 (DCA) for POM1:02. This will calculate a final
allocation percentage for POM1:01 almost five times bigger than the one for POM1:02!

When you run a job, you need to be very careful and supply it with consistent data. If
you need to mix up the methods (because you don’t have equivalent data for all wells),
then you have to verify thoroughly data quality and consistency.

Because the allocation percentages are those of a total measured in one flow station
(POM), then you can easily apply different methods to different flow stations. For
instance, it would be easy to allocate all POM1:xx wells using KH and all POM2:xx wells
using DCA numbers. Because the parameters are consistent within the flow station, then
the allocation percentages will be also consistent.

It is best to try and allocate all of the volumes of a particular flow station using the same
method by making sure the same type of data is available for each contributing well.

When you decide to mix methods, then you have to associate all parameters in the BA
setup. Take as an example the following figures:

Setting up all parameters allows OFM to use the first possible method. The rules OFM
follows are:

• For the oil phase, the default sequence is: Well Char, KH, Decline and Welltest.
• For the gas phase, the default method is Welltest only.
• For the gas phase, the default method is Welltest only.
• For the Water phase, the default method is Welltest only.
• For the Water and Gas Injection, the default method is Welltest only.

You need to be aware that [rumors are] OFM will not mix the KH method with any other
one. If it uses KH for a particular flow station, then it will not attempt to use coefficients
from any other method. The sequence in which OFM will apply the methods can be
changed by editing the ba file (see later).

The OFM administrator handbook____________________________________ Page 335


The rest of the settings

In previous sections, we only explained part of the available options of BA jobs. This
section will explain the rest. We will concentrate on the Back Allocation Setup window,
one tab at a time.

The Control Tab


The control tab has some other options that we have not discussed yet.

Create OFM Load File:


this will create an ASCII
file that can be loaded
directly to OFM with the
Data Loader. The file will
contain all the needed
commands (*tablename
xxx, etc), so you need to
specify to which tables you
will load the results41. This
is done with the last tab
(Writeback to OFM), so
both work in combination
and you should check the
last tab if you decide to
create a load file.

Create report HTML:


Instead of creating an
ASCII file with the results of the run, you activate the HTML option and OFM will create
a series of files that can be inspected using any web browser.
The file you need to open is the one that has the name you selected. The other ones are
referenced from this one and will be opened by your browser while navigating the
results. The next figure displays the generated file viewed on a web browser.

Writeback Results to OFM: This will load the results directly to OFM, saving you the
work of loading the ASCII file with the data loader. I would not recommend to directly
load the results without previous inspection, so don’t be very excited about this option
and use it at your own judgement.

Compute Theoretical Volumes: This option works in two different ways:


• If you don’t supply any measured values (at the flow station), then OFM will skip the
two last steps of the BA job. It will directly allocate the calculated theoretical values,
so there is no need of calculating the percentages and prorating the measured

41
If you don’t specify the destination variables, OFM will still generate the load file, but you will
have to edit it and add the names manually.

Page 336 ____________________________________ The OFM administrator handbook


values. Because you decide to allocate the theoretical values, there is no need for
measured values at all. They won’t be used.

• If you do supply the measured OIL value and the Gas and Water as ratios to OIL, (in
the Well test tab) then OFM will allocate the real OIL (from the supplied measured
value) and the calculated Water and Gas volumes based on the real oil and the
provided ratios.

The Measurements tab


This is where you specify the measured values that need to be allocated (unless you
decide to allocate the synthetic theoretical values)
Notice that there is also room for injected rates, in case you decide to back allocate
injections.
There is also a Stock option. If you associate it to a stock volume variable, it will be
subtracted from the oil volume before being allocated. This is done to correctly account
for discrepancies in oil volumes when the stock tanks are measured. Sometimes the
tanks are not drained and measured to the same level each time they are drained and
measured. This causes some inconsistencies when the residual left in the tank is
different than the residual volume left in the stock tank the last time it was drained and
measured. This way the volume of the stock is taken out of the total oil volume so it is
accounted for correctly.

The OFM administrator handbook____________________________________ Page 337


The Production Times tab
This tab is used to tell OFM the hours per day that each well should be considered as
opened. The time should be given in hours and could be uptime (24, for a full flowing
day) or downtime (0 for a full flowing day). If you data is downtime, you need to check

the corresponding Down Time check box.


If you don’t have this kind of data, OFM can assume a default value that you enter in
the corresponding box. This value can be combined with another variable associated
with Status. The status expresses an open/on/flowing or off/shutin string value that

Page 338 ____________________________________ The OFM administrator handbook


combines with the default uptime. The combination of default hours with an on/off
status can be used to replace the uptime variable. These options should not be used if
you have the actual hours available.

A Facility Change variable can be used to signal a network change. For instance,
suppose that POM1:01 well’s production is switched from POM1 to POM2 at July 20th.
You can use a variable (that should contain the name of the flow station to which the
well is connected to -such as POM1, POM2, etc.-) to indicate possible changes during
the allocation period. If you don’t have such needs, just leave it blank.

The Welltest/Equations tabs


There is not much to add about them. Only that in the well test tab, there is also an
option for Injection test
data, in case you need to
allocate injection data
using this technique.

The Writeback to OFM tab


This is the tab where you choose the destination table for your allocated values. It is
needed when you select the option to write the results back to OFM. This settings are
also needed (but they are not mandatory) if you decide to create an OFM load file.
If you are doing a Daily back allocation, then select the target daily variables.
If you are doing a Monthly back allocation, then select the target monthly variables.

The OFM administrator handbook____________________________________ Page 339


The Back Allocation file42

The *.ba file is an ASCII file containing the surface network, methods, calculation
control, and production volumes for the back allocation session. To start up you do not
need a *.ba file. The BA module can generate this file when you use the Control tab
option Create a BA input file. You may want to do specialized BA configurations by
editing this file outside of OFM using an ASCII text editor. We mentioned one of the
possibilities when we talked about the numerical precision of the runs.

Opening a previous BA session


You can open a previous BA session within any OFM project by using the Tools/Back
Allocation/Open command. This will re run the job specified in the file without asking
anything else. Once the calculations are finished, the result navigation window pops up
and once you close it, you are out of the back allocation module.

Because all the data needed for the run is in this file, you can to a Tools/Back
Allocation/Open from any project, not necessarily the one used to create it.

However, you can’t modify an existing ba file from within OFM. All you can do is build a
new one from scratch and for that, you need to have the project with the data opened.

42
This section is based on a handout sent to me by Doug Woodruff.

Page 340 ____________________________________ The OFM administrator handbook


You create a new one with Tools/Back Allocation/Setup and selecting, in the control
tab, the option to create a Back Allocation file.
The data is stored on the *.ba file and can be run with any project opened. The *.ba file
is then, quite portable. However, the settings of a BA session are not stored in an OFM
project nor *.ba file, but rather they are stored in the program registry area. The
settings include everything that is not written to the *.ba file. The Write back to OFM
tab setup, among others.

When you open a *.ba file, this simply replaces the BA section of the Windows registry
with the contents of the *.ba file. In this way you can regenerate the results of the BA
session without being connected to the original OFM project that the BA session was
originally built around.

The results of a BA session can be stored permanently in three places.


• An OFM production table
• In a OFM load file.
• In a report file.

The only interaction that BA has with the OFM database is when the BA setup is
configured to read the OFM tables for BA data input and when any allocated results are
written back to an OFM production table. Once the BA data is read in, program registry
is updated with this information.

After a session is opened, the BA output window will appear showing the results of the
BA session. If you want to make changes to the BA session, you should first open the
original OFM project that contains the tables your BA session used. You can then make
changes to the session if you are using the original OFM project by selecting the
Tools/Back Allocation/Setup… command and make your changes and then use OK
to have the calculation occur and view the output results.

Network section
A #network command in the *.ba file shows the start of the network section to
described the network along with its defined variables. Here is an example of the
network section with two nodes called POM1 and POM2.

#network
*header "Testing"
*header "Testing"
*header "testing"
*define FS #WELL
*methods *Oil *wellchar *kh *decline *welltest
*methods *Gas *welltest
*methods *Water *welltest
*methods *WaterInj *welltest
*methods *GasInj *welltest
*FS "POM1" *shrinkage 0.000000
WELL "POM1:01"
WELL "POM1:02"
WELL "POM1:03"

The OFM administrator handbook____________________________________ Page 341


WELL "POM1:04"
*FS "POM2" *shrinkage 0.000000
WELL "POM2:01"
WELL "POM2:02"
WELL "POM2:03"
WELL "POM2:04"
WELL "POM2:05"
#end

Three lines starting with *header indicate some header information for your report.
Next the *define FS #WELL causes the variable FS and WELL to be defined. FS is
the flow station and Well is the level under the FS level. A *method line then gives the
priority of each allocation method for each phase. The first method listed will have the
highest priority. The four methods are *welltest, *kh, *decline and *wellchar.

Each occurrence of *FS then denotes a new flow station. In this example there are
two. Then attached to each FS is the listing of the WELLs that are attached to that FS.
For POM1 there are four wells and for POM2 there are five wells. Volumes are
measured at the FS level and back allocated to the WELL level for each FS.

The *shrinkage factor can be multiplied by the measured volume before the
allocation is done if it is non-zero. Inside OFM BA you can only designate one shrinkage
value shared by all of the flow stations. You can designate a separate shrinkage factor
for each flow station by modifying the *.ba file and entering the shrinkage factor
accordingly for each *FS line. Using either 0.000 or 1.000 as a shrinkage factor is the
same thing since zero is interpreted as no shrinkage.

As you can see, there are quite a few commands in this file, but you don’t need to learn
them all. The BA module itself initially generates the file, which then you can edit it just
to fine-tune the job, before you run it again.
Together with the job control section (#network) there are also data sections with all
the numbers extracted from the project that are needed for the job. That is the reason
you don’t need the original project to run a job. All the information is contained in the
*.ba file.

The following scroll is an edited *.ba file.

#network
*header "Allocating using"
*header "Decline Data"
*define FS #WELL
*methods *oil *wellchar *kh *decline *welltest
*methods *Gas *welltest
*methods *Water *welltest
*methods *WaterInj *welltest
*methods *GasInj *welltest
*FS "POM1" *shrinkage 0.000000
WELL "POM1:01"
WELL "POM1:02"
WELL "POM1:03"
WELL "POM1:04"
#end
#control
*Daily

Page 342 ____________________________________ The OFM administrator handbook


*period 19980701 19980731
*Precision 0
*Theoretical *Gas *Water
*OfmFields DATE * * * * * * * * * * * *
*report C:\WINDOWS\Desktop\Reporte.prn
*load C:\WINDOWS\Desktop\load.prd
#end
#volume
*Date *Oil
*FS "POM1"
19980701 10000.000
19980702 10000.000

19980727 10000.000
19980728 10000.000
19980729 10000.000
19980730 10000.000
19980731 10000.000
#end
#time
*ON 24.000
*Date *Hours
*WELL "POM1:01"
19980701 24.00000
19980702 24.00000

19980730 0.00000
19980731 24.00000
*WELL "POM1:02"
19980701 24.00000
19980702 24.00000

19980730 24.00000
19980731 24.00000
*WELL "POM1:03"
19980701 24.00000
19980702 24.00000

19980730 24.00000
19980731 24.00000
*WELL "POM1:04"
19980701 24.00000
19980702 24.00000

19980730 24.00000
19980731 24.00000
#end
#Equation
*OFM *DATE *KH *Slope *Yo *RefDate *Qi *Di *n *other *other
*WELL "POM1:01"
19980605 10.0000 -3.0000 5000.0000 19980610.0000
600.0000 0.0030 0.0000 0.0000 0.0000
19980810 30.0000 -4.0000 6000.0000 19980726.0000
500.0000 0.0040 0.0000 0.0000 0.0000
*WELL "POM1:02"
19980605 10.0000 -3.5000 5000.0000 19980615.0000
300.0000 0.0070 0.0000 0.0000 0.0000
19980710 30.0000 -3.0000 5000.0000 19980101.0000
200.0000 0.0045 0.0000 0.0000 0.0000
*WELL "POM1:03"
19980605 20.0000 -5.0000 4000.0000 19980616.0000
300.0000 0.0050 0.0000 0.0000 0.0000
19980710 30.0000 -4.0000 4500.0000 19980101.0000
200.0000 0.0045 0.0000 0.0000 0.0000
*WELL "POM1:04"
19980705 20.0000 -10.0000 8000.0000 19980605.0000
600.0000 0.0060 0.0000 0.0000 0.0000
19980725 30.0000 -12.0000 9000.0000 19980601.0000
500.0000 0.0060 0.0000 0.0000 0.0000
#end
#welltest

The OFM administrator handbook____________________________________ Page 343


*BSWFraction
*Date *Oil *GOR *BSW *THP *Status
*WELL "POM1:01"
19980506 2700.000 400.000 0.250 1000.000 good
19980706 2600.000 400.000 0.280 1100.000 ok
19980727 2550.000 425.000 0.300 950.000 bad
*WELL "POM1:02"
19980209 2350.000 450.000 0.320 1100.000 g
19980701 2297.000 460.000 0.320 980.000 *
19980722 2269.000 462.000 0.330 1073.000 *
*WELL "POM1:03"
19980101 2455.000 412.000 0.310 1215.000 *
19980705 2455.000 426.000 0.260 1190.000 1
*WELL "POM1:04"
19970628 2163.000 560.000 0.160 980.000 *
19980711 3160.000 319.000 0.360 1200.000 good
#end

Conclusions

We can’t leave this chapter without some final conclusions. First of all, most of the
companies are already doing back allocation with different tools and then pass on the
results to reservoir engineers. Having this module built in into the program makes the
process a lot more convenient because it is very easy to access the needed data43 and
control the quality of the results44. Also, the generated results could be loaded directly
without intermediate steps. It could all be done in one place.

The methods available are quite a few and they all calculate theoretical values before
the final back allocation. This is very important, because you can supply different data
and get experimental results. For instance, you could use any rating number (not an oil
rate) in the well test method and still use the algorithm. The theoretical values will not
mean much because they do not come from a real rate, but they will be used to allocate
the measured production correctly, using your magic rating numbers.

Finally, the back allocation module is flexible (it allows you to use different types of data
and with different formats) and simple. However, if you need to customize more your
run, you can always dig into the *.ba file, for tuning.

43
The input data is usually already loaded to the OFM projects.
44
There are several ways of performing quality control of the results, from a simple plot to
compare the new value with the previous ones, to the possibility of writing user functions to look
for data anomalies.

Page 344 ____________________________________ The OFM administrator handbook

You might also like