Você está na página 1de 240

SCAL

User Guide

2009.1

Proprietary notice
Copyright Schlumberger. All rights reserved.
No part of the document may be reproduced, stored in an information retrieval system, or translated or retransmitted in any form or by any
means, electronic or mechanical, including photocopying and recording, without the prior written permission of the copyright owner.
Use of this product is governed by the License Agreement. Schlumberger makes no warranties, express, implied, or statutory, with respect
to the product described herein and disclaims without limitation any warranties of merchantability or fitness for a particular purpose.

Patent information
Schlumberger ECLIPSE reservoir simulation software is protected by US Patents 6,018,497, 6,078,869 and 6,106,561, and UK Patents
GB 2,326,747 B and GB 2,336,008 B. Patents pending. Schlumberger FrontSim reservoir simulation software is protected by US Patent
2004/0015295A1.

Service mark information


The following are all service marks of Schlumberger:
The Calculator, Charisma, ConPac, ECLIPSE 100, ECLIPSE 200, ECLIPSE 300, ECLIPSE 500, ECLIPSE Office, EDIT, Extract, Fill,
Finder, FloGeo, FloGrid, FloViz, FrontSim, GeoFrame, GRAF, GRID, GridSim, Nodal, NWM, Open-ECLIPSE, PetraGrid, PIPESIM,
PIPESIM FPT, PIPESIM GOAL, PlanOpt, Prodman, Pseudo, PVTi, RTView, SCAL, Schedule, SimOpt, VFPi, Weltest 200.

Trademark information
Silicon Graphics and IRIX are registered trademarks of Silicon Graphics, Inc. OpenGL and the oval logo are trademarks or registered
trademarks of Silicon Graphics, Inc. in the United States and/or other countries worldwide. OpenInventor and WebSpace are trademarks
of Silicon Graphics, Inc. IBM, AIX are registered trademarks of International Business Machines Corporation. Sun, SPARC, Solaris, Ultra
and UltraSPARC are trademarks or registered trademarks of Sun Microsystems, Inc. Macintosh is a registered trademark of Apple
Computer, Inc. UNIX is a registered trademark of UNIX System Laboratories. Motif is a registered trademark of the Open Software
Foundation, Inc. The X Window System and X11 are registered trademarks of the Massachusetts Institute of Technology. PostScript and
Encapsulated PostScript are registered trademarks of Adobe Systems, Inc. OpenWorks and VIP are registered trademarks of Landmark
Graphics Corporation. Lotus, 1-2-3 and Symphony are registered trademarks of Lotus Development Corporation. Microsoft, Windows,
Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP, Internet Explorer, Intellimouse and PowerPoint are either
registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Netscape is a registered
trademark of Netscape Communications Corporation. AVS is a registered trademark of AVS Inc. ZEH is a registered trademark of ZEH
Graphics Systems. Ghostscript and GSview are Copyright of Aladdin Enterprises, CA. GNU Ghostscript is Copyright of the Free Software
Foundation, Inc. Linux is Copyright of the Free Software Foundation, Inc. IRAP is Copyright of Roxar Technologies. LSF is a registered
trademark of Platform Computing Corporation, Canada. VISAGE is a registered trademark of VIPS Ltd. Cosmo is a trademark and
PLATINUM technology is a registered trademark of PLATINUM technology, inc. PEBI is a trademark of Veritas DGC Inc./HOT Engineering
GmbH. Stratamodel is a trademark of Landmark Graphics Corporation. GLOBEtrotter, FLEXlm and SAMreport are registered trademarks
of GLOBEtrotter Software, Inc. CrystalEyes is a trademark of StereoGraphics Corporation. Tektronix is a registered trade mark of
Tektronix, Inc. GOCAD and JACTA are trademarks of T-Surf. Myrinet is a trade name of Myricom, Inc. This product may include software
developed by the Apache Software Foundation (http://www.apache.org). Copyright (c) 1999-2001 The Apache Software Foundation. All
rights reserved. MPI/Pro is a registered trademark of MPI Software Technology, Inc. The TGS logo is a trademark of TGS, Inc. POSC, the
POSC logo and Epicentre are registered trademarks of Petrotechnical Open Standards Consortium, Inc. Red Hat is a registered
trademeak of Red Hat, Inc. This product may include software developed using LAPACK (http://www.netlib.org/lapack/), which is copyright
of its authors. Scali is a trademark of Scali Inc.

Table of Contents
List of Figures ..... ...................................................................................................................................................................5
List of Tables ...... ...................................................................................................................................................................7

Chapter 1 - New Developments ....................................................................................................... 9


Developments for 2007.1 .......................................................................................................................................................9
Developments for 2000A ......................................................................................................................................................10

Chapter 2 - Introduction ................................................................................................................. 13


Overview............. .................................................................................................................................................................13
Records and attributes .........................................................................................................................................................14

Chapter 3 - Getting Started ............................................................................................................ 15


Starting SCAL ..... .................................................................................................................................................................15
Graphical user interface .......................................................................................................................................................17

Chapter 4 - Tutorials ....................................................................................................................... 19


Introduction ......... .................................................................................................................................................................19
Available tutorials .................................................................................................................................................................20
Tutorial 1: Creating Saturation Tables for ECLIPSE.............................................................................................................21
Tutorial 2: Correlations .........................................................................................................................................................29

Chapter 5 - Reference section ....................................................................................................... 33


Introduction ......... .................................................................................................................................................................33
SCAL-GF ............ .................................................................................................................................................................35
SCAL Loader ...... .................................................................................................................................................................37
Main SCAL window ..............................................................................................................................................................39
Record editor ...... .................................................................................................................................................................57
Graph module ..... .................................................................................................................................................................66
Record selector .. .................................................................................................................................................................84
Keyword generator ...............................................................................................................................................................86
Generate Pc curves ..............................................................................................................................................................93
Archies parameters..............................................................................................................................................................94
Merging and associating.......................................................................................................................................................95
3D grid viewer..... .................................................................................................................................................................98
Three-phase relative permeability ......................................................................................................................................131

Chapter 6 - Technical description ............................................................................................... 135


Input and output.. ...............................................................................................................................................................135
Functions ............ ...............................................................................................................................................................137
Derived data ....... ...............................................................................................................................................................141
Three-phase relative permeabilities....................................................................................................................................143
Hysteresis ........... ...............................................................................................................................................................148
Units ................... ...............................................................................................................................................................149

Appendix A - File formats ............................................................................................................ 151


The SCAL input file (.RCI) ..................................................................................................................................................151
Saturation log data file ........................................................................................................................................................165
The SCAL tables output file (.RCP) ....................................................................................................................................166
The SCAL properties output file .........................................................................................................................................168

SCAL User Guide


Table of Contents

Appendix B - The Calculator........................................................................................................ 169


Introduction ......... ...............................................................................................................................................................169
Language definition ............................................................................................................................................................170
Keywords ............ ...............................................................................................................................................................173
Built-in constants ...............................................................................................................................................................177
Built-in functions . ...............................................................................................................................................................178
Operators ............ ...............................................................................................................................................................180
Symbol functions ...............................................................................................................................................................181
Unit support ........ ...............................................................................................................................................................184
Commands ......... ...............................................................................................................................................................187
SCAL-specific commands...................................................................................................................................................192
Special variables. ...............................................................................................................................................................200
Special variables specific to SCAL .....................................................................................................................................201
Calculator utilities ...............................................................................................................................................................208
Startup files ......... ...............................................................................................................................................................210
Debugging .......... ...............................................................................................................................................................211
Example Calculator files .....................................................................................................................................................213

Appendix C - Windows and panels ............................................................................................. 215


Windows ............. ...............................................................................................................................................................215
Special windows . ...............................................................................................................................................................217
Panels ................. ...............................................................................................................................................................218
Data Tables ........ ...............................................................................................................................................................221
Window Items ..... ...............................................................................................................................................................222

Appendix D - Configuring SCAL ................................................................................................. 225


SECTION SCAL options .....................................................................................................................................................225
SECTION FRAMEWORK options.......................................................................................................................................226
SECTION HELP.. ...............................................................................................................................................................227
SECTION FLOGRID ...........................................................................................................................................................228

Appendix E - Glossary ................................................................................................................. 229


Appendix F - Bibliography ........................................................................................................... 233
Appendix G - Index ....................................................................................................................... 235

SCAL User Guide


Table of Contents

List of Figures
Chapter 1 - New Developments ....................................................................................................... 9
Chapter 2 - Introduction ................................................................................................................. 13
Chapter 3 - Getting Started ............................................................................................................ 15
Chapter 4 - Tutorials ....................................................................................................................... 19
Figure 4.1 .......... Record tree after merging Kr and Pc records .........................................................................................25
Figure 4.2 .......... Final record tree structure.......................................................................................................................26
Figure 4.3 .......... Graph of data points from fitted function.................................................................................................30

Chapter 5 - Reference section ....................................................................................................... 33


Figure 5.1 ..........
Figure 5.2 ..........
Figure 5.3 ..........
Figure 5.4 ..........
Figure 5.5 ..........
Figure 5.6 ..........
Figure 5.7 ..........
Figure 5.8 ..........
Figure 5.9 ..........
Figure 5.10 ........
Figure 5.11 ........
Figure 5.12 ........
Figure 5.13 ........
Figure 5.14 ........
Figure 5.15 ........
Figure 5.16 ........
Figure 5.17 ........
Figure 5.18 ........
Figure 5.19 ........
Figure 5.20 ........
Figure 5.21 ........
Figure 5.22 ........
Figure 5.23 ........
Figure 5.24 ........
Figure 5.25 ........
Figure 5.26 ........
Figure 5.27 ........
Figure 5.28 ........
Figure 5.29 ........
Figure 5.30 ........
Figure 5.31 ........
Figure 5.32 ........
Figure 5.33 ........
Figure 5.34 ........
Figure 5.35 ........
Figure 5.36 ........

The main SCAL window .........................................................................................................................39


An example record tree ..........................................................................................................................40
The Property Transformer panel.............................................................................................................55
Normalize Graph Data panel ..................................................................................................................73
Denormalise Graph Data panel ..............................................................................................................74
Generate New Curves by Averaging panel ............................................................................................75
The Generate New Curves by Interpolation panel..................................................................................76
End Point Scaling Curve Viewer .............................................................................................................78
Graph settings panel...............................................................................................................................80
Graph preferences screen ......................................................................................................................81
PostScript panel......................................................................................................................................99
Write Image panel.................................................................................................................................100
Property Display panel..........................................................................................................................103
Cell Probe panel ...................................................................................................................................104
Integer Threshold panel........................................................................................................................105
Real Threshold panel............................................................................................................................106
Control buttons .....................................................................................................................................107
The Animate Time panel.......................................................................................................................109
The timestep control buttons ................................................................................................................109
The Animate Time Options panel .........................................................................................................110
IJK Slicer panel.....................................................................................................................................111
VOI Grid Cells panel .............................................................................................................................112
VOI Domain Selection panel.................................................................................................................113
Create VOI From Boundary panel ........................................................................................................114
The Cell Face Selection panel ..............................................................................................................115
Create Property Type panel..................................................................................................................116
Object Appearance panel .....................................................................................................................117
Ternary legend......................................................................................................................................118
Color legend .........................................................................................................................................118
Camera Rotation panel .........................................................................................................................122
Lighting panel .......................................................................................................................................123
Edit Titles panel ....................................................................................................................................124
Axes panel ............................................................................................................................................125
Mouse actions.......................................................................................................................................129
Reservoir rotation. ................................................................................................................................130
3D 3Phase Rel. Perm. Viewer ..............................................................................................................132

Chapter 6 - Technical description ............................................................................................... 135


Figure 6.1 .......... The default three-phase oil relative permeability model assumed by ECLIPSE...................................143
Figure 6.2 .......... Calculating the minimum residual oil saturation from the water saturation...........................................144

SCAL User Guide


List of Figures

Figure 6.3 ........... Calculating the minimum residual oil saturation from the gas saturation ..............................................145

Appendix A - File formats ............................................................................................................ 151


Appendix B - The Calculator........................................................................................................ 169
Appendix C - Windows and panels ............................................................................................. 215
Figure C.1
Figure C.2
Figure C.3
Figure C.4

..........
..........
..........
..........

The Text Editor window ........................................................................................................................217


Example of a modal panel ....................................................................................................................218
Example of a modeless panel...............................................................................................................219
Example window items .........................................................................................................................223

Appendix D - Configuring SCAL ................................................................................................. 225


Appendix E - Glossary ................................................................................................................. 229
Appendix F - Bibliography ........................................................................................................... 233
Appendix G - Index ....................................................................................................................... 235

SCAL User Guide


List of Figures

List of Tables
Chapter 1 - New Developments ....................................................................................................... 9
Chapter 2 - Introduction ................................................................................................................. 13
Chapter 3 - Getting Started ............................................................................................................ 15
Chapter 4 - Tutorials ....................................................................................................................... 19
Chapter 5 - Reference section ....................................................................................................... 33
Table 5.1
Table 5.2
Table 5.3
Table 5.4
Table 5.5
Table 5.6
Table 5.7
Table 5.8
Table 5.9

ECLIPSE family (i) keywords ...................................................................................................................91


ECLIPSE family (ii) keywords ..................................................................................................................91
End-point scaling keywords or keyword families .....................................................................................91
Cell-based property keywords or keyword families..................................................................................91
Configuration file settings ......................................................................................................................100
Open Inventor settings...........................................................................................................................127
OIFloViz Settings ...................................................................................................................................128
GeoFrame settings ................................................................................................................................128
RTView settings .....................................................................................................................................128

Chapter 6 - Technical description ............................................................................................... 135


Table 6.1

The four unit sets supported by SCAL ...................................................................................................149

Appendix A - File formats ............................................................................................................ 151


Table A.1
Table A.2
Table A.4
Table A.3
Table A.5
Table A.6
Table A.7
Table A.8
Table A.9
Table A.10

ECLIPSE keywords supported in the SCAL input file ............................................................................153


Relative permeability .............................................................................................................................153
J function keywords ...............................................................................................................................154
Capillary pressure ..................................................................................................................................154
End point scaling versus depth saturation table keywords ....................................................................157
End point scaling versus depth relative permeability table keywords ....................................................157
Description .............................................................................................................................................159
Procedures attributes.............................................................................................................................160
Results attributes ...................................................................................................................................160
End point scaling attributes....................................................................................................................162

Appendix B - The Calculator........................................................................................................ 169


Table B.1
Table B.2
Table B.3
Table B.4
Table B.5
Table B.6
Table B.7
Table B.8
Table B.9
Table B.10

Standard Calculator keyword descriptions ............................................................................................173


Built-in constants ...................................................................................................................................177
Built-in functions ....................................................................................................................................178
Supported operators ..............................................................................................................................180
Symbol functions ...................................................................................................................................181
Variables defined when simulation property editing ..............................................................................200
Variables defined when using a Calculator function within SCAL.........................................................201
Variables defined when processing records and generating keywords .................................................201
Calculator attributes defined by SCAL ...................................................................................................202
Example Calculator files ........................................................................................................................213

Appendix C - Windows and panels ............................................................................................. 215


Table C.1
Table C.2
Table C.3

The default pushbutton action ...............................................................................................................219


Panel interaction ....................................................................................................................................220
Window items ........................................................................................................................................222

SCAL User Guide


List of Tables

Table C.4

Interaction with a dropdown list box .......................................................................................................223

Appendix D - Configuring SCAL ................................................................................................. 225


Appendix E - Glossary ................................................................................................................. 229
Appendix F - Bibliography ........................................................................................................... 233
Appendix G - Index ....................................................................................................................... 235

SCAL User Guide


List of Tables

New Developments
Chapter 1

Developments for 2007.1


Maintenance of this application is continuing until further notice.

SCAL User Guide

New Developments
Developments for 2007.1

Developments for 2000A


General
Saturation Height model display is now complete with various display options. You may create
Capillary Pressure (Pc) Reservoir or Saturation Height curves. A new option to generate Pc
Reservoir curves from saturation logs is also available. In addition to these two, SCAL now
supports resistivity index and formation factor plots to calculate Archies parameters.

Saturation Height curves


From a capillary pressure display, you can convert the same curve into Pc reservoir or Saturation
height/depth model. The view can be adjusted by changing various parameters and can be
calibrated by using saturation logs.
Saturation height model can be saved into an ASCII file to be used in other 3D applications.

Generating Capillary Pressure Curves


A new option to generate capillary pressure curves from the saturation logs is available. You
need to use the appropriate fitting methods to generate a smooth curve. The raw curve may be
discarded later as it can spoil the graph display.

Archies parameters
A new option to plot Resistivity Index or Formation Factor data is available. Formation Factor
curves can be plotted only for a group of curves (as there is only one FF measurement per
sample). Appropriate fit functions may be used to generate the cementation exponent and
cementation factor for the group.
Resistivity plots are available for records as well as groups. If a group of records is plotted, the
application will show two sets of curves, one for the group and the other for individual records.
The user may fit the curves to generate the saturation exponent for each record and also for the
group.
Note

A group in these two experiments represents a zone, so it is up to the user to create a


group of records that belongs to a particular zone before calculating Archies
parameters.

2D display improvements
In 99B it was possible to set rules for controlling the color of lines, and optionally marker colors
could be defined using the same rule.

10

New Developments
Developments for 2000A

SCAL User Guide

It is now possible, in 2000A, to set independent rules for line color, marker color and marker
shape.
This is of particular use in cross-plots, where individual markers may be shaped and/or colored
according to some characteristic of the record they originate from.

SCAL User Guide

New Developments
Developments for 2000A

11

12

New Developments
Developments for 2000A

SCAL User Guide

Introduction
Chapter 2

Overview
SCAL is a tool to help engineers effectively use laboratory-derived relative permeability and
capillary pressure measurements in reservoir simulation.
The program has facilities to:

import laboratory data,

perform quality control (such as curve smoothing),

group data according to lithological parameters and end-point values,

transform the laboratory data into rock curves suitable for input to simulators such
as ECLIPSE and automatically assign these curves to grid cells (according to a set
of user defined rules, for example as a function of porosity, permeability or
lithological parameters).

The output consists of a series of INCLUDE files, for both the PROPS and REGIONS sections.
The program is a Windows-type program. It runs on both PC and UNIX workstations, and
makes use of GUI facilities such as drag-and-drop and 3D visualization.
A major goal of SCAL is to be as open as possible. To this end maximum use is made of the
Calculator. The Calculator is a simple programming language with access to program internal
variables. It can also issue commands back to the program.
Using the Calculator makes it possible for you to implement algorithms which are not provided
as standard in the program (company confidential algorithms, for instance).
By using SCAL, you are able to make more systematic use of the special core analysis data
available to you. This should improve the results of reservoir simulation.

SCAL User Guide

Introduction
Overview

13

Records and attributes


A key concept in SCAL is that of a record. A record is a collection of data items known as
attributes. Attributes are of various types and can contain information such as the name of a
core sample, the wettability of the sample, or the relative permeability of the sample. A list of
the attributes is given under "The attribute section" on page 159.

Record types
In most circumstances a record can be considered as the results of an experiment on a single
core plug. The key piece of information in a record is normally a capillary pressure curve or a
relative permeability curve. Records can be merged so that they hold both relative permeability
and capillary pressure. This is normally done before writing out the simulator saturation
keyword tables.
In addition records can hold data about arbitrary functions or correlations. These records are
known as relationship records. They may be generated from the data held in several other
records (for example a porosity-permeability relationship) or created from scratch.

Supplements
SCAL supports the most common special core analysis data items. However other data items
may be specified as supplemental attributes or supplements. These named data items are
specified in the same way as for normal attributes but in the supplement section of a record.
Once you have specified a supplement, you can use it in the same way as the normal attributes.
Supplements can be boolean, integer, string, real, table or function.

Ranges
Records can also contain information specifying how the data in the record is to be used in a
simulation. This is specified in the PROPERTY section of the input file. The data is a simulator
property (map) name and either a set of integer values or an upper and lower limit.

SCAL-GeoFrame
In the SCAL-GeoFrame version, a collection represents all the records that were loaded from a
SCAL input file (for easy identification, the name of a collection would be the same as that of
the ascii file that was loaded from). A record is stored as a special core analysis data item under
a core sample.

14

Introduction
Records and attributes

SCAL User Guide

Getting Started
Chapter 3

Starting SCAL
Windows NT and Windows 95 platforms
ECLIPSE Suite program launcher
1

Start the ECLIPSE Program Launcher.

Click on the SCAL icon

Select the version and working directories as required.

Command line
1

Type the command $SCAL in a command prompt window.

UNIX platforms
1

Type the command @scal at the command prompt.

SCAL under GeoFrame


1

Type the command Geonet at the command prompt.

Select GeoFrame from drop down list.

Starting a new project


1
SCAL User Guide

Click the Project Manager... button


Getting Started
Starting SCAL

15

Enter SCAL_GF in the New Project Name field and enter the password.

Click OK.

Note

For further information regarding Storage Setting and Data Base Administration see
the GeoFrame manual.

Starting SCAL-GF

16

Once a new project and memory allocation are completed click on the GeoFrame Login...
button.

Click OK to confirm.

Select SCAL_GF Project under the Projects list and enter the password.

Click on Connect and Application Manager...

In the Application Manager panel click on the Reservoir button.

Select SCAL and Scal Loader under the Products list.

Getting Started
Starting SCAL

SCAL User Guide

Graphical user interface


SCAL uses the graphical user interface common to many ECLIPSE Suite Simulation
Software products. See "Windows and panels" on page 215 for more information on the GUI.

SCAL User Guide

Getting Started
Graphical user interface

17

18

Getting Started
Graphical user interface

SCAL User Guide

Tutorials
Chapter 4

Introduction
The aim of this section is to demonstrate how to perform several typical operations on the results
of core data experiments using SCAL. Since the emphasis of these tutorials is to demonstrate
the effective use of laboratory derived relative permeability and capillary pressure
measurements in reservoir simulation as opposed to exercising all the program options, some
menu options and areas of functionality are omitted. Nevertheless, the first tutorial in particular
aims to acquaint you with the major aspects of SCAL. The remaining tutorials explain the
options in greater detail. Precise instructions are provided for each step of the tutorial whilst
input data, graphical displays and output reports are reproduced within this document where
appropriate.
Note

These tutorials are not meant to teach special core analysis; rather, they are intended to
familiarize you with the facilities available.

Each tutorial is divided into a number of distinct sections intended to highlight a specific aspect
of the analysis process. To avoid repetition, later tutorials assume familiarity with some
procedures used in earlier tutorials, so it is strongly recommended that you work through them
in the order they are presented.

SCAL User Guide

Tutorials
Introduction

19

Available tutorials

20

"Tutorial 1: Creating Saturation Tables for ECLIPSE" on page 21

"Tutorial 2: Correlations" on page 29.

Tutorials
Available tutorials

SCAL User Guide

Tutorial 1: Creating Saturation Tables for ECLIPSE


Introduction
This tutorial demonstrates how to bring data into your project in an efficient way and finally
how to export the validated saturation functions for use in the simulator.
The tutorial stages are as follows:

"Creating a new record" on page 21.

"Importing relative permeability saturation functions" on page 22.

"Importing capillary pressure into relative permeability records" on page 23.

"Importing additional data by opening an existing SCAL project" on page 24.

"Viewing the data in graphical form" on page 24.

"Merging Kr and Pc records" on page 24.

"Selecting saturation functions for ECLIPSE" on page 25.

"Exporting ECLIPSE saturation tables" on page 26.

"Saving a SCAL project" on page 26.

Creating a new record


1

Copy the contents of the SCAL/TUTORIALS/SATTBLS directory to your current


working directory, then run SCAL.

Options | Edit Records... or click on the

button.

As no records were dropped onto the button, the Editor has no records loaded. Any data
that is entered into the various panels of the Editor will therefore be part of a new record.
3

Select the Description tab (Des).


This brings the Description panel to the front. This panel stores basic data about the
location and type of the core that was used in the experiment.

Note

5
SCAL User Guide

Data for SCAL records does not have to be entered in any particular order, but it is
usual to start with the Description panel because the name of the record is stored there.

Enter the following data, leaving blank the fields not mentioned:

Sample name:CS1

Reservoir name:Reservoir 1

Zone:Sector 1

Well name:G1

Core Depth:7979 ft

HAOWC:421 ft

Click on Apply to commit the data.


Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

21

On the main window, a new blank record is created under the Misc. group as there is not
enough information to allow SCAL to place the record under the appropriate group.
6

In the Editor panel, select the Procedures tab (Pro).


This brings the Procedures panel to front. This panel allows you to specify details about
the experiment performed on this particular core sample.
(The information on this tab is optional.)

Enter the following data:


(Note that in several of the fields, the data can be entered by using the drop-down list,
accessible by clicking in the small down-pointing arrow at the right side of the field.)

Kr experiment:

Steady

Pc experiment:

PorPlate

Flooding orientation:

Vertical

Displaced phase:

Gas

Injected phase:

Water

Water density:

1 g/cc

Gas density:

0.01473 g/cc

Water viscosity:

1 cp

Gas viscosity:

0.023 cp

Click on Apply to commit.

Select the Results tab (Res).


This panel allows you to specify non-tabular experimental results, such as absolute
permeabilities and saturation end points.

The Kr basis should be defined before importing the table relative permeability data. If the Kr
basis is left undefined, SCAL considers the record incomplete and places it in the Bad group.
Also, if the Kr basis is defined but no value of permeability has been entered, a warning is given
in the Log window.
10 Set the following information and click on Apply:

Kr basis:

KgSwi

Porosity:

0.23

KgSwi:

300

(in the Permeability table on the bottom left)

Importing relative permeability saturation


functions
1

Editor: File | New | Table.


This opens the New table selector panel. This panel allows you to display the tabular
experiment results. If a particular type of data exists for this record its name is marked with
an asterisk (*) and it is at the top of the drop-down list.

22

Select the gas-water relative permeabilities (KRGW) from the drop-down list, or click on the
drop-down arrow and press the K keyboard key repeatedly until KRGW is displayed in the
field.

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

SCAL User Guide

Click on OK.
This creates an empty tab with a two-phase gas/water relative permeabilities table, called
krgw.
The data required to populate the saturation table are gas saturations, gas relative
permeability and water relative permeability. The values can be typed in separately or
imported from a text file. To save time we will import the data.

Click with the right mouse button over the empty saturation table. Select Table Import |
From file from the pop-up menu.

Select the file KRGW1.TXT and OPEN.

Ensure that Tab and Space are selected as delimiters and also notice the columns in the file
correspond correctly with the columns in the SCAL table. Click on OK to import the data.

Accept any warnings generated that indicate records failed validation - this means that
any comments or header lines in the imported data are ignored.

Click on OK in the Editor panel.


The Record Tree now shows a K on the CS1 record node, indicating that it now contains
relative permeability data. The group it is in has been renamed to Rel. Perm. (GW),
indicating that it contains gas-water data.

Note

The current release of SCAL does not account for hysteresis, and therefore ignores any
information about the direction of the experiment. Here it has ignored the displacement
information on the Procedures panel, which indicates that the initial water saturation
must have been lower than the final water saturation; it has instead determined that
Sgi=0.3 and therefore Swi=0.7.
In gas-water and gas-oil systems SCAL always chooses endpoints so that Sgi<Sgr;
in oil-water systems it always ensures Swi<Swr. This has no effect on the tables
output from SCAL.

Importing capillary pressure into relative


permeability records
If you have obtained any more data from the same core sample you might want to combine the
results from these experiments within one record.
1

Drag CS1 onto the

Editor: File | New | Table

Select PCGW as the table to edit by pressing the P key until (PCGW) is displayed in the
field.

button.

OK to enter.

SCAL User Guide

Select the pcgw tab and right mouse-click on the empty table to select Table import... |
From file.

Import the contents of the file PCGW1.TXT by clicking on OPEN.

Ensure that Tab and Space are selected as delimiters and also confirm that the column
headings in the file match those in the empty SCAL table and click on OK.

Accept any messages regarding the contents of the file by clicking on OK.

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

23

Click on OK in the Editor panel to apply the new data and close the panel.
The CS1 record on the Record Tree is now marked with KP, indicating it has both relative
permeability and capillary pressure data.

Importing additional data by opening an existing


SCAL project
1

File | Open Records

Choose CORE.RCI (found in the SCAL/TUTORIALS/SATTBLS directory).


The file is read and the records and groups are displayed in the main SCAL
window. Any problems encountered in the file are written to the Log window.

Viewing the data in graphical form


1

Drag the node called Rel.Perm. (GW) on to the kr plot button

This displays all three records in graphical form.


2

In the same way, drag the Capillary Pressure record labeled CS2 on to the Pc plot button
.

To add the Capillary Pressure information from CS1, click on the box to the left of CS1
(labeled KP) and drag it to Pc plot

This adds CS1 data to the graph already on display.


4

Close the Graph panel.

Merging Kr and Pc records


Note

Note that there are two separate records for CS2. Prior to writing out ECLIPSE SWFN
and SGFN tables, we must merge the records for CS2. This ensures that both relative
permeability and capillary pressure information are correctly listed for use by
ECLIPSE.

Options | Merge Records


This opens the Record Merger panel. We want to merge the Kr and Pc records for CS 2
only.

24

Select Rel. Perm. (GW) as the Primary group.

As we want to merge the Kr and Pc records for CS2 only, in the Define merge record
pairs folder delete Primary names CS3 and CS1 by selecting any cell in those rows in the
table and pressing Ctrl-D in each (press the Ctrl and D keys at the same time).

Select Cap. Press. (GW) as the Secondary group.

Enter Merged (GW) in the Merged group field.

Enter CS2_KP in the Merged names column of the Define merge record pairs tab.

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

SCAL User Guide

Enter CS2 as both Primary name and Secondary name for the one remaining row in the
Define merge record pairs tab.

Click on Apply then on OK.


A new group called Merged (GW) has been placed on the Record Tree. This group
contains a new record CS2_KP. It is marked with a KP, indicating both relative
permeability and capillary pressure data have been defined for this record. The CS2_KP
record has also been added to the Rel. Perm.(GW) group.

You need to merge records if you want to output ECLIPSE table keywords (such as SWOF), as
they need to contain both relative permeability and capillary pressure data.
To change the width,
point to the left or right Hint
window border. When the
pointer changes into a
horizontal double-headed
arrow, drag the border to
the right or left.

If you want to merge all records from Rel. Perm. group (primary group) with all
records from Cap. Press. group (secondary group), select the Merge All Record
Combinations tab. This option creates all combinations that exist with the two
selected groups without further input.
If this tab is not visible, either widen the panel, or click on the button at the top right
of the table.

Your record tree should now look similar to Figure 4.1.


Figure 4.1 Record tree after merging Kr and Pc records

Selecting saturation functions for ECLIPSE


1

Drag the CS1 record from the Rel. Perm (GW) group to an empty area of the Record Tree.
This creates a new group for export.

Rename the new group by clicking with the right mouse button on the Group node and
selecting Change Label from the pop-up menu.

Type Simulation Records in Group Label and click on OK.

Drag CS2_KP from the Rel. Perm. (GW) group onto the Simulation Records group
node.
This adds a copy of CS2_KP to the Simulation Records group.

Note

Dragging a record from the root tree copies the record to the designated group.
If the drag-and-drop is done from one group to another, not from the root group, the
selected record(s) are moved to the designated group.

The Record Tree should now look similar to Figure 4.2.

SCAL User Guide

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

25

Figure 4.2 Final record tree structure

Exporting ECLIPSE saturation tables


1

Drag the Simulation Records group onto the Keywords button

Enter the following data:

Type of data to process

Tables

Table keyword

Family (ii) - SWFN & SGFN

Overwrite

Checked
next to the Output File name field to open a browser

Click on the Browser button


panel.

Select the directory, enter MY_TBL as the file name and click on Open. You should indicate
the file name but not the file name extension.

In the Keyword Generator panel, click on Write.


This generates the saturation tables and writes them to a file called user.rcp in your
working directory. Close the panel.

Hint

You may want to select Settings on the Keyword Generator panel. This opens the
Keyword Generator Settings panel, whose functionality is discussed in "The
keyword generation settings panel" on page 89.

You can inspect this file using the SCAL text editor by selecting Tools | Text Editor on the
main SCAL panel. Indicate the MY_TBL.RCP file using the open button
. You will see
that there are two SWFN tables and two SGFN tables in the file. These correspond to the two
records in the Simulation Records group.
This file can now be included in the PROPS section of an ECLIPSE 100/300 data file.

Close the Text Editor.

Saving a SCAL project


1

26

File | Save.

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

SCAL User Guide

Enter USER.RCI as the file name.

Click on Save.
This saves all the records and information concerning the group structure.

Hint

If you had problems with the tutorial you can look at the example file SATTBLS.RCP
for comparison.

Saving a SCAL project using *.CMDLOG.


For every SCAL session, a SCAL.CMDLOG file is produced and written to your working
directory. This file is overwritten each time a new SCAL session is started. For this reason the
SCAL.CMDLOG file should be saved to a different name at the end of each SCAL session.
Actions performed in SCAL that changed the state of the data are logged as commands to
SCAL.CMDLOG. These commands may be replayed to rerun a complete session in a new SCAL
session. Alternatively, the command file may be edited and portions of a session replayed.
At any stage in a session the project may be saved using this procedure by following these steps.
1

Tools | Text Editor...


This opens the Text Editor panel.

File | Open... and select SCAL.CMDLOG from your working directory.

Text Editor: File | Save as...

Rename the file USER.CMDLOG and click on Save.

File | Clear all data...

Click on OK to delete all records, grid and properties from the program.

File | Play Commands

Select USER.CMDLOG from your working directory.

Discussion

SCAL User Guide

This tutorial demonstrated how to create a SCAL project from scratch with only core
sample information and saturation tables available.

It involved entering data by hand, importing tables from files, creating records by copying
and modifying others.

Although it started by constructing records for relative permeability, it could have started
with capillary pressure instead SCAL does not require a particular input order.

It showed how different types of table data (relative permeability and capillary pressure)
from the same core can be stored in the same record, or in separate records with the same
name.

It showed how new records can be created by merging records containing relative
permeability and capillary pressure data.

It demonstrated how ECLIPSE saturation tables can be generated from the merged records.

Finally, it showed how to save the records to a project file which can be read back into
SCAL later.

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

27

Hint

28

Sometimes it is easiest to create the SCAL input file directly using the text editor such
as Notepad or vi. The input format is described in "File formats" on page 151.

Tutorials
Tutorial 1: Creating Saturation Tables for ECLIPSE

SCAL User Guide

Tutorial 2: Correlations
Introduction
This section aims to show how to plot cross-plots of reservoir parameters and, where applicable,
how to generate correlation functions from the observed relationships.
The tutorial stages are as follows:

"Opening the SCAL project" on page 29

"Cross-plotting core data" on page 29

"Saving the record" on page 31

Opening the SCAL project


1

Copy the files from the scal/tutorials/correlations directory to your working


directory.

File | Open Records

Open CORR.RCI.

Cross-plotting core data


1

Options | Edit Records

From the Editor, select File | New | Supplement Table

Enter the following data:

Attribute name:

SWIVDEP

X column name:

COREDEPTH

Y column name:

SWI

Load from group:

Checked

Group:

Rel. Perm. (OW)

Click on OK and inspect the swivdep table that has been created.

Click on OK to save the information and close the Editor panel.

Drag the SWIVDEP record onto the "Cross plot" button

Double-click on SWIVDEP in the Legend to open up the Plot Style panel.

On the Axis tab of the Plot Style panel set the following:

Y Axis Range of 0.1 to 0.6; Click off the Limit Range box.

10 X Axis Range of 3000 to 3010; click off the Limit Range box
11 Click OK to accept the Plot Style changes and inspect the graphed relationship.
12 To create a correlation, select Edit | Table from the Graph panel.
SCAL User Guide

Tutorials
Tutorial 2: Correlations

29

13 Select QUADRATIC FUNCTION from the Function drop-down list.


The table of fitting parameters is automatically loaded with some initial values. For most
functions the initial values are first attempts at fitting the data. You have to use the Fit
button to get the program to try and find the parameters that give the best fit. In the case of
the quadratic function, the initial values are normally very good
14 To illustrate this, click on Fit to fine-tune the parameters.
The coefficients probably change very little, if at all.
15 Click on Generate and then on Apply.
This generates data points from this fitted function and displays them on the graph. The
graph should look similar to the one in Figure 4.3.
Figure 4.3 Graph of data points from fitted function

Hint

If you do not like the fit you can click on the swivdep tab, alter the coefficients (or fit
a different correlation function), then Generate another curve. Each curve fit that is
generated occupies a new tab.
If you have closed the Editor panel, select Graph: Edit | Table to re-open it.

16 Click on OK to close the Editor panel.


17 Close the Graph panel.

30

Tutorials
Tutorial 2: Correlations

SCAL User Guide

Saving the record


1

Right-click on the Misc. group.

Select Save to File from the pop-up menu.

Name the output file misc.rci.

Click on Save.

Tools | Text Editor.

Open misc.rci. Examine the way the records are stored. You can compare your results
to CORR_FINAL.RCI.

Discussion
Hint

SCAL User Guide

If you had difficulty, the files misc.rci and MISC_FINAL.RCI contain the results
from this tutorial.

This tutorial showed how to create a relationship between two attributes.

The relationship was displayed graphically and a standard correlation was fitted to the
relationship.

A correlation was used to regenerate missing data.

We showed how a fitted correlation be tuned manually by changing the values of the
coefficients. Normally you would only attempt to derive data from a correlation if you
know what the functions coefficient values should be, but you might also want to tune the
fit if you believe the regressed fit is not accurate enough.

Relationship records may also be used to transform grid properties.

If you want to use a correlation that is not built in, then you can use the Calculator to define
your own.

Tutorials
Tutorial 2: Correlations

31

32

Tutorials
Tutorial 2: Correlations

SCAL User Guide

Reference section
Chapter 5

Introduction
This chapter contains information on the following:

SCAL User Guide

SCAL-GF is the GeoFrame version of SCAL - see "SCAL-GF" on page 35

SCAL_Loader, which is a tool to load SCAL input files (.RCI) into the GeoFrame
database - see "SCAL Loader" on page 37

The main SCAL window, from here you can import data and access the principal
functionality of the program - see "Main SCAL window" on page 39 and "Record tree" on
page 40

The Record Editor enables you to set and change any of the attributes in a record - see
"Record editor" on page 57

The Graph window displays relative permeability curves, capillary pressure curves and
cross-plot data - see "Graph module" on page 66

The Record Selector processes groups of records - "Record selector" on page 84

The Keyword Generator generates tables of saturation-based data, tables of end-points


varying with depth, or arrays of grid-based properties - see "Keyword generator" on
page 86

SCAL now allows generation of capillary pressure curves from saturation logs - see
"Generate Pc curves" on page 93

SCAL supports calculation of Archies parameters, cementation factor, cementation


constant, and saturation constant, using Formation Factor and Resistivity Index plots - see
"Archies parameters" on page 94

SCAL creates records containing both relative permeability and capillary pressure data by
merging records - see "Merging and associating" on page 95

The 3D Grid Viewer displays a three-dimensional representation of the simulation grid see "3D grid viewer" on page 98

Reference section
Introduction

33

34

SCAL supports the input, display and output of three phase oil relative permeability
surfaces - see "Three-phase relative permeability" on page 131.

Reference section
Introduction

SCAL User Guide

SCAL-GF
Description
SCAL-GF is the GeoFrame version of SCAL. The main difference between SCAL-GF and the
standalone version is that the GeoFrame application allows you to read special core analysis
data from GeoFrame, instead of a text file.

File menu
The Open Records options under file menu is replaced with Open Scal data. Under this
option, there are four data selection options, Collection, Rock Analysis, Core and Wells.

Collection
A Collection contains the same information as an RCI (SCAL input) file. If a collection is
created using an RCI file, the collection name will be the same as that of the file. When a
collection is selected as the input, all the data under this collection will be loaded into the
application.

Rock analysis
A Rock Analysis represents a single experiment record. If this option is selected, a number of
experimental results will be displayed for selection. You can change the focus of the selection,
by using the Focus icon in the dialog.
Note

Only one selection at a time is allowed.

Core
A Core represents a core plug in SCAL. All the core data items under the selected data focus
are displayed for selection. All the experimental results under the selected core are loaded into
the application.

Well
If a Well/borehole is selected, all the experimental results under a well/borehole are loaded into
the application.

Save
Data may be saved back into GeoFrame or an ASCII file. You can also create new records
during a SCAL-GF session. All the changes, except well name, to a record are honoured.

SCAL User Guide

Reference section
SCAL-GF

35

Note

Note that the LOGDEPTH and ZONE/RESERVOIR implementations are not tightly
integrated in this release. Note that the Auto-save option is turned off in this version.

Delete from GeoFrame database


Records that are deleted from the GeoFrame database are removed from the application. A
warning message is displayed.

Delete from SCAL-GF


If a record is deleted in SCAL, the corresponding data item in the GeoFrame database is not
deleted until you choose Save to GeoFrame. If you exit without selecting Save to
GeoFrame the data item is left intact in the database, and is accessible in the next transaction.

ITC
Caution

The ITC interactions are not completely implemented in this release.

The application does not honor incoming ITC messages. This is due to the fact that SCAL can
have more than one record selected at a time, and each selected record may be performing
different functions.
You can broadcast selections from SCAL-GF by selecting the Broadcast button.
Note

The automatic broadcasting mechanism (if the door is open) is not functional in this
release.

Express interest events


SCAL-GF honors all the express events from GeoFrame database. Any deleted record or
collection is deleted from the application. A prior warning message is displayed before the
delete operation. You cannot stop the delete operation once it is deleted from the database. Any
other attribute changes are reflected within the application at the same time as the changes
occur.

Options
A new option, Field Name, is available for setting the preferred data focus. Once this is set, all
the data selections will show the data under this field only. However, if the you select Clear All,
you must reset the field name.

36

Reference section
SCAL-GF

SCAL User Guide

SCAL Loader
Description
SCAL_Loader is a tool to load SCAL input files (.RCI) into the GeoFrame database in the
GeoFrame-specified format.

Input file
This option allows you to select SCAL input (.RCI) files to be loaded into GeoFrame. Multiple
files may be selected in one session. Multiple files may be loaded in one session. All the
transactions are recorded in a log file, SCAL_Loader.Log, created under the current working
directory for each SCAL_Loader run.

View input file


This option allows you to view all the files that are selected in the session.

Target field
The Target field option specifies the field under which the data to be stored in GeoFrame. A
default name Scal_Field is provided. You can use the ITC options to select a field from
other GeoFrame application, or use the dialog provided to enter a new field name.
Note

Note that if the field is deleted from GeoFrame, just before the load, a new field with
the same name is created.

Well name
The Well name option defines the default well to be used for a record, if this information is not
provided. You can use the dialog to type in a new well name. Alternately, you can select one of
the well names from the file that is being loaded, or select one of the existing well names in
GeoFrame.
Note

SCAL User Guide

ITC options can also be used for selecting a well/borehole from another GeoFrame
application.

Reference section
SCAL Loader

37

Core name
Core name defines the default core name to be used for a record, if the core information is not
provided. You can use the dialog provided to enter a new core name or select one of the core
names from the file that being loaded.
Note

ITC options may also be used for selection.

ITC options
The door at the right bottom corner of the window must be left open for receiving selections
from other GeoFrame applications. For example, if this door is open in SCAL_Loader, and a
Field is selected in GeoFrame Data Manager, and the selection is broadcast using the
Broadcast button, SCAL_Loader will update the information. Once a loading session has
started, no changes take effect until that session is over.

Other dialogs
If a record already exists in GeoFrame, a warning dialog will be displayed. You can choose
whether to overwrite the record(s) by selecting Yes, Yes To All, No or No To All.
Note

38

Reference section
SCAL Loader

The Yes and No options are applicable to the current record only, where as if you select
either Yes To All or No To All, the rest of the records in the same data file are processed
accordingly without the dialog being displayed again.

SCAL User Guide

Main SCAL window


Introduction
The main SCAL window is the heart of the program. From here you can import data and access
the principal functionality of the program. Once you have imported some data, the main window
should look similar to Figure 5.1.
Figure 5.1 The main SCAL window

SCAL User Guide

You can import record data (containing the results of experiments on rock samples),
simulation grids and properties using the "File menu" on page 45.

You can access the "Record editor" on page 57, "Record selector" on page 84, "Keyword
generator" on page 86 and "Graph module" on page 66 by dragging records onto icons in
the toolbar, or clicking the right mouse button over a selection of records to bring up a menu
containing these options.

Reference section
Main SCAL window

39

You can merge and associate records using the Options menu. You can also access the "3D
grid viewer" on page 98 and "Property transformer" on page 55 using the "Options menu"
on page 48.

The "Utilities menu" on page 50 allows you to start other utilities (such as the Calculator
and a text editor).

This main window also contains the "Record tree" on page 40.

Record tree
All records in the program are represented on the Record Tree. The Record Tree is part of the
main SCAL window. Figure 5.2 shows an example Record Tree. It can contain one or more
groups of records. The groups may contain sub-groups, the sub-groups may contain records or
other sub-groups.
Figure 5.2 An example record tree

Record groups are represented by blue boxes, the records themselves by yellow boxes. The
groups that do not belong to the root group can have arbitrary names, the root group names are
fixed. The records can be labelled according to their attributes (by default the SAMPLENAME
attribute is used). Records and groups on the tree are collectively known as nodes.
You can collapse the display of records in a group by clicking on the small box containing a
minus sign next to a group node. This saves screen space. A plus sign in the box indicates that
it contains records or groups but is collapsed.
You can also to split the view of a tree vertically by dragging down the splitter bar on each tree.
At rest, this looks like a small box above the vertical scroll bar on a tree. It splits the tree into
two vertical divisions, each with its own vertical scroll bar. The splitter bar can be removed by
dragging it back up to the top of the tree. It enables the you to work with the top and bottom of
large trees at the same time.
You can resize individual trees by clicking on and dragging the borders between the trees.
Sometimes it is useful to hide individual trees from view. You can do this by right-clicking over
any node in the tree and selecting the Hide Tree option, or by dragging the node onto the Hide/
Show trees icon

Click on the icon itself to open the Hide/show Trees panel, which allows you to see and set
which trees are hidden.

40

Reference section
Main SCAL window

SCAL User Guide

The Record Tree is used to impose order on the various records (rock curves) in the system.
Records may be grouped using the mouse or by using the Record Selector panel (see "Record
selector" on page 84 for more details). Much of the functionality of SCAL is based around using
groups of records.

The root group


The group at the top left of the window is known as the Root Group. All records in the system
are in one of the subgroups of the Root Group. When you read in or create data, the records are
put into one of the special subgroups of the root group. These subgroups categorize the data
according to the phases present and the predominant type of data stored. The subgroups will
only be created if they are required. Possible subgroups are:

Rel. Perm. (OW),

Rel. Perm. (OG),

Rel. Perm. (GW),

Cap. Press. (OW),

Cap. Press. (OG),

Cap. Press. (GW).

Note

If a record contains both relative permeability and capillary pressure data it is stored in
one of the relative permeability groups.

Two further group names may appear:

Misc.
Records with no relative permeability or capillary pressure data, for example relationship
records, or records with only wettability information or end point scaling data are stored in
the Misc. group.

Bad.
Records which are invalid in some way are stored in the Bad group. Bad records may be
edited to make them good. They will then be automatically moved to the appropriate group.

Note

Because of the fixed structure of the root tree records may not be interactively moved
within it using the mouse.

Note

If you try to delete subgroups or records from the Root Group you are asked to
confirm this action (as it completely removes the data from the program).

Interacting with the record tree


Selecting record and groups
Records and groups are selected by clicking the mouse over a record or group node as
appropriate. If you want to select more than one record or group you can use Shift-click
over another node (which will select all nodes from the first up to and including the new one)
or Ctrl-click (which will select the new one in addition to the first one).

SCAL User Guide

Reference section
Main SCAL window

41

If you right click over any selected node the right mouse button menu will be brought up and
the action you select will be attempted on all selected items. Similarly if any of the selected
nodes are dragged onto an action icon that action will be attempted on all selected items.

Copying and moving records and groups


Note

Records and groups in the root group can only be copied, not moved.

To copy a record or group selection drag it onto an empty area in the record tree. This will
create a new group containing the copied data. If the nodes are dropped onto an existing
tree they will be added, new subgroups will be automatically created as required.
If nodes are dragged from a non-root group onto another non-root group, the nodes will be
moved. If you wish to copy (rather than move) the nodes, hold the control key while you
drag the node.

Note

It is only the tree representation of the records that are copied not the data itself.

To create a new record containing a copy of another records data, use the Editor or Group
Cloner.
See "Record editor" on page 57 and "Clone group" on page 44 for more information.

Deleting records and groups


You can delete record and group selections by dragging them onto the Delete icon or using
the Delete option on the right mouse button menu.
Note

If you try to delete a root group node, you will be asked to confirm the action. This will
remove the data from the program.

Group and record labeling


The name of non-root groups can be changed by dragging the group onto the Group/Record
Labeller icon (the fourth toolbar icon) or, again, from the right mouse button menu. The labels
associated with each record in the group can also be specified. See "Record labeller" on page 52
for more details.

Sorting records
Records in a group can be reordered by dragging the group containing them onto the Sort icon
(the fifth toolbar icon) or from the right mouse button menu. See "Group sorter" on page 53 for
more details.

Saving records and groups


Record selections and groups may be saved to a separate .RCI file by dragging the selected
nodes onto the Save icon or from the right mouse button menu. Any subgroups of those nodes
are also saved. Clicking the Save icon saves the complete group structure and all the records.
Hint

42

Reference section
Main SCAL window

The complete data may also be saved using File | Save and File | Save As.... See
"Saving records and groups" on page 42 and "Save as..." on page 47 for more
information.

SCAL User Guide

Editing records and groups


The Record Editor can be displayed by dragging a record or group selection onto the Edit
icon, or from the right mouse button menu. The Record Editor is loaded with all the records
under the dropped node. If an Editor panel is already displayed, the data currently being edited
is discarded and replaced with the dropped data.

To create a new Editor panel hold down the Ctrl key while dragging the node.

Graphing record and groups data


The data in a node or nodes can be plotted by dragging the selection onto one of the graphing
toolbar icons, or from the right mouse button menu.

To plot relative permeability data, drag onto the Kr plot icon.

To plot capillary pressure data, drag onto the Pc plot icon.

To display cross plot data (relationship records), drag onto the Cross plot icon.

A window containing one or more graphs appears. If a graph window already exists the new
data is plotted on it. If the data is of the same type as the currently plotted data then the new data
is added to that plot.

To plot on a separate graph in the same graph window hold down the Shift key while
dragging.

To create a new graph window, hold down the Ctrl key while dragging.

Displaying the Record selector

and keyword generator

These panels can be invoked by dragging a record or group onto the appropriate toolbar icon
(the sixth for the Record Selector, the seventh for the Keyword Generator), or from the right
mouse button menu. The panels can also be displayed by clicking the toolbar icons or by using
the menu. The advantage of dragging and the right mouse button menu is that the group fields
on the panel are set when the panel is displayed. For further information see "Record selector"
on page 84 and "Keyword generator" on page 86.

Merging records
To merge records and create a record containing both relative permeability and capillary
pressure data, hold down the Shift key and drag one record onto the other.
The dropped record is the primary record. A new record with a SAMPLENAME made up from
the individual samplenames is created. See "Merging" on page 95 for more details.
If several records are to be merged it may be more convenient to use the Record Merger panel.
See "Merge records..." on page 48 for more details.

Right mouse button menu


Right clicking on a record or group displays a pop-up menu. This menu provides a short-cut to
many frequently used drag and drop features in SCAL. In addition it allows you to clone
groups of records and view three-phase relative permeability surfaces in 3D.

SCAL User Guide

Reference section
Main SCAL window

43

Note

Only those options that can be performed on at least one of the selected or dropped
items are enabled. Actions that cannot be performed on any of the items are greyedout.

Save to file
This option allows you to save records or groups.

Edit records
This option displays the Record Editor. For further information see "Record editor" on
page 57.

Change label
This option displays the Record Labeller that allows you to change the labels or text associated
with records. For further information see "Record labeller" on page 52.

Sort records
This option displays the Group Sorter panel that allows you to sort records within their groups.
For further information see "Group sorter" on page 53.

Select records
This option displays the Records Selector panel that allows you to group and process records.
For further information see "Record selector" on page 84.

Generate keyword
This option displays the Keyword Generator panel, which allows you to generate and write
simulator keywords. For further information see "Keyword generator" on page 86.

Clone group
This option displays the Group Cloner panel. This creates a true copy of the records in a group.
New entries appear in the root group and the data may be edited without affecting the original
data.
Source group
This allows you to specify the group of records to be cloned.
Target group
This allows you to specify the name of the new group (containing the cloned records). If it does
not already exist, it will be created. The target may be a subgroup of an existing group.
Subgroups of the source group are also cloned.
Suffix for new records
This allows you to specify a suffix for the cloned records. This is very useful; without it, it is
easy to get confused when several records have the same name.

Plot Rel. Perm records


This option allows you to display relative permeability data graphically. For further information
see "Graph module" on page 66.

44

Reference section
Main SCAL window

SCAL User Guide

Plot relationship records


This option allows to display correlation or relationship data graphically. For further
information see "Graph module" on page 66.

Plot other Sat. Func. records


This option allows you to display other saturation function data graphically. For further
information see "Graph module" on page 66.

View 3 phase Rel. Perm.


This option displays the 3D 3 Phase Rel. Perm. Viewer (see "Three-phase relative
permeability" on page 131 for more details). In order for the surface to be calculated, the record
must have an associated record so that oil-water and oil-gas data are available. This association
can be made using the Record Associator (see "Associating" on page 97).

Hide tree
This option allows you to hide individual record trees from view.

Delete
This option allows you to delete records and groups.

Menu options
File menu
Play commands...
This option allows you to open and play a file containing Calculator or SCAL commands. By
convention these files have the .CAL or .CMDLOG suffix. By default SCAL generates a
command file, SCAL.CMDLOG, in your working directory. You may rename this file to re-run
your current SCAL session later.
For further information on the Calculator see "The Calculator" on page 169.

Open records
This option allows you to open a file containing SCAL records. By convention these files have
the .RCI suffix (this is not mandatory). This is the main way of importing data into SCAL.
When you open an .RCI file, the records it contains are added to the record tree.
The internal format of an RCI file is described in "The SCAL input file (.RCI)" on page 151.

Import grid
This option allows you to import the simulation model geometry from an ECLIPSE 100/200
grid file (formatted or unformatted).
Note

SCAL User Guide

If you try to import a second grid file, you are warned that the first grid will be cleared.
You will be given the chance to cancel this request.

Reference section
Main SCAL window

45

Caution

This release of SCAL is unable to read unstructured (that is PEBI) grids. You are
therefore restricted to importing regular corner-point or block-center grids.

Import properties...
This option allows you to import the simulation model properties either from an ECLIPSE
.INIT (or .FINIT) file or from a RESTART file (.Xnnnn or .Fnnnn). You can also import
properties from .AVS files (as used by the RTView and FloViz 3D visualization products.
Note

This option only becomes active after a grid has been read in.

Note

If you try to import a second properties file with a different root name, you are warned
that the existing property data will be cleared. You will be given the chance to cancel
this request.

Note

You need to import both a grid file and a property file before you can view the grid or
generate properties.

Open ECLIPSE (.DATA)...


This option allows you to extract relative permeability, capillary pressure and end point scaling
versus depth tables from ECLIPSE 100/200.DATA files. SCAL automatically creates a new
merged record for each oil-water, oil-gas or gas-water table.
The following keywords are recognized: SWOF, SGOF, SLGOF, SGFN, SWFN, SOF2, SOF3,
SOF32D, ENPTVD and ENKRVD. The KRBASIS attribute for the records is set to KoSwi .
You cannot import property data (PORO, SATNUM etc.) from a .DATA file. To import property
data, import an initial or restart file (see "Import properties..." on page 46).

Open ECLIPSE tables (.RCP)...


This option allows you to import simulator table keyword files (.RCP), such as those created
using "The keyword generator panel" on page 86. SCAL creates a merged record containing
relative permeability and capillary pressure data for each set of tables. These files often
correspond to a simulator INCLUDE file.

Directories...
This option displays the Directory Selector panel, which lets you set various directory related
settings used by SCAL.
Output directory
This is where SCAL output files, such as tables (.RCP) and property (.RCR) files, are written.
By default it is the directory the program is started from.
System directory
This is used to locate certain files needed at run time. This field is normally set correctly at
installation and you should not need to change it.

46

Reference section
Main SCAL window

SCAL User Guide

Working directory
This is the current directory. This field can be used to change the current directory.
Calculator path
This is a space delimited list of directories. When a Calculator file is specified, for example on
the Record Selector panel, each directory in the path is searched in turn (from left to right)
until a file matching the specified name is found. This file is then loaded and run. For example,
first the current directory is searched then a directory containing Calculator files for this project
and finally the example files supplied on the installation.
Note

The settings for the output directory, system directory and Calculator path are
maintained between program runs.

Save
This option allows you to save the current record and group structure back into the current file.
The current filename is the last .RCI file saved (or the first one opened if you have not saved
yet). If you open more than one .RCI file, the current filename is reset. In this case selecting
File | Save asks you to specify a new filename.

Save as...
This option displays a file browser allowing you to specify the filename that the current record
and group structure should be saved into.

Workspace
The program workspace provides a quick way to get back to what you were last doing. In effect
it contains an image of all the data in SCAL, at the time you create the workspace. Reloading
from a workspace enables you to reload SCAL with all that data in a fraction of the time taken
to reload the data manually or re-run the session log.
This option allows you to save and restore the program workspace.
Save workspace
This option allows you to save your workspace to your current working directory.
Save workspace as...
This option displays a file browser allowing you to specify the filename that the current
workspace should be saved into.
Restore workspace...
This option allows you to restore a previously saved workspace.

Clear all data


This option deletes all records, grids and properties from the system. Any record editors, graphs
or 3D viewers are closed automatically. You are asked to confirm this action.

Exit
This option closes SCAL. If you have made any changes to the record data or group structure
then you are asked if you want to save the changes (Yes, No or Cancel).

SCAL User Guide

Reference section
Main SCAL window

47

Options menu
Edit records...
This option displays the Record Editor (described in detail in "Record editor" on page 57). The
Record Editor allows you to set the values of attributes and supplements within a record.

To create a new record select Options | Edit Records.

To edit an existing record, drag the record onto the Edit icon or right click on the record
and select Edit Record from the pop-up menu.

Select records...
This option displays the "Record selector" on page 84, which allows you to group and process
the records in various ways.
Note

Note that starting the Record Selector by selecting Options | Select Records
does not set the Source Group field. However, if you drag a group onto the Group
icon, or use the right mouse button menu, the Source Group field is set automatically.
See "Record selector" on page 84 for more details.

Merge records...
This option displays the Record Merger panel, which allows you to merge the contents of pairs
of records to produce records containing both relative permeability and capillary pressure data.
These merged records are ready to be written out as simulator tables. See "Merging and
associating" on page 95 for more details.

Associate records...
This option displays the Record Associater panel, which allows you to associate pairs of
records so that oil-water and oil-gas data can be accessed together.
Note

You will need to do this before you write simulator tables for oil-water-gas systems or
before you display the 3D three-phase relative permeability surfaces. See "Merging
and associating" on page 95 for more details.

Generate keyword...
This option displays the Keyword Generator panel which allows you to generate and write
(save to file) simulator keywords.
Note

48

Reference section
Main SCAL window

Selecting Options | Generate Keyword, does not preset the Assignment Group
and Generate Group fields. However, if you drag a group onto the Keywords icon,
or use the right mouse button menu, these fields are set automatically. See "Keyword
generator" on page 86 for more details.

SCAL User Guide

Transform property...
This option displays the Property Transformer panel, which allows you to create and edit
properties. It has now been superseded by the Property Editor (see "Edit property..." on
page 49). The Property Transformer has only been kept for creating properties using SCAL
relationship records, which the Property Editor cannot yet do.
Note

This option is not available until you have imported a grid and properties. See
"Property transformer" on page 55 for more details.

Edit property...
This option displays the Property Editor panel
The Property Editor panel allows new properties to be created and existing ones to be changed
or deleted, using arithmetic expressions or via calculator programs.
Note

This option is not available until you have imported a grid and properties. See
"Simulation property editor panel" on page 53 for more details.

View grid
This option displays the 3D Grid Viewer.
Note

This option is not available until you have imported a grid and properties. See "3D grid
viewer" on page 98 for more details.

Settings
Program...
This option displays the Program Settings panel. See "Program settings" on page 56 for more
details.
Input...
This option displays the Data Input Settings panel. See "Data input settings" on page 56 for
more details.
Tree...
This option displays the Hide/Show Trees panel, which allows you to display or hide selected
records trees.

Select the required data from the available list and press Show or Hide as appropriate.

Graph...
This option displays the Graph Settings panel. See "Graph settings..." on page 79.
Keyword...
This option shows the Keyword Generation Settings panel. See "The keyword generation
settings panel" on page 89 for more details.

SCAL User Guide

Reference section
Main SCAL window

49

Debug...
This option displays the Define Trace Information panel, which allows you to interact with the
SCAL debugging system. You should only use this panel under the direction of ECLIPSE Suite
personnel.
Graph prefs...
This option allows you to set the graph view preferences. The curves on the graph module can
be grouped by various attribute names or even by range.

Utilities menu
Text editor
This option displays a simple text editor. You can open, edit and save ASCII files. There are
facilities to cut, copy and paste text to and from the clipboard, to go to a specified line and to
find and replace specific text strings.
The text editor is useful for viewing and editing the various SCAL data files.

Calculator Log
The Calculator can be started from several places in SCAL to extend the built in functionality.
For example from the "Record selector" on page 84 to have more complex record grouping
criteria, from the "Keyword generator" on page 86 to specify curve assignment rules, from the
"Function" on page 59 to specify a user defined function for fitting or generation of data or from
the "Simulation property editor panel" on page 53 to enable a new property to be created.
In all these cases you need to specify a file containing a Calculator script and this is then run
automatically. Output from each of these Calculator runs is written to a file called
OUTPUT.PRT in the working directory. If you experience a problem with a Calculator script,
this file helps you understand the problem (for example
there may be a syntax error in the script). You can easily view the OUTPUT.PRT file by
choosing the Utilities | Calculator Log menu. The contents of OUTPUT.PRT is displayed in
the Log window.

Calculator show
This option provides the facility to view different Calculator variables within a text window
(see"Calculator utilities" on page 208) including a listing of all the commands within the
program.

Calculator Reset
This option clears all variables from the Calculator. It is recommended when running one
Calculator program after another to avoid clashes of persistent variables.

Windows menu
See "Windows and panels" on page 215 for more details.

50

Reference section
Main SCAL window

SCAL User Guide

Toolbar
The toolbar provides access to many of the most frequently used items of functionality. In some
cases the icons act as a shortcut to a particular menu item. Often the icons are targets for
dragging and dropping groups of records.
The toolbar on the main window contains the following icons:

Open
You can use this button to open a .RCI file. See "Open records" on page 45.

Save

If pressed this is equivalent to File | Save. The whole record tree is saved into the current
file. See "Saving records and groups" on page 42 for more details.

If you drag some selected records or groups onto the Save icon, the Save As file
browser is displayed and the selected records are saved under a filename of your choice.

Edit
If pressed this is equivalent to Options | Edit Records... See "Editing records and groups"
on page 43.
If you drag a record or group selection onto the Edit icon, the Editor panel is displayed
allowing you to edit each of the selected records in the group.

Label
If you drag a group or a record onto the Label icon, the Record Labeller is displayed. See
"Record labeller" on page 52 for more details.

Sort
If you drag a group onto the Sort icon, the Group Sorter is displayed. See "Group sorter"
on page 53.

Group
If pressed this is equivalent to Options | Select Records.... See "Record selector" on page 84
for more details.
Hint

If you drag a group onto the Group icon, the source group on the Record Selector
panel is automatically set to the dropped group.

Keywords
If pressed this is equivalent to Options | Generate Keyword.... See "Keyword generator" on
page 86 for more details.
Hint

SCAL User Guide

If you drag a group onto the Keywords icon, the assign and generate groups on the
Keyword Generator panel is automatically set.

Reference section
Main SCAL window

51

Kr plot
If you drag a record or group selection containing relative permeability data onto the Kr plot
icon, the Graph window is displayed showing those curves. See "Graph module" on page 66
for more details.

Pc plot
If you drag a record or group selection containing capillary pressure data onto the Pc plot
icon, then the Graph window is displayed showing those curves. See "Graph module" on
page 66 for more details.

Cross plot
If you drag a record or group selection containing correlation or relationship data onto the
Cross plot icon then the Graph window is displayed showing those curves. See "Graph
module" on page 66 for more details.

Hide/Show trees
If you drag onto the Hide/Show trees then the tree that contains the selection is removed
from the record tree display. See "Tree..." on page 49 for further information.

Delete
If you drag a selection of groups or records onto the Delete icon, all those items are deleted,
including any subgroups. If the groups or records are dragged from the root tree you are asked
to confirm this action, as it removes those items from the program. Dragging from a different
tree removes the items from that location but they remain in the root group, and therefore in
the program.

Record labeller
The Record Labeller panel is used to tailor the text associated with records and groups on the
record tree.
You can display this panel by dragging a group of records onto the Label icon.
You can enter the following data:

Group label
This is the groups name or label.

Attributes for record label


This is the list of attributes used to label the record. The attribute names should be separated by
spaces. For text attributes the record is labeled with the value of the attribute. For numerical
attributes the label is of the form name = value. The default label is the SAMPLENAME
attribute. See "Attribute names" on page 202 for a complete list of SCAL attributes.

Apply to subgroups
This check box allows you to specify whether or not to apply the new label specification to any
subgroups of the dropped group.

52

Reference section
Main SCAL window

SCAL User Guide

Group sorter
The Group Sorter panel is displayed when you drag a group onto the Sort icon or select Sort
Records from the right mouse button menu.
You can set the attribute(s) by which you wish to sort the data, the order in which the records
are to be sorted and whether you wish to sort any sub-groups.
The records are sorted using the first attribute listed. If any records have the same value of this
attribute, the second attribute specified (if any) is used to determine the sort order.

Group to be sorted
This field contains the name of the group you selected for sorting.

Attributes to be sorted
Type the required attributes into this field.

Ascending order
Check this option if you wish the records to be sorted in ascending order.

Apply to subgroups
Check this option if you wish the sorting to also apply to subgroups.

Simulation property editor panel


The Simulation Property Editor panel allows you to manipulate properties in SCAL.
Properties can be created, edited and deleted. It is also possible to run the Calculator from this
panel and special variables are made available to the Calculator when it is run in this context.
Note

The Simulation Property Editor panel displays information and edit facilities for
initial simulation properties. Calculator commands are currently the only means
available to edit and manipulate recurrent properties.

Property to edit
The Property to edit section of the Simulation Property Editor panel holds the details of the
property to which the changes are to be applied.

New property
This box should be checked if a new initial property is to be created.

Type
This drop-down lists the property type of the property to be edited. Property types of existing
properties are first in the list and indicated by an asterisk.

SCAL User Guide

Reference section
Main SCAL window

53

Version
This drop-down holds the editable property versions corresponding to the property type
displayed in the Type drop-down or (none) if no versions of the property type currently exist.

Property creation parameters


The Property creation parameters section of the Simulation Property Editor panel allows
you to set the creation details for a property and is active when a new property is to be created.

Real
Select this radio button if the new property values are real.

Integer
Select this radio button if the new property values are to be integers.

Inactive cells
Check this box if values for inactive cells are to be stored.

LGRs
Check this box if values for local grid refinements are to be stored.

Edit scope
The Edit scope section of the Simulation Property Editor panel allows you to specify which
cells the edit is to be applied to.

All cells
This radio button applies the edit to all the cells that exist for the property.

3D Viewer selected cells


This radio button applies the edit to the cells currently on display on the 3D Viewer.

Generate by
The Generate by section of the Simulation Property Editor panel defines the method to
compute the property which is being edited.

Expression
When this option is chosen, you enter an expression in the next line of the panel. This involves:

from the first drop-down list - typing in a constant or selecting a property on which to base
the new or edited property,

from the second drop-down list (optional) - selecting an arithmetic function,

from the third drop-down list (optional) - selecting a second constant or property.

Calculator
When this option is chosen, you can enter (or select using the browser) the location of a
Calculator script file in the Calculator file text entry field.

54

Reference section
Main SCAL window

SCAL User Guide

Apply
The Apply button applies the edits made on the panel.

Delete
The Delete button displays a question box asking if you are sure you wish to delete the selected
property. If Yes is selected, the property is deleted from the application.

Cancel
The Cancel button closes the panel without applying any edit.

Help
The Help button brings up on-line help.

Property transformer
You can use Property Transformer to combine properties with other properties or create new
properties. The panel represents an arithmetic expression with properties as the operands.

You can display the Property Transformer by selecting Options | Transform Property....
(See "Transform property..." on page 49 for more details).

Figure 5.3 The Property Transformer panel

You can enter the following data:

The property to be transformed.


If it does not exist it is created.

The first operand in the expression.


It may be a property that already exists or a number.

The operation to perform.


You are not limited to the arithmetic operations (+ - / *) for combining properties; they may
also be transformed using any relationship records in the system. If this field is blank then
the transformed property is set equal to the first operand.

The second operand which is used for the + - / * operations.


It may be an existing property name or a number.

Note

SCAL User Guide

The Simulation Property Editor has largely replaced the Property Transformer as
it has better control of the property type and of which cells to use. The Property
Transformer is best used for creating properties using SCAL-derived relationship
records.

Reference section
Main SCAL window

55

Program settings
The Program Settings panel is displayed using the Options | Settings | Program....

Autosave
This allows you specify whether or not SCAL should automatically save the current state of the
data at regular intervals. Autosave can provide a useful recovery mechanism if the program or
computer crashes. If Autosave is enabled, the data is saved to a file named _SCALSAV.RCI.
This is a standard SCAL input file that can be loaded when necessary. The autosave file is
deleted automatically if the program terminates normally

Save interval
This allows you to specify how often SCAL autosaves (in minutes).
Hint

You may wish to reduce the frequency of autosaves (or disable them completely) when
you are dealing with large datasets that could take several seconds, or minutes, to save.

Record unit system


This allows you to specify the unit system SCAL uses to display and manipulate data.

Data input settings


The Data Input Settings panel allows you to the restriction policies for importing data into
SCAL.

Restriction settings
Certain conditions may occur that may indicate errors in the relative permeability and capillary
pressure data. The restriction settings control how you want these conditions to be reported. The
conditions SCAL automatically detects are that a Kr value is greater than 1, that a minimum Kr
value at an end-point is not 0, and that Kr or Pc data is not monotonic. SCAL can be configured
through these settings to allow these conditions without reporting them, to allow them but
produce warnings, or to disallow them (which will prevent them being output).
Note

These settings are also used whenever relative permeability or capillary pressure data
are updated (when loading existing SCAL records or editing them) as validation
criteria.

Read error limit


This allows you to set the number of syntax errors that are tolerated in the .RCI input file. It is
especially useful when the wrong file type has been selected by mistake.

56

Reference section
Main SCAL window

SCAL User Guide

Record editor
Introduction
The Record Editor is a set of cooperating data entry panels enabling you to set and change any
of the attributes in a record. Supplements can be created and changed. New records may also be
created by the Editor.
The Editor is invoked from the Options | Edit Records..., by clicking on the
toolbar
button, by dragging tree nodes onto the toolbar button, or by using the right mouse button menu.
If nodes are dropped then the Editor is loaded with those records, otherwise it is opened editing
a new empty record. The Editor may also be opened from the Graph window.
The Editor has the concept of a buffer. The currently edited record is loaded into the buffer and
changes are stored in the buffer. The changes are saved back to the record when the Apply
button is clicked on any of the panels making up the Editor, or when a different record in the
loaded set is made current. If the Editor is opened from the graph then the buffer is shared
between the graph and the Editor and changes made on the graph are immediately reflected in
the "Tabular data page" on page 59. Otherwise you must click on OK or Apply to synchronize
the graph with the Editor.
Hint

It is possible to have two instances of the Editor active at once. This can be useful to
compare different records simultaneously.

To produce a second copy of the Editor, drag a record onto the


holding the Ctrl key down.

Note

toolbar button while

Nearly all the attributes are optional, so only the fields that are of interest need to be
filled in.

Editor panel
If several records are loaded, then which record is being displayed can be set using the toolbar
arrow buttons on the Editor. These display the first loaded record, the previous record, the next
record, and the last record respectively. The Editor | Edit menu also contains these items.
Under the File menu there are several options to create new data: to create a new record File |
New | Record, to create a new copy of the current record File | New | Copy of Record, to
create a new standard table in the current record File | New | Table and to create a new userdefined (supplemental) table in the current record File | New | Supplement Table). You can
also clear the contents of the current record, Clear.
The Editor contains one large folder, which has at least 6 pages on it. These display all the userdefinable attributes of the record. Each page shows a particular set of attributes, grouped loosely
according to their function or type.

SCAL User Guide

Attributes describing the sample are on the "Description page" on page 58.

Reference section
Record editor

57

Attributes describing the experimental procedures used to get the data are on the
"Procedures page" on page 58.

Non-tabular experimental results such as saturation end points and absolute permeabilities
are on the "Results page" on page 58.

Supplemental attributes are displayed on the "Supplements page" on page 62. They may
also be defined from this page.

The ranges used when assigning saturation functions to the simulation grid are setup on
the"Ranges page" on page 64.

Attributes containing ECLIPSE end point scaling values are set on the "End point scaling
attributes page" on page 64.

If there are any tables in the record a page will be created for each of them. See the "Tabular
data page" on page 59.

Description page
This page shows the values of various attributes describing the core plug. The attributes are
described in "The SCAL input file (.RCI)" on page 151.

Procedures page
This page shows the values of various attributes describing the experimental procedures on core
plug. The attributes are described in "The SCAL input file (.RCI)" on page 151.

Results page
This page shows the values of various attributes describing the results of experiments on the
core plug. The attributes are described in "The SCAL input file (.RCI)" on page 151.

End point linkage


Normally the end point saturations are linked to the saturation curves themselves, if they exist.
Thus if you alter the end points on the "Results page" on page 58 and click on Apply the curves
on the appropriate "Tabular data page" on page 59 are updated. Similarly if you edit the curves
on a table (on a Tabular data page) and click on Apply, then the end points on the Results page
update. When a record is read in the end point attributes are set from the values on the curves.
The linkage can be disabled by checking the Unlink saturations from table results box. This
may be useful if the end points were measured by a different technique to that used for the
saturation functions.

58

Reference section
Record editor

SCAL User Guide

Tabular data page


The table data
The Tabular Data page shows a table of data on the left side of the page. This is normally
relative permeability or capillary pressure data, but supplemental tables are also shown here.
Capillary pressure data has two columns, saturation and pressure, relative permeability data has
three columns, saturation and the relative permeability for each phase. Supplemental tables have
two columns, with user-defined columns. Values may be typed into the table.
You can clear the table contents by using the Clear Data button.
If the data in the table is capillary pressure it can be converted to a Leverett J-function table by
clicking the Create J-function Data button. This opens a panel in which you can set the
permeability to be used in the Pc - J conversion, then perform the conversion. The converted
table is displayed on a new page on the main Editor folder.
In a similar way, if the data in the table is J-function data, it can be converted to a Pc table by
clicking on the Create Pc Data button.
Note

The J function conversion also requires values for porosity, interfacial tension and the
contact angle. These are also set on the Results page.

Fitting/generating data
This (right-hand) section of the page allows data to be generated from one of the built-in
functions or from a Calculator program. Also the coefficients of a function may be fitted to table
data, which may represent experimental results.
If a table has been previously generated from an equation, the fitting /generating section of the
page is inactive.

Function
This option allows you to select the function you wish to use using the Function drop down
field.
The table updates to give the list of coefficients appropriate to that function.

If there is table data available the program attempts to make an estimate of the
coefficients. Otherwise you must supply the coefficients.

If a Calculator function is selected the Calculator file that evaluates the function
must be specified in the Calculator file field.

Note

SCAL User Guide

Details of the available functions are given in "Functions" on page 137. The special
Calculator variables are described in "Special variables specific to SCAL" on
page 201.

Reference section
Record editor

59

Active
The Active column of the table determines whether that coefficient should be optimised during
the curve fitting process. Often certain coefficients may be known, for example, end points, and
others uncertain, for example, Corey coefficients.
Hint

You should deactivate any known coefficients, that is set Active to No.

Fit settings
Lower x limit for fitting
This option allows you to set the lower x limit for curve fitting.

Upper x limit for fitting


This option allows you to set the upper x limit for curve fitting.
Note

If table data already exists then the x values to generate y data for are taken from the
original data

Max. number of iterations


This option sets the maximum number of iteration for the curve fitting or generating process.

Rms residual scaling factor


This option allows you to set the Rms Residual Scaling factor.
Hint

They need not cover the complete range of the data. This can be useful if some parts
of the experimental data are more reliable than others. A function can be fitted to the
reliable part and then data generated for the unreliable part from the fitted function.

The non-linear regression algorithm used to fit functions converges better for some sets of data
and certain functions than others. If the fit fails because the maximum number of iterations has
been reached then the limit may be increased using the Max. number of iterations field. The
upper limit is 999.
The criteria for determining when a fit is sufficiently accurate is based on the Rms residual
scaling factor. The fit is considered complete when either the regression algorithm determines
that no improvements can be made or when the ratio of the root mean square residuals to the
average value of the experimental data is less than the scaling factor. Hence the accuracy of the
fit may be improved by reducing the scaling factor. Remember that the data must be close
enough to the function for the residuals to be small, and that more iterations will be required if
the convergence criteria is strict.

60

Reference section
Record editor

SCAL User Guide

Note

The Corey functions are only defined over a particular saturation range. For oil-water
systems this is from Swi to 1 - Sor. For oil-gas systems it is from Swi + Sgcrit to 1 Sor. The generation limits specified in the Settings panel should respect this.
When generating data for Corey oil-gas systems, then when Sgc <> 0 an additional
point is added at Sg = 0. This point has Krg = 0, Kro = 1 and is necessary to satisfy
the consistency requirements when writing simulator tables for three phase systems
and when generating three phase relative permeability surfaces.

Fit
This option starts the curve fitting process.
The software uses a non-linear regression technique to vary the active coefficients until the best
match to the table data is found.
Note

During fitting the progress of the fit is reported to the status line on the page and the
Fit button changes to Stop Fit allowing the fit to be interrupted.

When the fitting has finished the coefficients values is updated and the Function fitted to data
field is checked to show fitting has taken place.

Normalized residuals
The Normalized residuals gives an indication of the accuracy of the fit. This number is
calculated as the sum of the absolute residuals between the experimental and fitted data divided
by the sum of the experimental data. That is:

ye yf
resid = -----------------------ye

[EQ 5.1]

where
ye
yf

are the experimental measurements and


are the values evaluated by the function.

Once the data has been fitted the Function fitted to data field is checked.

Generate settings
Note

If table data already exists then the x values to generate y data for are taken from the
original data

Number of points to generate


This option allows you set the number of points to generate.

SCAL User Guide

Reference section
Record editor

61

Lower x limit for generating


This option allows you to set the lower x limit for curve generating.

Upper x limit for generating


This option allows you to set the upper x limit for curve generating.
Note

Note that if there is no table data already then these fields must be set.

Note

Some functions restrict the range data may be generated over. For example the Corey
function for oil-gas data (see "Corey Oil-Gas" on page 137) is only defined over the
range Sgcrit to 1 - Sor - Swi. The program flags an error if you attempt to generate
outside these limits.

Generate
This option allows you to generate table data from a function once all the coefficients have been
defined.
If experimental table data does not already exist the table is filled in. However, if the table data
does already exist a new table is created in the record and given its own page on the main folder.
This new table has the same base name as the original table, with an suffix of the form _1. For
example if a Lambda function was fitted to a PCOW table, the new table generated from that
table would be PCOW_1 (unless there was already a PCOW_1 table, in which case the new
table would be PCOW_2 etc.)

J function conversion
If the data in the table is capillary pressure data it can be converted to Leverett J function data
by selecting what permeability type to use for the conversion in the J func perm drop down list,
and ensuring that a permeability value is specified for that type on the "Results page" on
page 58, then clicking the J function box.
This option displays the associated "Tabular data page" on page 59.

Supplements page
This page allows the editing and creation of supplemental attributes, or supplements.
Supplements that have been read from the input file appear here.

Name
This table column gives the names of the supplemental attributes or supplements.

Type
This table column gives the type of the attributes.

Value
This table column gives the existing values for the attributes. To edit the value of an existing
attribute type the new value into this column.

62

Reference section
Record editor

SCAL User Guide

Units
This table column gives the units for the attribute values, if applicable. Real attributes can
optionally have units.

Add attribute
This option allows you add supplemental types.

To create a new supplement type the name of the new supplement in the Name field and
select the type of supplement from the Type field. Now click on the Add Attribute button.
The new attribute appears in the table and a value can be typed in. Real attributes can
optionally have units.

Note

Supplemental tables can only be added to records that do not already have any tables.

Remove attribute
This option allows you to remove attributes from the table.

To remove an attribute click on the row of the table containing the attribute to remove and
click on the Remove Attribute button.

Name
You can use this option to create new supplemental types. See "Add attribute" on page 63.

Type
You can use this option to create new supplemental types. See "Add attribute" on page 63.
Available types are BOOLEAN, TEXT, INT, REAL and TABLE.
Note

If a table attribute is created the Supplement Table Definer panel appears. The
additional information needed to define the table is entered there.

Supplement table definer panel


This panel is used to define supplement tables also known as relationships.

Specify name of the table in the Attribute name field and the X and Y column names in
the appropriate fields.

Typically this panel is used to produce relationships between attributes that are already in the
program. In this case the column names should be the names of the appropriate attributes. The
values will be automatically extracted from the specified group if the Load from group box is
checked.
Note

Note that only records in the specified group are processed, subgroups are not.

Column names can also be arbitrary names with arbitrary units. In this case the Load from
group box should not be checked. The empty table is then normally filled by hand. This
technique can be used to produce tables that can then be filled by the Calculator from the
"Record selector panel" on page 84 and subsequently plotted, fitted and used to transform
properties.
SCAL User Guide

Reference section
Record editor

63

When you click on OK the Tables page in the Editor is displayed, possibly loaded with data
extracted from the specified group. You must click on Apply on the Tables page to save the
supplement table and create a relationship record. By default, the SAMPLENAME of the new
relationship record is set to the name of the supplement table. It can be changed by using the
Description page.

Ranges page
This page is used to specify which cells on the simulation grid should get information from a
particular record. There are two tables. The first is for interacting with real (floating point)
simulation properties, the second for interacting with integer properties. In both cases the name
of the property should appear in the Property column. This name is case sensitive.

For real properties enter the range of the property to be used to select the matching cells in
the Min and Max columns.

For integer properties enter the actual values to match as a comma separated list.

The sets of selected cells resulting from each row in each table are logically ANDed together
and the resulting set of cells used during the generation of new properties from the Keyword
Generation panel.
When properties are read, SCAL creates some additional ones that are often useful during
keyword generation. These properties are:
1

Cells - the numerical index of the cell. Varies from 1 to the total number of cells in the grid.

IIndex - the i value for each cell, varies from 1 to nx

JIndex - the j value for each cell, varies from 1 to ny

KIndex - the k value for each cell, varies from 1 to nz, corresponds to layers in the
simulation model.

The Derived data box is checked for records that have been created within SCAL, for example
by averaging.

End point scaling attributes page


This page is used to set values that will be used to generate ECLIPSE end point scaling property
keywords. Values for all the end point scaling keywords may be set. Consult the "RUNSPEC
section overview" in the "ECLIPSE Reference Manual" for the definitions of these keywords.
The values set on this page may also be used in the End Point Scaling Viewer panel and values
set on that panel can be saved into a record and viewed here.

End point scaling versus depth table panel


This panel is used to load or edit values for the ENPTVD and ENKRVD keyword families. These
keywords describe the variation of end points with depth and are fully described in the
"RUNSPEC section overview" in the "ECLIPSE Reference Manual". Blanks in the table
correspond to default values in the keyword, that is 1*. You can clear the table by clicking on
the Clear button.

64

Reference section
Record editor

SCAL User Guide

Facilities exist to help setup these tables. You access them by clicking on the Table Loader...
button. This displays the End Point Scaling Table Loader panel described below.

End point scaling table loader


This panel is used to help with the setting up of the end point scaling versus depth keywords. If
the Use existing depth values field is checked the Depth column on the table is left
unchanged, otherwise the depths range from the values specified in the Depth from and to
fields. The number of rows in the table is determined by the PTH property if it exists.
The effect on individual columns of the attribute table is determined by the rows of the table
loader table. For each attribute column the values may be leave old value in which case the
values in the column are not changed or default in which case the values are set to blanks.
Note

Note that if any relationships or correlations have been created in the program then
they are added to the list of options. The relationship is then used to calculate the values
in the column. For example depth versus end point relationships may be setup for
several end points and these could then be used to populate the end point versus depth
table.

Building correlations
SCAL is a powerful tool for extracting correlations from core data. For example SOI-SOR or
porosity-permeability relationships can be setup, graphed and fitted to correlations and then
used to process existing property data.

The first stage is to define a table for the correlation. This is done by editing a new record
(click on the edit toolbar button) and choosing the File | New | Supplement table menu
item.

Note

Note that a record can contain only one correlation at a time so they are normally added
to new records.

The Supplemental Attribute Table Definer panel is then displayed.

The new correlation is stored as a supplemental attribute whose name must be supplied.
Data for the correlation may be loaded directly from an existing set of records in which case
the X and Y column names should correspond to attributes already defined in the records.
Alternatively arbitrary names may be given and the appropriate units selected.

When OK is pushed then if Load from group was specified the records in the selected
group are checked and if they contain the desired attribute then that value is loaded into the
table. Otherwise an empty table is displayed for you to fill in.

Once the correlation is completed and you have clicked on Apply, a new record is created.
This is a relationship record and labelled with an R on the record tree. By default the record
is given the same name as the correlation.

The correlation can now be graphed by dragging the record onto the Cross plot button
, and fitted and generated from as for any other table data.

SCAL User Guide

Reference section
Record editor

65

Graph module
Introduction
The Graph windows main function is to display relative permeability curves, capillary
pressure curves and cross-plot data.
Data from different records can be plotted onto separate graphs, or overlaid onto one.

The Graph window is created by dragging a record with table data onto the appropriate
plotting icon in the main window, or by selecting the appropriate plot option from the right
mouse button menu.

For relative permeability data, the Graph module can be configured to create extra specialized
diagnostic plots, such as fractional flow or log kr. These plots appear as small graphs and can
be swapped with the main graph by double-clicking on them.
In addition to displaying these curves, this window provides you with facilities to manipulate
these data. In particular, you can

Normalize curves.

Create new curves by de-normalizing between user-specified limits.

Create new curves by averaging curves.

Create new curve families by interpolating between curves.

Create new, end-point scaled curves.

It also contains a link to the "Record editor" on page 57, so that analytic curves can be fitted to
and visually compared with their originals.

Limitations
Copy Range and Paste Range have been disabled for relative permeability curves for this
release.

Toolbar
This is just underneath the menu options, and contains icons representing common menu
options.

You can remove the toolbar by un-checking the option under Graph | Configure Graph...

You can move it to the left, right or bottom of the window using Graph | Layout Graph....

Main graph window


This contains a graph with one or more curves on it, normally beneath the toolbar.

66

It can be resized by clicking and dragging the borders between it and any adjacent
components, or by removing those components or by resizing the Graph window.

Reference section
Graph module

SCAL User Guide

Double-clicking on a small graph window swaps the contents of the main plot and that
small graph window.

Clicking on a particular curve causes that curve to become active, meaning that any edits
are carried out on that curve and its associated data. The active curve is highlighted in
yellow in the legend.

Title
The title describes what is being displayed in the main plot window, at the top of the main
window.

To remove the title, un-check the Title box under Graph | Configure Graph....

To edit the title, double-click on it and enter new text.

Legend
The Legend area names every curve on the graph in the main plot window, and is normally to
the right of the main plot window.

To remove the legend un-check the Legend box under Graph | Configure Graph..., or
click its title (highlighted in blue) and drag this to the Trash can icon.

Note

If there is more than one curve the name of the active data is the one highlighted in
yellow.

To change the active plot click on the appropriate data name.

To delete graphs, drag the name from the legend to the Trash can button.
This deletes the from the main plot window and any other small graphs that contain it.

To amend the appearance of the curves double-clicking on a data name opens a Plot Style
window.
In the Plot Style window you can set the thickness, style, color etc. of the curve, as well as
many other graph controls.

Small graphs
Small graphs show either specialized diagnostic plots (for relative permeability plots) or other
curves (if you used Shift-Drop when adding a record to the Graph module).

They are positioned either right of the main plot window and below the legend (if there are
up to 3 of them) or below the main plot window and the legend (more than 3).

They can be removed individually either by un-checking the appropriate box under Graph
| Configure Graph..., or by clicking the small graphs title and dragging it to the Trash
can icon.

SCAL User Guide

They can be resized by clicking and dragging the borders between the components, or their
contents can be swapped with those of the main graph window by double clicking on the
plot in the small graph window.

Reference section
Graph module

67

The required set of small graphs is set using the Graph Settings panel which is shown by
using the Special | Graph Settings.... These graphs correspond to the set of derived data
as shown in the Record Editor and described in the Derived Data section.

Navigation graph
The navigation graph shows which area of the data is currently being zoomed into in the main
plot window.

This option is turned off by default, you can turn it if required under Graph | Configure
Graph...

Status bar
The status bar presents error messages or measurements, x and y locations of the cursor in plot
coordinates, and reports which edit mode the Graph module is in. It is normally at the bottom
of the screen.

To move the status bar use Graph | Layout Graph....

To remove the status bar from the module use Graph | Configure Graph....

Menu options
Edit menu
Edit record
This option opens up the Record Editor (see "Record editor" on page 57) and loads the data
from the currently active curve into it.
Note

When opened in this way the Record Editor is opened in a linked mode. That is if
the data is changed and applied from the Record Editor, the graph updates to reflect
the change (s). Similarly, if the active curve on the graph is changed or edited, the
Record Editor immediately updates.

Table
This option is a useful short-cut to accessing the Table panel component of the Record Editor.

68

If you display any of the specialized diagnostic relative permeabilities plots in the Graph
module you can also view them in tabular form by selecting the Derived Data button from
the Table panel.

If you open the Fit panel from the Table panel, and then fit and generate an analytic
function to the data, the resulting curve displays on the graph.
The original curve it was derived from is renamed with the suffix (original), and the new
curve takes the original name. You can remove the fitted curve by selecting Restore
Original from the Table panel.

Reference section
Graph module

SCAL User Guide

Edit point
This option allows you to click on a point and drag it to a new position. You cannot drag the
point left of any previous point or right of any subsequent point.
Note

Note that for relative permeability plots, which have two curves, the companion point
on the other curve is also moved horizontally to the new X coordinate - that is its Y
coordinate is not changed.

Note

Note too that this option can make curves become non-monotonic.

X edit
This option allows you to click on a point on a curve and drag it left or right, to a different X
coordinate but maintaining the Y coordinate.
Note

This is the same as the Edit Point option except that the Y coordinate remains
unchanged. On relative permeability plots the companion point is also moved.

Y edit
Allows you to click on a point and drag it vertically to a different Y coordinate but preserving
the X coordinate.
Note

This is the same as the Edit Point option except that the X coordinate remains
unchanged. As no horizontal movement occurs, the companion point on relative
permeability plots is not moved.
Note that like the Edit Point option, this option may make curves non-monotonic.

Insert point
This option allows you to create new points for the curve by clicking on the graph. A new point
is created at the click position and inserted at the correct position in the coordinate list.
Note

For relative permeability plots it is important to note that inserted points must be
positioned on the curve of the same phase as the x-axis. A companion point is also
inserted at the same X coordinate; the Y coordinate is linearly interpolated from the
neighboring points.

Delete point
This option allows you to delete a point (and its companion point if a relative permeability plot)
by clicking on it.

Delete inside box


This option deletes any points that lie within a box you draw. The box can only be drawn from
the Box delete option under the "Graph menu" on page 71.

SCAL User Guide

Reference section
Graph module

69

Undo graph edit


This option allows you to undo the most recent graphical edit.
Hint

Using this option repeatedly allows you to get back to the state of the data when the
changes were last applied to the record.

Apply
This option sends any graphical edits back to the record.
Note

Once this step has been taken any changes cannot be undone by the Undo graph edit
option.

Range operations
These operations are similar to the "Edit point" on page 69, X edit, and Y edit, except that they
operate on a range of points rather than just one.

To define the range of points, click on the Select-range icon in the toolbar or select Graph
| Range | Select.

Click and drag out the required section of the graph.

Note

Note that the range is defined only along the x-axis.

To unset the range, click on the Clear-range icon in the toolbar or select Graph | Range
| Clear.

Edit range
This option allows the selected points to be moved in any direction.
Note

Note that movement is not restricted in the x-direction - if the points are moved before
or after their preceding or succeeding points they erase those data points.
Also note that unlike Edit Point, segments of the companion curve (relative
permeability plots) included in the range move with the other curve. This can have
undesired effects, such as moving values approaching zero to a completely different
location.

X edit range
This option allows the selected points to be moved en masse in the X direction.
Note

Note, if the points are moved before or after their preceding or following points they
erase those data points. The range segment on the companion curve moves too.

Y edit range
This option allows the selected points to be moved in the Y direction.

70

Reference section
Graph module

SCAL User Guide

Note

If a relative permeability plot, the range segment of the companion curve is moved too.
This can cause undesired effects.

Cut range
This option deletes points included in the range.
Note

If the graph is a relative permeability plot, then it deletes points on the companion
curve too.

Copy range
This option allows you to copy the points in the range to a clipboard.
Note

This is disabled for relative permeability plots.

Paste range
This option allows you to paste the points in the clipboard onto the current curve.
Note

This is disabled for relative permeability plots.

Graph menu
Zoom In
Zoom a rectangular portion of the plot area. To zoom an area on a plot drag out a box over the
area to be zoomed and release. Plots may also be zoomed and panned using the zoom box on
the navigation graph.

Zoom out
Unzoom the complete plot area into a rectangular portion of the plot. To Unzoom drag out a box
and release. The extent of the unzoom is inversely proportional to the size of the dragged box.
A small box will generate a large unzoom. A large box will change the axes range only slightly.
The hotspot for the cursor is at the center of the negative sign.

Unzoom completely
Completely unzoom the plot. This displays the complete data range on the main graph.

Measure
This selects the Measure mode in which the x, y, y/x and distance between the drag start position
and the current mouse position are reported.

Select
Select is not always applicable as it may be performed automatically. Choosing Select and then
clicking either the plot or legend makes the chosen plot active.

SCAL User Guide

Reference section
Graph module

71

Set Curr Pt
Choose the current point - it is marked by a circle. Often used in conjunction with a table and
the Show curr. pt options. If a table is displayed at the same time then the current point
corresponds to the table row with focus. This is a useful way of quickly scrolling a table to a
particular data item.

Delete Box
This facility serves as a quick alternative to deleting points individually. First select Graph | Box
Delete from the menu. When the cross-hairs cursor appears drag out a box over the data points
you wish to delete i.e. mouse down, drag, mouse up. The box will remain on the graph until you
drag out a new box or select Edit | Delete Inside Box from the menu. The points inside the box
are deleted when Delete Inside Box is chosen.

Range
Select
Select a range of data points. To select a range drag the mouse over the range to be selected.
Only X ranges are supported. The selected range is highlighted by using a different line style.
Clear
Clear the currently selected range for the active plot.
Panel...
Specify the range using coordinates entered in a panel. The panel allows ranges to be selected,
shifted and scaled with more precision than with the mouse.

Configure Graph...
Add or remove components, such as toolbars and small plots from the window. When OK is
pressed the window is rebuilt to the new configuration.

Layout Graph...
Adjusts the location of components such as toolbars and status lines in the main window. Click
on OK to rebuild the window to the new layout.

Show Curr Pt
Activate highlighting of the current point. It is marked by a circle.

Grid Toggle
Display or remove the grey primary and secondary tickmark grid from the main graph.

Refresh
Force a redraw of the window.

Axis
Toggle the X and Y axis between linear and logarithmic

72

Reference section
Graph module

SCAL User Guide

Annotate
Provides a means of annotating plots. Select Graph | Annotate from the menu, then perform a
single mouse click at the point where you wish the text to be associated. Type into the edit field
displayed and press Enter to accept the text, press Escape to cancel. All annotations resize
appropriately on a window resize. Each annotation can individually be resized, repositioned,
and deleted by dragging onto the dustbin.

Special menu
Normalize...
This option allows you to set values between which the curves should be normalized. These are
typically from either the initial (Swi) or breakthrough saturation (Swbrk) (depending on the
fluid) to a residual saturation (Swr), but you may instead set them to fixed values.
A new option to normalize the curves on vertical scale is also available. Proportional scaling
option is available only if vertical scaling is possible on both the curves. If this option is
selected, the second curve is normalized in proportion to the criteria used for the first one.
Figure 5.4 Normalize Graph Data panel

Note

This option applies to all curves being displayed - not just the active curve, so while
limits set at For example initial saturation is interpreted correctly for each curve, using
user-defined values may have undesired effects such as truncation of data.

The data appears re-plotted on a 0 - 1 scale.


The data is normalized according to the formula Sn = (S - Smin) / (Smax-Smin) where Sn is the
normalized saturation, S is the original saturation and Smin and Smax are the normalization
limits.

Denormalize...
This option allows you to denormalize the data back to the original limits, or to limits you
specify. The data can be denormalized into new records or overwrite the original records, and
can be placed in a different group if new.

SCAL User Guide

Reference section
Graph module

73

Figure 5.5 Denormalise Graph Data panel

Average...
Horizontal...
This option creates a new curve which is the average of all curves on the graph. It achieves this
by normalizing all the curves before averaging over a set number of equally spaced points, then
denormalizing the result.
You can control the initial limits for the normalization, whether to use arithmetic or geometric
averaging, the number of equally sized intervals at which new points are generated on the
normalized curve, and the limits of the final denormalization.
The new curve is stored as a new record and is added to the graph. This new record inherits its
other attributes from the first of the averaged records.
Vertical...
In this option, the new average curve is created by averaging over a set of fixed saturation
values.

74

Reference section
Graph module

SCAL User Guide

Figure 5.6 Generate New Curves by Averaging panel

Interpolate...
This option requires exactly two curves, and creates a family of curves by interpolating between
them.
You can control the number of curves produced, as well as the normalization limits, averaging
method and the number of points on each curve.
This can be a useful technique for generating curves for rock types that are intermediate between
two existing types, or as an alternative to de-normalization to get curves with different end
points.
Note

SCAL User Guide

Note that if you set the Fraction of B parameter to be negative or greater than one, it
is also possible to produce extrapolated curves.

Reference section
Graph module

75

Figure 5.7 The Generate New Curves by Interpolation panel

Show Pc
See "Show J Func" on page 76.

Show J Func
If the attributes necessary for capillary pressure to be converted to a Leverett J function are
available, then the Show Pc and Show J Func options apply the appropriate transformation
and change the display to show the result. These transformations can also be done from the
Table panel.

Show Pc-Reservoir
If the record contains a Pc-Reservoir table, identified by the _RES to the normal Capillary
Pressure table, PCWO_RES for example, the graph switches the plot to show the
corresponding reservoir curve. Show Pc then switches the plot back to show the normal Pc
curve.

76

Reference section
Graph module

SCAL User Guide

Show Sat vs. height


A capillary pressure curve may be transformed into a saturation height profile or capillary
pressure under reservoir conditions. You may also use this option to calibrate Pc curves with
saturation logs.
The attributes get stored under the corresponding group, if you decide to save your transaction.
If the curves belong to different groups, a new group is created.
Note

Note that the log data must be supplied in the TVDSS format. In the GeoFrame version,
the application would do this internally.

Set sgcrit
This option allows you to change the critical gas saturation graphically.
On oil-gas displays, the critical gas saturation is shown by a small vertical marker near the
beginning of the curve. This marker can be moved using the mouse, or set from this option by
clicking at the appropriate point. The SGCRIT attribute, located on the Results panel of the
Record Editor, is updated appropriately.

Set swbkff
This option allows you to change the flood front breakthrough water saturation graphically.
On oil-water displays, the breakthrough saturation is shown by a small vertical marker on the
saturation axis, if the option has been turned on in the Axis marker preferences on the Graph
Settings panel.
The SWBKFF attribute, located on the Results panel of the Record Editor is updated with the
change.

End point scaling viewer...


The effect of the simulators end point scaling option on the rock curves can be examined from
this option. (See Figure 5.8.)

SCAL User Guide

Reference section
Graph module

77

Figure 5.8 End Point Scaling Curve Viewer

The displayed panel lets you generate curves using the various scaling options in ECLIPSE. The
curves can then be assessed for physical reasonableness and either the end points used in the
scaling can be saved, or the scaled curves themselves may be saved for direct input into the
simulator. See the "ECLIPSE Technical Description" for more information on the scaling
algorithms.
The Record field on the panel corresponds to the original curve on the graph to scale. This field
contains entries for each of the plotted curves. Only one may be scaled at a time. The end points
that may be specified for the scaling are input into the Value column of the table. If a value cell
is blank then the value is taken from the Original column. The Value column can be pre-loaded
with end points stored in a record by choosing that record from the EPS Record field.
If only one scaled curve is required (in the Number of curves field) then the values in the table
are used directly. However the panel lets you see the effect of varying an end point over a given
range.

78

Reference section
Graph module

SCAL User Guide

To do this select the end point to vary using the Vary attribute field and specify the limits
it is to vary between and the number of scaled curves to generate. When Apply is pressed
the scaled curves are calculated and plotted.

The scaling type and method is selected using the Horizontal and Vertical check boxes and
the Two point and Three point radio buttons. Three point horizontal corresponds to the
ECLIPSE SCALECRS YES keyword.
End point values that are not appropriate to the scaling method are ignored. Curves may be
scaled simultaneously horizontally and vertically.

By default previously generated scaled curves are deleted when Apply is pressed and a new
set created. If the Clear curves check box is unchecked the old curves are left on the graph.
This enables the effect of systematically varying different end points to be assessed.

The end point values in the Value table column may be saved back to the record specified
in the EPS record field by pressing the Save EPS values button.

The scaled curves themselves may be written out in GRAF user data format using the Write
Curves... button.
The scaled curves may then be compared with the curves generated by ECLIPSE using the
GRAF program.

The scaled curves may also be saved as records into the Record Tree by using the Save
Records... button. The group into which the new records are to be saved can be set.

Graph settings...

This panel can also be displayed using the Options | Settings | Graph menu on the main
window.

This panel lets you specify what relative permeability data to plot (water-oil, water-gas, or oilgas) when there is a choice in the group, whether to join the points on cross plot graph, which
specialized relative permeability graphs to produce, what extra markers to display on the
saturation axis and whether to automatically calculate the flood front breakthrough water
saturation.

SCAL User Guide

Reference section
Graph module

79

Figure 5.9 Graph settings panel

Note

Note that if these settings are changed, the Graph window has to be re-opened for the
changes to take effect.

Currently, SCAL has the following types of specialized diagnostic relative permeability plots:

Log Kr.

Fractional Flow. If the viscosity attributes are not set for the curve this plot is not be
produced.

Total mobility. If the viscosity attributes are not set for the curve this plot is not be
produced.

Permeability ratio.

Derivative plots.

The data values plotted on the specialized plots can also be viewed in tabular form by clicking
on the Derived Data button on the Table panel in the Editor.

80

Reference section
Graph module

SCAL User Guide

Note

Note that when many records are plotted at once there may be a significant delay
creating the graph as each of the specialized plots is created. This delay can be
minimized by turning off the unwanted plots.

A specialized plot can be swapped with the main plot by double-clicking on it. More details on
derived data are given in "Derived data" on page 141.

Graph preferences...
Figure 5.10 Graph preferences screen

Hint

This panel can also be displayed using the Options | Settings | Graph Preferences
menu on the main window.

This panel lets you specify how you want data in the Graph module to appear. The aim is to
give you enough control so you can distinguish curves or data points that match some basic
criteria from those which dont.
You can alter the appearance of three indicators - line color, marker color and marker shape.
The rules you can select for each distinguishing each one are:
1

By record ID.
In this case data from the same record are marked in this same way. For example, if several
Kr records were plotted and the line color control was set to record id each curve would
have a different color. This is the default behavior.

By group.
In this case all data that were plotted from the same group would be marked in the same
way. For example, if two groups were plotted together and the marker shape control was
set to group you would clearly be able to distinguish between the two sets of data.

SCAL User Guide

By attribute.

Reference section
Graph module

81

In this case you can choose which attribute of the parent record to use as a key, and specify
ranges of values. For example, if the line color rule was set to PORO, and the ranges were
set to 0.0, 0.2 and 0.3, all the curves from records with porosity values between 0.0 and 0.2
would be drawn in one color, and all those with values from 0.2 to 0.3 would be drawn in
another color. If the parent records of any of the curves had porosity values greater than 0.3,
the curve would be drawn in gray.
Note

Note that with a cross-plot built from a relationship, each point knows which record it
originated from and thus determines its marking separately from the other points when
using the attribute rule. This may give you extra insight. For example, if a cross-plot
of porosity against permeability is plotted with the marker color rule set to say SWI,
careful selection of range limits may reveal previously hidden rock types within your
data.

The status bar reports the values of any preferences for the active curve.
There is also an option to highlight the selected record in the Graph module, which draws the
selected/active data in bold.

Save
This option saves the records in the Graph module in to the specified group. If the group does
not exist a new group (or sub-group) is created.
Note

Note that the Print menu is now available under the File option.

Save Archies Constants


This option is available for Formation Factor and Resistivity Index plots. The Archies constants
generated is saved into the appropriate group/records.

Print
This option prints the contents of the current plot window into a file (UNIX). The file can be
sent to a printer. On PCs this option printers the contents of the window to the default printer.

Print All
Print All prints the contents of the plot window plus the information windows into a file.

Print Type...
This opens the Printer Drivers Panel. You can select the type of format in which to store the
graphics image. The various output options arespecified in the ECL.CFG file.

Print Setup... (PC only)


This allows selection of one of the default printers on a PC.

82

Reference section
Graph module

SCAL User Guide

Print Layout...
You use the Print Layout Dialog box to specify the font for all the labels on the hardcopy plot
and also to define the datestamp, if required.

Defining the font for hardcopy plots

To select a font, click on the font name from the selection list in the top left corner of the
Print Layout Dialog box (). The currently selected font name is inverted, that is the
foreground and background colors are swapped.

Defining a datestamp for the plot


A datestamp can be printed on the plot, either at the top of the page or the bottom of the page.

To choose the position of the datestamp, click on At Top of Page or At Bottom of Page
in the Datestamp Position radio button which is in the top right hand corner of the Print
Layout Dialog ().

You specify the height and width of the datestamp (in UNITS) in the Text String text box. The
Text String text box is below the Datestamp Position radio button on the right hand side of
the Print Layout Dialog ().

To define the height, click in the Height text entry box and enter a value.

To define the width, click in the Width text entry box and enter a value.

The form of the datestamp is controlled by selections in the Datestamp selection lists which
appear at the bottom of the Print Layout Dialog ().
There are four selection lists. The current selection in each list is indicated by text inversion,
that is the foreground and background colors are swapped. An example of the datestamp that
will appear on the plot is displayed below the selection lists.
Note

No field can appear twice in the datestamp, where duplicate fields are selected the left
most occurrence takes precedence. That is if DATE is selected in more than one
column only the first occurrence will be used in the datestamp and the other(s) will be
ignored. The example below the lists shows exactly what will be printed on the plot.

The print driver selection box


The Print Driver Selection box is used to specify which print driver to use.
You select print driver by clicking on the name of the driver. The selected driver name is
displayed in inverse, that is the foreground and background colours are swapped.

SCAL User Guide

To select a driver, choose the driver from the list and then click the OK button.

Reference section
Graph module

83

Record selector
Introduction
The Record Selector is a powerful tool for processing groups of records. Records may be
copied or moved between groups according to various criteria, or they may be deleted or the
data within a record processed in some way.
The Record Selector may be accessed using Options | Select Records, or by dragging a
group of records onto the Record Selector button
menu over a group on the "Record tree" on page 40.
Note

or by using the right mouse button

If invoked by the latter two methods the Source group field is preset to the selected
group.

Limitations
1

Only one selection condition may be specified at a time without resorting to the Calculator.
For example to select records with porosity below 0.2 and Swi between 0.1 and 0.15 would
take two interactions with the Record Selector. The first specifying a porosity range and
a target group, the second using the previous target group as the source group and an SWI
range.

Note

Records in the source group are processed, sub groups of the source group are ignored.

Record selector panel


Source group
The Source group is the group containing the records to be processed.
Note

The Source group may not be the root group or any of its subgroups if the action is
move.

Target group
The Target group is used when moving or copying records.
Note

84

Reference section
Record selector

The Target group cannot be the root group nor any of its subgroups.

SCAL User Guide

The Target group may be a sub group and its parent specified. If the Target group does not
exist it is created.

Action on apply
The Action on apply field specifies what is to be done to records that meet the selection criteria.
They may be copied or moved to the Target group, deleted from the source group or processed.
Note

Records may be deleted from the root group in which case they are deleted from the
program. Confirmation from you is required before the deletion takes place.

Process
The process option is useful in conjunction with the Calculator. It makes each record in the
source group available to the Calculator in turn.

Attribute to select on
Records may match selection criteria that are specified in several ways. The attribute that must
match the criteria is specified in the Attribute to select on field. If it is a numerical attribute
then a unit for the Value or Minimum and Maximum fields may optionally be specified.

Value
If selecting by value then the Value field enables and a text or numeric value may be typed in.
If a record in the source group contains the attribute to select on and that attribute contains the
specified value then the record is considered to be selected and the Action on apply is done to it.
The Value field accepts wildcards, for example if the Attribute to select on is SAMPLENAME
and the Value is A* then all records with names starting with A are selected.

Range
If selecting by Range the Minimum and Maximum value fields are enabled. One or both of
the fields should be filled in. The selection logic is the same as for the Value case.

Calculator file name


If selecting by Calculator then the Calculator file name must be filled in with the name of a
file containing a Calculator script.
A record is selected within the Calculator by setting the special Calculator variable
SELECTED to TRUE.

SCAL User Guide

Reference section
Record selector

85

Keyword generator
Introduction
The Keyword Generator is used to generate tables of saturation-based data, tables of endpoints varying with depth, or arrays of grid-based properties, and output them for subsequent
inclusion in ECLIPSE data sets.

The keyword generator panel


This panel is quite complex, and its functionality changes dependent on the current task. It
consists of two parts; selecting what data is to be generated, and supplying additional (maybe
context-sensitive) information.

Selecting data to process


Creating ECLIPSE tables and property arrays are quite different operations, requiring different
information from you, so these are split into separate activities. At the top of the panel you must
first choose which of these types of data to create.

Tables
If tables are chosen, you need to specify exactly which tables are to be created. You must choose
one of the three available families by clicking on the appropriate button, then choose a particular
table or table combination from the associated drop-down selection box.
The table keyword families are:
Family (i)

Keywords for defining the saturation functions. (SWOF, SGOF,


SLGOF)

Family (ii)

Alternative set of keywords for defining the saturation functions.


(SWFN, SGFN, SOF2, SOF3, SOF32D*)

End pt scaling

Variation of rel. perm. and saturation end-points with depth.


(ENPTVD, ENKRVD,...)

*.Currently SCAL does not calculate the SOF32D table - the only way to be able to output it is to have read
it in beforehand from an ECLIPSE .DATA file or a .RCI file.

Note

Note that to write tables containing both kr and Pc data the records in the assignment
group must have been merged; otherwise the Pc data is set to zero. To write out oilwater and oil-gas data in one interaction the records must have been associated.

Properties
Grid properties in SCAL fall into two groups - Generatable or all. Generatable properties are
table number properties such as SATNUM and end point scaling properties such as SWL. The all
group includes all others loaded into SCAL that are not generatable, and so can only be written
to an output file without change. An example of a generatable property would be SATNUM, and
an example of a non-generatable property would be PORO.

86

Reference section
Keyword generator

SCAL User Guide

You must choose between processing a generatable property or one from the all group, then you
must select the particular property to process from the appropriate drop-down list.

Context-sensitive information
This section contains several fields that may need to be filled in, depending on what data is
being processed. Their functions are described below. The three action buttons to the right of
this section are included here as they are only active when a generatable property is being
processed.

Use default assignment (check box)


This is only active when the panel is used to create a generatable property. The default
assignment method is to examine the range data in each record to see if the properties of the grid
cell fall within the ranges specified. If so either the index number of the record becomes the
value of the property for that cell (table number properties are table number such as SATNUM
and end point scaling properties such as SWL). If there is more than one range specified ALL
must be satisfied to be considered a match. The ranges for each record are set from the Ranges
panel in the Record Editor.

Auto reset assign information (check box)


Note

This is only active when the panel is used to create a generatable property.

If checked, values of the property being generated is reset before the property is generated.
Hint

Normally this option should be checked, unless you are building up a property in stages
using the Calculate button (rather than the Generate button) and therefore do not
want to reset already calculated values of that property. You can use the Reset button
to force a reset.

Calculator file name


Note

This is only active when a generatable property is being created, and you want to use
a Calculator program to generate the property rather than use the default assignment
method (that is when the Use Default Assignment check box is unchecked).

Volume of interest (VOI)


Note

This is only active when a generatable property is being created.

It is often useful to build a property in sections. To do this:

Specify a volume of interest (VOI) as a set of i, j and k ranges.

When Generate or Calculate is pressed, only those cells in the voi are processed.
Cells in the VOI that are not matched can be assigned a default value, and cells outside the
VOI can also be assigned a default value, through "The keyword generation settings panel"
.

SCAL User Guide

Reference section
Keyword generator

87

Note

If a VOI is not specified, it defaults to the entire grid.

Assignment group
Note

This is only active when a table is being created or a generatable property is being
created.

When a table is being created this is used to specify the group of records that the tables will be
built from. If possible one table is generated for each record in this group.
When a generatable property is being created the index number of the appropriate record in the
assignment group is used rather than from the generate group. The reason for this is that
sometimes two or more property keywords need to be generated for one simulation run, using
different groups of records to match against. Separate groups would cause confusion between
record numbers, so the record numbers need to be taken from a group that contains all the groups
that are used for matching. This means that the generate group must always be the same as or a
sub-group of the assignment group. For example, if a run used SATNUM and IMBNUM, the
IMBNUM property should only be generated from imbibition records, but the table numbers they
refer to should be taken from the complete set of imbibition and drainage records.

Generate group
Note

This is only active when a generatable property is being created.

All records in the generate group are checked to see if they are applicable for each grid cell. If
a match is found, the index number of the matching record is recorded for that grid cell.
Note

Note that the index number of the matching record is taken from the assignment group
rather than the generate group. The reason for this is explained above in the
Assignment group section.

Generate
Note

This is only active when a generatable property is being created.

Each grid cell in the VOI is processed in turn, using either the default assignment rules or a
custom Calculator script to examine values of properties in that cell and the records in the
generate group to determine a value of the new property for that cell.

Calculate
Note

This is only active when a generatable property is being created.

It works in the same way as the Generate button but only builds up the assignment information
and does not actually create the property.
Hint

88

Reference section
Keyword generator

It is particularly useful for building up a property in sections using a voi.

SCAL User Guide

The Auto reset assign information check box should be unchecked when using Calculate in
this way or it resets the property assignment information for the entire grid before calculating
the new values.

Reset
Note

This is only active when a generatable property is being created.

It is used to reset the assignment information. If the Auto reset assign information check-outs
is checked this is done automatically after every Generate or Calculate.

Output file root


Specifies the root name of the file that the table or property is written to when the Write button
is pressed. The file name will be created from this root name and a suffix, which is .RCP for
tables, .RCR for generatable properties and .RCU for any other property.
You can also set whether the file is overwritten or appended to.

Write
This button causes the selected table or property to be written to an output file. The output file
name is the specified file root plus an extension, as described above.

The output files may be included directly into the appropriate sections of an ECLIPSE data
set.

Files are written to the current output directory, which can be shown/set using the main
menu option File | Directories...

Settings
Opens up "The keyword generation settings panel" , which contains various controls on how
the data is generated.

You can, also, access this panel from the main SCAL menu using Options | Settings |
Keywords...

Help
Opens up on-line help for this panel

The keyword generation settings panel


This panel contains several important options for controlling the generated data. As it contains
restriction settings which are also applicable for validating tables in records, this panel can also
be accessed from the main menu option Options | Settings Keywords...

Saturation vector interpolation preferences


This setting lets you specify how the relative permeability and capillary pressure data should be
merged prior to creating SWOF etc. The options are for the capillary pressure data to be
interpolated onto the relative permeability saturation vector, the relative permeability data to be
interpolated onto the capillary pressure saturation vector, or a new common saturation vector to
be created from the union of the other saturation vectors. The relative permeabilities and
capillary pressures are interpolated onto this vector.

SCAL User Guide

Reference section
Keyword generator

89

Note

Note that only interpolation, not extrapolation, is done. If the capillary pressure and
relative permeabilities are specified over differing saturation ranges then the merged
vector may be unexpectedly short.

Saturation vector scaling preferences


This setting lets you choose to scale the saturation vector of one of the Pc or Kr tables to be
output onto the same end-points as the other table. This avoids the truncation problems
mentioned above. You can also select to scale both curves onto the combined range limits.

J function
This specifies whether the selected capillary pressure should be written out as a Leverett J
function, or as capillary pressure directly.
Note

If this is required you must also use the ECLIPSE keyword JFUNC in the GRID
section of the data set. If this is not done ECLIPSE interprets the capillary pressure
columns in the SWOF etc. tables as the true capillary pressure.

Add end point at Saturation = 1


If checked then an extra point is added to the ECLIPSE saturation tables corresponding to Sw=1.
This ensures the tables are appropriate in an aquifer. The values are set so that Krw = 1, Kro = 0,
Pcow = 0 or the previous Pcow value if that value was negative. The additional point is only added
for oil-water tables.

Compress output
This option allows you to produce output written in ECLIPSE parser compressed format, that
is with repeat counts for repeated values. For example, 1 1 3 3 3 1 2 2 would be written as 2*1
3*3 1 2*2. This format can often save considerable disk space.

Default property values


These settings specify the values to be given to grid cells during property generation if the cells
have not been selected. Usually the value for inside the volume of interest (voi) should be blank,
it then takes the value for the undefined cells outside the voi. The value for cells outside the voi
should normally be set to a value that causes an error (for example -999) when read by
ECLIPSE. This ensures that no undefined cells are allowed in the simulation.
Hint

It is often useful to set a real value for inside the voi so that, for example, all cells are
assigned table one except those that satisfy certain criteria.

Output keyword descriptions


Lists of the table keywords and generatable property keywords are given in the following tables.
For more detailed information on any of these please refer to the .

90

Reference section
Keyword generator

SCAL User Guide

An exhaustive list of all properties is not possible, as this depends on what properties have been
read into SCAL, and also includes any new properties you create using the Property
Transformer or a Calculator script.
Table 5.1
Keyword

Description of keyword

SWOF

Water/Oil saturation functions versus water saturation

SGOF

Gas/Oil saturation functions versus gas saturation

SLGOF

Gas/Oil saturation functions versus liquid saturation

Table 5.2

ECLIPSE family (ii) keywords

Keyword

Description of keyword

SWFN

Water saturation functions

SGFN

Gas saturation functions

SOF2

Oil saturation functions (2-phase)

SOF3

Oil saturation functions (3-phase)

SOF32D

2D table of oil relative permeability

Table 5.3

End-point scaling keywords or keyword families

Keyword(s)

Description of keyword

ENPTVD,...

Saturation end point versus depth tables

ENKRVD,...

Relative permeability end point versus depth tables

Table 5.4

SCAL User Guide

ECLIPSE family (i) keywords

Cell-based property keywords or keyword families

Keyword(s)

Description of keyword

ENDNUM

End point scaling versus depth region numbers

SATNUM

Saturation function region numbers

KRNUM,...

Directional relative permeability table numbers

KRNUMMF

Matrix-fracture flow saturation table numbers

IMBNUM,...

Imbibition saturation function region numbers

IMBNUMMF

Matrix-fracture imbibition table numbers

SWL,...

Scaled connate water saturations

SWU,...

Scaled saturation table maximum water saturation

SWCR,...

Scaled critical water saturations

SGL,...

Scaled connate gas saturations

SGU,...

Scaled saturation table maximum gas saturations

SGCR,...

Scaled critical gas saturations

SOWCR,...

Scaled critical oil-in-water saturations

SOGCR,...

Scaled critical oil-in-gas saturations

Reference section
Keyword generator

91

Table 5.4

92

Cell-based property keywords or keyword families (Continued)

Keyword(s)

Description of keyword

SWLPC

Scaled connate water saturations, for Pc curves only

SGLPC

Scaled connate gas saturations, for Pc curves only

PCW

Scaled maximum water capillary pressures

PCG

Scaled maximum gas capillary pressures

KRW,...

Scaled end point water relative permeabilities

KRG,...

Scaled end point gas relative permeabilities

KRO,...

Scaled end point oil relative permeabilities

Reference section
Keyword generator

SCAL User Guide

Generate Pc curves
Introduction
SCAL now allows generation of capillary pressure curves from saturation logs. You need to
apply appropriate fit functions to generate a smooth curve. The original curve may be removed
from the record, after generating the fitted curve.

Limitations
Currently only water saturation logs are read into SCAL.

SCAL User Guide

Reference section
Generate Pc curves

93

Archies parameters
Introduction
SCAL supports calculation of Archies parameters, cementation factor, cementation constant,
and saturation constant, using Formation Factor and Resistivity Index plots.

Formation factor plots


Formation factor plots can be used to calculate cementation factor and cementation constant for
a group of records. Fit a straight line using one of the fitting options, and the cementation factor
is the absolute value of the slope and cementation constant is the intercept.

Resistivity index plots


Resistivity Index plots can be used to calculate saturation constant for a record or a group of
records. Fit a straight line using the only fitting option available, and the saturation constant is
the absolute value of the slope.

Limitations
Formation factor is a single measurement per sample. Because of this, FF plots are available
only for a group of records. The cementation constant and cementation exponent values for
single records are calculated by the application, when the Formation Factor and porosity
values are entered.

94

Reference section
Archies parameters

SCAL User Guide

Merging and associating


Introduction
SCAL data is typically in the form that one input record corresponds to one experiment on a
piece of core. Thus normally the water-oil and gas-oil permeabilities are in separate records, and
similarly for the capillary pressure data.
Simulators often expect this data to be specified together. For example, relative permeability
and capillary pressure are both specified in the ECLIPSE keywords SWOF or SWFN, and oilwater and oil-gas tables for similar rock types (SATNUM) must be specified in the same order.
SCAL creates records containing both relative permeability and capillary pressure data by
merging records.

Records may be merged using the "Record tree" on page 40: hold the Shift key down and
drop a capillary pressure record on a relative permeability record and they are merged - the
record is labeled as KP.

If there are several records to merge the Record Merger panel is more convenient. Select
the Options | Merge Records... menu to display the panel.

SCAL uses the associate function to logically connect oil-water and oil-gas data that apply to
the same rock sample. The association is setup using the Record Associater panel. This is
displayed using the Options | Associate Records.... Records must be associated before they
can be added to the 3D Three Phase Relative Permeability Viewer.
The association status of a record can be seen on the Description panel of the Record Editor.
Individual records can also be associated using the Description panel as long as the records ID
is known.
In both the Record Merger and Record Associater panels the value in a table cell can be
copied into the cell below by pressing the F9 key. This provides a rapid way of filling the table
in the frequent case that there is a many to one relationship between relative permeability and
capillary pressure records, or between oil-water and oil-gas records.

Limitations
Merging and association is done by looking up records by name (SAMPLENAME attribute). If
there are several records with the same sample name SCAL compares the list of records with
the list in the group. If they are the same SCAL assumes the records are to be processed in the
same order as given in the group. If the lists are different (that is you have changed the list in
some way SCAL cannot make this assumption. In such a case it is therefore important that
records have unique names.

Merging
This panel allows the specification of a group for the merged records, which is often very useful.
The merged group may be set to be a sub group of a different group.

SCAL User Guide

Reference section
Merging and associating

95

Note

Records in the secondary group are merged with records in the primary group.

Primary group
This option displays the name of the base or primary group of records you wish to merge other
groups with. You can select the primary group using the drop down list.
Note

If the same attribute exists in both records then the primary group takes precedence.

Secondary group
This option displays the name of group you wish to merge with the primary group. You can
select the secondary group using the drop down list.

Merged group
This option displays the name of the new merged group. You can enter a new name for the group
or you can select a pre-existing group using the drop down list.

Methods
There are two ways of merging records; by matching a record in the primary group to one in the
secondary group (Define Merge Record Pairs), or just by merging all records in the primary
group with all records in the secondary group (Merge All Record Combinations). Merging all
record combinations is an automatic operation, but defining merge record pairs requires you to
manually select which records to combine.

Table data
Primary names
This column contains the original names for the individual records in the Primary group.
Secondary names
This column contains the original name for the individual records in Secondary group.
Merged names
Use this column to set the names for the individual merged records.
Merged records without explicit names are named by concatenating the names or the primary
and secondary records separated by a space.
Replace merged records
Use this option to replace existing records with the same name as the new merged records.
Hint

96

This is usually the desired behavior. You could otherwise produce many merged
records with the same name.

Reference section
Merging and associating

SCAL User Guide

Associating
Association group
Use this option to select the group the records to be associated.
The program automatically loads the names of the records.

Group associated with


Use this option to select the group containing the records to be associated with.
The program automatically loads the names of the records.

Table data
Hint

You can modify these lists, by deleting rows (Ctrl-D) or duplicating rows (Ctrl-N)
or overwriting individual names to ensure that the correct records are being associated.

Associate
This column contains the names of the individual records to be associated.
with
This columns contains the names of the individual records to be as associated with.
Note

Association only takes place for rows where two records are named.

Certain consistency checks are made during the association, for example that the Swi values for
the oil-water and oil-gas records are consistent. If the consistency check fails then the oil-gas
data can be optionally automatically re-normalized so that the Swi values are consistent.

SCAL User Guide

Reference section
Merging and associating

97

3D grid viewer
Introduction
The 3D Grid Viewer allows a three-dimensional representation of the simulation grid to be
displayed. It is accessed by the Options | View Grid menu. A grid file and properties must have
been read before the viewer may be shown.
The model may be rotated, translated and exaggerated. Various predefined views can be set. The
model may be sliced and volumes of interest set. Any property that exists may be displayed and
cells thresholded on that property.
The functionality is accessed principally through menus. These are described below.
Note

In SCAL there is only ever one grid in the program; this is an active grid. Hence,
options such as Set Active Grid are disabled. SCAL does not support unstructured
grids. References to unstructured grids may therefore be ignored.
You need a FloViz license to view 3D Grid.

File menu
Save as...
Allows you to save the current image in a variety of formats.

PostScript...
Creates a vector PostScript file of the current image.

98

Reference section
3D grid viewer

SCAL User Guide

Figure 5.11 PostScript panel

As well as allowing a choice between Landscape and Portrait and Color and Grayscale, you
can choose between Default Quality and High Quality. The difference between these options
is the way a decision is made to see if an object is in front of, or behind, another object.
The default quality option produces Postscript at the screen resolution, high quality at twice this.
The Width and Height may only be entered for encapsulated PostScript. For the other sizes,
these sliders are disabled and are used to show the page size selected.
When you click on Write Postscript File, a check is first made to see if the aspect ratio of the
3D window matches the aspect ratio of the output. If it does not match, you are presented with
three choices:
Resize
An attempt is made to reduce the 3D window to match the aspect ratio, or to increase the 3D
window if the reduction would make it smaller than the minimum size. The output file is then
created.
Create
No change of window size is made, and the output file is created.
Cancel
The process is stopped and no output file is created.
Note

The program may be unable to resize the window correctly if it is near to its minimum
size. If this occurs, you are asked to resize the window manually.

The next stage is to check if the directory entered here (or from the config.file) exists. If
not, you are asked if the current working directory should be substituted instead, in which case
the file is not written.

SCAL User Guide

Reference section
3D grid viewer

99

The last stage is to check if the requested filename already exists. You may either overwrite the
file or cancel the operation. If, however, the filename is the default filename, this check does not
take place.
Limitations

If the aspect ratio of the 3D window and the PostScript output are not the same, the image
is centered on the page.

The center triangle of the ternary color legend is colored gray.

The appearance of cell outlines may not be the same as on screen, and may also differ from
one printer to another.

Transparency is a not a supported feature of PostScript, therefore all surfaces appear


opaque.

Image File...
This menu item allows the 3D image to be saved in various file formats.
Figure 5.12 Write Image panel

The quality of the JPEG image can be changed; a higher quality (higher value) is likely to mean
larger file sizes. This parameter has no effect for the other formats.
When you click on the Write Image button, a check is made to see if the requested file name
already exists. You may either overwrite the file or cancel the operation. If, however, the
filename is the default filename, this check does not take place.
Table 5.5

100

Configuration file settings

SECTION

3D

SUBSECTION

WRITE_IMAGE

FILENAME

$TMPDIRgrtframe.jpg

FILETYPE

JPEG

Reference section
3D grid viewer

SCAL User Guide

Table 5.5

Configuration file settings

SECTION

3D

WIDTH

500

HEIGHT

500

SUBSECTION

WRITE_IMAGE

FILENAME is the name of the file entered on the dialog panel (note that if a name is entered
without a suffix this is added automatically). The config. file name does not alter the
default file name.
FILETYPE determines the type of image selected. Choices are:

JPEG (JPG is also accepted)

TIFF (TIF is also accepted)

FILETYPE determines the 3-letter suffix that is automatically added to the file name.

Choice of type of image


The advantage of JPEG over TIFF is the size of the files, due to the compression techniques
used. However JPEG is better suited to photographic images than to computer generated
images. TIFF files as generated here use the lossless run-length encoding method; the
compression used for JPEG is a lossy compression.

Hardcopy Colors
There is no dialog panel associated with this option.
This menu item switches colors between black and white for various objects, and is primarily
intended for switching between screen colors and hard copy.
If the menu option is selected (that is, hardcopy colors are requested), then the background color
is set to white and the foreground color is set to black. If the option is not selected (or screen
colors are selected) then the background color is set to black and the foreground color is set to
white.
The various objects changed are as follows:

The background of the 3D window changes to the background color.

Cell outlines change to the foreground color.

Text used for Wells, Axes, Titles, Color Legend and 3D Text changes to the foreground
color.

Commands
Play commands...
A log of your operations is written to a command file with the suffix .CMDLOG. These files can
be replayed to restore the program to a previous state.
The file from the previous run is renamed to <application_name>_prev_run.CMD and
can be replayed using the Play Commands option. Alternatively, command log files can be
renamed as required with the suffix .CMD, and then replayed in future sessions. If a command
file is renamed <application_name>.startup, or appended to the command line with
the -play option, it is run automatically on startup.

SCAL User Guide

Reference section
3D grid viewer

101

Record 3D Position
This option writes commands containing details of the current 3D position of the object in the
view. The 3D position may be recorded in this way at any time.

Add Pause Commands...


The Add Pause dialog allows you to write a Pause command into the current log file. You
may enter a text message of your choice that is associated with the Pause command.
When the command file is played back the Pause command interrupts execution of the
program and displays a panel containing the text message. Three possibilities are then available:
Continue
Process all commands until the next Pause when another panel appears.
Continue to End
Process all commands until the end of the command file. If any further Pause commands are
found, they do not generate a panel.
Cancel
Immediately stop all processing of the command file.

Exit
Select this option to close the 3D Viewer window.

Scene menu
Property
Property
This panel is used to select the simulation property to color the cells of the active grid. Only
Initial or Recurrent properties are shown in the list at a time. If both property types are
available, selection may be toggled from one to the other by use of the radio buttons.

102

Reference section
3D grid viewer

SCAL User Guide

Figure 5.13 Property Display panel

If water, oil and gas saturations are available, a Ternary property is created. This property exist
at all timesteps where the three saturations are available. The Ternary property is found in the
list of Recurrent properties and is available for display just like any other property.

Cell Probe
The Cell Probe allows you to investigate a cells properties. The cell is selected by clicking on
it in the 3D Viewer with the left mouse button. If the Paint Cell option is on, the cell is painted
white. By default the I, J, K location of the cell, and the grid it belongs to, are reported.
To examine the cells property values select a property from the All Properties list and transfer
it to the Probe Properties by either double-clicking on the property or by selecting the property
and clicking on the
button. The property name and the corresponding cell value are then
shown in the Cell Properties box. More properties may be selected in the same way.
To remove a property from the Probe Properties either double-click on the property name in
the list or select it and click on the

SCAL User Guide

button.

Reference section
3D grid viewer

103

Figure 5.14 Cell Probe panel

The cell values update as you animate the simulation through time. Also note that the probe can
be used in sweep mode by holding the left mouse button down and moving the pointer over the
grid. The effect is to get a continuous trail of property values for the cells that have been swept
by the mouse cursor.
The Cell Geometry option displays the coordinates of the corners and the center of the
currently selected cell. The nodes are listed in an anti-clockwise direction, top face first
followed by the bottom face. For Cartesian cells we list from the top back left node, for radials
from the min. r - min. theta node.
The Always On Top option can be used to prevent the cell probe panel from being hidden by
the 3D Viewer if the two windows are overlapping.
The Print button prints the contents of the text window to your default printer.

Threshold
The Threshold panel allows you to limit the cells displayed to those that have a property value
inside a given range. You can threshold on multiple properties, so that the cells displayed are
those whose property values are within the intersection of the supplied ranges. As you animate
through time different cells fall into and outside of this property range so giving a visual
indication of fluid flow.

104

Reference section
3D grid viewer

SCAL User Guide

Figure 5.1 Threshold Properties

The list of properties featured in the All Properties list can be toggled between the Initial
and Recurrent property list by the buttons at the top of the panel.
Select properties for thresholding from the All Properties list either by double-clicking on
them, or by single-clicking them and then clicking on the
button. Selected properties are
then listed in the Active Properties list. The details of the currently selected property are listed
on the folder below. The layout of the folder differs for integer and real properties - the integer
thresholding folder allows multiple discrete ranges to be selected whereas the real threshold
folder allows just one floating point range to be set per property. Selecting a property from the
Active Properties list displays the details of that property on the folder below. A properties
may be removed from the Active Properties list (and have its threshold range reset) either by
double-clicking on it or by single-clicking on it and clicking on the

button.

The following two sections describe the different interfaces presented for integer and real
properties.

Integer properties
The Integer properties interface is as follows:
Figure 5.15 Integer Threshold panel

SCAL User Guide

Reference section
3D grid viewer

105

Select values
The Select Values list allows multiple selection of integer values to be included in the
threshold range. The selected ranges are listed in the Edit Selection field below. This text list
may be edited directly. To select more than one individual integer from the list, press the Ctrl
key while selecting values with the mouse button; to select a continuous range select the first in
range with the mouse, scroll to the last in range and press the Shift button while selecting it
with the mouse.
Move selection
This increments or decrements all selected values by the given amount. Selected values wrap
from the end of the list to the beginning and vice-versa.
Edit Selection
The complete selection is shown in this field. You can also edit it here.
Disable
When selected, this temporarily disables the selected propertys threshold range.
Reset
Resets the selected properties threshold ranges.

Real properties
The Real Properties panel is as follows:
Figure 5.16 Real Threshold panel

Threshold range
Allows selection of a min. and max value that delimit the property values. Only cells with
property values within these limits are displayed.
Move range
Allows the min. and max range values to be incremented or decremented by the given amount.
The buttons are only available when there is sufficient range to move the range values without
ending up outside of the property min. and max values.
Disable
When selected, temporarily disables the selected propertys threshold range.

106

Reference section
3D grid viewer

SCAL User Guide

Reset
Resets the selected properties threshold ranges.
The Control buttons act on all the properties in the panel:
Figure 5.17 Control buttons

Disable all
Disables all active threshold ranges.
Enable all
Enables all active threshold ranges.
Reset all
Resets all active threshold ranges.
Apply
Applies all changes made to the panel. Not available if AutoApply is on.
If AutoApply is on, then changes to the panel take place immediately; if AutoApply is off, then
changes made in the panel do not happen until Apply is chosen. When AutoApply is on, the
Apply button is disabled (grayed out).
The status of AutoApply can be altered from the drop-down menu accessible with the right
mouse button; releasing the button over the AutoApply option changes the state of AutoApply.
Close
Closes this panel. You are asked whether you wish to Apply any unapplied changes.
Help
Opens the on-line help pages.

Edit...
When properties are created or edited in the Main Viewer, the new property values will be
applied only to the cells which are currently displayed. Before assigning a property, use one of
the Main Viewer tools to define the appropriate range of cells (for example IJK slicing, limit
by volume of interest, domain selection, thresholding).
This option opens the Edit Properties panel which has a list of previously defined properties
and a set of action buttons for creating, copying, editing and deleting.
Create
This option opens the Create Property panel. Use this panel to create a new property.

Property name
Enter a unique property name.

SCAL User Guide

Property type

Reference section
3D grid viewer

107

In this area of the panel you define the property type by choosing between either
Integer or Real and whether the data is to be applied to inactive cells and/or LGRs.

Property value
Here you can provide an initial value for the property.
Choose OK to create the new property.

Copy
A property can be copied by selecting an existing property from the list and choosing Copy. A
panel similar to the one described above will appear, except that instead of providing a default
value for the new property, you can enter a multiple of the existing property.
Edit
To edit a property, highlight the property and choose Edit. This opens the Edit Property Cells
panel.

Edit scope
The edits may be applied to All Cells or to only the Current Selection displayed in
the Main Viewer.

Edit value
You can give a new value to the property. The new value can be a Constant or a Multiple of
another property. The drop-down list is enabled when this option is chosen to allow you to select
the reference property.
If Accumulate is enabled the new value will be added to the current value. For integer
properties the new value will either be rounded to the nearest integer or truncated depending on
whether the Nearest Integer is enabled.
Delete
This option will delete the highlighted property.

Timesteps
Note

All timesteps for all time varying objects in the view are listed. It is possible therefore
for you to select a timestep for which there is no data for one of these objects. If this
happens, you are warned and the objects closest previous timestep used.

Individual timesteps can be chosen to display from a list showing sequence number, timestep
and date. Animation of the timesteps is controlled with buttons similar to those on a video
recorder.

108

Reference section
3D grid viewer

SCAL User Guide

Figure 5.18 The Animate Time panel

The timesteps can also be chosen from the timestep buttons on the 3D Viewers toolbar.
The animation buttons let you single step forwards, single step backwards, stop the animation
and play the animation from current step to the end. Additional buttons on the 3D Viewers
toolbar let you snap directly to the first (rewind) or last (fast forward) timestep.
On the Animate Time panel it is possible to select timesteps directly from the list, so the panel
does not have the icons for first/last timesteps.
The Circular Animation button sets the Play Mode to loop continuously. When Play is pressed
and the last step is reached we return to the first step where the animation starts again. By default
the loop is played 99 times before stopping automatically. This may be configured through the
use of the MAX_CONTINUOUS entry in the config file.
Figure 5.19 The timestep control buttons

First Timestep

Last Timestep

Previous Timestep
Stop

Next Timestep
Play

Select Options... to define the minimum and maximum timesteps, the timestep interval, and the
delay between timesteps.

SCAL User Guide

Reference section
3D grid viewer

109

Figure 5.20 The Animate Time Options panel

IJK Slice
Note

This option applies only to the grid selected in Set Active Grid.

The IJK Slicer panel allows you to view restricted slices or blocks of the grid based on the grids
IJK structure. Structured grids have a single global domain and domains for each LGR created.
LGRs can be sliced independently of the global cells.
Unstructured grids are made up from several domains around features like wells, faults and
boundaries. Each of these domains has its own IJK structure and can be sliced independently.
There is also a top level, or global domain that does not have an explicit IJK structure. It is an
internally constructed, virtual IJK grid that can be used to view the unstructured grid in a more
conventional manner.
The Global domain is sliced by default. To slice a particular domain, either select it from the
Select Domain drop-down list box or simply pick on the domain in the 3D Viewer with the
left mouse button. This automatically selects the chosen grid for slicing. Existing slicings of
other domains are remembered.

110

Reference section
3D grid viewer

SCAL User Guide

Figure 5.21 IJK Slicer panel

Note

When slicing sub-domains, it may be useful to display only the cells in that particular
sub-domain. Use Grid | Volume of Interest | Domains to limit the domains viewed.

The effects of slicing are cumulative in that the global domain and any or all sub-domains can
be sliced at the same time. The union of the slices is displayed. The buttons Reset Domain and
Reset All Domains can be used to cancel slicing if it is not desired.
The rest of the IJK Slice panel provides three folders for controlling the slicing. The IJ Slicing
folder allows a selection of rows and columns to be displayed. These rows can be combined with
a selection of K layers set in the K Slicing folder. The Honor IJ Slicing check-box on the K
Slice folder toggles the combination between union and intersection with the IJ slices. The IJK
Extents folder allows the range of I,J and K cells displayed to be restricted to a smaller block.
Several numbers in a row can be chosen by highlighting the first value then holding the Shift
key and highlighting the last value. All numbers in between are highlighted. Multiple IJK
numbers can be chosen by pressing the Ctrl key while selecting the appropriate numbers using the Ctrl key on an already selected row deselects it. The full combination of selected
rows is shown in the horizontal box in a short-hand form such as 1-7,13,15-20. This box can
be edited.
Use Every Nth to choose regularly spaced row or layer numbers.

SCAL User Guide

Reference section
3D grid viewer

111

If AutoApply is on, then changes take place immediately; if AutoApply is off then changes
made in the panel do not happen until you click on Apply. When AutoApply is on, the Apply
button is disabled (grayed out).
The status of AutoApply can be altered from the drop-down menu accessible with the right
mouse button - releasing the button over the AutoApply option changes the state of AutoApply.
The drop-down menu only changes the status of AutoApply on the currently selected folder, so
each folder can be set as required.

Volume of Interest
Note

This option applies only to the grid selected in Set Active Grid.

Grid Cells...
This option restricts the volume of the displayed model. Only cells in the new restricted range
will be available to the IJK Slicer. Volume of Interest may only be set on the global grid.
Changes made to the Volume of Interest panel are applied automatically. The AutoApply
option can be toggled off by pressing the right mouse button anywhere in the window and
clicking on AutoApply is On.
Figure 5.22 VOI Grid Cells panel

Domain Selection...
A domain is a named group of cells within the grid. Structured grids have a global domain and
a sub-domain for any available LGRs.

112

Reference section
3D grid viewer

SCAL User Guide

In unstructured grids, reservoir features such as wells, faults and regions are grouped into
individual domains. Each domain has an independent IJK numbering system. (This collection
of IJK numbers is mapped to a single, regular IJK grid for ECLIPSE internally by the
unstructured gridder.) There is also an unstructured global domain that does not have an explicit
IJK structure. It is a virtual IJK grid created by the unstructured gridder that allows the model
to be displayed and sliced in a more conventional manner.
From the Domain Selection window one or more domains can be chosen for display.
Choices made in Domain Selection are not applied until Apply is chosen. The AutoApply
option can be toggled on by pressing the right mouse button anywhere in the window and
clicking on AutoApply is Off.
Figure 5.23 VOI Domain Selection panel

Boundaries...
Boundaries are used to define areal limits for structural models and grids. They can also be used
to assign properties and aquifers to particular sections of the grid. Boundaries can be created in
Edit | Boundaries. Boundary boxes may be displayed or removed from the viewer in Edit |
Boundaries.
The window Create VOI From Boundary allows you to select cells inside or outside of a
boundary for display.

SCAL User Guide

Reference section
3D grid viewer

113

Figure 5.24 Create VOI From Boundary panel

The Union and Intersection buttons display the union or intersection respectively of the cells
defined by the boundary with the cells currently selected in the 3D Viewer.
When assigning properties or creating aquifers in the 3D Viewer, this option offers a method to
define which cells are used for assigning the new property or aquifer.

Display
Show
Cells
This option allows the display of the cells to be toggled.
Outlines
This option allows the display of the cell outlines to be toggled. Along with the Cells option
this enables four different display modes, from cells with outlines (good for checking
geometry), to no cells or outlines for viewing the wells.
Note

These buttons affect all grids in the display, not just the currently active one. Use the
Object Appearance panel to set the visual characteristics of individual grids.

Faces...
This option opens the Cell Face Selection panel, which gives you control over which faces of
the cells are displayed and which are not displayed. This is useful for visualizing the grid, with
the wells in situ at the same time, gaining insight into the fluid flow through the interior, and
viewing the exterior of the model.

114

Reference section
3D grid viewer

SCAL User Guide

Figure 5.25 The Cell Face Selection panel

You can turn the I, J and K + and - faces on or off using the check boxes.

The Clear button removes all selections and the Reset button selects all faces.

Note

Note that with all six faces selected, the model behaves as it does by default, by only
displaying the external faces of the model (since the interior faces are no longer
visible).

Caution

Note that displaying many faces at once dramatically increases the number of
polygons to be displayed, and will therefore have a marked effect on the speed of
your display. It is unwise to display back-to-back faces at the same time.

Cell face selection can of course be used in conjunction with any other display option, but is
particularly effective when used with IJK slicing.
Inactive cells
By default, inactive cells are only shown if the displayed property has data for active cells. This
option allows you to show the inactive cells even if the displayed property has no data for them.
The inactive cells are colored according to the color set using the Scene | Grid | Inactive Cell
Color... menu option.
Displaying inactive cells can be useful for highlighting shale breaks, pinch-outs or just generally
checking the grid quality.
Display Shale Breaks
This option turns off the display of cell faces adjacent to inactive layers. Take for example a
shale break that is represented by a layer of impermeable cells. Assuming these cells are
inactive, they are not displayed with the majority of simulation properties. This means that your
model may be full of thin layers that are not displayed; each layer will have cell faces above and
below it, the faces of the active cells above and below. If these layers are very thin, these faces
are unnecessary to the point of being invisible when internal to the model. By turning off Shale
Breaks, you turn off the display of these potentially invisible faces. This reduces the amount of
geometry to be displayed and so can dramatically speed up interaction with the model.
Note

SCAL User Guide

Where these inactive layers meet the exterior of the model, you may see holes
through which you can see inside the reservoir.

Reference section
3D grid viewer

115

Transparency...
The Grid Transparency panel allows you to change the opacity of the displayed grid so that
you can see the wells in position. A value of 1.0 makes the grid fully transparent, a value of 0.0
fully opaque.

Utilities menu
Create Property Type panel
This dialog provides options for creating new types of properties. Once created, these property
types are available for the creation of new properties.
Figure 5.26 Create Property Type panel

Note

Property Types are placeholders for their individual properties and property versions.
The idea is that many versions of the same property may exist and all be grouped in
one Property Type. All properties (versions) must be associated with a Property
Type, and the min and max values used to color these properties are taken from all
properties associated with a Property Type.

Property type name


This text box allows you to specify the name of the new property type.
Select quantity
This drop-down menu allows you to select what type of quantity a property type is (for example,
area, length, etc.). The choice of quantity dictates which units are used with a property type.
Integer or Real radio buttons
Select Integer or Real to determine the type of the data to be associated with this property type.
Info
This text box allows additional information to be provided about the property type.

116

Reference section
3D grid viewer

SCAL User Guide

Select families
This is a multiple selection list that allows you to define which property families the created
property type belongs to. Families are not currently used by this product so this field can be
ignored.

Display menu
The View menu allows the view of the 3D model to be configured. Many of the options are
duplicated on the vertical toolbar.

Object appearance...
This opens the Object Appearance panel, which contains a list of all objects that have been
requested for display in the 3D Viewer. On this panel you can select which objects to view at
any one time.
Figure 5.27 Object Appearance panel

Objects
This column displays the names of the objects that have been sent to the viewer.

Visibility
The drop-down menus in this column allow you to either Hide or Show the object.

Render mode
The drop-down menus in this column allow you to select how the objects are visualized in the
viewer. The choices are dependent on the type of objects. Most objects have the following
options:

Lines - This shows the objects as a framework of lines.

Surfaces - This shows the objects as solid surfaces.

Cell outlines - This shows the objects with the cell outlines superimposed
on the surfaces.

Other objects have more specific options; for example, wells have the following:

Wells - This shows the wells without well labels.

Wells and labels - This shows both the wells and the well labels.

Level of detail
The drop-down menus in this column allow you to specify the level of detail required in the
viewer. If Level of Detail is not applicable for a given object, the entry only shows All.

Color legend
These options control the appearance of the color legend. Switching between the normal
horizontal legend and the ternary legend is automatic as you choose the property to display.

SCAL User Guide

Reference section
3D grid viewer

117

Figure 5.28 Ternary legend

Figure 5.29 Color legend

Show Color Legend


This option toggles the color legend on or off.

Color Legend Editor...


The Color Legend Editor allows you to edit the position and size of the legend and also allows
access to the individual property Color Map Editors. These allow editing of the colors, markers
and method used to generate the colormap and are discussed in detail later.
Horizontal Position
Slider moves the color legend horizontally across the screen.
Vertical Position
Slider moves the color legend vertically across the screen.
Ternary Legend Size
Sets the size of the Ternary property legend.
Length of legend
Sets the length of the color legend on the screen.
The Color Map to Edit list allows selection of the property type color map to be edited. Simply
select the property type and then click on Edit...
Hint

Click on the Color Legend in the 3D Viewer to display a pop-up menu. Select Edit
to open the current Property Types color map editor.

You are presented with one of the following editors depending on the property data type:

118

Reference section
3D grid viewer

SCAL User Guide

Integer color map editor


The Integer Color Map Editor provides controls for editing the color map used for a particular
integer property type. The color map may be continuous or discrete.
Min./Max. Override
Normally the minimum and maximum values for a property type are calculated over all objects
in the view and all timesteps containing the property. The Min./max. Override allows these
values to be changed. If the minimum and/or maximum values are set inside the calculated
values, then a light gray color is used for the underflows (values less than the min. value set)
and a dark gray color is used for the overflows (values greater than the max. value set).
Overriding the Min./Max can be useful for:
1

Highlighting small property variations by reducing the coloration range to values close to
the variations.

Pinpointing data anomalies by reducing coloration range to show cells that are outside the
normal range for that property.

Identifying groups of cells that fall inside or outside a particular range of interest, especially
whilst animating that property through time.

Continuous Colormap
A continuous color map is shown as a smooth gradation of colors from the start to the end. The
Edit Color...button may be used to change the color for the start and/or end and the interpolation
method used to change the way the gradation occurs.
RGB interpolation works by providing a smooth gradation between the red, green and blue
components of the Start and End colors. RGB interpolation is useful for providing color maps
from light to dark blue etc.
HSV interpolation works by providing a smooth gradation between the hue, saturation and
value components of the Start and End colors. HSV interpolation is useful for providing
rainbow color maps.
Discrete Colormap
Discrete color maps may have from 2 to 16 steps. If the integer property has 16 or fewer values,
the default color map is discrete.
The number of steps may be altered. If there are fewer steps than values, then several values will
be shown together. For example, if JINDEX ranges from 1 to 20 and four steps are chosen, then
the steps contain values of 1-5, 6-10, 11-15, and 16-20 respectively.
The color and bounds of each step may be altered. Clicking on the Edit Color... button will
bring up a new panel with 48 predefined colors that may be used to change the color of the
selected step. The bounds may be altered using the Lower Bound and Upper Bound sliders,
and these automatically change the adjacent step.
Classifier Colormap
Classifier color maps allow coloring of the property by user defined classifications. You add
new classification rows to the table by clicking the Add Row button. You may then name the
classification, set the min and max range and select an associated color from the drop down list.
The Delete Row button removes the currently selected row from the table.

SCAL User Guide

Reference section
3D grid viewer

119

Real Color Map Editor


The Color Map Editor provides controls for editing the color map used for a particular floating
point property type. The color map may be continuous, discrete, logarithmic or reverse
logarithmic.
Min./Max. Override
Normally the minimum and maximum values for a property type are calculated over all objects
in the view and all timesteps containing the property. The Min./Max. Override allows these
values to be changed. If the minimum and/or maximum values are set inside the calculated
values, then a light gray color are used for the underflows (values less than the minimum value
set) and a dark gray color are used for the overflows (values greater than the maximum value
set). Overriding the Min./Max can be useful for:
1

Highlighting small property variations by reducing the coloration range to values close to
the variations

Pinpointing data anomalies by reducing coloration range to show cells that are outside the
normal range for that property

Identifying groups of cells that fall inside or outside a particular range of interest, especially
whilst animating that property through time.

Continuous Colormap
A continuous color map is shown as a smooth graduation of colors from the start to the end. The
Edit Color... button may be used to change the color for the Start and/or End, and the
interpolation method used to change the way the gradation occurs.
RGB interpolation works by providing a smooth graduation between the red, green and blue
components of the start and end colors. RGB interpolation is useful for providing color maps
from light to dark blue, etc.
HSV interpolation works by providing a smooth graduation between the hue, saturation and
value components of the start and end colors. HSV interpolation is useful for providing rainbow
color maps.
Discrete Colormap
Discrete color maps may have from 2 to 16 steps. The number of steps, the color and the bounds
of each step may be altered.
Clicking on the Edit Color... button opens a new panel with 48 predefined colors that may be
used to change the color of the selected step. The bounds may be altered using the Lower
Bound and Upper Bound sliders, and these automatically change the adjacent step.
Logarithmic Colormap
Selecting this option creates a discrete log10 color map with boundaries at decades. The
decades will overlap the property range at either end. If a property contains values <1e-5 they
will be colored grey. The number of steps will correspond to the number of decades the property
range encompasses and is fixed as are the step bounds. The color associated with each step may
be altered by clicking on the Edit Color... button as for the Discrete color map above.
Classifier Colormap
Classifier color maps allow coloring of the property by user defined classifications. You add
new classification rows to the table by clicking the Add Row button. You may then name the
classification, set the min and max range and select an associated color from the drop down list.
The Delete Row button removes the currently selected row from the table.

120

Reference section
3D grid viewer

SCAL User Guide

Ternary Color Map Editor


The Ternary Color Map Editor presents you with the three components and their Min./Max.
values that will be used to generate the Ternary diagram. Ternary cell colors are derived by
applying amounts of red, green and blue coloration according to the percentage of each
component within the cell. The first component (usually GasSat) is red, the second (usually
OilSat) is green and the third (usually WaterSat) is blue.
By default we override the components real Min./Max. and assume that each component
occupies 0 - 100% of a cell somewhere in the model, in other words that their Min./Max.
saturations are 0 to 1. This gives a balanced view of the percentage of each component within
each cell, but can make it hard to see small amounts of gas in the reservoir, for example. The
Override switch can therefore be used to toggle between this and using the Min./Max. of the
individual components.

Autonormalize
With this option turned on, the contents of the view are automatically scaled to fill the window.
This happens every time the contents of the view changes. With this option off, no rescaling
takes place when the view contents change.

Perspective
This option toggles the perspective projection on and off.

Set View
This option allows a choice from a list of six predefined viewpoints of the model.
Hint

The button colors correspond to the display colors of the axes.

User
This view is defined as the last view of the model defined by the mouse. The default is 30
degrees above the horizontal, 60 degrees to the left and with the model rotated 8 degrees around
the Z axis.

Top
A view from above the model in the negative Z direction.

Bottom
A view from below the model in the positive Z direction.

Front
A view of the model from the front or positive Y direction.

Back
A view of the model from the back or negative Y direction.

Left
A view of the model in the left or positive X direction.

SCAL User Guide

Reference section
3D grid viewer

121

Right
A view of the model in the right or negative X direction.

Camera rotation
This panel allows you to rotate the camera about the objects in the 3D Viewer. The buttons in
the Single Step box allow for horizontal and vertical rotation by the specified rotation Angle.
The buttons in the Animation box rotate the objects through 360 degrees, using the specified
Number of Iterations.
Note

Camera rotation is not the same as object rotation performed with the mouse, or using
the object rotation panel.
Firstly, camera rotation is always about the center of the object, and takes no note of
the center of rotation/zoom. Secondly, moving the camera does not move the directed
light, so that objects continue to be lit from the original camera position.

Figure 5.30 Camera Rotation panel

Lights...
Turns directional lights on or off. Lighting the model with several lights "shining" from different
directions produces highlights and shadows, creating a more realistic view and emphasizing
topological features such as faults. Ambient lighting is always on.
Caution

122

Reference section
3D grid viewer

The use of lighting can increase the time taken to display the model. This decrease
in performance can be very significant when working with large models.

SCAL User Guide

The Lighting panel controls the directional lights. The directional lights are arranged relative to
the viewing position at Top Left, Top Right, Bottom Left and Bottom Right. Turning on for
example the Bottom Right light illuminates the bottom and right hand sides of the model, which
may help in viewing points of interest in tha area.
The display becomes brighter as more lights are turned on.
Figure 5.31 Lighting panel

Edit Titles...
This option allows you to add titles and annotation to your 3D view. You may add as many titles
as you like by using the Add Title button. The currently selected title may also be removed by
pressing the Delete Title button.
The position, size and alignment to start position for the currently selected title may be changed
using the Position, Font and Align Text to Position sections respectively. The position sliders
have extents of -1.0 to 1.0. Fonts and text heights may be machine-dependent.
The Contents section displays the selected title text. The contents of the title may be edited by
simply typing into the text box. The drop-down list holds keywords that are translated on screen
to the value they represent. Select an entry point in the title text with the cursor and select a
keyword to add it to the title.
Titles may be defined in advance within the config file. See the section on configuring the
application for more details.

SCAL User Guide

Reference section
3D grid viewer

123

Figure 5.32 Edit Titles panel

If AutoApply is on, then changes take place immediately; if AutoApply is off then changes
made in the panel do not happen until Apply is chosen. When AutoApply is on, the Apply
button is disabled (grayed out).
The status of AutoApply can be altered from the drop-down menu accessible with the right
mouse button: release the button over the AutoApply option to change the state of AutoApply.

Axes...
The Axes panel allows you to configure the display of model axes in the 3D Viewer.
The axes displayed around the model have their origin at (0,0,0) in the grid model coordinate
system. You can set the axes to be colored and labeled using the Axes check boxes. The axes
colors directly correspond to the colors on the View buttons found on the left side of the 3D
Viewer, namely red for the X axis, green for the Y axis and blue for the Z axis. A full model
Bounding Box can be turned on, which fully contains the grid and axes.

124

Reference section
3D grid viewer

SCAL User Guide

Figure 5.33 Axes panel

The axes locations can be set to the Bounding Box limits with the Position radio buttons.
The Axes Extents option allows you to toggle the axes extents between that of the current
selection and the whole model. The axes update as the selected extent changes, for example by
changing threshold or slicer values.
Tick Marks and Tick Labels can be placed on the axes using the check boxes and tick mark
folders. Primary and Secondary Tick Marks can be set at defined intervals on each axis from
drop-down menus. Tick Labels can be displayed at regular intervals along the Primary Tick
Marks, set with the Label Every: drop-down menu. Control of the number of decimal places,
and whether to use scientific notation, is also possible.
The Primary Tick Marks can be extended to cover the full extent of the model by selecting the
Grid Lines box. Grid line color can be changed with the Grid Color... option. The Grid and
Primary Tick Marks positions are affected by the Position radio buttons.
The Axes settings can be applied to the model view automatically. This can be set by clicking
anywhere within the Axes panel area with the right mouse button, then releasing the mouse
button on the AutoApply is Off button. The Apply button is then grayed out and any edits in the
Axes panel are immediately reflected in the model view. To turn the automatic axes settings off,
click in the Axes panel area with the right mouse button then release the mouse button on the
AutoApply is On button.
Axes AutoApply options can be preset on or off at program startup by editing the 3D section
of the CONFIG.ECL configuration file, or its local copies ECL.CFG or ECL.CFA.

SCAL User Guide

Reference section
3D grid viewer

125

XYZ Exaggerate...
This option allows you to apply a scale factor to the X, Y, and Z (height) directions. Vertical
exaggeration can be quickly applied to the model by clicking on the Vertical Stretch
Vertical Shrink

and

buttons in the toolbar.

Preferences menu
Set External Units
This panel allows you to change the unit system with which data values are displayed. The unit
system can be switched between Field, Metric and Laboratory. Property units, axes and data
values on other panels are automatically updated to reflect the unit system change.

Toolbars
This option shows or hides the toolbars.

Graphics Option
There is a choice between two renderers:

The hardware renderer uses the workstation platforms native graphics libraries and
hardware to draw objects on the screen.

The software renderer implements its own graphics model, drawing objects into an X
Window System image.

In general, the hardware renderer is faster. However, the native graphics facilities on many
workstations do not support all rendering features. If the hardware renderer does not support a
rendering feature such as lights, switch to Software Renderer.
The software render may be slower to draw, but it implements more rendering features than all
but the most expensive color graphics workstations. On some platforms, such as a simple color
X terminal, the software renderer may be the only renderer available.

X
This option reverses the X axis. It should only be used for non-ECLIPSE grids with a different
origin.

Y
This option reverses the Y axis. It should only be used for non-ECLIPSE grids with a different
origin.

Rotation style
While you are translating, rotating and/or zooming objects in the 3D Viewer, you can use
different methods to display the object before the final display. The less the amount of
processing to be done during these operations, the faster they are executed.

126

Reference section
3D grid viewer

SCAL User Guide

Unchanged
All objects in the 3D Viewer are displayed and moved during translating, rotating and/or
zooming. No objects are hidden. Cell outlines are especially time-consuming to translate, rotate
and zoom in the Unchanged mode.

Wireframe
Rather than displaying and moving all objects in the 3D Viewer, wire frames for each grid are
displayed during translation, rotation and zooming. Wells are displayed as simple lines without
well labels. Streamlines are displayed as lines. The Wire frame option is less demanding on the
software than the Unchanged mode.

Bounding Box
All objects are hidden from view during translation except for a bounding box around each grid.
This is the least demanding style.

Rotation Caching
When enabled, this option stores an image of the model in RAM during translation, rotation and
zooming. This provides much smoother movement of the model during manipulation in the 3D
Viewer.

Mouse buttons
The Mouse Buttons option allows you to select a mode of interaction with the 3D Viewer that
suits the way in which you work. Options are OpenInventor (default), OIFloViz,
GeoFrame and RTView. All are described in detail below. Primarily, these options just set
which mouse buttons control picking, rotation, translation and zooming. The one exception is
OpenInventor, which has two distinct modes for picking and viewing.
Slave viewers use the same mode as the master viewer.
For continuous rotation, keep the mouse moving when releasing the appropriate mouse button.
Note

A 2-button mouse is no longer supported.

The following tables give details of which mouse buttons do what in each mode.
Table 5.6

Open Inventor settings

Interaction

Mouse / key combination

Select (Picking)

LEFT (only in pick mode)

Rotate

LEFT (only in view mode)

Translate

MIDDLE (only in view mode)

Zoom

<CTRL>MIDDLE (only in view


mode)

When in pick mode, the model cannot be moved. Only picking is available. To toggle between
modes, either use the buttons at the top left corner of the viewer (hand and arrow), select with
the P and V keys, or toggle using the <Esc> key.

SCAL User Guide

Reference section
3D grid viewer

127

In viewing mode, the left mouse button rotates the model, the middle button translates, and
<Ctrl> key with the middle mouse button zooms.
Table 5.7
Interaction

OIFloViz Settings
Mouse / key combination

Select (Picking)

LEFT

Rotate

LEFT and move mouse

Translate

MIDDLE

Zoom

<CTRL>MIDDLE

OIFloViz is similar to Open Inventor except that there is only one mode. A pick is registered by
a left mouse button click. If the mouse button is depressed and the mouse is moved, the pick
turns into a rotate. In this way, both modes are available at once using the mouse.
Table 5.8

GeoFrame settings
Mouse / key combination

Select (Picking)

LEFT

Rotate

MIDDLE

Translate

RIGHT

Zoom

LEFT and move mouse

A pick is registered by a left mouse button click. If the mouse button is depressed and the mouse
is moved, the pick turns into a zoom.
Table 5.9

RTView settings
Mouse / key combination

Select (Picking)

LEFT

Rotate

MIDDLE

Translate

RIGHT

Zoom

<SHIFT>MIDDLE

These settings are the same as the ECLIPSE Suite program RTView.
To zoom into an object (make it appear bigger), keep the appropriate button depressed and move
the mouse upwards or to the right.

Rotation and translation


Once the dataset has been loaded it is possible to rotate the image with the mouse, or translate
and zoom using the mouse buttons and the Shift key. To rotate the image, depress the right
mouse button and move the mouse. The image will rotate following the mouse cursor.

128

Reference section
3D grid viewer

SCAL User Guide

Translation of the image is achieved by using the Shift key in combination with the right
mouse button. This option allows the image to be relocated around the screen, but does not
rotate the current view.
Zooming in and out can be achieved using the Shift key in combination with the right mouse
button.
It is possible to move an image completely out of sight. This can be remedied by clicking the
AutoNormalize icon on the left side of the viewer. This will also turn on auto-normalization so
that the picture will be centered each time it is edited. Click this icon again to disable
AutoNormalize.
The following figure summarizes these controls.
Figure 5.34 Mouse actions

Rotate

Zoom
(with shift)
Select
object

Translate (with shift)

Rotation of the reservoir is dependant not only on how the mouse is subsequently moved, but
also on where on the reservoir it was initially placed. To clarify this, imagine that the reservoir
is located within a sphere - if the mouse is placed at the upper mid point and dragged down then
the reservoir will in effect rotate about the horizontal axis; similarly clicking on the left and
dragging right will rotate it about a vertical axis. Clicking on an arbitrary point has the effect of
rotating the reservoir about its center - the center of the sphere encompassing it

SCAL User Guide

Reference section
3D grid viewer

129

Figure 5.35 Reservoir rotation.

130

Reference section
3D grid viewer

SCAL User Guide

Three-phase relative permeability


Introduction
SCAL supports the input, display and output of three phase oil relative permeability surfaces
using the SOF32D attribute. It also shows the surfaces generated by the following models:
ECLIPSE default, Stone 1, Stone 2, Parallel Conductance Method. This enables you to better
select the method used by the simulator. Several surfaces may be shown at once.
The models are described in more detail in "Technical description" on page 135.
Relative permeability surfaces for records containing SOF32D data may be shown directly by
using the right mouse button menu on the "Record tree" on page 40. Choose the View 3 Phase
Rel. Perm. option. A record containing oil-water relative permeabilities must be associated
with a gas-oil record before display. This is done using the Record Associator panel. The
surfaces for associated records are also shown using the right mouse button menu. A record
containing three phase relative permeability (either by association or SOF32D attribute) is
indicated in a light blue color.

Limitations
1

It is not possible to export the displayed relative permeability surface to for example a
SOF32D attribute for writing out for the simulator.

The SOF32D attribute may not be edited within the program.

The traditional triangular ternary diagram with contours representing isoperms is not
supported.

There is no way of reading in or displaying the results of three phase relative permeability
experiments for example individual (Sw, Sg, Kro) values.

Three-phase relative permeability surface viewer

To open the viewer use the right mouse button on a record with associated data such that
oil-water and oil-gas relative permeability data is accessible, or which contains an SOF32D
attribute.
A typical display is shown in Figure 5.36.

SCAL User Guide

Reference section
Three-phase relative permeability

131

Figure 5.36 3D 3Phase Rel. Perm. Viewer

The display has water saturation along the x axis, gas saturation along the y axis and oil relative
permeability on the z axis. If SOF32D data is available it is shown by default, else the surface
is generated according to the ECLIPSE default model.
By default the rainbow color map is used with blue for low values and red for high. There are
two styles available; colored cell outlines or colored cells with white outlines.

To set the style select Display | Display Style.

Many of the menu and toolbar options are common with the Grid Viewer and are described in
that section.
You can control the surfaces by using the Relative Permeability Controller panel.

To display this panel select Display | Rel Perm. Surfaces....

Relative permeability controller panel


The panel contains a table with an entry for such surface displayed in the viewer. You can either
type in new rows or copy existing rows (using Ctrl N) and then modify them.

Record
This column contains the name of the record containing the surface.

Method
This column contains the method used to generate the surface.
Available methods are ECLIPSE 100/200 Default, Stone 1, Stone 2, Parallel Conductance and
User. User corresponds to data from the SOF32D keyword. For further information on the
available methods see "Three-phase relative permeabilities" on page 143.

132

Reference section
Three-phase relative permeability

SCAL User Guide

Colour
This column contains the surface color.
The default is Rainbow but when comparing two surfaces it is more useful to have the complete
surface the same color. The available colors are Rainbow, Blue, Cyan, Green, Yellow and Red.

Visible
This column determines the surface visibility.
Hint

It is sometimes useful when comparing several surfaces to be able to temporarily hide


some of them.

Interpolate surface
By default this option is checked, that is the surface is interpolated. This means that Sw and Sg
saturations are equally spaced along the axes.

Surface resolution
The field contains the number of saturations.
Note

SCAL User Guide

If the Interpolate surface box is unchecked then the surface is only drawn for
saturations that exist in the oil-water and oil-gas two phase curves that the surface has
been derived from. For curves with unequally spaced saturation values the two
surfaces can look very different. You need to have a Floviz license to view 3D.

Reference section
Three-phase relative permeability

133

134

Reference section
Three-phase relative permeability

SCAL User Guide

Technical description
Chapter 6

Input and output


Input
SCAL supports the following input methods and formats:
1

The standard keyword file. By convention this has the extension .RCI. This is an ASCII
keyword file that specifies the records and attributes used in a SCAL session.

ECLIPSE GRID (.GRID or .FGRID file). This file contains the geometry of the
simulation model.

ECLIPSE property file. Both the initial (.INIT) and restart (.Xnnnn or .UNRST)
properties can be read. SCAL only accesses data for the first timestep that has been read.

.AVS file. This file format is used in conjunction with the RTView and FloViz ECLIPSE
3D graphical post processors.

Text editor. The basic text editor allows the reading and writing of ASCII files.

The Calculator. This has functions for reading data using the read and vreadcol
keywords. The data may then be transferred into the internal SCAL data structures in
various ways.

Table import. Using the right mouse button over a table allows import from a file called
TABLE.TXT in the current directory. The file should be tab delimited and its structure must
match the table it is being read into. That is, there should be the same number of columns
and possibly row, and the types of data must match; for example, you cannot read text into
a column of numbers. This facility allows files generated by spreadsheets to be easily input.

Output
SCAL supports the following output methods and formats:

SCAL User Guide

Technical description
Input and output

135

136

The standard SCAL keyword file. By convention this has the extension .RCI. This is an
ASCII keyword file that specifies the records and attributes used in a SCAL session. The
autosave file is written in this format.

ECLIPSE table keywords. These are written to a file with the extension .RCP. The
following saturation table keywords may be written: SWOF, SGOF, SLGOF, SWFN, SGFN,
SOF2, SOF3, SOF32D. The following end point scaling versus depth keywords may be
written: ENPTVD, ENKRVD. Face values for these keywords may also be written, for
example ENKRVDX-.

ECLIPSE properties generated from records by SCAL. These are written to a file with the
extension .RCR. This file is an ASCII text file designed for inclusion in the ECLIPSE
.DATA file. Saturation table number keywords (SATNUM, KRNUMX-, IMBNUM,
IMBNUMZ+ etc.) and end point scaling keywords (SWL, KRWZ- etc.) may be written.

ECLIPSE properties generated in other ways by SCAL, for example by using the Property
Editor panel or the Calculator. These are written to a file with the extension .RCU. This file
is an ASCII text file designed for inclusion in the ECLIPSE .DATA file.

Text editor. The basic text editor allows reading and writing of ASCII files.

The Calculator. This has functions for writing data using the write and vwritecol
keywords. The data have been transferred from internal SCAL data structures in various
ways.

Table export. Using the right mouse button over a table allows export to a file called
TABLE.TXT in the current directory. The file is tab delimited. This facility allows files of
SCAL data to be easily input into spreadsheets.

Technical description
Input and output

SCAL User Guide

Functions
The following functions are supplied. This section of the manual, also, details their typical
usage. The SCAL name refers to the name as seen on the Function Data panel and is also the
name to be specified in the .RCI input file.

Corey Oil-Water
SCAL name:

COREY OIL_WATER

Definition:
1 S w S or
k ro = ----------------------------1 S wi S or

No

S w S wi N w
k rw = k rwend ----------------------------1 S wi S or

Usage:
Note

Oil-water relative permeability curves.


Valid saturation range when generating data is S wi to 1 S or .

Corey Oil-Gas
SCAL name:
Definition:

COREY OIL_GAS
1 S g S wi S or No
k ro = ----------------------------------------1 S wi S or

Ng
S g S gc
-
k rg = ------------------------------------------
1 S wi S or S gc

Usage:
Note

SCAL User Guide

Oil-gas relative permeability curves.


Valid saturation range when generating data is S wi + S gc to 1 Sor .
If S gc > 0 or S gc < 0 an additional point is added at S g = 0 .
This point has k rg = 0 , kro = 1 and is necessary to satisfy the consistency requirements
when writing simulator tables for three-phase systems and when generating threephase relative permeability surfaces.

Technical description
Functions

137

Cubic spline
SCAL name:

CUBIC_SPLINE

Definition:

Cubic spline as defined in Press, Vetterling, Teukolsky and Flannery,


Numerical Recipes 2nd Ed. CUP [Ref. 4]. Routines based on spline and
splint are used.

Usage:

Smoothing and interpolation of curves.

Note

138

One knot for each data point.

Technical description
Functions

SCAL User Guide

Exponential
SCAL name:

EXPONENTIAL y=C*exp(m*x)

Definition:

y = ce

Usage:

Capillary pressure.

mx

Exponential (log)
SCAL name:

EXPONENTIAL

Definition:

ln ( y ) = ln ( c ) + mx

Usage:

Capillary pressure. Often it is more stable to fit to logged data.

Power
SCAL name:

POWER

Definition:

y = Cx

Usage:

Capillary pressure.

Power (log)
SCAL name:

POWER

Definition:

ln ( y ) = ln ( c ) + B ln ( x )

Usage:

Capillary pressure. Often it is more stable to fit to logged data.

Lambda
SCAL name:

Lambda

Definition:

a
y = ---------------
Sw b

Usage:

Capillary pressure. Gives excellent fits.

1/

Lands correlation

SCAL User Guide

SCAL name:

LAND SOI_SOR

Definition:

S oi
S or = -------------------1 + CS oi

Usage:

Initial - residual saturation relationship. Used to fit and extrapolate


relationships extracted from several cores.

Technical description
Functions

139

Quadratic
SCAL name:

QUADRATIC FUNCTION

Definition:

y = ax + bx + c

Usage:

General fitting and extrapolation.

Straight line
SCAL name:

STRAIGHT LINE, SEMILOGX LINE, SEMILOGY LINE, LOGLOG


LINE

Definition:

y = slope x + intercept

Usage:

Various

Calculator
SCAL name:

CALCULATOR_2_COL, CALCULATOR_3_COL

Definition:

Calculator program defined in specified file

Usage:

General functional form may be supplied.

Note

140

The interface variables are x_value, y1_value and y2_value. Use


CALCULATOR_3_COL for relative permeability data, CALCULATOR_2_COL for
capillary pressure and relationship data.

Technical description
Functions

SCAL User Guide

Derived data
SCAL can calculate various quantities based on the relative permeability curves. These
quantities may be plotted as small graphs, or viewed as a table from the Tables panel in the
Record Editor. The required set of derived data is specified on the Graph Settings panel.
The following quantities may be calculated and plotted:

Semilog relative permeability


log10(kr) is plotted against the saturation vector.

Fractional flow
The fractional flow of water for an oil-water system is defined as:
1
Fw = ---------------------------- w k ro
1 + ------ ------- o k rw

[EQ 6.1]

The fractional flow of gas for an oil-gas system is defined as:


1
Fg = -------------------------- g k ro
1 + ------ ------ o k rg
Note

[EQ 6.2]

The viscosities are required for the fractional flow curves to be calculated.

Total mobility
The total mobility for an oil-water system is defined as:
k rw k ro
- + ------ ow = ------w o

[EQ 6.3]

The total mobility for an oil-gas system is defined as:


k rg k ro
- + ------Mog = -----g o
Note

[EQ 6.4]

The viscosities are required for the total mobility curves to be calculated.

Permeability ratio
This is calculated as:
k rw
Row = ------k ro

[EQ 6.5]

for oil-water systems and


k rg
Rog = -----k ro

SCAL User Guide

[EQ 6.6]

Technical description
Derived data

141

for oil-gas systems. This quantity is plotted on a log scale by default.


Note

To avoid problems with division by zero upper and lower limits of 106 and 10-6 are
used.

Relative permeability derivatives


Simulators are sensitive to sudden changes in relative permeabilities. This can manifest itself as
convergence problems.
dk

dk

dk

dk

rw
ro
rg
ro
- , --------- , --------- and --------- are calculated using a moving average technique.
The derivatives ---------dS w dS w dS g
dS g

Flood front breakthrough water saturation


This quantity can also be derived using the simple graphical technique of Welge (AIME, 195,
1952, 91-98). If requested by you it is displayed as a marker on the saturation axis of oil-water
rel. perm. plots, and also on the Results panel (the SWBKFF attribute), provided that there is
enough data to calculate it and if you have requested that it be calculated.
If the fractional flow small graph is swapped into the main graph, the saturation may be changed
by dragging the marker. While dragging, the graphical construct used to derive the breakthrough
saturation is made visible.
The displaying of the marker and the automatic calculation of this saturation can be controlled
by settings on the Graph Settings panel.
Note

142

Because Welges technique uses the fractional flow curve, oil and water viscosities are
required for this to be calculated.

Technical description
Derived data

SCAL User Guide

Three-phase relative permeabilities


ECLIPSE default
The default model is shown in Figure 6.1. The oil saturation is assumed to be constant and equal
to the block average value, S o , throughout the cell. The gas and water are assumed to be
completely segregated, except that the water saturation in the gas zone is equal to the connate
saturation, Swco . The full breakdown, assuming the block average saturations are So , S w and S g
(with S o + S w + Sg = 1 ) is as follows:
In a fraction S g ( Sg + S w S wco ) of the cell (the gas zone),
the oil saturation is So
the water saturation is S wco
the gas saturation is S g + S w S wco
In a fraction ( S w Swco ) ( S g + S w Swco ) of the cell (the water zone),
the oil saturation is So
the water saturation is S g + S w
the gas saturation is 0
The oil relative permeability is then given by
S g k rog + ( S w S wco )k row
k ro = -----------------------------------------------------------S g + S w S wco

[EQ 6.7]

where
k rog

is the oil relative permeability for a system with oil, gas and connate water
(tabulated as a function of S o )

k row

is the oil relative permeability for a system with oil and water only (also
tabulated as a function of S o )

Figure 6.1 The default three-phase oil relative permeability model assumed by ECLIPSE

Swco

1-So-Swco

So
0

Gas

Oil
Sg/(Sg+Sw-Swco)
Water
1
1-So

SCAL User Guide

So

Technical description
Three-phase relative permeabilities

143

Stone 1 (modified)
The second model available for calculating values of the three-phase oil relative permeability is
a modified version of the first model suggested by Stone (Trans. AIME, 249, 1970, 214-218)
[Ref. 6]. The formula is
[EQ 6.8]

k ro = k rocw SS o F w F g
where
k rocw

is the value of the oil relative permeability in the presence of connate water only

SS o = ( S o S om ) ( 1 S wco S om )

when S o > Som

F w = k row ( k rocw ( 1 SS w ) )

[EQ 6.9]

F g = k rog ( k rocw ( 1 SS g ) )

where
SS w = ( S w S wco ) ( 1 S wco S om )

when S w > S wco

SS g = S g ( 1 S wco S om )

In these formulae S o , S w and S g denote block averaged values for the oil, water and gas
saturations in a grid cell. k rog denotes the oil relative permeability for a system with oil, gas and
connate water, and krow denotes the oil relative permeability for a system with oil and water
only. Both two-phase oil relative permeability functions are tabulated as functions of oil
saturation in the input data. k rocw denotes the oil relative permeability in the presence of connate
water only.
is the minimum residual oil saturation. By default Som is taken to be the minimum of the
critical oil-to-water saturation and the critical oil-to-gas saturation. Alternatively, S om can be
input either as a function of water saturation (SOMWAT keyword) or as a function of gas
saturation (SOMGAS keyword).
S om

If the SOMWAT keyword is used, Som is interpolated from the water saturation as shown in
Figure 6.2:
Figure 6.2 Calculating the minimum residual oil saturation from the water saturation

Water Saturation
Swco

So=Socrw

Gas Saturation

144

Sw

So=Socrg

Technical description
Three-phase relative permeabilities

SCAL User Guide

If the SOMGAS keyword is used, S om is interpolated from the gas saturation as shown in Figure
6.3:
Figure 6.3 Calculating the minimum residual oil saturation from the gas saturation

Water Saturation

So=Socrw

Swco

Gas Saturation

0
Sg

So=Socrg

Stone 2 (modified)
The third model provided for calculating values of the three-phase oil relative permeability is a
modified form of the second model suggested by Stone (J. Can. Pet. Tech., 12, 1973, 53-61)
[Ref. 7]. The formula is
k ro = k rocw

k row
----------- k rog- + k k k
rg
rw
rg
k - + k rw -----------k
rocw

[EQ 6.10]

rocw

where krog denotes the oil relative permeability for a system with oil, gas and connate water;
k row denotes the oil relative permeability for a system with oil and water only. Both sets of twophase oil relative permeability functions are tabulated as functions of oil saturation in the input
data. k rocw is the oil relative permeability in the presence of connate water only.
Note

Note the values of k ro produced by this formula can be negative. The negative values
are shown on the displayed surface. However, ECLIPSE automatically changes any
negative kro values produced to zero.

Parallel conductance model


This model was developed by Marek et al. of Mobil (SPE 21374, SPE Middle East Oil Show,
Bahrain 1991) and includes various corrections by David Huang of Mobil. The model was
developed to address concerns that the Stone 2 model gave relative permeability values that
were too high, especially at low oil saturations. It does this by including a trapped gas effect.
The model is as follows:

SCAL User Guide

Technical description
Three-phase relative permeabilities

145

S wf
Sg
- k ( S ) + ------------------ k (S )
k ro = -----------------S wf + S g row oew S wf + S g rog oeg

[EQ 6.11]

where
n

2n

S wf S g
-
S oew = S o + w ---------------------- S wf + S g
n

2n

S wf S g
-
S oeg = S o + g ---------------------- S wf + S g
and
S orw S orm
w = I ------------------------------------S gm + S wm S iw

[EQ 6.12]

S org S orm
g = I ------------------------------------S gm + S wm S iw

[EQ 6.13]

where
n2

(1 ) I = 4 -----------------------n
(1 + )
1 = ----------+1
and
S wm S iw
= ---------------------S gm
n = 1+
Nomenclature:

146

kro

Relative permeability to oil (three-phase system)

krog

Relative permeability to gas (gas-oil system)

krow

Relative permeability to water (water-oil system)

Siw

Interstitial water saturation

Swf

Free water saturation, Sw - Siw

Sorg

Residual oil saturation in oil-gas system

Sorm

Minimum residual oil saturation in three-phase system

Sorw

Residual oil saturation in oil-water system

Sgm

Value of Sg at So = Sorm

Technical description
Three-phase relative permeabilities

SCAL User Guide

So

Oil saturation

Sg

Gas saturation

Swm

Value of Sw at So = Sorm

Gas multiplier

Water multiplier

Soeg

Effective three-phase oil saturation (gas-oil system)

Soew

Effective three-phase oil saturation (water-oil system)

Augmented oil saturation modifier

Exponent for Sg and Sw

Parameter for n, I

Parameter for n, I

Minimum residual oil saturation


The Sgm, Sorm, and Swm may be specified in the input file using the SGM, SORM and SWM
keywords respectively. If they are not available Sorm can be estimated from a correlation with
permeability where:
if permeability < 10 mD
S orm = 0.9 S orw

[EQ 6.14]

else:
S orm = 0.7 S orw

[EQ 6.15]

Sgm can be derived from Figure 3.23 in Craigs monograph (F. F. Craig Jr. SPE Monograph Vol.
3, Reservoir Engineering Aspects of Waterflooding) which gives a relationship between the
reduction of residual saturation, DeltaSor ( S or ), and the trapped gas saturation, (Sgm).
Here S or = S orw S orm and the curve fit to the figure is:
2

S gm = 1.01546 S or 0.055 ( S or ) + 0.032 ( S or ) 0.002 ( S or )


Note

SCAL User Guide

[EQ 6.16]

Note that S or and Sgm are both in percent in this curve fit equation.

Technical description
Three-phase relative permeabilities

147

Hysteresis
Facilities
SCAL has limited support for hysteresis in this release. Experimental data from both drainage
and imbibition experiments may be read in and handled by the program. However it is
principally up to you to organize the data in a useful way.
The type of process can be inferred by the injected phase and displaced phase attributes,
INJPHASE and DISPPHASE. These are displayed on the Procedures panel in the Record
Editor. The wettability classification and Amott wettability indices (WETT, AOWI, AWWI) on the
Results panel may also be useful. (See "Record editor" on page 57 for further information.)
For each saturation function two attributes are available, for example. KROW and KRWO. This
provides a means of handling drainage and imbibition data. The displacing phase initial should
come first in the attribute name. Hence KROW is the relative permeability in an oil displacing
water experiment and KRWO is for water displacing oil.
Tables for both drainage and imbibition data can be written at the same time. They should all be
contained within the assignment group on "The keyword generator panel" . Table number grid
arrays can be written for both drainage (SATNUM, KRNUMX etc.) and imbibition (IMBNUM,
IMBNUMZ- etc.) cases. The appropriate records should be specified as the Generate group.

Limitations
The end point attributes (SWI, SWR etc.) shown on the "Results page" on page 58 are derived
from the curves on the assumption that the master saturation vector is increasing. For gas-oil
and gas-water systems, relative permeability and capillary pressure data is always plotted
against gas saturation; so for example in a gas-water example, SGI always corresponds to the
first point on the curve, the lowest gas saturation seen, even if the experiment was actually a
water flood.
The convention that KROW is for oil displacing water is not enforced by the program, nor are
any consistency checks made between KROW (say) and INJPHASE and DISPPHASE. Future
versions of SCAL may enforce this convention so it should be followed in this release.
The scanning curves derived by various hysteresis models (Carlson, Killough, etc.) are not
calculated or shown.
These limitations will be addressed in future versions of the program.

148

Technical description
Hysteresis

SCAL User Guide

Units
SCAL supports four unit systems. These may be set by using the UNITS keyword in the .RCI
input file. The following table gives the units for the various attributes in the different unit
systems.
Permeabilities are always in millidarcy (mD). Quantities not mentioned are dimensionless.
Table 6.1

SCAL User Guide

The four unit sets supported by SCAL

Attribute

Lab

Field

Metric

Practical
metric

CONTANGLE

deg

deg

deg

deg

COREDEPTH

ft

ft

DENSG

g /cc

lb /ft

DENSO

g /cc

DENSW

g /cc

m
3

m
m3

kg / m3

lb /ft3

kg / m3

kg / m3

lb /ft3

kg / m3

kg / m3

kg /

DIFFP

psi

psi

Pa

kPa

ENKRVD_Depth

ft

ft

ENPTVD_Depth

ft

ft

GRAVG

rel. to sgair = 1

rel. to sgair =

rel. to sgair =

rel. to sgair =

GRAVO

API

API

API

API

GRAVW

rel. to sgwater = 1

rel. to sgwater = 1

rel. to sgwater = 1

rel. to sgwater = 1

HAOWC

ft

ft

INTERTENS

dyne /cm

dyne /cm

dyne /cm

dyne /cm

LOGDEPTH

ft

ft

PCGO,PCOG

psi

psi

Pa

kPa

PCGW,PCWG

psi

psi

Pa

kPa

PCWO,PCOW

psi

psi

Pa

kPa

PCHGE,PCHGI

psi

psi

Pa

kPa

PORV

cc

ft

m3

m3

RATE

cc /hr

stb /day

m3 /s

m3 /day

STOG

dyne /cm

dyne /cm

dyne /cm

dyne /cm

STOW

dyne /cm

dyne /cm

dyne /cm

dyne /cm

TEMPERATURE

deg. C

deg F

TVDSS

ft

ft

VISCG

cp

cp

cp

mPa s

VISCO

cp

cp

cp

mPa s

VISCW

cp

cp

cp

mPa s

Technical description
Units

149

150

Technical description
Units

SCAL User Guide

File formats
Appendix A

The SCAL input file (.RCI)


Description
SCAL input data are in an ECLIPSE parser style of formatted file. That is, they consist of a
series of keywords, each followed by zero or more logical, integer, real or string values. By
convention the keywords are upper-case, although the reader is not case-sensitive.
Input data consist of a keyword, then text or numerical data. Numerical data is input in the
current units (see below). When a vector is to be entered (for example the table of Kr data) the
data must be terminated with a slash (/). Text must be bracketed by single quotes if it contains
white-space or special characters.
Other data files may be included using the include keyword (INCLUDE) followed by the name
of the file to include. The INCLUDE keyword must not split a data item (data keyword and its
associated data).
Four unit systems are supported. These are Metric, Practical Metric, Oilfield and Laboratory
(Keywords METRIC, PRACTICAL METRIC, FIELD, LAB).

Overview
The data-set consists of a mandatory title field (keyword TITLE), an optional units field
(UNITS followed by METRIC or LAB or FIELD), then one or more input records. Units may
be changed at any time between records. The default unit set is LAB. The TITLE keyword is
optional, if absent the first non comment line of the file is taken as the title.
Input records consist of a Record-Start keyword (RECORD), one or more Attribute sections
(ATTRIBUTE), and zero or more Supplement (SUPPLEMENT) and Property (PROPERTY)
sections.

SCAL User Guide

File formats
The SCAL input file (.RCI)

151

Input records are closed on receipt of an End-of-data keyword (END), a Record-Start keyword,
an INCLUDE keyword, or a UNITS or GROUP keyword. An End-of-data keyword will be
expected at the end of the last record, otherwise a warning is generated, since if there is no endof-data keyword the file may be corrupt.
The GROUP keyword is optional and specifies the groups for various records as reflected in the
SCAL record tree. The group keywords are generated automatically when the file is saved by
SCAL. A GROUP may also contain information of the parameters used for lab to reservoir
conversion.
The overall structure of the file is as shown. Record sections are shown indented, this is not
required but it is supported and recommended.
-- Start of file
TITLE An example SCAL input file
UNITS LAB
RECORD
ATTRIBUTE
(lots of attributes)
SUPPLEMENT
(a few extra properties)
ATTRIBUTE
(a few more attributes)
RECORD
ATTRIBUTE
(attributes - no supplement this time)
RECORD
ATTRIBUTE
(lots of attributes)
INCLUDE supplmt.1
RECORD
INCLUDE attrib.1
UNITS FIELD
RECORD
ATTRIBUTE
(some attributes)
INCLUDE attrib.2-- more attributes
SUPPLEMENT
(some more properties)
INCLUDE MOREDATA.RCI
-- records 6 to 8 ..
GROUP
(records in a group)
GROUPEND
GROUP
(records in a different group)
GROUPEND
END
-- end of file

152

File formats
The SCAL input file (.RCI)

SCAL User Guide

Tables and functions


Relative permeability and capillary pressure data are input in two forms; a table of values or a
function name and list of coefficients. The liquid / gas saturation values must lie between 0 and
1 and increase monotonically down the table.

Supported ECLIPSE keywords


The following keywords are taken from ECLIPSE and are always followed by a table. The
keywords, and the columns expected in the table, are:
Table A.1

ECLIPSE keywords supported in the SCAL input file

Keyword

Column 1

Column 2

Column 3

Column 4

SWOF

Sw

Krw

Kro

Pcow

SGOF

Sg

Krg

Kro

Pcog

SLGOF

Sl

Krg

Kro

Pcog

SWFN

Sw

Krw

Pcow

SGFN

Sg

Krg

Pcog

SOF2

So

Kro

SOF3

So

Kro (oil-water)

Kro(oil-gas)

See the "ECLIPSE Reference Manual" for more details.


The keywords for data which may be a table or a function, and the columns expected if the data
is a table, are shown in the following tables.
Table A.2

SCAL User Guide

Relative permeability

Keyword

Column 1

Column 2

Column 3

KRWO

Sw

Krw

Kro

KROW

Sw

Krw

Kro

KRGO

Sg

Krg

Kro

KROG

Sg

Krg

Kro

KRGW

Sg

Krg

Krw

KRWG

Sg

Krg

Krw

KRWO_ORG

Sw

Krw

Kro

KROW_ORG

Sw

Krw

Kro

KRGO_ORG

Sg

Krg

Kro

KROG_ORG

Sg

Krg

Kro

KRGW_ORG

Sg

Krg

Krw

KRWG_ORG

Sg

Krg

Krw

File formats
The SCAL input file (.RCI)

153

Table A.3

Capillary pressure

Keyword

Column 1

Column 2

PCWO

Sw

Pcwo

PCOW

Sw

Pcow

PCGO

Sg

Pcgo

PCOG

Sg

Pcog

PCGW

Sg

Pcgw

PCWG

Sg

Pcwg

PCHGE

SHg

PcHg (ejection)

PCHGI

SHg

PcHg (injection)

PCWO_ORG

Sw

Pcwo

PCOW_ORG

Sw

Pcow

PCGO_ORG

Sg

Pcgo

PCOG_ORG

Sg

Pcog

PCGW_ORG

Sg

Pcgw

PCWG_ORG

Sg

Pcwg

PCHGE_ORG

SHg

PcHg (ejection)

PCHGI_ORG

SHg

PcHg (injection)

For each capillary pressure the data can be specified as a J function:


Table A.4

154

J function keywords

Keyword

Column 1

Column 2

JPCWO

Sw

JPcwo

JPCOW

Sw

JPcow

JPCGO

Sg

JPcgo

JPCOG

Sg

JPcog

JPCGW

Sg

JPcgw

JPCWG

Sg

JPcwg

JPCHGE

SHg

JPcHg (ejection)

JPCHGI

SHg

JPcHg (injection)

JPCWO_ORG

Sw

JPcwo

JPCOW_ORG

Sw

JPcow

JPCGO_ORG

Sg

JPcgo

JPCOG_ORG

Sg

JPcog

JPCGW_ORG

Sg

JPcgw

JPCWG_ORG

Sg

JPcwg

JPCHGE_ORG

SHg

PcHg (ejection)

JPCHGI_ORG

SHg

PcHg (injection)

File formats
The SCAL input file (.RCI)

SCAL User Guide

Notes

SCAL User Guide

For the SCAL specific keywords (KROW, PCGW etc) the convention is that the displacing
phase is specified first, that is KROW is for oil displacing water and KRWO for water
displacing oil. Note that this convention is not enforced but is recommended.

The _ORG suffix indicates original data as opposed to data generated by a function. The
_ORG keywords are generated automatically by SCAL when a file is saved.

The keyword must be followed by TABLE or FUNCT. The TABLE or FUNCT qualifier may
be followed by one or more parameters, some of which may be optional, and terminated by
a slash (/).

For TABLE the optional parameter is "GENERATED".

For FUNCT the next two parameters are required. These are a two-word function name, for
example "COREY CORRELATION" or "POWER y=C*x^B ". Note special characters
must be in single quotes. The function name may be followed by "FITTED" and this may
be followed by GOODNESS and a floating point number.

On a new line after the terminating / comes the data itself. For a TABLE keyword this is
two or more columns, for example the saturation and relative permeability values. For a
FUNCT keyword this is the coefficients used by the function. These data must also be
terminated by a slash.

File formats
The SCAL input file (.RCI)

155

Example 1
KRWO
-- Sw
0.1
0.3
0.4
0.5
0.6
0.7
/

TABLE
/
Krw
0.0
0.00740741
0.025
0.0592593
0.115741
0.2

Kro
1.0
0.197531
0.0625
0.0123457
0.000771604
0.0

Example 2
KRWO

FUNCT COREY @OIL-WATER/


.1 .3 3 4.1 .2 /

Example 3
PCWO
-- Sw
0.2
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
/

TABLE
Pcow
60.5388
60.5388
24.4711
12.869
7.81722
5.20193
3.68645
2.73563
2.10273
1.66174

GENERATED

Example 4
PCWO

FUNCT POWER 'y=C*x^B


1.66174
-2.23396

' FITTED
/

GOODNESS

0.545783

Example 5
SWOF
--Sw
0.151090
0.178350
0.203350
0.253350
0.400000
0.489320
0.656930
0.712800
0.881490
/

156

File formats
The SCAL input file (.RCI)

Krw
0.0
0.0
0.000010
0.000030
0.069530
0.123290
0.261900
0.318650
0.490000

Krow
1.0
0.991590
0.978830
0.943730
0.171430
0.070530
0.005940
0.001590
0.000000

Pcwo
400.0
27.930
20.400
15.550
-1.604
-1.860
-2.260
-2.380
-2.750

SCAL User Guide

Example 6
Supplement Tables
Supplement tables require more information, in particular the column names and units.
POROPERM
-- PORO
0.12
0.13
0.21
0.22
0.29
0.3
0.34
0.39
/

TABLE
KWSW1
500.04
492.25
109.04
150.23
32.23
96.3
800.25
32.23

XNAME 'PORO'

YNAME 'KWSW1'

YUNIT 'mD'

Example 7
Supplement Functions
SOISOR
FUNCT
LAND
XNAME 'SOI' YNAME 'SOR'
2.13 /

'SOI_SOR '
/

FITTED GOODNESS 0.0106192

End point scaling versus depth tables


These tables are specified using the same format as for the corresponding ECLIPSE keywords.
The attributes have the same name as in ECLIPSE.
Table A.5
Keyword

Col 1

Col 2

Col 3

Col 4

Col 5

Col 6

Col 7

Col 8

ENPTVD

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

ENPTVDX

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

ENPTVDX-

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

ENPTVDY

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

ENPTVDY-

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

ENPTVDZ

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

ENPTVDZ-

Depth

Swi

Swcrit

Swr

Sgi

Sgcrit

Sgr

Sowcrit Sogcrit

Table A.6

SCAL User Guide

End point scaling versus depth saturation table keywords


Col 9

End point scaling versus depth relative permeability table keywords

Keyword

Col 1

Col 2

ENKRVD

Depth

ENKRVDX

Depth

Col 3

Col 4

Col 5

Col 6

Col 7

Col 8

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

ENKRVDX-

Depth

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

ENKRVDY

Depth

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

File formats
The SCAL input file (.RCI)

157

Table A.6

End point scaling versus depth relative permeability table keywords

Keyword

Col 1

Col 2

ENKRVDY-

Depth

ENKRVDZ
ENKRVDZ-

Col 3

Col 4

Col 5

Col 6

Col 7

Col 8

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

Depth

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

Depth

Krwmax Krgmax

Kromax

Krwco

Krgco

Krocg

Krocw

Stone 1 tables
The "Stone 1" model for three phase oil relative permeability allows the specification of the
variation of minimum oil saturation against water or gas saturations. This data can be input
using the same keywords as for ECLIPSE 100, namely SOMWAT and SOMGAS. The data
consists of the water (or gas) saturation in column 1 and the corresponding minimum oil
saturation in column 2.

Example 8
SOMWAT
0.25
0.3
0.4
0.5
0.6
0.69
/

0.1
0.08
0.06
0.1
0.2
0.3

Connate water

1 - SOCRW

Three-phase relative permeability surfaces


These surfaces are specified using the same keyword and format as the ECLIPSE 100 keyword
SOF32D.
The first row is the water saturation values, the first column the gas saturation values. The
remaining entries are the corresponding three phase oil relative permeability values.
Note the following constraints:

158

The gas saturation (the first item in the second and subsequent records) should increase
monotonically down the column. The oil relative permeability for each water saturation
should decrease monotonically down the column and should end in a zero value.

The relative permeability must also be zero for any point on the table in which
S w + S g 1.0 .

Default values may not be placed within the table.

File formats
The SCAL input file (.RCI)

SCAL User Guide

Example 9
SOF32D
---------------------------------SWAT-----------------------------0.22 0.27 0.32 0.37 0.42 0.47 0.52 0.57 0.72 0.77
0.78 /
--SGAS
0.00 1.000 0.625 0.345 0.207 0.113 0.083 0.053 0.023 0.002 0.001 0
.000/
0.05
0.555 0.337 0.210 0.110 0.078 0.047 0.021 0.004 0.001 0.000 /
0.10
0.330 0.212 0.106 0.074 0.042 0.019 0.003 0.002 0.000 /
0.15
0.215 0.103 0.069 0.036 0.017 0.003 0.002 0.001 0.000 /
0.20
0.100 0.065 0.031 0.015 0.002 0.002 0.001 0.000 /
0.25
0.060 0.025 0.014 0.002 0.001 0.001 0.000 /
0.30
0.020 0.012 0.001 0.001 0.001 0.000 /
0.35
0.010 0.001 0.001 0.001 0.000 /
0.40
0.000 0.000 0.000 0.000 /
/

The attribute section


The ATTRIBUTE section contains some of the following data. The ID must be unique if it is
set. If Kr data is specified then KRBASIS must be set.
The following sections are for descriptive purposes only, the attributes may be entered in any
order.
Table A.7

SCAL User Guide

Description

Keyword

Type

ID

Integer

Quantity Description
Unique identifier

SAMPLENAME

Text

Sample name

DESCRIPTION

Text

Description

ASSOCIATE

Integer

ID of record with data for other phase combinations for


this sample

RESERVOIR

Text

Reservoir name for example South

ZONE

Text

Zone

WELL

Text

Well name

CORENAME

Text

Core name

LAYER

Text

Layer name

LITHOFACIES

Text

Lithofacies indicator

LITHOTYPE

Text

Lithotype indicator

COREORIENTATION

Choice

COREDEPTH

Real

Depth

Core depth

LOGDEPTH

Real

Depth

Log depth

TVDSS

Real

Depth

True vertical subsea depth

Orientation of core - Axial or Transverse

File formats
The SCAL input file (.RCI)

159

Table A.7
Keyword

Type

Quantity Description

HAOWC

Real

Depth

SOFTDATA

Bool

Experimental or analogue data

DERIVED

Bool

Record derived from other records (set by SCAL)

Table A.8

Height above the Oil-Water contact

Procedures attributes

Keyword

Type

KREXP

Choice

Type of Kr experiment - "Unsteady", "Steady",


"Centrifuge"

PCEXP

Choice

Type of Pc experiment - "PorPlate", "Centrifuge", Hg

FLOODORIENTATI
ON

Choice

Flooding orientation - "Vertical", "Horizontal"

Quantity

Description

DISPPHASE

Choice

Displaced phase - "Oil", "Water", "Gas", "Hg"

INJPHASE

Choice

Injected phase - "Oil", "Water", "Gas", "Hg"

CLEANSTATE

Choice

Core preparation - "Preserved", "Restored", "Mildly


Cleaned", "Extremely Cleaned", "Solvent Cleaned"

RATE

Real

Liquid rate

Flood rate

DIFFP

Real

Pressure

Differential pressure

TEMPERATURE

Real

Temperature

Temperature

VISCO

Real

Viscosity

Oil viscosity

VISCW

Real

Viscosity

Water (Brine) viscosity

VISCG

Real

Viscosity

Gas viscosity

DENSO

Real

Density

Oil density

DENSW

Real

Density

Water (Brine) density

DENSG

Real

Density

Gas density

GRAVO

Real

Gravity

Oil gravity

GRAVW

Real

Gravity

Water (Brine) gravity

GRAVG

Real

Gravity

Gas gravity

CENTSPEED

Real

rpm

Centrifuge speed

Table A.9

160

Description (Continued)

Results attributes

Keyword

Type

KRBASIS

Choice

KAIR

Real

Quantity

Description
Relative permeability basis "KwSw1", "KoSo1",
"KgSg1", "KoSwi", "KgSwi", "KwSor", "KgSor",
"KgSwr", "Kair", "Permeability", "XPermeability",
"YPermeability", "XYPermeability",
"ZPermeability"

Permeability

Klinkenberg air permeability

KGSG1

Real

Permeability

Gas permeability at 100% gas

KGSOR

Real

Permeability

Gas permeability at residual oil saturation

File formats
The SCAL input file (.RCI)

SCAL User Guide

Table A.9

SCAL User Guide

Results attributes (Continued)

Keyword

Type

Quantity

Description

KGSWI

Real

Permeability

Gas permeability at initial water saturation

KGSWR

Real

Permeability

Gas permeability at residual water saturation

KOSO1

Real

Permeability

Oil permeability at 100% oil

KWSW1

Real

Permeability

Water permeability at 100% water

KOSWI

Real

Permeability

Oil permeability at initial water saturation

KWSOR

Real

Permeability

Water permeability at residual oil saturation

PERMEABILITY

Real

Permeability

Permeability

XPERMEABILITY

Real

Permeability

X direction permeability

XYPERMEABILITY Real

Permeability

Horizontal permeability

YPERMEABILITY

Real

Permeability

Y direction permeability

ZPERMEABILITY

Real

Permeability

Vertical permeability

SWBK

Real

Fraction

Saturation of water at breakthrough

SGBK

Real

Fraction

Saturation of gas at breakthrough

SWI

Real

Fraction

Initial water saturation

SGI

Real

Fraction

Initial gas saturation

SOI

Real

Fraction

Initial oil saturation

SWR

Real

Fraction

Residual water saturation

SGR

Real

Fraction

Residual gas saturation

SOR

Real

Fraction

Residual oil saturation

SWCRIT

Real

Fraction

Critical water saturation

SGCRIT

Real

Fraction

Critical gas saturation

SGM

Real

Fraction

Gas saturation at minimum Kro

SWM

Real

Fraction

Water saturation at minimum Kro

SORM

Real

Fraction

Oil saturation at minimum Kro

SWBKFF

Real

Fraction

Calculated flood front breakthrough water saturation

PORO

Real

Fraction

Porosity

THRU

Real

Liquid-rate

Displacing phase throughput

PORV

Real

Fraction

Pore volume

AOWI

Real

Fraction

Amott oil wettability index

AWWI

Real

Fraction

Amott water wettability index

WETT

Choice

CONTANGLE

Real

INTERTENS

Real

Interfacial Tension

STOW

Real

Oil-water surface tension

Wettability classification - "Oil", "Weakly oil",


"Intermediate", "Weakly water", "Water"
Angle

Contact angle

File formats
The SCAL input file (.RCI)

161

Table A.9

Results attributes (Continued)

Keyword

Type

STOG

Real

Oil-gas surface tension

UNLINKS2T

Bool

If TRUE do not link end point values (SWI etc) with


values in table

JFUNCPERM

Choice

Permeability to use in Pc <-> J function conversion "KwSw1", "KoSo1", "KgSg1", "KoSwi", "KgSwi",
"KwSor", "KgSor", "KgSwr", "Kair",
"Permeability", "XPermeability", "YPermeability",
"XYPermeability", "ZPermeability"

Table A.10

Quantity

Description

End point scaling attributes

Keyword*

Description

SWL

Connate water saturation

SWCR

Critical water saturation

SWU

Maximum water saturation

SGL

Connate gas saturation

SGCR

Critical gas saturation

SGU

Maximum gas saturation

SOWCR

Critical oil in water saturation

SOGCR

Critical oil in gas saturation

SWLPC

Connate water saturation (Pc only)

SGLPC

Connate gas saturation (Pc only)

PCW

Maximum water-oil (or water-gas) capillary pressure

PCG

Maximum gas-oil capillary pressure

KRW

Maximum end point water relative permeability

KRG

Maximum end point gas relative permeability

KRO

Maximum end point oil relative permeability

KRWR

Water relative permeability at Sor (or Sgr)

KRGR

Gas relative permeability at Sor

KRORW

Oil relative permeability at Swcrit

KRORG

Oil relative permeability at Sgcrit

*.

All these attributes are type Real. They are used to generate the end point scaling grid properties. These attributes
are for interacting with ECLIPSE - they do not directly represent the results of experiments on core samples.
The saturation related keywords have a valid range of 0 - 1.

162

File formats
The SCAL input file (.RCI)

SCAL User Guide

The supplement section


Contains keywords that are attribute names, followed by attribute type (REAL, INT, TEXT,
BOOLEAN, TABLE or FUNCT), followed by the value, then optional units. SUPPLEMENT
keywords must not be known keywords or attributes. For example:
KAOLINITE REAL 55

The properties section


Contains keywords corresponding to simulator property names, for example quantities read
from an INIT or RESTART file. The keyword is the property name followed by the specifier
RANGE or LIST. If the RANGE specifier is set it must be followed by two floating-point
numbers indicating the upper and lower limits for this property/record combination. If the list
specifier is set it is followed by a list of integers terminated with a slash, indicating the property
values to match this record.
Example 10:
PROPERTY
PORO
SATNUM
1 /

RANGE
LIST

0.2 0.3

The group section


This section is written by SCAL when a file is saved. It specifies the grouping and labelling of
the records in the file when displayed on the hierarchy editor in SCAL. The GROUP keyword
must have a matching GROUPEND keyword. GROUP keywords can contain other GROUP
keywords to indicate subgroups. A GROUP keyword can contain GROUPTYPE keywords to
indicate special groups, a LABELSPEC keyword specifying the record label and a RECORD
section containing the IDs of the records in that group.

SCAL User Guide

File formats
The SCAL input file (.RCI)

163

Example 11
GROUP
GROUPNAME
LABELSPEC
SAMPLENAME
PORO
/
RECORD
GROUP
GROUPNAME
LABELSPEC
SAMPLENAME
PORO
/
RECORD
GROUPEND
GROUPEND

164

File formats
The SCAL input file (.RCI)

TRIAL1

4 /
SUBSET5

23

21 /

SCAL User Guide

Saturation log data file


For calibrating capillary pressure curves, the saturation log data needs to be input upon request.
The data is represented in two columns, with the first column showing the saturation data and
the second showing the depth in TVDSS. This is required only in the stand-alone version. The
GeoFrame version automatically gets the data from the database and converts it into TVDSS
format. An example is given below:
WELL

WELL

SCAL User Guide

WELL-1
TABLE SWLOG /
0.2
0.6185
0.6377
0.6497
0.6556
0.665
0.6686
0.6696
0.7
/
WELL-2
TABLE SWLOG /
0.6
0.6185
0.6377
0.6497
0.6556
0.665
0.6686
0.6696
0.7
/

1000.0
1005.0
1200.0
1399.0
1500.0
1666.0
1672.0
1800.0
1999.0

2000.0
2005.0
2200.0
2399.0
2500.0
2666.0
2672.0
2800.0
2999.0

File formats
Saturation log data file

165

The SCAL tables output file (.RCP)


This file is written from the Keyword Generator when Table type data is specified The file is
in a format ready for inclusion into the ECLIPSE .DATA file. The file consists of a set of table
keywords. The keywords are either from:

Family (i) set


SWOF
SGOF
SLGOF

Family (ii) set


SWFN
SGFN
SOF2
SOF3
SOF32D or end point scaling versus depth, that is ENPTVD, ENKRVD.

166

File formats
The SCAL tables output file (.RCP)

SCAL User Guide

Saturation function tables are preceded by a comment detailing the name and id of the record
that originally contained the table and a list of the ranges in that record. These details may be
useful to help provide an audit trail of how the tables were generated. An example file is shown
here.
-- SGOF generated by program scal.exe at 17:52:12 on 27 Aug 97
SGOF
-- Table 1
-- Data from record GO1 (ID=83770668)
-- SELECTION VALUES
-KIndex
-KIndex
1 2 3
-- Table 1
-- Data from record GO1 (ID=83770668)
-- SELECTION VALUES
-KIndex
-KIndex
1 2 3
--Sg
Krg
Kro
Pc
0.000000
0.000000
1.00000
0.000000
0.158046
0.218826
0.475585
0.000000
0.354663
0.480888
0.0777152
0.000000
0.450000
0.779235
0.000000
0.000000
0.500000
1.00000
0.000000
0.000000
/
-- Table 2
-- Data from record GO2 (ID=83771395)
-- SELECTION VALUES
-KIndex
-KIndex
4 5
--Sg
Krg
Kro
Pc
0.000000
0.000000
1.00000
0.000000
0.149007
0.193913
0.408317
0.000000
0.363703
0.419250
0.0777152
0.000000
0.445062
0.733113
0.000000
0.000000
0.510000
1.00000
0.000000
0.000000
/

These files may be read in directly into SCAL using File | Open Eclipse Tables (.RCP)...

SCAL User Guide

File formats
The SCAL tables output file (.RCP)

167

The SCAL properties output file


This file is written from the Keyword Generator when property type data is specified The file
is in a format ready for inclusion into the ECLIPSE .DATA file. The file contains property
arrays for the simulation grid. The properties are of two types, those generated by SCAL and all
the other properties.
Generated properties are either indices into the list of saturation function tables, for example,
SATNUM, or end point scaling properties, for example SWL, KRWR, etc. These are written to files
with the suffix .RCR.
Other properties may also be written. These go to files with the suffix .RCU. This is a useful
facility for when SCAL has been used to transform a property in some way, for example using
the Property Transformer or the "The Calculator" on page 169.
An example file is shown here. This was generated with the compress output option switched
on, so that repeated values are written as repeat*value.
-- SATNUM generated by program rcmain.exe at 13:12:04 on 29 Aug 97
SATNUM
2*1 18*2 3*1 17*2 3*1 17*2 4*1 16*2 5*1 15*2 5*1 15*2 6*1 14*2 7*1 13*2
8*1 12*2
12*1 8*2 13*1 7*2 15*1 5*2 17*1 3*2 19*1 2 20*1 49*2 6*3 12*2 9*3 11*2
10*3 10*2
10*3 10*2 11*3 9*2 11*3 9*2 11*3 9*2 11*3 9*2 10*3 12*2 8*3 77*2 6*3
15*2 5*3
16*2 4*3 17*2 3*3 17*2 3*3 17*2 3*3 18*2 2*3 18*2 2*3 18*2 2*3 19*2 3
19*2 3
19*2 3 19*2 3 45*2 15*1 7*2 13*1 9*2 11*1 10*2 10*1 11*2 9*1 12*2 8*1
13*2 7*1
14*2 6*1 15*2 5*1 16*2 4*1 17*2 3*1 18*2 2*1 18*2 2*1 19*2 1 29*2 11*3
12*2 8*3
14*2 6*3 14*2 6*3 15*2 5*3 16*2 4*3 17*2 3*3 18*2 2*3 156*2 4*3 8*2
12*3 6*2
14*3 5*2 15*3 4*2 16*3 3*2 17*3 3*2 17*3 2*2 18*3 2*2 18*3 2*2 18*3
2*2 18*3 2*2
18*3 2*2 18*3 4*2 16*3 7*2 11*3 2 3 47*1 9*2 10*1 11*2 8*1 13*2 7*1
13*2 6*1
14*2 6*1 14*2 6*1 14*2 6*1 14*2 6*1 14*2 7*1 13*2 8*1 11*2 14*1 3*2 26*1
/
REFINE
LGR /
SATNUM
45*3
/
ENDFIN

168

File formats
The SCAL properties output file

SCAL User Guide

The Calculator
Appendix B

Introduction
The Calculator is a general purpose, easy to use, interpreted programming language. You can
write your own programs in a language similar to BASIC, C or FORTRAN. Calculator
programs can be executed from a file or in an interactive environment. Applications that run
Calculator programs from a file write any output to a *.PRT file (usually OUTPUT.PRT).
The Calculator language is a free format language supporting all major programming constructs
such as variables and arrays, and high level constructs such as if, while and function calls. It also
understands units, and has a large number of built-in functions.
Applications can tailor the Calculator to their needs in three ways:

by installing commands, which enable the Calculator to instruct the application to do


various application specific tasks

by calling the Calculator at well-defined points in the application to run calculator


programs to perform certain tasks. These programs can be made available to you giving you
the ability to modify or extend the default processing.

It is not expected large programs will be written using the Calculator, rather that it is used to
calculate useful expressions and transformations. You can build up your own library of small
routines.
The Calculator may be encountered in an application in various guises, for instance as a
standalone top level window, or for executing startup or run files, or as a means of extending
the capabilities of an application by supplying program files for the application to execute.

SCAL User Guide

The Calculator
Introduction

169

Language definition
Syntax
This section briefly describes the definition of the programming language; but it can be easier
to learn by example. You can study the example (*.CAL) files for examples of the language
constructs.

Statements
The Calculator language consists of statements. There is one statement per line. Statements can
continue over more than one line by finishing the line with a continuation character (&).

Comments
Comments are introduced by --. Text following the -- but on the same line is ignored.

Structure
The language is block structured. if statements must be paired with endif, while with
endwhile etc.

Strings
Text strings are specified using double quotes ("").

User defined procedures and functions


User defined procedures and functions are supported. They must be defined before they are
called.

White space
White space may be freely used to enhance readability (for example blank lines and indentation
are recommended).

Case sensitivity
The language is case sensitive. Language keywords may be in upper or lower case. Other
elements (variables, functions, constants, units) must be specified exactly as described in this
document.

Variables
The following types of variables are supported:

170

Floating point numbers (double precision).

Built in floating point constants (double precision).

The Calculator
Language definition

SCAL User Guide

String constants.

Floating point variables (scalars - double precision).

String variables.

Floating point vectors (single and double precision).

All variables have global scope apart from function and procedure arguments. This means that
the same variable can be accessed from anywhere in a Calculator program, even from other
functions.
Variables exist from the time they are first used until the application closes down or the
Calculator is reset. Consequently, variables from previous runs exist with their old values. This
is to enable exchange of information between the Calculator and an application.
All variables in the Calculator except strings are floating point: there are no integer or logical
variables. Floating point variables are also known as scalars. Floating point arrays are known as
vectors. Both scalars and vectors may have units attached to them.
String and floating point variables are created when they are encountered. However vectors
must be declared before use and variables with particular units must also be declared.
Strings may optionally be declared before use by using the string keyword. This syntax is
required if the first use of a string is as an argument to a command.
Strings may be concatenated using +. They may be read and written to files. Strings may be
used as function arguments and as file names in read, write and include statements.
Singly dimensioned vectors are supported. The lengths must be specified when they are
declared. The lengths may be changed at run time using the vresize function.
Variables are initialised to UNDEFINED. (See Built-in constants.)
The following program illustrates various aspects of Calculator variables:
-- set variables to a constant
a = 1
b = 1 ft
c = "Hello"
print "a=",a," b=",b," c=",c
-- declare a vector, set it
vector v1[3]
vset(v1,1.0)
print "v1[0]=",v1[0]
-- specify units for a variable
d : cm
vector v2[3] : in
d = 1 ft
vset(v2,2m)
print "d=",d," v2[0]=",v2[0]
-- undefined variables
e
vector v3[3]
print "e=",e," v3[0]=",v3[0]
-- strings
s1 = "Concatenated "
s2 = "string"
s3 = s1 + s2
print s1," ",s2," ",s3

SCAL User Guide

The Calculator
Language definition

171

It gives the following output:


a=
1 b= 0.3048 m c=Hello
v1[0]=
1
d=
30.48 cm v2[0]= 78.7402 in
e= -1e+037 v3[0]= -1e+037
Concatenated string Concatenated string

Example
Here is a simple Calculator program to calculate some values in different units.
proc conv()
print "Distance conversion"
print "==================="
ht = 100 ft
print "ht in cm = ",ht cm
print "ht in in = ",ht in
print "Rate Conversion"
print "==============="
q = 100 stb/day
print "q in ft3/day = ",q ft^3/day
print "q in m3/s
= ",q m^3/s
print "q in ft3/mnth = ",q ft^3/mnth
endproc
--main program starts here
conv()
stop

Syntax / runtime errors


Processing by the Calculator happens in two stages. First the program is compiled, that is the
language is checked and translated into an executable form. During this phase the Calculator
displays the message Processing program.... If the compilation is successful the
calculator displays the message Running program... and runs the compiled program.
If the program finishes successfully the message Program finished ok is written.
When compiling, if the Calculator does not recognize a particular language construct it prints
an error message that includes the line that was in error. The message is as informative as
possible but often the necessary information is not available and the message Syntax error
File... line... is displayed.
Checks are also made at run time. For example array bounds errors and dimensionally incorrect
assignments are trapped and reported.

172

The Calculator
Language definition

SCAL User Guide

Keywords
The language consists of the following keywords. This list can be generated using the Options
| Show | Keywords menu option in the interactive Calculator. Keywords may be specified in
upper or lower case. By convention this document always uses lower case.
Table B.1

Standard Calculator keyword descriptions

Keyword

Description

Notes

break

Break out of a while loop

(7)

close

Close (rewind) file

(4)

else

Else statement

(1)

endfunc

End of function definition

(2)

endif

Endif statement

(1)

endproc

End of procedure statement

(2)

endwhile

End of while loop

(7)

func

Function definition

(2)

if

If statement

(1)

include

Include another source file

(5)

print

Print statement

(3)

printnr

Print on same line

(3)

proc

Procedure definition

(2)

read

Read vectors and scalars from file

(4)

return

Return from func or proc

(2)

stop

Stop execution (optional)

(6)

string

Define a string variable

(9)

usertype

Define a user variable

(10)

vector

Define a vector (array): vector vec[10]

(8)

vreadcol

Read vectors from file in column format

(4)

vwritecol

Write vectors to file in column format

(4)

while

while loop

(7)

write

write vectors and scalars to file

(4)

Notes
1

The set of statements in the if and else block must be terminated by an endif
statement. For example:

if ( i < iMax )
sum = sum + i
prod = prod * i
else
print "Error: i out of range ",i
endif

SCAL User Guide

The Calculator
Keywords

173

The condition in () is deemed to be TRUE if non zero, FALSE if zero


2

Functions return a value, procedures do not. Function and procedure definitions begin with
the name followed by empty brackets. Procedures end with the endproc statement.
Functions end with an endfunc statement. Multiple returns within a function or
procedure are allowed. Values are returned from a function using the return statement.
Within the definition arguments are referred to as $1 for the first argument, $2 for the
second etc. Functions must be defined before they are called. Function calls may be nested.
They are invoked by specifying the name followed by any arguments in brackets. For
example:

proc error()
print "A fatal error has occurred. Execution terminated."
stop
endproc
func invert_sum()
temp = $1 + $2
if ( abs(temp) < 0.0001)
error()
endif
return 1/temp
endfunc
--main program
a = 1.0
b = 2.0
print "1/(a+b) = ",invert_sum(a,b)
stop

Strings and variables may be displayed on the output window using the print statement.
The print statement always starts a new line. To print on the same line as before use
printnr. Several items may be printed in one statement, each separated by a comma.
Variables are printed into fields 8 characters wide. If a variable has associated units these
are automatically printed according to the rules described in the Units Support section.
All output produced using print statements is echoed to the file OUTPUT.PRT. This
provides a convenient record of a calculation which can then be included into other work,
for example a spreadsheet.

Reading and writing to files is supported. The file name is specified on the keyword. Note
that on the PC, any backslashes to indicate directories must be put in twice. If the file is not
already open it is opened automatically.
The read and write keywords write vectors, strings and scalars from and to files.
Vectors are written 6 per line. When reading strings are delimited by spaces.
When reading or writing scalars or strings the variable must be prefixed with & to indicate
that the contents may be updated.
The vreadcol and vwritecol keywords write vectors in columns, one column per
vector. This is useful for interfacing with other programs.
Files are closed when the Calculator program terminates or the close keyword is
encountered.

174

The Calculator
Keywords

SCAL User Guide

Here is some example code for I/O.


--write, read, close
vector vwrita[5]
vector vwritb[6]
vinclog(vwrita,1,1e+4)
vset(vwritb,1e+5)
writc = 1e+5
write("writeto.cal",vwrita,vwritb,&writc)
close("writeto.cal")
vector vreada[6]
vector vreadb[6]
print "error message coming up "
read("writeto.cal", vreada,vreadb,&readc)
while(i<6)
if(vreada[i]!=10^i || vreadb[i]!=1e+5)
stopmsg("write/read test failed")
endif
i = i + 1
endwhile
if(readc!=0)
stopmsg("write/read test failed")
endif
close("writeto.cal")
--vwritecol, vreadcol, close
vector vwcola[6]
vector vwcolb[6]
i = 0
while(i<6)
vwcola[i] = i
vwcolb[i] = 10*i
i = i + 1
endwhile
vwritecol("vwriteto.cal",vwcola,vwcolb)
close("vwriteto.cal")
vector vrcola[6]
vector vrcolb[6]
vreadcol("vwriteto.cal",vrcola,vrcolb)
i = 0
while(i<6)
if(vrcola[i]!=i || vrcolb[i]!=10*i)
stopmsg("vwritecol/vreadcol test failed")
endif
i = i + 1
endwhile

Other Calculator functions, procedures and code may be embedded using the include
statement. For example:

-- include library of useful routines


include "mylib.cal"
-- make use of the include file
a = 10
b = 3
c = 22
d = 5.4
area = calcarea(a,b,c,d)

SCAL User Guide

The Calculator
Keywords

175

Execution stops when a stop statement is encountered. A stop statement at the end of
the main program is optional. The message STOP is written to the output window.

Program loops are accomplished using the while statement. The statements between the
while and endwhile are repeatedly executed until the expression inside the () becomes
false. while loops can be exited using the break statement. Remember to increment the
loop counter inside the loop. For example:

print "Table of sines"


deg = 0.0
while ( TRUE )
print "sin(",deg,") = ",sin(deg/DEG)
deg = deg + 1.0
if ( deg > 90.0 )
break
endif
endwhile
print "Finished"

Vectors, also known as arrays are declared using the vector keyword. Only singly
dimensioned arrays are supported. Individual elements are accessed using square bracket
notation []. Vectors start at element 0 and range up to element N-1 where N is the declared
size. Vectors must be declared before use. They are given a size when they are declared,
this size can be changed at run time using the vresize() symbol function (see later).
Vector variables may be given preferred units as for scalar variables. For example:
vector speeds[10] : mi/h;

The string keyword is only required when the first encountered usage of the variable is
as an argument to a command. In this case it is not possible to ascertain from the context
what the correct type of the variable is and a hint is required from the user. For example:

string message
proc AskTOContinue()
if ( Question( Question=message ) )
stop
endif
endproc
message = Carry on?
AskToContinue()
-- do further processing

10 The usertype keyword is only required when the first encountered usage of the variable
is as an argument to a command. In this case it is not possible to ascertain from the context
what the correct type of the variable is and a hint is required from the user. User types are
used infrequently. Certain commands may return a user type, such as a simulation grid. The
only use of this returned variable is as an argument to another command. This facility
allows a set of commands to be defined to process specialized objects efficiently.

176

The Calculator
Keywords

SCAL User Guide

Built-in constants
The table shows the various constants that are predefined in the Calculator.
Table B.2

Built-in constants

Name
DEG

SCAL User Guide

Value

Description

5.72958e+01

degrees to radians conversion factor

EPSILON

1.0e-04

precision test

EXP

2.71828e+00

e - base of natural logarithms

FALSE

Logical false

GAMMA

5.77216e-01

Euler-Mascheroni constant

LN10

2.30259e+00

natural log of 10

LN2

6.93147e-01

natural log of 2

LOG10E

4.34294e-01

log (base 10) of e

LOG2E

1.44270e+00

log (base 2) of e

ONE_DIV_PI

3.18310e-01

reciprocal of pi

ONE_DIV_SQRT2

7.07107e-01

reciprocal of square root of 2

ONE_DIV_SQRTPI

5.64190e-01

reciprocal of square root of pi

PHI

1.61803e+00

golden ratio

PI

3.14159e+00

pi

PI_DIV_2

1.57080e+00

pi divided by 2

PI_DIV_4

7.85398e-01

pi divided by 4

SQRT2

1.41421e+00

square root of 2

TRUE

1.0

Logical TRUE

TWO_DIV_PI

6.36620e-01

twice reciprocal of pi

TWO_DIV_SQRTPI

1.12838e+00

twice reciprocal of square root of pi

UNDEFINED

-1.0e33

variable initialized to this value

The Calculator
Built-in constants

177

Built-in functions
The table shows the wide range of built-in functions that the Calculator supports.
Table B.3

178

Built-in functions

Name

No. args

Description

abs

absolute value

Notes

acos

inverse cosine

antilog10

Anti logarithm base 10

(1)

asin

inverse sine

(1)

atan

inverse tangent

(1)

cos

cosine

(2)

cosh

hyperbolic cosine

(2)

ei

exponential integral (1 argument)

erf

error function

erfc

Complementary error function

exp

exponential function e

expn

exponential integral (2 arguments)

factorial

factorial

gamma

gamma function

i0

Modified Bessel function of order zero

i0e

i0(x)*exp(-x)

i1

Modified Bessel function of order one

i1e

i1(x)*exp(-x)

igamma

Incomplete gamma function

igammac

Complementary Incomplete gamma function

int

Truncate towards zero

j0

Bessel function of order zero

j1

Bessel function of order one

k0

Modified Bessel func, third kind, order zero

k0e

k1(x)*exp(x)

k1

Modified Bessel function, third kind, order one

k1e

k1(x)*exp(-x)

log

Logarithim base e

log10

Logarithm base 10

(3)

rand

Random number between 0 and 1

(6)

sin

Sine

(2)

sinh

Hyperbolic sine

(2)

sqrt

Square root

srand

Initialize random number sequence

(6)

tan

Tangent

(2)

The Calculator
Built-in functions

SCAL User Guide

Table B.3

Built-in functions (Continued)

Name

No. args

Description

Notes

tanh

Hyperbolic tangent

(2)

user

Developer defined function user(a,b)

(4)

yn

Bessel function of second kind of integer order

(5)

Notes
1

Value returned in radians. Use built in constant DEG to convert to degrees.

Argument in radians. Use built in constant DEG to convert to degrees.

Usage is a = exp ( n, x ) where

exp ( n, x ) =

( xt )

dt t

[EQ B.1]

SCAL User Guide

The user function is only available to programmers using the Calculator as a part of their
own programs.

Usage is b = yn(n,x) where n is a (possibly negative) integer.

rand( ) returns a random number between 0 and 1. The argument is required but ignored.
Successive calls to rand( ) return different random numbers from a given sequence. The
sequence can be altered by calling srand (seed) where seed represents a position in the
random number sequence. The same sequence of random numbers can be regenerated by
re-initializing with the same seed. The srand seed also affects the sequence of numbers
generated for vrandomfill.

The Calculator
Built-in functions

179

Operators
The table shows the operators supported by the Calculator.
Table B.4

180

Supported operators

Symbol

Description

Add

Subtract (or negate)

Multiply

Divide

Raise to power

<

Less than

>

Greater than

<=

Less than or equal

>=

Greater than or equal

!=

Not equal (logical expression)

==

Equals (logical expression)

Assignment

||

Logical OR

Logical NOT

&&

Logical AND

()

Brackets - evaluate first

Assign units when declaring variable

[]

Access vector elements

&

Continuation character if last on a line

The Calculator
Operators

SCAL User Guide

Symbol functions
A wide range of built in functions are provided that operate on vectors and some manipulate
scalars. These functions make many data processing tasks extremely simple.
Functions operating on vectors have names that begin with v. Many of the functions return a
value indicating success or failure, these values are denoted by ierr in the table below. For
these functions 1 (TRUE) indicates success, 0 (FALSE) failure.
The vlen() and vresize() functions are particularly useful as they allow the Calculator to
respond to different run time data, for example the size of a simulation grid.
Using the vector based functions is much more efficient that explicitly processing the data using
the while loop. Whenever large arrays are processed vector functions should be used.
Note

Optional arguments are in [], is and ie correspond to the start and end indices of the
vector. Non vector arguments that are updated by the function are preceded by &.

Table B.5

Symbol functions

Name

Description

cubic

Solve cubic eqn ax**3+bx**2+cx+d=0: nroot = cubic(&x1,&x2,&x3,a,b,c,d)

presval

Present value: res = presval(rate,nper,pmt,fv,type)

quad

Solve quadratic eqn. ax^2+bx+c=0: nroot = quad(&x1,&x2,a,b,c)

raw

Dimensionless value after conversion to unit:


res = raw(x,unit)

swap

Swap values: ierr = Swap(&a,&b)

vabs

Make elements positive: ierr = vabs(v,[is],[ie])

vadd

Add v2 to v1: ierr = vadd(v1,v2,[is],[ie])

vaverage

Average vector: av = vaverage(v,[is],[ie])

vceiling

Replace values in v that are greater than x by x: ierr = vceiling(v,x,[is],[ie])

vcopy

Copy v2 onto v1: ierr = vcopy(v1,v2,[is],[ie])

vcopyconv

Copy v2 onto v1 with unit conversion:


ierr = vcopyconv(v1,v2,[is],[ie])

vcopyraw

Copy dimless v2 after conv onto v1 with unit conv:


ierr = vcopyraw(v1,v2,[is],[ie])

vdelete
vderivpoly

Delete element ierr = vdelete(v,i)


Evaluate as a differentiated polynomial:
res = vderivpoly(v,x,[is],[ie])

vdivide

Divide v1 by v2 element by element: ierr = vdivide(v1,v2,[is],[ie])

vexpon

Raise element in v1 to power in corresponding element in v2:


ierr = vexpon(v1,v2,[is],[ie])

vfloor

Replace values in v that are less than x by x: ierr = vfloor(v,x,[is],[ie])

vfft

Fast Fourier transform vector: ierr = vfft(v,npts,isign)

vinc

Set elements to incremented interval:


ierr = vinc(v,xl,xu,[is],[ie])

SCAL User Guide

The Calculator
Symbol functions

181

Table B.5
Name
vinclog

Symbol functions (Continued)


Description
Set elems to log incremented interval:
ierr = vinclog(v,xl,xu,[is],[ie])

vinsert

Insert element with value x at i: ierr = vinsert(v,x,i)

vintegrpoly

Evaluate as an integrated polynomial:


res = vintegrpoly(v,x,[is],[ie])

vintegrtrap

Trapezoidal rule integration:


res = vintegrtrap(v,xstep,[is],[ie])

vinterp

Return y corresponding to x using linear interpolation:


y = vinterp(vx,vy,x,[is],[ie])

vlaplace

Laplace transform of vector: res = vlaplace(v,n,tau,sr)

vlen

Return length of a vector: res = vlen(v)

vlog

Take natural logarithm of each element of a vector: ierr = vlog(v,[is],[ie])

vlsqfit

Fit vectors to y=a+bx, also calculate variances in the result. Can optionally
specify the fit range for the independent vector:
ierr = vlsqfit(vx,vy,&a,&b,&avar,&bvar,[fl],[fu])

vmax

Maximum value of vector: maxval = vmax(v,[is],[ie])

vmaxdiff

Maximum difference between elements:


maxd = vmaxdiff(v,[is],[ie])

vmedian

Median value of vector: med =vmedian(v,[is],[ie])

vmin

Minimum value of vector: minval = vmin(v,[is],[ie])

vmindiff

Minimum absolute difference between elements:


mind = vmindiff(v,[is],[ie])

vminus

Make elements negative, v[i] = -abs(v[i]):


ierr = vminus(v,[is],[ie])

vmultipy

Multiply v1 by v2 element by element:


ierr = vmultiply(v1,v2,[is],[ie])

vnearest

Index of element nearest to value:


near = vnearest(v,fval,[is],[ie])

vnegate

Invert sign of elements: ierr = vnegate(v,[is],[ie])

vpow

Raise each element of v to power x: ierr = vpow(v,x,[is],[ie])

vnpv

Net Present Value: amount = vnpv(v,time,rate)

vpolynom

Valuate as a polynomial: res = vpolynom(v,x,[is],[ie])

vrandomfill

Fill with random numbers between fl and fu:


ierr = vrandomfill(v,fl,fu,[is],[ie])

vresize

Change length of vector: ierr = vresize(v,newsize)

vscale

Scale vector: ierr = vscale(v,amount,[is],[ie])

vscprod

Scalar product of v1 and v2:


ierr = vscprod(v1,v2,[is],[ie])

182

vset

Set elements of vector to val: ierr = vset(v,val,[is],[ie])

vshift

Shift vector: ierr = vshift(v,amount,[is],[ie])

The Calculator
Symbol functions

SCAL User Guide

Table B.5
Name

Symbol functions (Continued)


Description

vsmooth

Smooth vector: ierr = vsmooth(v,nsm,[is],[ie])

vsolvematrix

Solve 2x2 matrix: ierr = vsolvematrix(va,vb,vc,n)

vsort

Sort vector, uses heapsort - efficient:


ierr = vsort(v,increasing,[is],[ie])

SCAL User Guide

vsubtract

Subtract v2 from v1: ierr = vsubtract(v1,v2,[is],[ie])

vsum

Sum vector: sum = vsum(v,[is],[ie])

vsumsqr

Sum of squares of vector: sumsq = vsumsqr(v,[is],[ie])

The Calculator
Symbol functions

183

Unit support
Calculator units are defined by the application. If no units are specified, the default is the SI unit
system. The complete list may be obtained by using Show | Variable | Units from the
interactive Calculator. The conversion factors are to the SI unit system.
Composite units are generated by forming expressions using the base units above. The
expressions are evaluated from left to right, brackets are not supported. Unit powers are
specified using the ^, inverse units by using the /. For example, momentum is kg m^2 /s^2.
Internally all variables are stored in SI units. Variables may be given preferred units by declaring
them using the colon (:) notation.
If a variable has preferred units then these units are assumed during assignment and used in print
statements. Units must always be specified explicitly in expressions whether preferred units are
in force or not that is:
today
tomorrow
today
tomorrow
tomorrow
tomorrow

:
:
=
=
=
=

day
day
1.0
today + 1.0
today + 1.0 day
today + 24.0 hr

-- illegal
-- ok
-- ok

If a variable has units these will be displayed when it is printed. Alternatively the units to be
used in printing may be specified explicitly. For example:
-- specify preferred units
d_cm : cm
d_mm : mm
d_cm = 10
-- stored internally as 0.1
d_mm = 20 cm
-- preferred units overridden
d_km = 1 km
-- no preferred units will be printed in metres
d_dim = 10
-- dimensionless variable
print "Variables without explicit units"
print "d_cm = ",d_cm
print "d_mm = ",d_mm
print "d_km = ",d_km
print "d_dim = ",d_dim
print "Variables with explicit units"
print "d_cm = ",d_cm m
print "d_mm = ",d_mm mm
print "d_km = ",d_km km
print "d_dim = ",raw(d_dim,ft) m
stop

184

The Calculator
Unit support

SCAL User Guide

This program prints the following output:


Variables without explicit units
d_cm =
10 cm
d_mm =
200 mm
d_km =
1000 m
d_dim =
10
Variables with explicit units
d_cm =
0.1 m
d_mm =
200 mm
d_km =
1 km
d_dim =
10 m
STOP

Notice the use of the raw() function to override the dimensionality of the d_dim variable in the
print statement.
Conversion factors may be easily obtained by setting the variable to 1. For example:
q = 1.0 stb/d
print q stb/d, " ", q m^3/s, " ", q ft^3/mnth

Note

There are strict checks for dimensional consistency. For example you may not add a
dimensionless quantity to a quantity with dimensions.

The units associated with a variable can be overridden using the raw() symbol function. This
converts the supplied variable using the supplied units and then strips the units and returns the
dimensionless value. For example the following program:
a = 2 ft
b = 1 in
b = raw(a,in) cm
print a, raw(a), raw(a,in), raw(a,in) cm, b

produces the following output:


0.6096 m

0.6096

24

2400 cm

0.24 m

The first output value is 2 feet converted into meters; the second is 2 feet converted to the default
SI unit (meters) then output as a dimensionless value; the third is 2 feet converted to inches and
output as a dimensionless value; the fourth is 2 feet converted to inches then to SI units (meters)
and output as centimeters. Finally, the last value is 24 centimeters expressed as meters.

SCAL User Guide

The Calculator
Unit support

185

This facility is useful when implementing formulae that assume certain units. The vcopyraw()
function is similar but does not convert using an intermediate unit. vcopyconv() is used to
copy vectors with different units but the same dimensionality. vcopy() is used when the vectors
have the same units. The following example should make this clearer:
vector a[3] :m
vector b[3] :g
vector c[3] :cm
vector d[3] :m
vset(a,1 ft)
-- initialise a
vcopyraw(b,a)
-- copy onto vector with different dimensions
vcopyconv(c,a)
-- copy onto vector with different units
vcopy(d,a)
-- copy onto vector with same dimensions
print a[0],b[0],c[0],d[0]

This program produces the following output:


0.3048 m

0.3048 g

30.48 cm

0.3048 m

Units bind to expressions with the same precedence as + and -. Thus the statement c = 1.0
m * 2.0 in is illegal but d = 1.0 m + 2.0 in is ok. The first statement should be c = (1.0 m) + (2.0
in). The example file UASSOC.CAL gives some more examples.

186

The Calculator
Unit support

SCAL User Guide

Commands
Introduction
Commands are special functions that applications install into the Calculator at run time. They
are similar in many ways to the symbol functions but have the following differences.
1

Commands are not "built in" to the Calculator, rather an application adds application
specific commands thus tailoring the Calculator to its needs. Application specific
documentation should be consulted for details of what commands are available.

Commands use named arguments. For example:

MenuPick( Window="SCAL", Pick = "Open...")

Commands may deal with application specific objects, also known as user types (grids,
properties etc.). These may be returned from a command and then passed as an argument
to another command. Application specific objects may not be used in any other context (for
example they cannot be printed).

All command arguments are read only. A command may return a value which may be a
scalar, string, vector or user type.

Commands may log themselves to a file as they are executed. This file is a valid Calculator
program and may be replayed at will. This provides a useful run file or macro facility.

Built in commands
The following is a list of commands that will always be available in the Calculator, some are
only available for interactive programs. Applications will typically add many more.

CalculatorReset()
This command will clear all variables from the Calculator. It is recommended when running one
program after another to avoid clashes of persistent variables.

Returns:
Nothing.

Arguments:
None

Example:
CalculatorReset( )

MenuPick()
Used to simulate the action of a user picking a menu item.

Returns:
Nothing.

SCAL User Guide

Arguments:

The Calculator
Commands

187

Window (string) - the window containing the menu to pick. This will normally be the text
in the title bar of the window. The text must be entered exactly as it appears on the title bar.
Some applications allow an abbreviated name - see the application specific documentation
for details.
Pick (string) - the text of the menu item to pick. The text must be entered exactly as it
appears on the menu.
Instance (scalar) - the instance number of the window. This is only used when there is
more than one copy of a particular window open, for example two graph windows.

Argument combinations:
Window, Pick. Instance is optional

Example:
MenuPick(Window=SCAL, Pick=Save Workspace...)

NumToString()
Used to convert a scalar variable to a string variable. Often used to build strings indicating
different versions of data. Considerable control over the format of the resulting string is
possible.

Returns:
String representation of supplied number.

Arguments:
Number (scalar) - number to convert.
Type (string) - style of converted number. The following options are allowed: integer,
standard, decimal, scientific
Width (scalar) - how many characters to use in the string
Precision (scalar) - how many significant figures to convert

Argument combinations:
Number is always required. The other arguments are optional.

Example:
s1 = NumToString(Number=n,Type=Integer)

Panel()
Suspends execution of the Calculator program and displays a data entry panel. The fields
correspond to variables in the Calculator program itself. This powerful facility lets users
interactively control the execution of the program.

Returns:
TRUE (1) if OK pressed, FALSE (0) if Cancel pressed.

Arguments:
Title (string) - the title text of the panel
Type (string) - allowed values are Input and Output. All fields are read only for output
panels.
Variables (string) - a space separated list of the variables to display on the panel. Both
scalar and string variables are allowed.
Argument combinations:

188

The Calculator
Commands

SCAL User Guide

Title, Type and Variables are always required.

Example:
continue = Panel(Title = Run details,Type=Input,
Variables = filename run_id)

Pause()
Suspends execution of the Calculator program and displays a message. The Calculator program
continues executing when the OK button is pressed.

Returns:
Nothing.

Arguments:
Message (string) - text to display in the message box

Argument combinations:
Message is always required.

Example:
Pause(Message=Press OK to continue)

Question()
Suspends execution of the Calculator program and displays a question. The Calculator program
continues executing when the OK or Cancel button is pressed. The button pressed is available
to the program.

Returns:
TRUE (1) if OK pressed, FALSE (0) if Cancel pressed.

Arguments:
Question (string) - text to display in the question box
But1 (string) - text for button 1, defaults to OK
But2 (string) - text for button 2, defaults to Cancel

Argument combinations:
Question is always required. Bit1 and But2 are optional.

Example:
Question(Question=Do you want to overwrite the file?
But1 = Yes, But2 = No)

StringList()
Manipulates a list of strings. The names list may be created or destroyed and items may be added
to or removed from it. The list has a notional cursor giving a current position in the list.

Returns:
Value depending on the requested action.

Arguments:
Name (string) - the name of the list. Several string lists may exist at the same time.
Action (string) - the process to do on the list. The following actions are allowed:

SCAL User Guide

The Calculator
Commands

189

Create - creates the named list


Destroy- deletes the named list.
Lists should always be destroyed when they are finished with.
Size - returns the number of elements in the list
Rank - returns the position of the current element
GoTo - sets the current position to specified value
PositionTo - sets the current position to the element whose contents matches the
string in Value, return the position
Add - adds the string in Value to the end of the list
Insert - adds the string in Value at the current position
Delete - deletes the string at the current position
Index (scalar) - value used for GoTo action
Value (string) - value to add or position to

Argument combinations:
Name, Action are required. Index required for GoTo, Value required for
PositionTo, Add and Insert.

Example:
StringList(Name=days,Action=Create)
StringList(Name=days,Action=Add,Value=Monday)
StringList(Name=days,Action=GoTo,Index=3)

StringListAt()
Returns the string at a specified position in a named string list.

Returns:
String at specified position.

Arguments:
Name (string) - the name of the list. Several string lists may exist at the same time.
Index (scalar) - element to return

Argument combinations:
Name and Index are required.

Example:
wed = StringListAt(Name=days,Index=3)

StringToNum()
Returns the number represented by the supplied string.

Returns:
Numerical representation of string.

Arguments:
String (string) - the string to convert.

190

The Calculator
Commands

Argument combinations:
SCAL User Guide

String

Example:
ver = StringToNum(String=snum)

SubString()
Returns a substring of another string.

Returns:
The substring

Arguments:
String (string) - the string to process
From (scalar) - position of first element substring in string. Zero is the first element.
Length (scalar) - length of the substring

Argument combinations:
String and From are required. Length is optional. If unspecified the rest of the string
is returned

Example:
snum = SubString(String=Version3,From=7)

System()
Invokes a command shell and runs the specified command.

Returns:
Nothing.

Arguments:
Command (string) - the command to execute - this might be the name of another program

Argument combinations:
Command

Example:
com = rm run1.log
System(Command=com)

The Panel command


This brief example shows how the Panel command can be used
name =
address =
ok = 1
while ( (name == ) && (ok == 1) )
ok = Panel(Title = Personnel details,Type = Input, Variables =
name address)
endwhile
print ok = ,ok, name = , name, address = , address

SCAL User Guide

The Calculator
Commands

191

SCAL-specific commands
The following is a list of commands available within SCAL. Commands have named
arguments, often some of the arguments are optional.

ActivateRecord()
Used to make the attributes of the record available to the Calculator. Should be paired with
DeactivateRecord() commands.

Returns:
1 for success, 0 for failure.

Arguments:
Name (string) - sample name of record.
Recno (integer) - index of record in group being processed.

Argument combinations:
Name or Recno

Example:
ok = ActivateRecord(Name="A100")

AttribEquals()
Used to test whether an attribute in the activated record equals a specified value. Might be used
in a script called by the Record Selector.

Returns:
1 if equal, 0 else

Arguments:
Name (string) - name of attribute to test
Value (string) - value to test attribute against
Unit (string) - units of value if applicable

Argument combinations:
Name, Value or Name, Value, Unit

Example:
equal = AttribEquals(Name="KREXP", Value = "Unsteady")

AttribRange()
Used to test whether an attribute in the activated record is between specified values. Might be
used in a script called by the Record Selector.

Returns:
1 if in range, 0 else

Arguments:
Name (string) - name of attribute to test
Min (float) - lower value to test attribute against
Max (float) - upper value to test attribute against

192

The Calculator
SCAL-specific commands

SCAL User Guide

Unit (string) - units of value if applicable

Argument combinations:
Name, Min or Name, Max or Name,Min,Max. Unit always optional.

Example:
inrange = AttribRange(Name="PORO", Min = 0.2, Max = 1.0)

CreateThresh()
Creates a "threshold" object used to select regions on a grid where a property is within a
specified range. Might be used in a script called by the Keyword Generator. The
CreateThresh() command must be used before any SetThresh() commands.

Returns:
Threshold object (not normally used)

Arguments:
PropName (string) - name of property to threshold against.
TimeStep (integer) - -1 for initial properties, 0 for recurrent.
ActivePropSC (boolean) - Not used by SCAL, set to TRUE.

Argument combinations:
PropName, TimeStep, ActivePropSC

Example:
CreateThresh(PropName="PORO", TimeStep = -1)

DeactivateRecord()
Saves attributes of a record from Calculator accessible variables back into the record. Should be
paired with ActivateRecord() commands.

Returns:
1 for success, 0 for failure.

Arguments:
Name (string) - sample name of record.
Recno (integer) - index of record in group being processed.

Argument combinations:
Name or Recno

Example:
ok = DeactivateRecord(Name="A100")

GBZAverage()
Volume averages the function defined by Heights and Function over the specified cell in the
simulation grid. The same algorithm used by ECLIPSE in its fine scale equilibrium calculation
is used.

Returns:
The calculated average value.

SCAL User Guide

Arguments:

The Calculator
SCAL-specific commands

193

ActiveId - the cell number to process.


Heights - the function independent variables for example, DEPTH.
Function - the dependent variables, for example SW.
Nslices - Number of slices to use in the averaging

Argument combinations:
All must be specified.

Example:
swav = GBZAverage(ActiveId=icell,Heights=height,
Function=sw,Nslices=nslice)

GetCellPoints()
Returns the coordinates of the cell specified by the i,j,k values.

Returns:
1 if ok, 0 if error.

Arguments:
Iindex, Jindex, Kindex (integer) - i,j,k values for required cell.
Xvec, Yvec, Zvec (vector) - vectors which are loaded with the
coordinates of each corner of the cell. The vectors should be of length 8.

Argument combinations:
All must be specified.

Example:
GetCellPoints(Iindex = i, Jindex = j, Kindex = k, Xvec = x, Yvec = y, Zvec = z)

Note

Note: The corners are specified in the following order:


Top left back, that is . in x[0], y[0], z[0]
Top left front
Top right front
Top right back
Bottom left back
Bottom left front
Bottom right front
Bottom right back, that is in x[7], y[7], z[7]

GetGridSize()
Returns the size of the grid in the specified dimension.

Returns:
Grid size.

Arguments:
Dimension (string) - Nx, Ny or Nz

Argument combinations:
Dimension

194

The Calculator
SCAL-specific commands

SCAL User Guide

Example:
nx = GetGridSize(dimension = "Nx")

GetPropValue()
Returns the value of a property at a given i,j,k cell. Either the property itself or a vector that has
been loaded with the property values (using SimPropToVec) can be used.

Returns:
The value at i,j,k

Arguments:
Property (string) - name of property
Vector (vector) - vector to use instead of property
Iindex, Jindex, Kindex (integer) - i,j,k values for required cell.

Argument combinations:
Iindex, Jindex, Kindex, Property or Iindex, Jindex, Kindex,
Vector

Example:
val = GetPropValue(Iindex = i, Jindex = j, Kindex = k, Property = "DEPTH")

SetThresh()
Sets a threshold criterion to be applied to the property specified in CreateThresh()

Returns:
Nothing

Arguments:
Bound1Type (string) - Type of thresholding to do, for example >, <, <=, >=.
Bound2Type (string) - Used if specifying upper and lower ranges.
Bound1Value (float) - value for bound 1
Bound2Value (float) - value for bound 1

Argument combinations:
Bound1Type, Bound1Value
Bound1Type, Bound1Value, Bound2Type, Bound2Value

Example:
SetThresh(Bound1Type = ">=", Bound1Value = 0.0, Bound2Type = "<=",
Bound2Value = 0.2)

Simulation Property Editor commands


The following commands provide access to manipulate simulation properties. It is possible to
edit and create both initial and recurrent properties of a simulation grid. These commands are
usually used by running the Calculator from within the Simulation Property Editor but can be
called from anywhere within the application, where appropriate.

SCAL User Guide

The Calculator
SCAL-specific commands

195

Most of the commands require a property type string. The list of available property types can be
found from the Type field in the Simulation Property Editor. It is also possible to create
property types.

SimCellIDToIndex()
This command loads a list of indices into a Calculator vector. These correspond to indices into
the property vector for each cellID (natural cell index, from 1 to number of cells, including any
LGRs).

Returns:
1 if ok, else 0.

Arguments:
PropType (string) - name of the property type to be created.
PropName (string) - name of the property version to be created.
GridName (string) - name of simulation grid.
PropManager (string) - name of property manager.
Vector (vector) - vector to copy the indices into. The vector is resized to hold
the data.
CurrentSelection (string) - name of current 3D cell selection. If none is specified
from the Simulation Property Editor, a warning is reported and all cells are used.
ReportStep (integer) - must be an existing report step.

Argument combinations:
PropType, PropName and Vector must all be specified. If only one simulation grid
and property manager exist in the application, the arguments GridName and
PropManager need not be specified. The remaining arguments are optional.

Example:
SimCellIDToIndex (PropType = PoreVolume, PropName = PORV,
GridName = SimGridName, Vector = idToIndexVec, CurrentSelection =
SimCellSelectionName)
Note that the GridName and CurrentSelection arguments are set to Calculator
variable names that are made available from within the context of the Simulation Property
Editor.

SimCreateEmptyProperty()
Used to create a new initial or recurrent simulation property. A new initial property is created
by the Simulation Property Editor when the New property box is checked, so this command
is unlikely to be required to create initial properties. However, it is the only way to create
recurrent properties.

Returns:
1 if ok, else 0.

Arguments:
PropType (string) - name of the property type to be created.
PropName (string) - name of the property version to be created.

196

The Calculator
SCAL-specific commands

SCAL User Guide

GridName (string) - name of simulation grid.


PropManager (string) - name of property manager.
DataType (string) - type of property data. Either Integer or Real.
InactiveData (boolean) - flag to indicate if there are inactive cells. Default is
FALSE.
LGRData (boolean) - flag to indicate that property includes data for any LGRs in the grid.
Default is FALSE.
External (boolean) - flag to indicate if the grid has external renumbering. Default is
FALSE.
Value (scalar) - initial value. If not specified, default is 0.
ReportStep (integer) - must be an existing report step.

Argument combinations:
PropType, PropName, and DataType must all be specified. If only one simulation
grid and property manager exist in the application, the arguments GridName and
PropManager need not be specified. The remaining arguments are optional.

Example:
SimCreateEmptyProperty (PropType = OilSat, PropName = os1,
GridName = Grid1, PropManager = PropManager1, DataType = Real,
ReportStep = 1)

SimGetPropReportSteps()
This command loads the report steps that exist for the specified property into a Calculator
vector.

Returns:
1 if ok, else 0.

Arguments:
PropType (string) - name of the property type to be created.
PropName (string) - name of the property version to be created.
PropManager (string) - name of property manager.
Vector (vector) - vector to copy the report steps into. The vector is resized to hold the
data.

Argument combinations:
PropType, PropName and Vector must all be specified. If PropManager is not
given, the first property manager in the system is used.

Example:
SimGetPropReportSteps (PropType = OilSat, PropName = SOIL,
PropManager = SimPropManager, Vector = rptStepVec)
Note that the PropManager argument is set to a Calculator variable name that is made
available from within the context of the Simulation Property Editor.

SCAL User Guide

The Calculator
SCAL-specific commands

197

SimIndexToCellID()
This command loads a vector of cellIDs into a Calculator vector corresponding to the cellID of
each element in the property vector.

Returns:
1 if ok, else 0.

Arguments:
PropType (string) - name of the property type to be created.
PropName (string) - name of the property version to be created.
GridName (string) - name of simulation grid.
PropManager (string) - name of property manager.
Vector (vector) - vector to copy the cellIDs into. The vector is resized to hold the data.
CurrentSelection (string) - name of current 3D cell selection. If none is specified
from the Simulation Property Editor, a warning is reported and all cells are used.
ReportStep (integer) - must be an existing report step.

Argument combinations:
PropType, PropName and Vector must all be specified. If only one simulation grid
and property manager exist in the application, the arguments GridName and
PropManager need not be specified. The remaining arguments are optional.

Example:
SimIndexToCellID (PropType = PoreVolume, PropName = PORV,
GridName = SimGridName, Vector = indexToCellIDVec, CurrentSelection =
SimCellSelectionName)
Note that the GridName and CurrentSelection arguments are set to Calculator
variable names that are made available from within the context of the Simulation Property
Editor.

SimPropToVec()
This command loads data for the specified property into a Calculator vector.

Returns:
1 if ok, else 0.

Arguments:
PropType (string) - name of the property type to be created.
PropName (string) - name of the property version to be created.
GridName (string) - name of simulation grid.
PropManager (string) - name of property manager.
Vector (vector) - vector to copy the property data into. The vector is resized to hold the
data.
CurrentSelection (string) - name of current 3D cell selection. If none is specified
from the Simulation Property Editor, a warning is reported and all cells are used.
ReportStep (integer) - must be an existing report step.

198

Argument combinations:

The Calculator
SCAL-specific commands

SCAL User Guide

PropType, PropName and Vector must all be specified. If only one simulation grid
and property manager exists in the application, the arguments GridName and
PropManager need not be specified. The remaining arguments are optional.

Example:
SimPropToVec (PropType = Porosity, PropName = poro1, GridName =
SimGridName, Vector = vecToCopyInto, CurrentSelection =
SimCellSelectionName)
Note that the GridName and CurrentSelection arguments are set to Calculator
variable names that are made available from within the context of the Simulation Property
Editor.

SimVecToProp()
This command loads data from a Calculator vector into the applications internal representation
of the specified property. The property must exist within the application, else an error is
returned.

Returns:
1 if ok, else 0.

Arguments:
PropType (string) - name of the property type.
PropName (string) - name of the property version into which the data is to be
copied.
GridName (string) - name of simulation grid.
PropManager (string) - name of property manager.
Vector (vector) - vector containing the property data to copy from.
CurrentSelection (string) - name of current 3D cell selection. If none is specified
from the Simulation Property Editor, a warning is reported and all cells are used.
ReportStep (integer) - must be an existing report step.

Argument combinations:
PropType, PropName and Vector must all be specified. If only one simulation grid
and property manager exist in the application, the arguments GridName and
PropManager need not be specified. The remaining arguments are optional.

Example:
SimVecToProp (PropType = SimPropType, PropName = SimPropName,
GridName = SimGridName, Vector = vecToCopyFrom, CurrentSelection =
SimCellSelectionName)
Note that all the arguments are set to Calculator variable names that are made available
from within the context of the Simulation Property Editor.

SCAL User Guide

The Calculator
SCAL-specific commands

199

Special variables
The Calculator can be run as a general utility from a stand alone top level window or it may be
called at well defined points from within an application. This section describes special variables
that can be used in Calculator scripts to be run at particular places in an application. The values
of variables depend on the data you have entered in the panel from which the Calculator is to be
run. This means that the variables can be used, rather than specific names, to write a general
Calculator script that can be applied to the user selected data.
Care should be taken that user defined variables do not clash with these names.

Simulation property editing


If the Calculator is run from the Simulation Property Editor panel, the following special
variables are made available for use.
Table B.6

200

Variables defined when simulation property editing

Name

Type

Usage

SimGridName

string

The name of the current simulation grid.

SimPropManager

string

The name of the current property manager.

SimPropType

string

The property type.

SimPropName

string

The version name of the property.

SimPropLength

scalar

The length of the property vector. This will either be


for all cells or for the selection in the 3D Viewer,
depending on the panel configuration.

SimCellSelectionName

string

The name of the selection in the 3D Viewer, or


unset_name if this option is inactive.

SimCellIDToIndexVector

vector

Vector holding the indices into the property vector,


SimPropVector, corresponding to cellID. If data for a
cellID is not present, the index = -1.

SimIndexToCellIDVector

vector

Vector holding the cellIDs for each of the values held in


the property vector, SimPropVector.

SimPropVector

vector

Vector holding the data for the property. Either all the
available data or for the selection in the 3D viewer.

SimSelCellIdsVector

vector

Vector holding the cellIDs for the cells that have been
selected in the 3D Viewer. If the selection option is
inactive, vector holds all the cellIDs for the property.

The Calculator
Special variables

SCAL User Guide

Special variables specific to SCAL


This section describes the special variables that SCAL sets up in order to communicate with the
Calculator. These variables only exist in the context they are described and care should be taken
that user defined variables do not clash with these names.

Fitting and generating


When specifying a Calculator function from the Function part of the record editors table data
page the following Calculator variables are used.
Table B.7

Variables defined when using a Calculator function within SCAL

Name

Type

Usage

x_value

scalar

x value the function should evaluate. Corresponds to the first column of the
table data. Should not be set by the Calculator script but used to evaluate the
function.

y1_value

scalar

y value corresponding to the second column in the table. The result of the
function. Should be set by the Calculator script.

y2_value

scalar

y value corresponding to the third column in the table. The result of the
function. Should be set by the Calculator script. Only used for relative
permeability tables.

coeff

vector

Vector of function coefficients. Contains 10 elements coeff[0] - coeff[9].


Correspond to coeffs c1 - c10 in the Coeff. Names column. Should not be set
by the Calculator script but used to evaluate the function.

Processing records and generating keywords


When specifying a Calculator file on the Record Selector panel or the Keyword Generator
panel the following Calculator variables are used.
Table B.8

SCAL User Guide

Variables defined when processing records and generating keywords

Name

Type

Usage

rec

scalar

The number of the record in the group current being


processed. Value varies from 1 to number of records in the
group.

SELECTED

scalar

Only used during record selection. Calculator script should


set the value to TRUE if the record is to be selected.

The Calculator
Special variables specific to SCAL

201

Attribute names
During record selection and keyword generation attributes are made available to the Calculator.
The attributes are also made available by the ActivateRecord() command. The following
table lists the names, types and descriptions of the attributes from the point of view of the
Calculator. These names should be avoided for user variables.
Integer, floating point and boolean attributes map to scalars in the Calculator; table attributes
map to one, two or three Calculator vectors; text and text choice attributes map to Calculator
strings.
Any supplements defined during the program run or read from the input file will also be
available. Table supplements map to Calculator vectors which are named as
SUPNAME_COLNAME where SUPNAME is the name of the table supplement and COLNAME is
the name of the appropriate column.
Table B.9

Calculator attributes defined by SCAL

Name

202

Attrib.
Type

Calc.
Type

Description

AOWI

Scalar

Scalar

Amott oil wettability

ASSOCIATE

Integer

Scalar

Associated with

AWWI

Scalar

Scalar

Amott water wettability

CENTSPEED

Scalar

Scalar

Centrifuge speed

CLEANSTATE

Choice

String

Cleaned state

CONTANGLE

Scalar

Scalar

Contact angle

COREDEPTH

Scalar

Scalar

Core Depth

CORENAME

String

String

Core Name

COREORIENTATIO
N

Choice

String

Orientation of Core

DENSG

Scalar

Scalar

Gas density

DENSO

Scalar

Scalar

Oil density

DENSW

Scalar

Scalar

Water density

DERIVED

Scalar

Scalar

Record derived from other records

DESCRIPTION

String

String

Description

DIFFP

Scalar

Scalar

Differential pressure

DISPPHASE

Choice

String

Displaced phase

ENKRVD_Depth

Table

Vector

End point scaling vs. depth - Depth

ENKRVD_Krgmax

Table

Vector

End point scaling vs. depth - Krgmax

ENKRVD_Krgwco

Table

Vector

End point scaling vs. depth - Krgwco

ENKRVD_Krocg

Table

Vector

End point scaling vs. depth - Krocg

ENKRVD_Krocw

Table

Vector

End point scaling vs. depth - Krocw

ENKRVD_Kromax

Table

Vector

End point scaling vs. depth - Kromax

ENKRVD_Krwco

Table

Vector

End point scaling vs. depth - Krwco

ENKRVD_Krwmax

Table

Vector

End point scaling vs. depth - Krwmax

ENPTVD_Depth

Table

Vector

End point scaling vs. depth - Depth

ENPTVD_Sgcrit

Table

Vector

End point scaling vs. depth - Sgcrit

The Calculator
Special variables specific to SCAL

SCAL User Guide

Table B.9

SCAL User Guide

Calculator attributes defined by SCAL (Continued)

Name

Attrib.
Type

Calc.
Type

Description

ENPTVD_Sgi

Table

Vector

End point scaling vs. depth - Sgi

ENPTVD_Sgr

Table

Vector

End point scaling vs. depth - Sgr

ENPTVD_Sogcrit

Table

Vector

End point scaling vs. depth - Sogcrit

ENPTVD_Sowcrit

Table

Vector

End point scaling vs. depth - Sowcrit

ENPTVD_Swcrit

Table

Vector

End point scaling vs. depth - Swcrit

ENPTVD_Swi

Table

Vector

End point scaling vs. depth - Swi

ENPTVD_Swr

Table

Vector

End point scaling vs. depth - Swr

FLOODORIENTATI
ON

Choice

String

Flooding orientation through core

GRAVG

Scalar

Scalar

Gas gravity (w.r.t. air). See note 3.

GRAVO

Scalar

Scalar

Oil API gravity

GRAVW

Scalar

Scalar

Water specific gravity

HAOWC

Scalar

Scalar

Height above oil water contact

ID

Integer

Scalar

Record ID

INJPHASE

Choice

String

Injected phase

INTERTENS

Scalar

Scalar

Interfacial Tension

JFUNCPERM

Choice

String

J function perm. See note 4.

JPCGO_JPc

Table

Vector

J function Pc for gas displacing oil

JPCGO_Sg

Table

Vector

J function Sg for gas displacing oil

JPCGW_JPc

Table

Vector

J function Pc for gas displacing water

JPCGW_Sg

Table

Vector

J function Sg for gas displacing water

JPCHGE_JPc

Table

Vector

J function Pc for mercury ejection

JPCHGE_Sat

Table

Vector

J function saturation for mercury ejection

JPCHGI_JPc

Table

Vector

J function Pc for mercury injection

JPCHGI_Sat

Table

Vector

J function saturation for mercury injection

JPCOG_JPc

Table

Vector

J function Pc for oil displacing gas

JPCOG_Sg

Table

Vector

J function Sg for oil displacing gas

JPCOW_JPc

Table

Vector

J function Pc for oil displacing water

JPCOW_Sw

Table

Vector

J function Sw for oil displacing water

JPCWG_JPc

Table

Vector

J function Pc for water displacing gas

JPCWG_Sg

Table

Vector

J function Sg for water displacing gas

JPCWO_JPc

Table

Vector

J function Pc for water displacing oil

JPCWO_Sw

Table

Vector

J function Sw for water displacing oil

KAIR

Scalar

Scalar

Kair

KGSG1

Scalar

Scalar

Gas permeability at 100% gas

KGSOR

Scalar

Scalar

Gas permeability at residual oil saturation

KGSWI

Scalar

Scalar

Gas permeability at initial water saturation

KGSWR

Scalar

Scalar

Gas permeability at residual water saturation

KOSO1

Scalar

Scalar

Oil permeability at 100% oil

The Calculator
Special variables specific to SCAL

203

Table B.9

204

Calculator attributes defined by SCAL (Continued)

Name

Attrib.
Type

Calc.
Type

Description

KOSWI

Scalar

Scalar

Oil permeability at initial water saturation

KRBASIS

Choice

String

Kr basis permeability

KREXP

Choice

String

Kr experiment type

KRG

Scalar

Scalar

KRG - end point scaling

KRGO_Krg

Table

Vector

Krg for gas displacing oil

KRGO_Kro

Table

Vector

Kro for gas displacing oil

KRGO_Sg

Table

Vector

Sg for gas displacing oil

KRGR

Scalar

Scalar

KRGR - end point scaling

KRGW_Krg

Table

Vector

Krg for gas displacing water

KRGW_Krw

Table

Vector

Krw for gas displacing water

KRGW_Sg

Table

Vector

Sg for gas displacing water

KRO

Scalar

Scalar

KRO - end point scaling

KROG_Krg

Table

Vector

Krg for oil displacing gas

KROG_Kro

Table

Vector

Kro for oil displacing gas

KROG_Sg

Table

Vector

Sg for oil displacing gas

KRORG

Scalar

Scalar

KRORG - end point scaling

KRORW

Scalar

Scalar

KRORW - end point scaling

KROW_Kro

Table

Vector

Kro for oil displacing water

KROW_Krw

Table

Vector

Krw for oil displacing water

KROW_Sw

Table

Vector

Sw for oil displacing water

KRW

Scalar

Scalar

KRW - end point scaling

KRWG_Krg

Table

Vector

Krg for water displacing gas

KRWG_Krw

Table

Vector

Krw for water displacing gas

KRWG_Sg

Table

Vector

Sg for water displacing gas

KRWO_Kro

Table

Vector

Kro for water displacing oil

KRWO_Krw

Table

Vector

Krw for water displacing oil

KRWO_Sw

Table

Vector

Sw for water displacing oil

KRWR

Scalar

Scalar

KRWR - end point scaling

KWSOR

Scalar

Scalar

Water permeability at residual oil saturation

KWSW1

Scalar

Scalar

water permeability at 100% water

LAYER

String

Scalar

Layer

LITHOFACIES

String

String

Lithofacies indicator

LITHOTYPE

String

String

Lithotype

LOGDEPTH

Scalar

Scalar

Log Depth

ORIENTATION

Choice

String

Flooding orientation

PCEXP

Choice

String

Pc experiment type

PCG

Scalar

Scalar

PCG - end point scaling

PCGO_Pc

Table

Vector

Pc for gas displacing oil

PCGO_Sg

Table

Vector

Sg for gas displacing oil

The Calculator
Special variables specific to SCAL

SCAL User Guide

Table B.9

SCAL User Guide

Calculator attributes defined by SCAL (Continued)

Name

Attrib.
Type

Calc.
Type

Description

PCGW_Pc

Table

Vector

Pc for gas displacing water

PCGW_Sg

Table

Vector

Sg for gas displacing water

PCHGE_Pc

Table

Vector

Pc for mercury ejection

PCHGE_Sat

Table

Vector

Mercury Saturation for mercury ejection

PCHGI_Pc

Table

Vector

Pc for mercury injection

PCHGI_Sat

Table

Vector

Mercury Saturation for mercury injection

PCOG_Pc

Table

Vector

Pc for oil displacing gas

PCOG_Sg

Table

Vector

Sg for oil displacing gas

PCOW_Pc

Table

Vector

Pc for oil displacing water

PCOW_Sw

Table

Vector

Sw for oil displacing water

PCW

Scalar

Scalar

PCW - end point scaling

PCWG_Pc

Table

Vector

Pc for water displacing gas

PCWG_Sg

Table

Vector

Sg for water displacing gas

PCWO_Pc

Table

Vector

Pc for water displacing oil

PCWO_Sw

Table

Vector

Sw for water displacing oil

PERMEABILITY

Scalar

Scalar

Permeability. See note 5.

PORO

Scalar

Scalar

Porosity

PORV

Scalar

Scalar

Pore volume

RATE

Scalar

Scalar

Flood rate

RESERVOIR

String

String

Reservoir name

SAMPLENAME

String

String

Sample name

SGBK

Scalar

Scalar

Gas saturation at gas breakthrough

SGCR

Scalar

Scalar

SGCR - end point scaling

SGCRIT

Scalar

Scalar

Critical gas saturation

SGI

Scalar

Scalar

Initial gas saturation

SGL

Scalar

Scalar

SGL - end point scaling

SGLPC

Scalar

Scalar

SGLPC - end point scaling

SGM

Scalar

Scalar

Minimum gas saturation. See note 6.

SGR

Scalar

Scalar

Residual gas saturation

SGU

Scalar

Scalar

SGU - end point scaling

SOF32D_Kro

Table

Vector

Kro for 3 phase system. See note 7.

SOF32D_Sg

Table

Vector

Sg for 3 phase system. See note 7.

SOF32D_Sw

Table

Vector

Sw for 3 phase system. See note 7.

SOFTDATA

Boolean

Scalar

Analogue data

SOGCR

Scalar

Scalar

SOGCR - end point scaling

SOI

Scalar

Scalar

Initial oil saturation

SOMGAS_Sg

Table

Vector

Sg. Stone 1- see note 8.

SOMGAS_Somin

Table

Vector

Somin Stone 1- see note 8.

SOMWAT_Somin

Table

Vector

Somin Stone 1- see note 8.

The Calculator
Special variables specific to SCAL

205

Table B.9

Calculator attributes defined by SCAL (Continued)

Name

Attrib.
Type

Calc.
Type

Description

SOMWAT_Sw

Table

Vector

Sw Stone 1- see note 8.

SOR

Scalar

Scalar

Residual oil saturation

SORM

Scalar

Scalar

Minimum oil saturation. See note 6.

SOWCR

Scalar

Scalar

SOWCR - end point scaling

STOG

Scalar

Scalar

Oil-gas surface tension

STOW

Scalar

Scalar

Oil-water surface tension

SWBK

Scalar

Scalar

Water saturation at breakthrough

SWBKFF

Scalar

Scalar

Water-saturation at breakthrough (calculated)

SWCR

Scalar

Scalar

SWCR - end point scaling

SWCRIT

Scalar

Scalar

Critical water saturation

SWI

Scalar

Scalar

Initial water saturation

SWL

Scalar

Scalar

SWL - end point scaling

SWLPC

Scalar

Scalar

SWLPC - end point scaling

SWM

Scalar

Scalar

Minimum water saturation. See note 6.

SWR

Scalar

Scalar

Residual water saturation

SWU

Scalar

Scalar

SWU - end point scaling

TEMPERATURE

Scalar

Scalar

Temperature

THRU

Scalar

Scalar

Throughput

TVDSS

Scalar

Scalar

True Vertical Depth Sub Sea

UNLINKS2T

Boolean

Scalar

Dont link end point attributes to table

VISCG

Scalar

Scalar

Gas viscosity

VISCO

Scalar

Scalar

Oil viscosity

VISCW

Scalar

Scalar

Water viscosity

WELL

Scalar

Scalar

Well name

WETT

Choice

Scalar

Wettability

XPERMEABILITY

Scalar

Scalar

X Permeability

XYPERMEABILITY Scalar

Scalar

XY Permeability

YPERMEABILITY

Scalar

Scalar

Y Permeability

ZONE

String

Scalar

Zone

ZPERMEABILITY

Scalar

Scalar

Z Permeability

Notes

206

Directional and irreversible versions of this keyword include an X, Y or Z in the name and
an M where the minus sign might be expected. The Calculator would interpret minus
signs as operators. For example ENKRVDX_Depth, ENPTVDZ_Sgr,
ENKRVDM_Krwmax.

Table keywords (KRWO etc.) have an optional associated keyword to represent the original
data if the data has been generated by a function. The Calculator names for these attributes
are constructed by appending _ORG after the attribute name. For example
KRWO_ORG_Sw, JPCHGI_ORG_JPc.

The Calculator
Special variables specific to SCAL

SCAL User Guide

Gravities are automatically converted internally to densities. They are displayed as


densities on the Record Editor Procedures panel.

JFUNCPERM specifies the permeability (KOSWI etc.) to use when converting capillary
pressure to the J function alternative.

The PERMEABILITY attribute is for use when a specific experimental permeability


(KOSWI etc.) is not available. It may also be the result of an upscaling calculation.

SGM and SWM and SORM are used by the Parallel Conductance Model method of calculating
three phase oil relative permeabilities.

SOF32D_Kro is really a two-dimensional array mapped to a one dimensional vector. It


should be accessed as follows. If nx is the length of the water saturation vector
SOF32D_Sw and ix is the index into the water vector, and ny is the length of the gas
saturation vector SOF32D_Sg and iy is the index into the gas vector then the three phase
oil relative permeability corresponding to S w = SOF32D_Sw[ix], S g =
SOF32D_Sg[iy] is K ro = SOF32D_Kro[ix*ny + iy].

SCAL User Guide

These attributes correspond to the minimum oil saturation used in the Stone 1 three-phase
oil permeability model. They map to the ECLIPSE keywords SOMGAS and SOMWAT.

The Calculator
Special variables specific to SCAL

207

Calculator utilities
The Calculator utilities are accessible from the Main Window | Utilities menu by selecting the
Calculator Show option. Selection of one of the menu items opens a window in which a list of
variables corresponding to the selection and available for use within a Calculator script is
displayed. The window provides a search facility and its contents can be saved to a file.

Scalars
Selection of the Calculator Show | Scalars menu item displays all current floating point
variables that exist for use within the Calculator.

Vectors
Selection of the Calculator Show | Vectors menu item displays all current vectors that exist for
use within the Calculator.

Strings
Selection of the Calculator Show | Strings menu item displays all current string variables that
exist for use within the Calculator.

Units
Selection of the Calculator Show | Units menu item displays all units that exist for use within
the Calculator. Conversion factors are to the SI unit system.

Built in functions
Selection of the Calculator Show | Built in functions menu item displays the built in functions
that the Calculator supports.

Symbol functions
Selection of the Calculator Show | Symbol functions menu item displays the symbol functions
that operate on vectors (and some scalars) supported by the Calculator.

Keywords
Selection of the Calculator Show | Keywords menu item displays the list of reserved keywords
defined by the Calculator.

Operators
Selection of the Calculator Show | Operators menu item displays the operators that can be
used within a Calculator script.

208

The Calculator
Calculator utilities

SCAL User Guide

Commands
Selection of the Calculator Show | Commands menu item displays the list of commands that
exist within the application. This includes commands used for logging and replaying progress
through the application in addition to commands used to provide access to the internal data
within the application for use in Calculator scripts.

Constants
Selection of the Calculator Show | Constants menu item displays the constants that are defined
within the Calculator.

All of above
Selection of the Calculator Show | Constants menu item lists all the above information at
once.

SCAL User Guide

The Calculator
Calculator utilities

209

Startup files
When an application starts it may search for a calculator file and run it. This file may create
variables for use later in the application, for example it could set a user name to be later
embedded in a report, or it may fire application specific commands or menu picks to restore an
application to a previous state.
By default the startup file is called PROFILE.CAL and is looked for in the working directory.
This can be altered using the ECL.CFG configuration file as shown:
---------------------------------------SECTION APPLNAME
---------------------------------------SUBSECT
CALC
PROFILEDIR
/project/study1/mydata
PROFILE
MYPROF.CAL

The section keyword is the specific application name for example SCHEDULE or WELTEST.
An example startup file that loads data into the Weltest 200 program is shown below:
caAutoRun = 1
caAutoFileName = "demo.db"
caAutoDirName = "/project/study1/mydata"
MenuPick(Window
MenuPick(Window
MenuPick(Window
MenuPick(Window
caAutoRun = 0
stop

=
=
=
=

"W200",Pick = "Open...")
"W200",Pick = "Import...")
"W200",Pick = "Close")
"W200 - Analyse",Pick = "Add Line...")

In this example the caAutoRun flag is a built in variable that, if non zero informs the
application that data panels should be bypassed. The caAutoFileName variable contains the
names of input files that will be needed when options such as opening a file are invoked.
caAutoDirName contains the directory where the files reside
The MenuPick() command takes two arguments and fires off the appropriate menu option.
The first parameter is the window name, while the second is the menu option. It is important to
get these names exactly right (case is important).

210

The Calculator
Startup files

SCAL User Guide

Debugging
Examining variables
There is no explicit debugging facility in the Calculator. However print statements can be
used as required to show the value of variables and
stop statements may be used as breakpoints. Variables may then be interrogated using the
Calculator Show utilities menu. Remember variables are global and exist until the calculator
is closed or reset.

Common problems
Name conflicts
This comes from three sources and can give rise to unexpected syntax or run time errors.
1

Name clashes with built in names or (especially) units. Certain names are reserved for
keywords, built in constants or functions, or units. A list of the names in use can be obtained
from the Calculator Show utilities menu. Clashes with unit names are especially common
as many units have short names likely to be chosen as variables (for example h, g, m etc.).

All variables are global so it is possible to inadvertently use the same variable in different
functions. This may give a compilation error (inconsistent units) or run time error, but may
just give misleading results. Variables must be global so that program as well as user
variables can be accessed. If in doubt use the Calculator Reset menu option.

Variables from previous runs still exist when the run has finished. This can give unexpected
errors when a new function is run which uses an old variable in a new way. Persistence of
variables is necessary so that program variables may be accessed. The namespace can be
cleared using the Calculator Reset menu. It is also good practise to initialize all variables
the first time they are used.

Never ending while loops


If using the while loop as a FORTRAN type DO loop or a c type for or while loop then do
not forget to initialize the counter and increment it inside the body of the loop. This example
will loop until stopped by the user.
iCount = 0
while (iCount<10)
a[iCount] = 0.0
endwhile

--loops forever

Stack overflow
This message can occur if the statement(s) following an if or while construct are not finished
with an endif or endwhile.

SCAL User Guide

The Calculator
Debugging

211

Syntax error signalled on a valid line


The preceding line may be at fault. You may have forgotten to close a quoted string. Sometimes
exact information about where an error occurred is not available. In these cases the Calculator
gives a nearby line number and highlights that line. To help locate the problem the next few
characters after the error are written.

Using quantities with fractional dimensions


The code:
a = 4.0 m
b = sqrt(a)
print "",b," ",(b*b)

incorrectly prints "2.0 m 4.0m^2", rather than "2.0 m^0.5 4.0 m".
Non fractional dimensions are treated correctly, that is the code:
a = 4.0 m^2
b = sqrt(a)
print "",b," ",(b*b)

correctly prints "2.0 m 4.0 m^2".

Printing expressions
Expressions involving * or / may give a syntax error when used in a print statement. If this
happens enclose the expression in () or use an intermediate variable for example.
a = 2
-- the following line would give a syntax error
--print a*a
-- so do it like this ...
b = a*a
print b
-- or this ...
print (a*a)

Slow execution
In the interactive Calculator sometimes the speed of program execution is limited by the time
taken to write the output text to the output window. Often shrinking the output window or
reducing the program output can dramatically speed up the Calculator.

212

The Calculator
Debugging

SCAL User Guide

Example Calculator files


The SCAL installation comes with several example Calculator files which illustrate how to use
the Calculator in various ways. These files are described here. Further examples may be found
in the Calculator-based tutorials.
Files beginning "_" (for example _RECSEL.CAL) are used or generated internally by the
Calculator. These should not be edited.
Table B.10

SCAL User Guide

Example Calculator files

File name

Description

CELLPROP.CAL

Shows how to access property data using the i,j,k grid indices. To be run from
the Property Editor panel.

CELLPTS.CAL

Calculates the average depth by getting the coordinates of each cell.To be run
from the Property Editor panel.

CELLVEC.CAL

More efficient version of CELLPROP.CAL as a complete vector is added in


one go. To be run from the Property Editor panel.

CORDAT.CAL

Program to generate relative permeability data from a Corey function. To be


run from the Property Editor panel.

FIT2COL.CAL

Fits a straight line to data in two vectors.To be run from the Function Panel.

KRTABLE.CAL

Loads a record with KRWO oil and water relative permeability data. To be run
from the Record Selector.

P2V1.CAL

Shows how to load a property into a vector for processing within the
Calculator and store the data back as a property. To be run from the Property
Editor panel.

PCTABLE.CAL

Loads a record with PCGW gas-water capillary pressure data. To be run from
the Record Selector.

POROASS.CAL

Example usage of Calculator when generating a property. To be run from the


Keyword Generator.

POROHI.CAL

Example use of Calculator for record selection.To be run from the Record
Selector.

SMOOTHKR.CAL

Smooths relative permeability curves.To be run from the Record Selector.

SWPROF.CAL

Extracts a profile of how water saturation varies across a grid. To be run from
the Record Selector.

The Calculator
Example Calculator files

213

214

The Calculator
Example Calculator files

SCAL User Guide

Windows and panels


Appendix C

Windows
Window management
This section describes facilities to manage the principal windows making up the application.
Applications can be divided into two types. The main application window may be a long thin
ribbon window positioned at the top of the screen, or it may be a normally shaped window on
a par with other top level windows. In both cases it has a Window menu on its menu bar. The
two application types differ in their response to window tiling and cascading but in all other
respects they are the same.

Window menu
The window menu contains the following standard items:

Tile
The windows are rearranged so that they cover approximately the bottom three quarters of the
screen and do not overlap. For ribbon applications the main window is repositioned to be a long
thin strip near the top of the screen. The log window, if present, appears at the bottom of the
screen. Data entry panels are brought to the front.

Cascade
The windows are rearranged so that they are the same size and overlap but are offset downwards
and to the right so the title areas are still visible. For ribbon applications the main window is
repositioned to be a long thin strip near the top of the screen. The log window, if present, appears
at the bottom of the screen. Data entry panels are brought to the front.

SCAL User Guide

Windows and panels


Windows

215

Message Area
This hides and shows the message area. Hiding the message area is useful if the application is
generating too many distracting messages. An application can either have a message area
incorporated into the main window or have one existing as a separate window called the Log
window (see "Log window" on page 217).

Minimize Children
All top level windows apart from the main window are minimized. It is useful if the screen is
getting full and you temporarily want to use a different application.

Restore Children
Any minimized windows belonging to the application are restored to their previous positions.

Window List
The remaining options correspond to top level windows in the application. Selecting one of
these causes the window to be brought to the front (and restored if it was minimized). This is
useful if the desired window has been hidden behind other windows.

Instance numbers
If the application shows more than one window of a certain type then the different windows are
identified by numbers on their title bars. For example Editor:1 and Editor:2.

216

Windows and panels


Windows

SCAL User Guide

Special windows
Log window
Many applications have a special window the Log Window to which they send informational,
warning and error messages. Applications may also echo the contents of the log window to a
file. The Log window can be deactivated using either the Window menu of the main window
or the pop up window of the Log window.

Text editor
The standard text editor window is used in a variety of contexts. It provides generic text editing
capabilities along with a status line and a tool bar. Here is an example the Text Editor display.
Figure C.1 The Text Editor window

The tool bar icons correspond to File | Open, File | Save, Edit | Copy, Edit | Cut and Edit |
Paste.
The Edit menu also contains items to find text, replace text and to goto a specific line.
Text may be cut, copied and pasted to the clipboard using the menus, toolbar or keyboard in the
normal way.

SCAL User Guide

Windows and panels


Special windows

217

Panels
Introduction
Data entry panels are divided into two types, modal (Figure C.2) and modeless (Figure C.3).
Modal panels need to be completed and responded to before any other operation within the
application can resume. Only one copy of a particular Modal panel can be displayed at a time.
Modeless panels are generally used where you wish the panel to remain on the screen after
applying a change. More than one copy of a Modeless panel can be displayed at a time.

Modal Panels
These normally have the OK, Cancel and Help buttons. They are used in situations where the
engineer must supply data before an action or calculation can be made. Once visible the panel
can be relocated on the screen, any other activity within the application is not possible.
The engineer will be able to work with other applications even when a modal panel is displayed.
The bottom of a panel often displays helpful information describing either the widget you are
on, how data should be entered, or a validation message.
Figure C.2 Example of a modal panel

218

Windows and panels


Panels

SCAL User Guide

Table C.1

The default pushbutton action

Pushbutton

Action

OK

Calls validation checks and if successful loads the data displayed into the
internal data structures, then removes the panel.

Apply

Calls validation checks and if successful loads the data displayed into the
internal data structures

Cancel

Removes the panel. Changes to data, since the last apply, within the panel
are lost.

Help

Produces help information.

Modeless panel
These normally have the OK, Apply, Cancel and Help butto
ns as shown in Figure C.3. They are used in situations where you are able to interact with the
data in a number of ways, for example simultaneous graphical or tabular editing. When a
modeless panel is displayed you are allowed to perform other application-specific tasks.
To remove a modeless panel select Cancel.
Figure C.3 Example of a modeless panel

SCAL User Guide

Windows and panels


Panels

219

Interaction with a panel


This is achieved using either the mouse or the following key strokes.
Table C.2

Panel interaction

Keystroke

Effect

Tab

Move focus to next window item. If focus is within a table tab will move
focus to the next cell. To move focus out of a table you must use the mouse.

Shift Tab

Same as above but in opposite direction.

Down arrow

If focus is within a table, moves focus to the cell below see Table C.1. If in
radio button moves to next button (tab to next field). If in drop down list box
see Table C.4.

Up arrow

If focus is within a table, moves focus to the cell above see Table C.1.
If within a drop down list, will move focus to the item above in the list see
Table C.4.

Left arrow

Move one character to the left within the same cell/edit field. See Table C.1

Right arrow

Move one character to the right within the same cell/edit field. Table C.1

Enter

Same as pressing OK on modal panels, or Apply on Modeless panels.


Otherwise simulates pressing an application specific update/process data
button (the exception is when focus is within a drop down list box). Or
chooses button with focus.

Escape

Same as pressing Cancel button. Otherwise simulates pressing an application


specific Cancel/Remove panel button.

Space

Toggles checkbox, set radio button, or simulates a button press.

F11

Moves onto next table or field / off current table / field

F12

Moves onto previous table or field / off current table or field

Active and passive units


Panels support passive units: changing the unit does not alter a displayed value.
For example: if we enter a value into the field seen in Figure C.2, and change the unit using the
dropdown list box, the displayed value of the field is not converted.
Active units would imply that a change to the unit field would convert the displayed value.
For example: if we had a field displaying 10 meters and changed the units to feet, the displayed
value would update to show 32.8.

220

Windows and panels


Panels

SCAL User Guide

Data Tables
Tables are supplied with their own vertical and horizontal scroll bars. The order of the table
columns can be temporarily changed by picking up the column header with the mouse and
dropping it at the new location in the table; the cursor changes to a hand during this operation.
Columns can be temporarily resized by dragging a columns divider, situated within the table
heading.
Table C.1

Table navigation

Keystroke

Effect

tab

Moves focus to next cell on same row. If in last cell move to first cell in next
row. If in last cell in table stay there. It is also not possible to tab into or out of
a data table.

shift tab

As above but move backwards.

up/down arrows

Move to cell above/below

left/right arrows

Move character left/right, remain in same cell.

Shift & down arrows

Displays drop down list bow for text choice cells

Ctrl d

Delete current row.

Ctrl n*

Insert row below current. Move focus to new row.

Ctrl shift n

Insert row above current row. Move focus to new row.

Ctrl
F9
*.
.
.

Undo last edit. Message "Undone" or "Nothing to undo" displayed.


Copy current cell contents into cell below, move to that cell

The Plus button in the top right corner of the table is an alternative to Ctrl N for inserting rows
Ctrl U will undo the table edits one at a time until the last time data was consolidated. Tables are
always consolidated by Apply.
The F9 cell repeat facility is currently only used on the Record merger and the Record Associator panels.

While editing tabular data use the Undo key (see Table C.1) to undo the changes in reverse
order. Undos can usually be made up to the last time the panel loaded the panel data into the
internal data structures (that is when OK or Apply were pressed).

SCAL User Guide

Windows and panels


Data Tables

221

Window Items
Window items, widgets and fields are generally synonymous, although sometimes a field
implies a composite widget (group of widgets) that represents a more useful construct for
example a named floating point value with associated units (scalar).
This section describes the different window items, and how there are used. For examples of the
window items listed here see Figure C.4
Table C.3

222

Window items

Window item

Behavior

Scalar - Floating point edit field


preceded by text

Alphabetic characters will be rejected as input (unless part of


scientific notation). Input will also be checked against the range
for the field. Extra validation may have enforced.

Scalar - Floating point edit field


preceded by text, with a units drop
down list box.

This field has a drop down list box attached which shows
alternate units for this item. The user may choose to display/input
the value in different units.

Slider Scalar

A slider representation of a standard scalar.

Integer edit field preceded by text

Input is automatically checked for range.

Slider Integer

A slider representation of a standard integer.

Checkbox

When a checkbox is checked it is deemed to be true.

Radio Buttons

A radio button can represent a number of states. A radio button


can only represent one particular state at an one time.

Static text

A piece of text or description which can not be edited or gain


focus.

String edit field

A string edit field allows data entry. An alphanumeric characters


can be entered.

Drop down list box

Clicking on the dropdown button displays a list of options. To


make a selection click on one of the entries in the list. The list
may be editable (that is the values not in the list may be entered).

Table

Generally a table will appear with scroll bars, and display several
columns of data. A table can be navigated as specified in Table
C.1. If a particular column or cell is disabled it will appear greyed
out and will not accept focus. A table cell may display a
dropdown button, in this case a selection from a choice can be
made. This is similar in operation to a Drop down list box
described above.

Windows and panels


Window Items

SCAL User Guide

Figure C.4 Example window items


Scalar fields with
unit drop-down

Checkboxes

Integer field
Radio
buttons

Table

String
field

Push button

Interaction with drop-down list box


Drop-downs are associated with a number of different window items, for example scalar units
and table cells. As well as using the mouse, drop-downs can be navigated using the following
keystrokes once focus is within the drop-down edit field:
Table C.4

Interaction with a dropdown list box

Keystroke

SCAL User Guide

Effect

Shift and down arrow

Display list box

Down arrow

Move down the list

Up arrow

Move up the list

Windows and panels


Window Items

223

Table C.4

224

Interaction with a dropdown list box (Continued)

Keystroke

Effect

Enter

Make selection from list

Space

Make section from list

Letter

Move to item in list starting with letter

Windows and panels


Window Items

SCAL User Guide

Configuring SCAL
Appendix D

SECTION SCAL options


At present, the only configurable item just for SCAL is the path to SCALs system directory.
The system directory stores master Calculator files which SCAL uses during record selection
and keyword generation. It should normally be set correctly in the CONFIG.ECL file as part of
the installation process.
SECTIONSCAL
SUBSECTDIRECTORY
SYSTEM/ecl/99b/scal/system

SCAL User Guide

Configuring SCAL
SECTION SCAL options

225

SECTION FRAMEWORK options


On PCs running Windows 95, Windows 98 or Windows NT, it may be necessary to configure
the FONT size for SCAL to ensure that panels are correctly displayed. The minimum screen
resolution needed to see all panels for SCAL on PCs is SVGA (800x600). Screen display sizes
of 14, or even laptop displays, can be used to display the panels provided the following
recommended settings are made in SECTION FRAMEWORK of the CONFIG.ECL file:
--------------------------------------SECTIONFRAMEWORK
--------------------------------------SUBSECTWIDGETFONT
-- Font used for panels
FONTSYSTEM
STYLEPLAIN
SIZE7
--------------------------------------SUBSECTTEXTFONT
-- Font used for text in Log windows
FONTFIXED
STYLEPLAIN
SIZE8

226

Configuring SCAL
SECTION FRAMEWORK options

SCAL User Guide

SECTION HELP
This section lists the paths to the help files for various programs, including SCAL. They should
normally be set in the master configuration file automatically by the installation process.
SECTION HELP
SUBSECT 99B
SCAL /ecl/99b/scal/help

SCAL User Guide

Configuring SCAL
SECTION HELP

227

SECTION FLOGRID
This section contains the control to set the position of the log window. If the setting is TRUE
the log window will be attached to the bottom of the SCAL main window.
SECTION FLOGRID
SUBSECT LOG_WINDOW
LOG_IN_MAIN_WINDOW TRUE

228

Configuring SCAL
SECTION FLOGRID

SCAL User Guide

Glossary
Appendix E

A
Assignment group
This is the group in the Keyword Generator which is used to write the list of saturation
function table keywords. Table numbers in the generated properties, for example SATNUM, refer
to the index of a particular record in the assign group.

Association
Records are said to be associated when they are linked so that data required by one record can
be found by looking up the associated record. The records are linked by the ASSOCIATE
attribute which contained the ID of the associated record. Association is used to link oil-water
and oil-gas data together. This is needed in three-phase systems when writing the saturation
function keywords or calculating the three-phase relative permeability surfaces.

Attribute
An attribute is a single item of data. A record holds a list of attributes. Attributes may be of
different types - text, choice, boolean, integer, scalar, table or surface. Typical examples are
SAMPLENAME which holds the name of a core sample, or KOSWI which holds the
permeability of a sample.

C
Calculator
The Calculator is a programming language with access to the internal data within SCAL. It is
used in various ways within SCAL to extend the built in functionality.

SCAL User Guide

Glossary

229

D
Derived data
This is data that is calculated from real data. Examples are fractional flow curves and
derivatives. Derived data may not be edited. It is displayed on the small graphs and via the
Derived Data button on the Table panel in the Record Editor.

G
Generate group
This is the group in the Keyword Generator which is used when generating the table number
or end point scaling properties. Records in the generate group should have appropriate property
specifiers (ranges) set. The generate group should be the same as the assignment group, or a
subgroup of it.

Group
See "Record group" on page 231.

M
Merging
Merging is the process of combining two records into a new third record. It is used to produce
records containing relative permeability and capillary pressure data ready for writing simulator
table keywords such as SWOF.
The two records being merged are known as primary and secondary. If a particular attribute is
set in both the primary and secondary records then the value from the primary record is used.

P
Property specifier
The property specifier specifies the ranges or values of a property where data from a particular
record should be used. It corresponds to the data on the Ranges panel of the Record Editor and
is used when generating properties.

Primary records
See "Merging" on page 230.

230

Glossary

SCAL User Guide

R
Record
The record is the primary SCAL data structure. It consists of lists of attributes, supplements and
property specifiers. In most cases it can be considered to contain the results of a single core
experiment in a single core sample. Records are organized into groups.

Record group
A record group is a list of records. Records may be grouped by the user according to various
criteria. The group structure typically represents the results of the analysis done by the user.
Group names must be unique.

Relationship records
These are records whose primary data are correlations derived from other records. They may be
used for transforming properties.

Root group
This is a special group containing all records in the system. It contains subgroups according to
the actual data in the records. Records may not be moved within the root group, however they
may be deleted. The root group is the group in the top left of the record tree.

S
Secondary records
See"Merging" on page 230.

Supplement
A supplement, or supplemental attribute, is an attribute defined by the user, or in the input file.
Once defined supplements may be used in the same way as standard attributes. They provide a
way of handling non standard data within SCAL.

SCAL User Guide

Glossary

231

232

Glossary

SCAL User Guide

Bibliography
Appendix F

Enhanced Reservoir Description: Using Core and Log Data to Identify Hydraulic (Flow)
Units and Predict Permeability in Uncored Intervals/Wells
[Ref. 1]

Amaefule, Jude O.,


Altunbay, Mehmet,
Tiab, Djebbar, Kersey,
David G., Keelan, Dare
K.

Presented at 68th Annual Technical Conference and Exhibition, SPE 26436, 1993.

Archie, G. E.

Classification of Carbonate Reservoir Rocks and Petrophysical Considerations

[Ref. 2]

Bull. AAPG 36, Page 278-298, Feb.1952.

Chierici G. L.

Novel Relations for Drainage and Imbibition Relative Permeabilities

[Ref. 3]

Soc. of Pet. Eng. J. , Page 275-276, June 1984.

Press, Vetterling,
Teukolsky and
Flannery
Welge

Numerical Recipes

[Ref. 4]

Cambridge University Press, 2nd Edition

AIME 195

[Ref. 5]

, , , , , Page 91-98, 1952

Stone

Trans. AIME, 249

[Ref. 6]

, Page 214-218, 1970

Stone

J. Can. Pet. Tech.,12

[Ref. 7]

, Page 53-61, 1973

Marek, B.F.,
Hartman, K.J.,
McDonald, A.E.
Craig, F. F., Jr.

Three-Phase Relative Permeability of Limestones Having Bimodal Pore-Size Distribution [Ref. 8]


SPE 21374 , SPE Middle East Oil Show, Bahrain 1991

Reservoir Engineering Aspects of Waterflooding

[Ref. 9]

SPE Monograph Vol. 3, ,

SCAL User Guide

Bibliography

233

234

Bibliography

SCAL User Guide

Index
Appendix G
Numerics
3D 3-Phase Rel. Perm. Viewer45
3D Grid Viewer. . . . . . . . . 98
3-Phase Rel. Perm. . . . . . . 45
3-Phase Relative Permeabilities143
3-Phase Relative Permeability131
3-Phase Relative Permeability Surfaces
158

Attributes . . . . . . 52, 57, 229


Autonormalize . . . . . . . . . 121
Autosave . . . . . . . . . . . . . . 56
Available tutorials . . . . . . . 20
Average. . . . . . . . . . . . . . . 74
Averaging curves . . . . . . . . 66
AVS file . . . . . . . . . . . . . 135
Axes, configure . . . . . . . . 124
Axes, Flip X . . . . . . . . . . 126

C
caAutoDirName . . . . . . . 210
caAutoFileName. . . . . . . 210
caAutoRun. . . . . . . . . . . 210
Caching, Rotation . . . . . . 127
Calculate button . . . . . . . . 88
Calculator135 to 136, 140, 169, 229
file name. . . . . . . . . . 85
log . . . . . . . . . . . . . . 50
path . . . . . . . . . . . . . 47
symbols . . . . . . . . . 180

abs . . . . . . . . . . . . . . . . . 178

Bad Group. . . . . . . . . . . . . 41

Camera Rotation. . . . . . . 122

acos . . . . . . . . . . . . . . . . 178

Bad Records . . . . . . . . . . . 41

Cascade . . . . . . . . . . . . . 215

Add

Boundaries
Volume of Interest. . . 113

Case Sensitivity . . . . . . . 170

Bounding Box
Rotation. . . . . . . . . . 127
Turning on . . . . . . . . 124

Cell Face Display . . . . . . .114

Pause . . . . . . . . . . . 102
AND . . . . . . . . . . . . . . . 180
antilog10 . . . . . . . . . . . . 178
Archies parameters. . . . . . 94
ASCII files . . . . . . . . . . . . 50
asin . . . . . . . . . . . . . . . . 178
Assignment Group . . 88, 229
Associate Records . . . . . . . 48
Associating. . . . . . . . . 95, 97

break . . . . . . . . . . . 173, 176


breakpoints . . . . . . . . . . . 211
Building correlations . . . . . 65
Built in functions . . . . . . . 208
Built-in Functions . . . . . . 178

Calculator symbols . . . . . 180

Cell Display . . . . . . . . . . .114


Cell Probe . . . . . . . . . . . 103
Cells . . . . . . . . . . . . . . . . 64
Clear . . . . . . . . . . . . . . . . 57
Clear All Data . . . . . . . . . 47
Clone Group. . . . . . . . . . . 44
close . . . . . . . . . . . . . . . 173
Collection . . . . . . . . . . . . 35

Association. . . . . . . . . . . 229

colon . . . . . . . . . . . . . . . 184

atan . . . . . . . . . . . . . . . . 178

Color Legend
Editing . . . . . . . . . . .118

Attribute section . . . . . . . 159

SCAL User Guide

Index

235

Integer properties . . . 119


Real properties . . . . .120
Ternary Display . . . .121
Colors
Hardcopy . . . . . . . . .101
Command line . . . . . . . . . .15
Commands . . . . . . . 187, 209
Adding a Pause . . . . .102
Play Commands . . . .101
Recording the Current Position102

Delete point . . . . . . . . . . . 69

endproc. . . . . . . . .173 to 174

Deleting records & groups . 42

endwhile . . . . . . . . . 173, 176

Denormalize . . . . . . . . . . . 73

ENKRVD . . . . . . . . . . . . . 64

Denormalizing . . . . . . . . . 66

ENPTVD . . . . . . . . . . . . . 64

Derived Data . . . . . 141, 230

EPSILON . . . . . . . . . . . . 177

Description panel . . . . . . . 58

erf . . . . . . . . . . . . . . . . . 178

dimensional consistency . 185

erfc. . . . . . . . . . . . . . . . . 178

Directories . . . . . . . . . . . . 46

Exit . . . . . . . . . . . . . . . . . 47

Display menu . . . . . . . . . 117

EXP . . . . . . . . . . . . . . . . 177

Comments . . . . . . . . . . . .170

exp . . . . . . . . . . . . . . . . . 178

Common problems . . . . . . 211

expn . . . . . . . . . . . . . . . . 178

Compilation . . . . . . . . . . .172
Composite units . . . . . . . .184
Compress output . . . . . . . .90
CONFIG.ECL . . . . . . . . . 226
Configuring SCAL . . . . . .225
Constants. . . . . . . . . . . . .209
Context-sensitive information87
Continuation Character . . .170
Copy Range . . . . . . . . . . . .71

E
ECLIPSE
default . . . . . . . . . . 143
end point scaling property keywords
64
end point scaling values58
keywords . . . . . . . . 153
tables . . . . . . . . . . . . 86
tables (.RCP) . . . . . . . 46

Exponential . . . . . . . . . . . 139
Exponential (log) . . . . . . . 139
Express Interest Events. . . . 36

F
factorial . . . . . . . . . . . . . 178
FALSE . . . . . . . . . . . . . . 177

Correlations . . . . . . . . . . . .65

Edit . . . . . . . . . . . . . . . . . 51
Color Map. . . 119 to 120
menu . . . . . . . . . . . . 68
point . . . . . . . . . . . . . 69
Property . . . . . . . . . . 49
Range . . . . . . . . . . . . 70
Records. . . . . . . . . . . 68
Titles . . . . . . . . . . . 123
toolbar icon . . . . . . . . 57

cos . . . . . . . . . . . . . . . . .178

Edit menu. . . . . . . . . . . . . 68

Fractional flow . . . . . . . . 141

cosh . . . . . . . . . . . . . . . .178

Edit point . . . . . . . . . . . . . 69

FRAMEWORK options . . 226

Cross plot . . . . . . . . . . . . .52

Edit Range . . . . . . . . . . . . 70

func . . . . . . . . . . . . . . . . 173

cubic . . . . . . . . . . . . . . . .181

Editing records & groups . . 43

function arguments. . . . . . 174

Cubic spline. . . . . . . . . . .138

Editor. . . . . . . . . . . . . . . . 57

function example . . . . . . . 174

Curve fitting . . . . . . . . . . .61

ei . . . . . . . . . . . . . . . . . . 178

Function fitting/generating . 59

Cut Range . . . . . . . . . . . . .71

else . . . . . . . . . . . . . . . . 173

Functions . . . . 137, 170, 174

Copying & moving records & groups42


Copying vectors . . . . . . . .186
Core . . . . . . . . . . . . . . . . .35
Core name . . . . . . . . . . . . .38
Corey Oil-Gas . . . . . . . . .137
Corey Oil-Water . . . . . . . .137

File menu . . . . . . . . . . . . . 45
Fit panel . . . . . . . . . . . . . . 68
Fit settings. . . . . . . . . . . . . 60
Floating point variables . . 171
Floating point vector . . . . 171
Font Size. . . . . . . . . . . . . 226
fractional dimensions . . . . 212

End point linkage . . . . . . . 58


End point saturations . . . . . 58

D
Data Input Settings . . . . 49, 56
Debugging . . . . . . . . . . . . 211
Define Trace Information . .50
DEG . . . . . . . . . . . . . . . .177
Delete . . . . . . . . . . . . . . . .52
Delete inside box . . . . . . . .69

236

Index

End point scaling . . . . . . . 86


attributes . . . . . . . . . . 64
table loader . . . . . . . . 65
viewer. . . . . . . . . . . . 77
vs. depth tables . 64, 157
endfunc . . . . . . . . 173 to 174
endif . . . . . . . . . . . . . . . 173
End-point scaled curves . . . 66

G
GAMMA . . . . . . . . . . . . 177
gamma . . . . . . . . . . . . . . 178
Generate button . . . . . . . . . 88
Generate Group . . . . . 88, 230
Generate Keywords . . . . . . 48
Generate Pc curves. . . . . . . 93

SCAL User Guide

Generate settings. . . . . . . . 61

Insert point . . . . . . . . . . . . 69

Lands correlation . . . . . . 139

Getting Started . . . . . . . . . 15

Instance Numbers . . . . . . 216

Language Definition . . . . 170

global variables. . . . . . . . 211

int. . . . . . . . . . . . . . . . . . 178

Legend . . . . . . . . . . . . . . 67

Graph menu . . . . . . . . . . . 71

Integer properties . . . . . . . . 64

Leverett J function . . . .76, 90

Graph Settings . . . 49, 79, 81

Interpolate . . . . . . . . . . . . . 75

Leverett J function data . . . 62

Graph window . . . . . . 52, 66

Interpolating . . . . . . . . . . . 66

Lights . . . . . . . . . . . . . . 122

Graphics Options . . . . . . 126

Interpolation preferences . . 89

Limitations. . . . . . . . . .66, 84

Graphing record & groups data43

inverse units . . . . . . . . . . 184

LN10. . . . . . . . . . . . . . . 177

Grid Lines . . . . . . . . . . . 125

ITC. . . . . . . . . . . . . . . . . . 36

LN2. . . . . . . . . . . . . . . . 177

Grid menu . . . . . . . . . . . 102

ITC options . . . . . . . . . . . . 38

log. . . . . . . . . . . . . . . . . 178

Grid properties . . . . . . . . . 86

log10 . . . . . . . . . . . . . . . 178

Group . . . . . . . . . . . 51, 230

LOG10E . . . . . . . . . . . . 177

Group & record labelling . . 42


Group Cloner . . . . . . . . . . 44
Group Label . . . . . . . . . . . 52

LOG2E . . . . . . . . . . . . . 177

J Func . . . . . . . . . . . . . . . . 76
J Function . . . . . . . . . . . . . 90
J function . . . . . . . . . . . . . 90

J function conversion . . . . . 62

Main SCAL window . . . . . 39

j0 . . . . . . . . . . . . . . . . . . 178

Map Axes . . . . . . . . . . . 124

j1 . . . . . . . . . . . . . . . . . . 178

Menu options . . . . . . . .45, 68

JIndex . . . . . . . . . . . . . . . . 64

MenuPick . . . . . . . .187, 210

Hardcopy Colors . . . . . . . 101

JPEG, format . . . . . . . . . . 101

Merge Records . . . . . . . . . 48

Group section . . . . . . . . . 163


Group Sorter. . . . . . . . 51, 53

Hardware Renderer . . . . . 126

Merging . . . . . . . . . . .95, 230

HELP. . . . . . . . . . . . . . . 227

Merging records . . . . . . . . 43

Hide/Show Trees. . 40, 49, 52


Hysteresis. . . . . . . . . . . . 148

K
k0. . . . . . . . . . . . . . . . . . 178
k0e . . . . . . . . . . . . . . . . . 178

Min & Max columns . . . . . 64


Minimize Children . . . . . 216
Minimum residual oil saturation147
Misc. Group . . . . . . . . . . . 41

k1. . . . . . . . . . . . . . . . . . 178

i0 . . . . . . . . . . . . . . . . . . 178

Keyword descriptions. . . . . 90

i0e . . . . . . . . . . . . . . . . . 178

Keyword file . . . . . . . . . . 135

i1 . . . . . . . . . . . . . . . . . . 178

Keyword Generation . . . . . 86

i1e . . . . . . . . . . . . . . . . . 178

Keyword Generation Settings49, 89

if . . . . . . . . . . . . . . . . . . 173

Keyword Generator 43, 51, 86

Name conflicts . . . . . . . . .211

igamma . . . . . . . . . . . . . 178

Navigation graph . . . . . . . 68

igammac . . . . . . . . . . . . 178

Keywords . . . . . . . . 173, 208


ECLIPSE . . . . . . . . . 153

IIndex . . . . . . . . . . . . . . . 64

KIndex . . . . . . . . . . . . . . . 64

New developments . . . . . . . 9

IJK Slicer . . . . . . . . . . . . 110

Kr plot . . . . . . . . . . . . . . . 52

Normalize . . . . . . . . . . . . 73

k1e . . . . . . . . . . . . . . . . . 178

Mouse Buttons . . . . . . . . 127


Mouse Buttons, 2-Button Mouse128

Never ending while loops .211

Image, Save As... . . . . . . 100

Normalize curves . . . . . . . 66

Inactive Cells . . . . . . . . . 115

Normalized residuals. . . . . 61

include . . . . . . . . . . 173, 175


Input . . . . . . . . . . . . . . . 135
Input and output - example 175

SCAL User Guide

L
Label . . . . . . . . . . . . . . . . 51

NOT . . . . . . . . . . . . . . . 180
NumToString() . . . . . . . . 188

Index

237

O
Object Appearance . . . . . . 117
ONE_DIV_PI . . . . . . . . .177
ONE_DIV_SQRT2. . . . . .177
ONE_DIV_SQRTPI . . . . .177
Open . . . . . . . . . . . . . . . . .51
Open ECLIPSE (.DATA). . .46
Open Grid . . . . . . . . . . . . .45
Open Properties . . . . . . . . .46
Open Records . . . . . . . . . .45
Operators. . . . . . . . . 180, 208
Options . . . . . . . . . . . . . . .36
Options menu. . . . . . . . . . .48
OR . . . . . . . . . . . . . . . . .180
Other dialogs . . . . . . . . . . .38
Other enhancements . . . . . .10
Output . . . . . . . . . . . . . . .135
Output directory . . . . . . . . .46
Output keyword descriptions90
OUTPUT.PRT . . . . . . . . .174

P
Panel . . . . . . . . . . . . . . . .188

Plot style window . . . . . . . 67

read . . . . . . . . . . .173 to 174

PostScript . . . . . . . . . . . . . 98

Read error limit . . . . . . . . . 56

Power . . . . . . . . . . . . . . 139

Reading from file. . . . . . . 174

Power (log). . . . . . . . . . . 139

Record . . . . . . . . . . . . . . 231

presval . . . . . . . . . . . . . . 181

Record Associater . . . . . . . 48

Primary records. . . . . . . . 230

Record Editor . . . . 48, 57, 68

print . . . . . . . . . . . 173 to 174

Record Group . . . . . . . . . 231

Printing Expressions . . . . 212

Record Groups. . . . . . . . . . 40

printnr . . . . . . . . . 173 to 174

Record Labeller . . . . .51 to 52

proc . . . . . . . . . . . . . . . . 173

Record Merger. . . . . . . . . . 48

Procedures . . . . . . . 170, 174

Record Selector 43, 48, 51, 84

Procedures panel . . . . . . . . 58

Record Tree. . . . . . . . . 40, 52

Process. . . . . . . . . . . . . . . 85

Record types . . . . . . . . . . . 14

PROFILE.CAL . . . . . . . . 210

Record unit system. . . . . . . 56

Program Settings. . . . . 49, 56

Recording Position. . . . . . 102

Project
Author . . . . . . . . . . 227
Name . . . . . . . . . . . 227

Records & attributes. . . . . . 14

Properties . . . . . . . . . . . . . 86
Cell Probe . . . . . . . . 103
Display . . . . . . . . . . 102
Thresholding . . . . . . 104
Types . . . . . . . . . . . 116

Reference Section . . . . . . . 33
Relationship records. . . . . 231
Relative permeability controller panel
132
Relative permeability derivatives142
Renderers, Graphics . . . . . 126

Properties section . . . . . . 163

Restore Children . . . . . . . 216

Property specifier . . . . . . 230

Restore Workspace. . . . . . . 47

Property Transformer. . . . . 55

Restriction settings. . . . . . . 56

Property values . . . . . . . . . 90

Results panel . . . . . . . . . . . 58

Parallel conductance model145

return . . . . . . . . . .173 to 174

Paste Range . . . . . . . . . . . .71

Ribbon Window. . . . . . . . 215

Pause . . . . . . . . . . . . . . .189
Add . . . . . . . . . . . . .102
Pc . . . . . . . . . . . . . . . . . . .76
Pc curves, generate . . . . . . .93
Pc plot. . . . . . . . . . . . . . . .52

Q
quad. . . . . . . . . . . . . . . . 181
Quadratic . . . . . . . . . . . . 140
Question. . . . . . . . . . . . . 189

Pc-Reservoir . . . . . . . . . . .76
Permeability ratio . . . . . . .141

Right mouse button menu . . 43


Rock Analysis . . . . . . . . . . 35
Root Group . . . . . . . . 41, 231
Rotation Caching . . . . . . . 127
Rotation Controls
2-Button Mouse . . . . 128
setting Mouse Button functions127
Style . . . . . . . . . . . . 126

Perspective . . . . . . . . . . .121

PHI . . . . . . . . . . . . . . . . .177

radians . . . . . . . . . . . . . . 179

PI . . . . . . . . . . . . . . . . . .177

rand . . . . . . . . . . . . . . . . 178

PI_DIV_2 . . . . . . . . . . . .177

Range . . . . . . . . . . . . . . . 85

PI_DIV_4 . . . . . . . . . . . .177

Range operations. . . . . . . . 70

Picture Exaggeration. . . . .126

Ranges . . . . . . . . . . . . . . . 14

Play Commands . . . . . . . .101

Ranges panel . . . . . . . . . . 64

Save . . . . . . . . . . . . . . . . . 51

Play commands . . . . . . . . .45

raw . . . . . . . . . . . . 181, 185

Save interval . . . . . . . . . . . 56

238

Index

run file . . . . . . . . . . . . . . 187


Run time errors . . . . . . . . 172

SCAL User Guide

Save View
PostScript . . . . . . . . . 98

Starting SCAL . . . . . . . . . . 15

Table import. . . . . . . . . . 135

Startup files . . . . . . . . . . . 210

Table panel. . . . . . . . . . . . 68

Save Workspace . . . . . . . . 47

Statements. . . . . . . . . . . . 170

Tables . . . . . . . . . . . . . . . 86

Saving records & groups . . 42

Status bar . . . . . . . . . . . . . 68

Tables & functions . . . . . 153

SCAL . . . . . . . . . . . . 33, 37

Stone 1 (modified) . . . . . . 144

Tables... button . . . . . . . . . 58

SCAL input file (.RCI) . . 151

Stone 1 tables . . . . . . . . . 158

Tabular Data. . . . . . . 58 to 59

SCAL Loader . . . . . . . . . . 37

Stone 2 (modified) . . . . . . 145

tan. . . . . . . . . . . . . . . . . 178

SCAL options . . . . . . . . . 225

stop . . . . . . . . . . . . 173, 176

tanh . . . . . . . . . . . . . . . . 179

SCAL Properties Output File168

Straight line. . . . . . . . . . . 140

Target field. . . . . . . . . . . . 37

SCAL Tables Output File (.RCP)166

string . . . . . . . . . . . . . . . 173

Target Group . . . . . . . .44, 84

SCAL_GF . . . . . . . . . 33, 35

String concatenation. . . . . 171

Ternary Display . . . . . . . 121

Scalars . . . . . . . . . . . . . . 208

String constants . . . . . . . . 171

Text Edit Windows . . . . . 217

Secondary records . . . . . . 231

String variables . . . . . . . . 171

Text Editor . . . 50, 135 to 136

SECTION . . . . . . . . . . . 225

StringList . . . . . . . . . . . . 189

Text strings . . . . . . . . . . 170

Select Records . . . . . . . . . 48

StringListAt. . . . . . . . . . . 190

The . . . . . . . . . . . . . . . . 159

Selecting record & groups . 41

Strings . . . . . . . . . . . . . . 208

Three-Phase Rel. Perm. . . . 45

Semilog relative permeability141

StringToNum. . . . . . . . . . 190

Three-Phase Relative Permeabilities143

Set Sgcrit . . . . . . . . . . . . . 77

Structure . . . . . . . . . . . . . 170

Three-Phase Relative Permeability131

Set View. . . . . . . . . . . . . 121

Subgroups . . . . . . . . . . . . . 52

Settings . . . . . . . . . . . . . . 49

SubString . . . . . . . . . . . . 191

Three-Phase Relative Permeability


Surfaces . . . . . 158

Sgcrit . . . . . . . . . . . . . . . . 77

Suffix for new records . . . . 44

Thresholding Properties. . 104

Show J Func . . . . . . . . . . . 76

Supplement . . . . . . . . . . . 231

TIFF, format. . . . . . . . . . 101

Show Pc . . . . . . . . . . . . . . 76

Supplement section . . . . . 163

Tile . . . . . . . . . . . 215 to 216

Shrink . . . . . . . . . . . . . . 126

Supplement table definer . . 63

Time Animation . . . . . . . 108

SI . . . . . . . . . . . . . . . . . 184

Supplemental attributes . . . 58

Titles, Edit . . . . . . . . . . . 123

SimCellIDToIndex . . . . . 196

Supplements . . . . . . . . . . . 14

Toolbar . . . . . . . . . . . .51, 66

SimCreateEmptyProperty. 196

Supplements panel . . . . . . . 62

Toolbars. . . . . . . . . . . . . 126

SimGetPropReportSteps . 197

Supported operators . . . . . 180

Total mobility. . . . . . . . . 141

SimIndexToCellID . . . . . 198

swap . . . . . . . . . . . . . . . . 181

Transform Property. . . . . . 49

SimPropToVec . . . . . . . . 198

SWBKFF . . . . . . . . . 77, 142

SimVecToProp . . . . . . . . 199

Swbkff . . . . . . . . . . . . . . . 77

Translation Controls, 2-Button Mouse


128

sin . . . . . . . . . . . . . . . . . 178

Symbol functions . . . 181, 208

sinh . . . . . . . . . . . . . . . . 178
Slow execution . . . . . . . . 212

Syntax . . . . . . . . . . . . . . 170
Run time errors. . . . . 172

Small graphs. . . . . . . . . . . 67

Syntax error. . . . . . . . . . . 172

Software Renderer. . . . . . 126

Syntax error signalled on a valid line212

Sort . . . . . . . . . . . . . . . . . 51

System . . . . . . . . . . . . . . 191

Source Group . . . . . . . 44, 84

System directory . . . . . . . . 46

Transparency . . . . . . . . . .116
TRUE . . . . . . . . . . . . . . 177
Tutorials . . . . . . . . . . . . . 19
TWO_DIV_PI . . . . . . . . 177
TWO_DIV_SQRTPI . . . . 177

Special menu . . . . . . . . . . 73

sqrt . . . . . . . . . . . . . . . . 178

UASSOC.CAL . . . . . . . . 186

SQRT2 . . . . . . . . . . . . . . 177
srand . . . . . . . . . . . . . . . 178
Stack overflow . . . . . . . . 211

SCAL User Guide

T
Table. . . . . . . . . . . . . . . . . 68
Table export . . . . . . . . . . 136

UNDEFINED. . . . . .171, 177


Undo graph edit . . . . . . . . 70
Unit System . . . . . . . . . . 126

Index

239

Units . . . . . . . . 149, 184, 208

vintegrtrap . . . . . . . . . . . 182

Units example . . . . . . . . .184

vinterp . . . . . . . . . . . . . . 182

Units table . . . . . . . . . . . .184

vlaplace . . . . . . . . . . . . . 182

UNIX platforms . . . . . . . . .15

vlen . . . . . . . . . . . 181 to 182

Unzoom . . . . . . . . . . . . . .71

vlog . . . . . . . . . . . . . . . . 182

user . . . . . . . . . . . . . . . . .179

vlsqfit . . . . . . . . . . . . . . 182

usertype. . . . . . . . . . . . . .173

vmax . . . . . . . . . . . . . . . 182

Utilities menu . . . . . . . . . .50

vmaxdiff. . . . . . . . . . . . . 182
vmedian . . . . . . . . . . . . . 182
vmin . . . . . . . . . . . . . . . 182

vmindiff . . . . . . . . . . . . . 182

vabs . . . . . . . . . . . . . . . .181
vadd . . . . . . . . . . . . . . . .181
Value. . . . . . . . . . . . . . . . .85
Variable declarations. . . . .171
Variables . . . . . . . 170 to 171

vminus . . . . . . . . . . . . . . 182
vmultipy. . . . . . . . . . . . . 182
vnearest . . . . . . . . . . . . . 182
vnegate . . . . . . . . . . . . . 182
vnpv . . . . . . . . . . . . . . . 182

vwritecol. . . . . . . .173 to 174

W
Well . . . . . . . . . . . . . . . . . 35
Well name . . . . . . . . . . . . . 37
while . . . . . . . . . . . 173, 176
while example . . . . . . . . . 176
White space. . . . . . . . . . . 170
Window List . . . . . . . . . . 216
Window Menu . . . . . . . . . 215
Windows menu . . . . . . . . . 50
Wire Frame . . . . . . . . . . . 127
Working directory . . . . . . . 47
Workspace. . . . . . . . . . . . . 47
write . . . . . . . . . . .173 to 174

vceiling . . . . . . . . . . . . . .181

Volume of Interest
Boundaries . . . . . . . 113
Grid Cells . . . . . . . . 112
Selecting Domains . . 112

vcopy . . . . . . . . . . . 181, 186

Volume of interest (VOI) . . 87

vcopyconv . . . . . . . . 181, 186

vpolynom . . . . . . . . . . . . 182

vcopyraw. . . . . . . . . 181, 186

vpow . . . . . . . . . . . . . . . 182

X Edit . . . . . . . . . . . . . . . . 69

vdelete . . . . . . . . . . . . . .181

vrandomfill. . . . . . . . . . . 182

X Edit Range. . . . . . . . . . . 70

vderivpoly . . . . . . . . . . . .181

vreadcol . . . . . . . . 173 to 174

XYZ Exaggeration . . . . . . 126

vdivide . . . . . . . . . . . . . .181

vresize . . . . . 176, 181 to 182

Vectors . . 171, 173, 176, 208

vscale. . . . . . . . . . . . . . . 182

vexpon . . . . . . . . . . . . . .181

vscprod . . . . . . . . . . . . . 182

vfft . . . . . . . . . . . . . . . . .181

vset . . . . . . . . . . . . . . . . 182

vfloor . . . . . . . . . . . . . . .181

vshift . . . . . . . . . . . . . . . 182

View Grid . . . . . . . . . . . . .49

vsmooth . . . . . . . . . . . . . 183

vinc. . . . . . . . . . . . . . . . .181

vsolvematrix . . . . . . . . . . 183

vinclog . . . . . . . . . . . . . .182

vsort . . . . . . . . . . . . . . . 183

vinsert . . . . . . . . . . . . . . .182

vsubtract . . . . . . . . . . . . 183

vintegrpoly . . . . . . . . . . .182

vsum . . . . . . . . . . . . . . . 183

vsumsqr . . . . . . . . . . . . . 183

Zoom . . . . . . . . . . . . . . . . 71

variables . . . . . . . . . . . . . 211
vaverage . . . . . . . . . . . . .181

240

Index

writing to file. . . . . . . . . . 174

Y
Y Edit . . . . . . . . . . . . . . . . 69
Y Edit Range. . . . . . . . . . . 70
yn. . . . . . . . . . . . . . . . . . 179

SCAL User Guide

Você também pode gostar