Sei sulla pagina 1di 330

FLARENET 2004

Reference Manual
Contents
1 INTERFACE................................................................................................ 10
Terminology .......................................................................................................... 11
Menu Bar .............................................................................................................. 13
Toolbar................................................................................................................. 14
Status Bar ............................................................................................................ 15
Editing Data Views ................................................................................................. 16
Changing Column Width ..................................................................................... 16
Changing Column Order ..................................................................................... 17
Setting Preferences ................................................................................................ 18
General Tab ..................................................................................................... 18
Defaults Tab..................................................................................................... 20
Databases Tab.................................................................................................. 21
Reports Tab ..................................................................................................... 22
PFD Tab........................................................................................................... 23
Formatting Tab ................................................................................................. 24
Import/Export Tab ............................................................................................ 25
Windows Menu ...................................................................................................... 25
Help Menu ............................................................................................................ 26

2 CREATING AND SAVING CASES ................................................................. 27


Creating A New Case .............................................................................................. 27
Opening An Existing Case........................................................................................ 29
Saving A Case ....................................................................................................... 30

3 COMPONENTS............................................................................................ 31
Overview .............................................................................................................. 31
Selecting Components ............................................................................................ 32
Component Types ............................................................................................. 32
Component List................................................................................................. 32
Matching the Name String .................................................................................. 33
Removing Selected Components.......................................................................... 33
Adding/Editing Components..................................................................................... 33
Add Hypothetical Component/Edit Component View ............................................... 33

1 Interface 2
Editing Database Components............................................................................. 37
Estimating Unknown Properties ........................................................................... 37
Organizing the Component List ................................................................................ 38
Sorting the Component List ................................................................................ 38
Move Single Component..................................................................................... 38
Swapping two components ................................................................................. 38
Changing the Components.................................................................................. 38
Combining Components ..................................................................................... 38
Binary Interaction Parameters.................................................................................. 39

4 SCENARIOS ............................................................................................... 41
Overview .............................................................................................................. 41
Scenario Manager .................................................................................................. 42
Adding/Editing Scenarios......................................................................................... 43
General Tab ..................................................................................................... 43
Constraints Tab ................................................................................................ 44
Sources Tab ..................................................................................................... 45
Estimates Tab................................................................................................... 45
Scenario Tools ....................................................................................................... 47
Adding Single Source Scenarios .......................................................................... 47

5 PIPE NETWORK ......................................................................................... 48


Pipe Manager ........................................................................................................ 48
Ignoring/Restoring Pipes ......................................................................................... 49
Connections Tab ............................................................................................... 50
Dimensions Tab ................................................................................................ 51
Fittings Tab ...................................................................................................... 53
Heat Transfer Tab ............................................................................................. 54
Methods Tab .................................................................................................... 56
Summary Tab................................................................................................... 58
Multiple Editing ...................................................................................................... 59
Pipe Class Editor ............................................................................................... 60

6 NODES....................................................................................................... 61
Node Manager ....................................................................................................... 61
Ignoring/Restoring Nodes........................................................................................ 62
Connection Nodes .................................................................................................. 63
Connector ........................................................................................................ 63
Flow Bleed ....................................................................................................... 65
Horizontal Separator.......................................................................................... 67

1 Interface 3
Orifice Plate ..................................................................................................... 71
Tee ................................................................................................................. 74
Vertical Separator ............................................................................................. 77
Boundary Nodes .................................................................................................... 80
Control Valve.................................................................................................... 80
Relief Valve ...................................................................................................... 87
Source Tools .................................................................................................... 94
Flare Tip .......................................................................................................... 95

7 CALCULATIONS ......................................................................................... 99
Calculation Options ................................................................................................ 99
General Tab ..................................................................................................... 99
Scenarios Tab..................................................................................................102
Methods Tab ...................................................................................................103
Warnings Tab ..................................................................................................106
Initialization Tab ..............................................................................................109
Check Model....................................................................................................110
Starting The Calculations .......................................................................................111
Efficient Modeling Techniques .................................................................................112
Data Entry ......................................................................................................113
Calculation Speed ............................................................................................114
Sizing Calculations ...........................................................................................115

8 DATABASES ..............................................................................................116
Overview .............................................................................................................116
Database Features ................................................................................................117
Selection Filter.................................................................................................117
Maneuvering Through the Table .........................................................................118
Printing ..........................................................................................................118
Adding/Deleting Data........................................................................................118
Setting The Password ............................................................................................119
Pipe Schedule Database Editor ................................................................................119
Fittings Database Editor .........................................................................................121
Component Database Editor ...................................................................................122
Importing Component Data ...............................................................................122

9 VIEWING DATA AND RESULTS..................................................................124


Components Data .................................................................................................124
Scenarios Data .....................................................................................................125
Pipes Data ...........................................................................................................125

1 Interface 4
Sources Data........................................................................................................126
Nodes Data ..........................................................................................................127
Messages.............................................................................................................127
Problems Tab ..................................................................................................128
Data Echo Tab .................................................................................................128
Solver Tab ......................................................................................................129
Sizing Tab.......................................................................................................129
Loops tab........................................................................................................130
Pressure/Flow Summary ........................................................................................130
Compositions........................................................................................................131
Physical Properties ................................................................................................132
Profile .................................................................................................................133
Flow Map .............................................................................................................134
Scenario Summary................................................................................................136
Graph Control.......................................................................................................137
Control Tab .....................................................................................................138
Axes Tab ........................................................................................................139
ChartGroup Tab ...............................................................................................141
ChartStyles Tab ...............................................................................................143
Titles Tab........................................................................................................144
Legend Tab .....................................................................................................146
ChartArea Tab .................................................................................................148
Plot Area Tab...................................................................................................150
ChartLabel Tab ................................................................................................152
View3D tab .....................................................................................................154
Markers Tab ....................................................................................................155
Trace Window.......................................................................................................156

10 PFD ........................................................................................................157
Overview .............................................................................................................157
Object Inspection..................................................................................................159
PFD Toolbar .........................................................................................................159
PFD Toolbar Icons ............................................................................................159
Print Options ...................................................................................................161
Stream Label Options .......................................................................................162
Viewports Option .............................................................................................162
Installing Objects ..................................................................................................163
Connecting Objects ...............................................................................................164
Manipulating the PFD.............................................................................................164

1 Interface 5
Selecting PFD Objects .......................................................................................164
Unselecting Objects ..........................................................................................165
Moving Objects ................................................................................................165
Locating Objects on the PFD ..............................................................................165
Regenerate PFD ...............................................................................................165
Printing and Saving the PFD Image..........................................................................166
Changing the PFD View Options ..............................................................................167

11 PRINTING, IMPORTING AND EXPORTING .............................................168


Printing ...............................................................................................................169
FMT Files ........................................................................................................170
Location-Specific Printing ..................................................................................172
Printer Setup ...................................................................................................173
Import Wizard ......................................................................................................173
Import Data Layouts.........................................................................................173
Using the Import Wizard ...................................................................................174
Importing Source Data ..........................................................................................182
ASCII Text Files ...............................................................................................183
Importing HYSYS Source Data ...........................................................................187
Export Wizard.......................................................................................................189
Export Data Layouts ..............................................................................................189
Using the Export Wizard....................................................................................189
Import/Export Examples ........................................................................................198
Default XML Import ..........................................................................................198
Access Database Import Using Select Criteria.......................................................199
Import of Updated Source Data from Excel ..........................................................206
Export to Access Database For FLARENET 3.05 ....................................................209
Export Pipe Data Table to Excel..........................................................................210
Merge Cases Through Export/Import Wizards .......................................................213

12 AUTOMATION .........................................................................................215
Overview .............................................................................................................215
Objects................................................................................................................216
Object Hierarchy ..............................................................................................216
The FLARENET Type Library ...............................................................................217
Object Browser ................................................................................................217
Automation Syntax...........................................................................................220
FLARENET Object Reference ...................................................................................226
Application ......................................................................................................226
Bleed .............................................................................................................227

1 Interface 6
Bleeds ............................................................................................................228
Component .....................................................................................................228
Components ....................................................................................................230
Connector .......................................................................................................230
Connectors......................................................................................................231
ControlValve....................................................................................................231
ControlValves ..................................................................................................233
HorizontalSeparator..........................................................................................233
HorizontalSeparators ........................................................................................234
Nodes.............................................................................................................234
OrificePlate .....................................................................................................235
OrificePlates ....................................................................................................235
Pipe ...............................................................................................................236
Pipes ..............................................................................................................238
ReliefValve ......................................................................................................238
ReliefValves ....................................................................................................240
Scenario .........................................................................................................240
Scenarios........................................................................................................241
Solver ............................................................................................................242
Tee ................................................................................................................243
Tees...............................................................................................................243
Tip .................................................................................................................244
Tips ...............................................................................................................245
VerticalSeparator .............................................................................................246
VerticalSeparators............................................................................................246
Example – Automation In Visual Basic......................................................................247

A THEORETICAL BASIS................................................................................254
Pressure Drop.......................................................................................................254
Pipe Pressure Drop Method ................................................................................254
Fittings Pressure Change Methods ......................................................................262
Vapor-Liquid Equilibrium ........................................................................................271
Compressible Gas ............................................................................................271
Vapor Pressure ................................................................................................271
Soave Redlich Kwong........................................................................................272
Peng Robinson.................................................................................................273
Physical Properties ................................................................................................274
Vapor Density..................................................................................................274
Liquid Density..................................................................................................274
Vapor Viscosity ................................................................................................275
Liquid Viscosity ................................................................................................275
Thermal Conductivity........................................................................................278

1 Interface 7
Enthalpy .........................................................................................................278
Noise ..................................................................................................................282

B FILE FORMAT ...........................................................................................284


Import/Export Details ............................................................................................284
Process Descriptions .........................................................................................284
Definition File Formats ......................................................................................288
Recognized Objects and Items ...........................................................................294
FMT Files Format...................................................................................................309

C REFERENCES ............................................................................................317

D GLOSSARY OF TERMS ...............................................................................319


Adiabatic Flow ......................................................................................................319
Choked Flow.........................................................................................................319
Critical Pressure....................................................................................................319
Critical Temperature..............................................................................................319
Dongle ................................................................................................................319
Equivalent Length .................................................................................................319
Isothermal Flow ....................................................................................................320
MABP ..................................................................................................................320
Mach Number .......................................................................................................320
Node ...................................................................................................................320
Reduced Pressure .................................................................................................320
Reduced Temperature............................................................................................320
Scenario ..............................................................................................................321
Schedule .............................................................................................................321
Security Device.....................................................................................................321
Source ................................................................................................................321
Static Pressure .....................................................................................................321
Tailpipe ...............................................................................................................321
Total Pressure ......................................................................................................321
Velocity Pressure ..................................................................................................322

GENERAL INFORMATION..............................................................................323
Copyright.............................................................................................................323
Related Documentation..........................................................................................324

1 Interface 8
TECHNICAL SUPPORT...................................................................................325
Online Technical Support Center .............................................................................325
Phone and E-mail..................................................................................................326

INDEX ..........................................................................................................327

1 Interface 9
1 Interface

The FLARENET interface has been designed to give you a great deal of
flexibility in the way in which you enter, modify and view the data and results
which comprise your model of a flare system. This chapter describes the
various components of the FLARENET interface. If you need help with any
particular task, the on-line help can give you step-by-step instructions.

1 Interface 10
Terminology
The following view of the FLARENET screen shows most of the interface
components that you will encounter. The terminology used to describe these
components throughout this manual is given in the following table.
Fig 1.1

1 Interface 11
Term Definition
Button Most views contain buttons. They perform a specific action when
selected (either by clicking the left mouse button or via the appropriate
hot key combination).
Icon Icons are like buttons, they perform a specific action when selected (by
clicking the left mouse button).
Checkbox Data items or settings that have an On/Off status are indicated by
Throughout this checkboxes. Selecting the checkbox will turn it on, selecting it again will
manual whenever turn it off.
any reference is Data View A window that contains a non-editable view of the model data and/or
made to clicking on the calculation results.
a button, icon, or
menu item, unless view A modal window which allows you to enter the model data. You cannot
otherwise specified access any other element in the model until this form has been closed.
it refers to the left Drop-Down List A drop-down list is indicated by a down arrow next to a field. If you click
mouse button. on this arrow, a list of available options for that field will be displayed.
Input Field Data items that are alphanumeric in nature are entered into an input
field. In general, the data that is entered in a field is checked for validity
A modal view is before you can continue.
characterized by a Menu Bar The Menu Bar displays all of the program functions, which can be
single border and accessed by clicking on the appropriate menu item. This is described in
the absence of the more detail later in the chapter.
minimize/maximize
icons in the upper Modal/Non-Modal When a view is modal, you cannot access any other element in the
right corner of the View simulation until you close it. Non-modal views do not restrict you in this
view. A non-modal manner. You can leave a non-modal view open and interact with any
view has a double other view or menu item.
border, and has the Scenario Selector This drop-down list shows the current scenario selected for the case. On
minimize/maximize clicking the down arrow, located beside the field, a list of all the
icons. scenarios will be displayed.
Calculation Mode This drop-down list shows the current calculation mode selected.
Selector Clicking the down arrow allows you to choose from Rating, Design or
Debottleneck calculations.
Scroll Bar Whenever the information associated with a view or list exceeds what
can be displayed, you may move through the view or list by using the
scroll bar.
Scroll Button Part of the Scroll Bar, allowing you to slide the list up or down, or left or
right.
Status Bar This displays the current model status. For more information, see Status
Bar.
Title Bar Indicates the FLARENET file currently loaded.
Toolbar The Toolbar contains a number of controls (icons/buttons) which give
short-cut access to the most commonly used program functions. This is
described in more detail later in this chapter.
Tool Tip Whenever you pass the mouse pointer over one of the icons/buttons on
the toolbar, a Tool Tip will be displayed. It will contain a summary
description of the action that will take place if you click on that
icon/button.

1 Interface 12
Menu Bar
The menu bar allows access to all the program functions via menus and sub-
menus.
Fig 1.2

The menu bar contains commands for each of the main areas of program
functionality:

Menu Description
File Work with files (New, Open, Save), supply Case Description, import/export
files, print, adjust printer setup, and set preferences. Also a list of previously
opened cases is displayed at the bottom of the menu.
Build Access the Managers for Components, Scenarios, Pipes and Nodes.
Tools Access various FLARENET utilities.
Calculations Set calculation options and start calculations.
Database Manages the pipe schedule, pipe fittings, and pure component databases
and allows you to set a password.
View Look at summaries of the Data, the Results, and the Process Flow Diagram
(PFD).
Windows Arrange the display of windows (Cascade, Tile, etc.)
Help Access on-line help and program version information.

1 Interface 13
As an alternative to using the mouse to click on the menu item, you can hit
the ALT key, then the underlined letter key. For example, to import source
data from the HYSIM process simulator as shown above you would hit the ALT
key, and then while holding down the ALT, press the F, I and H keys in
sequence (abbreviated as ALT F I H).

Toolbar
The Toolbar contains a set of controls which give short-cut access to some of
the program functions without the need to navigate through a series of
menus and/or sub-menus.

Name Icon Description


New Case Starts a new case.

Open Case Opens a case that has been previously saved to


disk.

Save Case Saves a case to disk using the current file name. If
you want to save the case with a different file
name, use the Save As command in the File menu.
Print Data and Results Opens a Print view, which allows you to print the
entries from the Database, Data and Results
groups. You can either print to a printer or to a file.
Display Metric Units Displays data and results in Metric units.

Display British Units Displays data and results in British units.

Display PFD Displays the Process Flow Diagram.

Display Pipe Data View Displays the Pipe data view.

Display Source Data View Displays the Source data view.

Display Node Data View Displays the Node data view.

Open Pressure/Flow Summary Displays the Pressure/Flow Summary view.


View

Open Profile Graphical View Displays the graphical Profile view.

Start Calculations Starts the FLARENET calculations.

Stop Calculations Stops the FLARENET calculations.

1 Interface 14
There are also two drop-down lists in the toolbar:

Name Description
Calculation Mode This drop-down list selects and displays the current calculation mode.
Selector The options are:
Rating - It is used to check the existing flare system in a plant. This
method calculates the pressure profile for the existing pipe network.
Design - It is used to design a new flare system for the plant. During
calculation it adjusts the diameters of all pipes until all the design
constraints of MABP velocity, etc. have been met. These diameters can
be smaller than the initially defined data.
Debottleneck - It is used to determine which areas of the flare system
must be increased in size due to either the uprating of the existing plant
and hence flare loading, or the tie-in of new plant. This mode can only
increase pipe diameters from their current size, it cannot reduce them.
Scenario Selector This drop-down list show the current scenario selected for the case. On
clicking the down arrow, located beside the field, a list of all the scenarios
will be displayed.

The Tool Bar can be hidden by unchecking the Show Toolbar checkbox in the
Preferences view.

Status Bar
Fig 1.3

1 Interface 15
The status bar displays the current status of the model. There are two general
regions in the status bar:
• The first region displays the program status - If Edit is displayed, you can
The calculation time
can be reduced by
make changes to your model. After calculations, this field will display
hiding the status bar, Done.
which is particularly • The second region displays important information during calculations, such
useful for large cases.
as the iteration error and the current pipe being solved.
Note: The Status Bar can be hidden by unchecking the Show Status
Bar checkbox in the Preferences view.

Editing Data Views


You can change the position and width of some of the columns in each of the
data views such as the Pressure/Flow Summary view.

Changing Column Width


To change the width of a column, move the mouse pointer until it is over the
vertical column separator line to the right of the column that you want to
resize (e.g. Flowrate). The mouse pointer will change to a double-headed
arrow.
Fig 1.4

Click and hold down the primary mouse button, then drag the separator line
to the new position.
The column width set here remains in effect for the duration of the current
session and is saved when you exit FLARENET.

1 Interface 16
Changing Column Order
To reposition columns, first select the columns by positioning the mouse
pointer in the column heading(s) (you will see a down arrow), then clicking.
The column heading will now be shaded.
Fig 1.5

Now click anywhere in the shaded region and hold down the primary mouse
button. The move column cursor will be shown, and there will be its now two
colored arrows either side of the header which contains the cursor. While
holding down the mouse button, drag the column(s) to their new position.
The two colored arrows either side of the header will move as you drag the
column(s) and indicate where the selected column(s) will be transferred. In
this case, the Mass Flowrate and the Molar Flowrate columns will be
positioned between the Noise and the Source Back Pressure columns.
Fig 1.6

Release the mouse button. The selected column(s) will remain in their new
location within the data view.
Note: You can highlight multiple columns by clicking and dragging
the mouse over the adjacent columns you want to select.
Alternatively, you could hold the SHIFT key and click on the
additional adjacent columns you want to select.

1 Interface 17
Fig 1.7

The change in column order remains in effect for the duration of the current
session and is saved when you exit FLARENET.

Setting Preferences
The Preferences view allows you to specify default information for the
simulation case.
To access the Preferences view, select Preferences from the File menu (ALT
F P). The Preferences view will be displayed.

The information on the Preferences view is divided into different tabs:


General, Defaults, Databases, Reports, Import/Export and PFD tab.

General Tab
Fig 1.8

1 Interface 18
The following fields are available on this tab:

Options Description
Show Status Bar Select this checkbox to display the Status bar. Unchecking this
option to hide the Status Bar can speed up calculations in large
cases.
Show Tool Bar Activate this checkbox to display the Tool bar.
Timed Backup Select this checkbox to activate a periodically backup of the
current case. File is saved back to the directory as Backup.fnw.
Backup Frequency This field is only accessed if the Timed Backup checkbox is
selected. The default value is 10 minutes.
Compress Files If checked, the data files will be saved in a compressed format
that can reduce the file size of the saved cases by a factor of up
to 50.
Edit Objects On Add On activating this checkbox, the editor view will be displayed as
the nodes/pipes are added to the PFD.
Units Specify the units set to be used for the simulation. The available
unit sets are Metric and British.
Work Directory Specify the directory for temporary files, which should be
writeable.
Auto Flash Source Nodes Activate the Auto Flash Source Nodes checkbox to automatically
flash the source fluid when it is edited. Otherwise sources are
flashed during the calculation.
Display Total Pressure Select this checkbox to display the total pressure, which is a sum
of the static pressure and the velocity pressure, instead of the
static pressure.
Display Velocity Properties Select this checkbox to display properties that are velocity
Used By Pressure Drop dependant based upon the velocities derived from rated flow
Calculation rather than from the nominal flow.
Save Phase Properties Phase properties can be saved by activating this checkbox. The
disk space/memory requirements are significantly effected by
this option, especially for large cases. It is advised to select this
option only if you have a high specification PC.
Hide Results For Selecting this option will hide the results for pipes that have not
Uncalculated Pipes been calculated in the last run of the model. This prevents
cluttering of the results view with uncalculated values from
sections of the flare network that might have been ignored.
Trace Buffer Size This field specifies the size in bytes of the text buffer displayed
by the Trace window. Larger values will allow more text to be
stored. The default value of 32000 is adequate for most cases.

1 Interface 19
Defaults Tab
Fig 1.9

The default data


values given on the
Default tab applies
only to new instances
of pipe class of pipes
and nodes. The value
for each instance may
be freely edited at any
stage.

The options available on this tab are:

Options Description
Composition Basis Select composition basis for each of the relief sources:
Molecular Weight - The molecular weight of the fluid is given. Mole
fractions are estimated by FLARENET, based upon the list of installed
components.
Mole/Mass Fractions - A full component-by-component composition
must be given for the fluid.
Tee Type Select the tee type to be set as a default for all the tees in the model.
The available tee types are 90o, 60o, 45o and 30o tee.
CS = Carbon Steel
Pipe Material This is the default material to be used in new pipes. The two materials
SS = Stainless Steel available for selection are Carbon Steel and Stainless Steel.
Use Pipe Class Activate this checkbox to use the pipe class to restrict the available
uses for pipes.
CS/SS Roughness Set the material roughness to be used in calculation. The default CS
Roughness is 0.04572 mm and SS Roughness is 0.02540 mm.

1 Interface 20
Databases Tab
The databases for the Components, Pipe Schedules and Pipe Fittings can
be specified here.
Fig 1.10

If the Save Database Directories With Model check box in checked then
these locations are stored with the model. This is useful if the databases have
been modified for use with specific models.

1 Interface 21
Reports Tab
You can specify the directories in which to save the report definition for each
of the entries in the Report list
Fig 1.11

If the Save Report Format Paths With Model check box in checked then
these locations are stored with the model. This is useful if the report formats
have been modified for use with specific models.

1 Interface 22
PFD Tab
Fig 1.12

The options available on this tab are:

Option Description
Use Wire Frame Icons When selected, pipe and node icons in the PFD are drawn as
wireframe outlines rather than shaded pictures. Selecting this option
can speed the drawing of the PFD for large models. If the PFD is
already open it must be closed and reopened to see the change.
Font Name Allows selection of the font to be used for pipe and node labels in the
PFD.
Font Size Allows definition of the size of the font used for pipe and node labels
in the PFD.
2.5 x Scale factor The factor to be used by FLARENET to scale the PFD when importing
models created in earlier versions of FLARENET.

1 Interface 23
Formatting Tab
Fig 1.13

The options available on this tab are:

Option Description
Data Formatting
Group
Display Using Activate this check box to display all results to a number of significant
Significant Figures figures rather than to a fixed number of decimal places.
Sig. Figures The number of significant figures used for the display of results.
Printing Group
Use Header Activate this check box to add a header at the top of each printed
page.
Use Footer Activate this check box to add a footer at the Bottom of each printed
page.
Binding margin A margin of this size is placed along the long side of printouts to allow
for binding.
Tiled Scale Factor For tiled printouts of the PFD view, the diagram will be scaled by this
factor. Larger values will tile the printout over more pages.

1 Interface 24
Import/Export Tab
You can specify the name and location of the Import and Export definition
files to be used when transferring information between FLARENET and Access,
Excel or XML files. Entries allow specification of the default definition files and
the base definition files to be used for creating new customized import export
definition files.
Fig 1.14

If the Save Import/Export Paths With Model check box in checked then
these locations are stored with the model. This is useful if the definition files
have been modified for use with specific models.

Windows Menu
This is a general Windows application function. The options are:

Option Description
Cascade Cascade all currently-open windows.
Tile Horizontally Tile all currently-open windows horizontally.
Tile Vertically Tile all currently-open windows vertically.
Arrange Icons Organize icons at the bottom of the screen.
Open All Open all the windows, which can be accessed through the View menu bar
Close All Close all windows.

1 Interface 25
Help Menu
The options under the Help menu are:

Option Description
Contents Displays the FLARENET Help contents.
Using Help Displays the general Windows Help on using Help.
Technical Support Displays a list of world wide Technical Support offices.
About The About option displays the About FLARENET view.

Fig 1.15

1 Interface 26
2 Creating and Saving
Cases

Creating A New Case


When you start FLARENET, the Desktop area will be blank. Before you can
When you start
FLARENET, a new work, you must either create a new case, or retrieve a saved case.
case is automatically
created.
To start a new case, do one of the following:
• Select New from the File menu in the menu bar.
• Use the hot key combination ALT F N.

• Click on the New Case icon in the toolbar.


The Case Description view will be displayed.
Fig 2.1

2 Creating and Saving Cases 27


Enter appropriate data into the User Name, Job Code, Project, and
Description fields and then click the OK button.
Note: The case description can be modified later by selecting
Description from the File menu.

After you enter the case description information, the Component Manager
view appears as shown in the figure below:
Fig 2.2

Select the desired components as described in Components and click OK. You
can now set up the simulation.

2 Creating and Saving Cases 28


Opening An Existing Case
When you open a case that has previously been stored on disk, all data from
the current case is cleared; however, the arrangement of any windows that
are already open is maintained.
To open an existing case, do one of the following:
• Select Open from the File menu.
• Use the hot key combination ALT F O.

• Click the Open Case icon on the toolbar.


The File Open view appears.
Fig 2.3

Select the file to be opened by doing one of the following:


• Type the file name (including exact directory path if necessary) into the
Filename field and click the OK button.
• Search the directory using the Look in drop-down menu and upon finding
the file, click once on the file name to highlight it and then click the OK
button.
• Search the directory using the Look in drop-down menu and upon finding
the file, double click the file name.
It is also possible to open a recently used file by selecting it from the list at
the bottom of the File menu.

2 Creating and Saving Cases 29


Saving A Case
Cases may either be saved using the current case name or under a new
name.
To save a case using the current file name, do one of the following:
• Select Save from the File menu.
• Use the hot key combination ALT F S.

• Click on the Save Case icon on the toolbar.


To save a case using a new name, do one of the following:
• Select Save As from the File menu.
• Use the hot key combination ALT F A.

When you’re saving the case for the first time or with a new name, the Save
FLARENET Model view will appear as shown in Figure 2.4.
Fig 2.4

Select the file to be


saved by directly
entering it, or
selecting the
appropriate file from Clear the Filename field, type in the file name you want to give to the case in
the list in the view and click on the OK button.
which contains all the
files and folders. The Note: You do not have to include the .fnw extension. FLARENET will
Save in drop-down add it on automatically.
list can be used to
change the directory
and/or drive. You will be asked to confirm that you want to overwrite if an
existing file is named.

2 Creating and Saving Cases 30


3 Components

Overview
Data for all components that will be used in the simulation must be selected
before the sources are defined. These components may be taken from the
standard component library, or you may define your own components, known
as hypothetical components.
You may select components from the Component Manager, which can be
accessed by selecting Components from the Build menu.
The Component Manager view will be displayed:
Fig 3.1

This view displays all of the Database and Selected components, and
provides various tools which you can use to add and edit database and
hypothetical components.

3 Components 31
Selecting Components
Component Types
You may filter the list of available components to include only those belonging
to a specific family. The All and None buttons turn all of the filters on and
off, respectively, while the Invert button toggles the status of each checkbox
individually. As an example, if only the Hydrocarbons (HC) and Misc options
were on, and you pressed the Invert button, then these two options would
be turned off, and the remaining options would be turned on.

Component List
Components can be chosen from the Database list, and added to the
Selected group, using one of the following methods:
• Arrow Keys - The <K> or <I> arrow keys move the highlight up one
component, and the <L> or <J> arrow keys move the highlight down
one component.
• PageUp/PageDown - Use these keyboard keys to advance an entire
page forward or backward.
• Home/End - The <Home> key moves to the start of the list and the
<End> key moves to the end of the list.
• Scroll Bar - With the mouse, use the scroll bar to move up and down
through the list.
• Enter a character - When you type a letter or number, you will move to
the next component in the list which starts with that character. If you
repeatedly enter the same character, you will cycle through all of the
components which start with that character.
You can highlight Note: You can select multiple components by using the SHIFT or
multiple components
CTRL keys as you select components.
to add to the Selected
list using the normal
windows SHIFT-click To add a component, you must first highlight it (by moving through the list
and CTRL-click options until that component is highlighted), then transfer it by double-clicking on it
in the Database list.
or clicking the Add button.

3 Components 32
Matching the Name String
Another way to add components is through the Selection Filter feature. The
The interpretation of
your input is limited
Selection Filter cell accepts keyboard input, and is used to locate the
to the Component component(s) in the current list that best matches your input.
Types which are
checked. You may use wildcard characters as follows:
• ? - Represents a single character.
• * - Represents a group of characters of undefined length.
• Any filter string has an implied '*' character at the end.
Some examples are shown here:

As you are typing into


Filter Result
the Selection Filter methan methanol, methane, etc.
cell, the component
list is updated, *anol methanol, ethanol, propanol, etc.
matching what you ?-propanol 1-propanol, 2-propanol
have presently typed.
*ane methane, ethane, propane, i-butane, etc.
You may not have to
enter the complete
name or formula
before it appears in Removing Selected Components
the component list.
You can remove any component from the Selected Component list:
1 Highlight the component(s) you want to delete.
You can select 2 Click either the Delete button on the Component Manager view, or press
multiple components the DELETE key.
using SHIFT-click and
CTRL-click options. Once the component(s) are removed from the list, any source compositions
that used this component will be normalized.

Adding/Editing Components
To create a new component (hypothetical), click the Hypothetical button.
Hypothetical components are set up in the same manner as database
components. Previously defined hypothetical components can be changed by
selecting them in the Selected Component list and then clicking the Edit
button.

Add Hypothetical Component/Edit


Component View
Upon clicking either the Hypothetical button or the Edit button the
Component Editor view opens up.

3 Components 33
Identification Tab
The minimum data requirements for creating a component are specified here:
Fig 3.2

Component Types: The following fields are available on this tab:


Hydrocarbon
Miscellaneous
Amine Input Field Description
Alcohol Name An alphanumeric name for the component (e.g. - Hypo -1). Up to 15
Ketone characters are accepted.
Aldehyde Type The type of component (or family) can be selected from the drop-down menu
Ester provided. There is a wide selection of families to choose from, which allows
better estimation methods to be chosen for that component.
Carboxylic Acid
ID The ID number is provided automatically for new components and cannot be
Halogen
edited.
Nitrile
Mol. Wt. The molecular weight of the component. Valid values are between 2 and 500.
Phenol
NBP The normal boiling point of the component.
Ether
Std. Density The density of the component as liquid at 1 atm and 60 F.
Watson K The Watson characterization factor.

3 Components 34
Critical Tab
Critical properties are specified here.
Fig 3.3

The following fields are available on this tab:

Input Field Description


Critical Pressure The critical pressure of the component. If the component represents
more than a single real component, the pseudo critical pressure
should be used. Valid values are between 0.01 bar abs and 500 bar
abs.
Critical Temp. The critical temperature of the component. If the component
represents more than a single real component, the pseudo critical
temperature should be used. Valid values are between 5 K and 1500
K.
Critical Volume The critical volume of the component. If the component represents
more than a single real component, the pseudo critical volume should
be used. Valid values are between 0.001 m3/kg and 10 m3/kg.
Acentric Factor The acentric factor of the component. Valid values are between -1
and 10.
Acentric Factor (SRK) The Soave-Redlich-Kwong acentric factor of the component (also
called the COSTALD Acentricity).

3 Components 35
Other Tab
Coefficients for the polynomial equations for the prediction of Ideal Gas
thermodynamic properties and parameters for the viscosity calculations are
specified here:
Fig 3.4

The following fields are available on this tab:

Input Field Description


Hi A, Hi B, Hi C, Hi D, Hi E, and Hi F The coefficients for the ideal gas specific enthalpy
equation:
H = A + BT + C T 2 + DT 3 + ET 4 + F T 5
i

Entropy Coef. The coefficient for the entropy equation.


Viscosity A and Viscosity B Viscosity coefficients used in the NBS Method (Ely and
Hanley, 1983).

3 Components 36
Editing Database Components
If you want to change the data for one of the database components, e.g.
Methane, you will find that opening the Component Edit view for this
component will display read only values that cannot be changed.
Fig 3.5

In order to update the data for a database component it must first be


changed to a hypothetical component.
This is done by clicking the Hypothetical button on the Component Editor
At the very minimum,
view. FLARENET will convert the displayed database component to a
you need to specify
the Molecular Weight. hypothetical as indicated by the adding of a * character to the name and by
However, it is a good changing the component ID to -1. The data values can then be updated.
practice to specify at
least two of the
following properties:
Estimating Unknown Properties
Molecular Weight
If any of the above data is unknown, then click Estimate to fill-in the
Normal Boiling Point unknown properties.
Standard Density Supply as many properties as are known, so that the estimation can be as
accurate as possible.

3 Components 37
Organizing the Component List
The Selected Components list can be organized in the following different
ways.

Sorting the Component List


The Sort button allows the whole component list to be sorted by the criteria
selected from the following pop up list:

Sorting Option Description


Name Arranged components alphabetically in descending order.
Molecular Weight Components are listed according to increasing molecular weight.
Normal Boiling Point (NBP) Select this to arrange components in increasing NBP value.
Group Group the components by type.

Move Single Component


A single component may be moved up and down the list by clicking on it in
the list of selected components and then clicking either the up or down arrow
buttons.

Swapping two components


In the Component Manager view, select the first component in the Selected
Component list by clicking on it. Then select the second component either
using the SHIFT key if the two are in sequence or pressing the CTRL key and
then clicking on the component. Swap the two components by clicking the
Swap button.

Changing the Components


You can switch the components in the Selected Component list with the
ones in the Database list while maintaining the source mole fractions.
In the Component Manager view, select the components in both the Selected
Components and the Database lists. Click the Change button to switch the
two components.

Combining Components
Multiple components can be combined and represented by a single component
to reduce the number of components in the model.
This is done by selecting the components you want to combine by control-
clicking them in the Selected Components list and then clicking the
Combine button. A pop-up view will then ask you to select which of these
combined components should be used as the target component to combine

3 Components 38
your selected components into. Once the target component has been selected
the combined components will update each source in the model by summing
the composition of all of the combined components and assigning it to the
target component.
Reducing the number of components in this way is useful since it can greatly
speed the calculations. This is especially true where a model contains sources
defined with a long list of hypothetical components.
For example consider a model containing the hypothetical components BP200,
BP225, BP250, BP275, BP300 boiling at 200 °C, 225 °C, 250 °C, 275 °C and
300 °C respectively. Since these components are likely to stay in the liquid
phase throughout the flare system, they may be combined into a single
component, BP250 without significant loss of accuracy. As another example,
in a purely gas phase flare system it is possible to combine isomers such as i-
Butane and n-Butane into a single component n-Butane without
compromising results.

Binary Interaction Parameters


Binary Interaction Coefficients, often known as KIJ’s are factors that are used
in equations of state to better fit the interaction between pairs of components
and hence improve the accuracy of VLE calculations. FLARENET allows the
user to specify binary interaction parameters for the Peng Robinson and
Soave Redlich Kwong VLE methods or to estimate them through the Binary
Coeffs tab of the Component Manager view as shown here.
Fig 3.6

3 Components 39
To define binary interaction coefficients first select either the Peng Robinson
or Soave Redlich Kwong VLE method using the drop-down list at the top of
the view.
Note: Binary interaction coefficients are not used by either the
Ideal Gas or Lee Kesler VLE methods at present. The view will show
the binary interaction coefficient matrix for the selected VLE
method.

Individual binary interaction parameters are set by selecting the required


entry in the matrix and typing in the new value.
Note: The matrix is symmetrical i.e. KJI is the same value as KJI and
updating an entry will also update the corresponding entry in the
table. E.g. updating the entry in the Methane column, Propane row
will also update the entry in the Propane column, Methane row.

Individual binary interaction parameters may be estimated by selecting the


required entry in the matrix and clicking the Estimate button. The estimation
method is based on the components boiling point, standard liquid density and
critical volume.
It is possible to set several binary interaction parameters at the same time
either by clicking the Select All button to select the whole matrix or by
control-clicking the two corners of a rectangular area in the matrix. The
selected entries can then be estimated by clicking the Estimate button or set
to 0.0 by clicking the Zero HC-HC button.
The Reset All button causes all interaction parameters to be set to their
default values. Generally this is 0.0 for hydrocarbon components with non
zero values being supplied only for common polar components.
If the Auto Estimate check box is checked then the interaction parameters
for new components are automatically estimated as they are added to the
model.

3 Components 40
4 Scenarios

Overview
A scenario defines a set of source conditions (flows, compositions, pressures
and temperatures) for the entire network. The design of a typical flare header
system will be comprised of many scenarios for each of which the header
system must have adequate hydraulic capacity. Typical scenarios might
correspond to:
• Plantwide power failure.
• Plantwide cooling medium or instrument air failure.
• Localized control valve failure.
• Localized fire or Depressurization.
The scenario management features within FLARENET allow you to
simultaneously design and rate the header system for all of the possible relief
scenarios.
Note: Although the major relief scenarios will normally constrain
the size of the main headers, care should be taken in the evaluation
of velocities in the individual relief valve tailpipes and sub headers.
When looking at relief valves which might operate alone, lower back
pressures in the main headers may lead to localized high velocities
and consequently choked flow in the tail pipes.

As well as having different source conditions, each scenario can have unique
design limitations that will be used either to size the pipes or to highlight
problems when an existing flare system is being rated. For example, a Mach
number limit of 0.30 might be applied for normal flaring compared to a Mach
number limit of 0.50 or greater at the peak flows encountered during plant
blowdown.

4 Scenarios 41
Scenario Manager
Scenarios can also be Scenarios are managed via the Scenario Manager view. This view has buttons
selected by selecting that allow you to add, edit or delete scenarios as well as to select the current
the scenario in the scenario for which scenario specific data is displayed. All cases have at least
Scenario selector on one scenario.
the tool bar.
To access the Scenario Manager view, select Scenarios from the Build
menu.
The Scenario Manager view will be displayed.
Fig 4.1

The Scenario Manager view displays all Scenarios in the case, and indicates
the Current Scenario. Several buttons are available:

Button Description
Add Adds a new scenario.
Edit Edits the highlighted scenario.
Delete Removes the currently highlighted scenario. There must always be at
least one scenario in the case.
Sort Arrange the scenario list alphabetically in descending order.
Up and Down Arrow Move the highlighted scenario up and down the Scenario list.
Swap Swap the two selected scenarios in the list.
Current To make a scenario the current one, highlight the appropriate
scenario, and then click on the Current button.
OK Closes the Scenario Manager view.

4 Scenarios 42
Adding/Editing Scenarios
FLARENET has no pre- To add a scenario, click the Add button on the Scenario Manager view. If
programmed limits on there is already a scenario present in the Scenario list, clicking the Add
the number of button will show a Clone Scenario Form view. You can select an existing
scenarios which can
be defined within a
scenario from the list to be used to initialize the flows, compositions,
single case. pressures and temperatures of all the sources in the new scenario.
The Next button To edit a scenario, highlight it, and then click the Edit button. For adding and
allows you to continue editing a scenario, the views are similar except for the Next button on the
adding scenarios
without returning to
Scenario Editor view for adding a scenario.
the Scenario Manager.

General Tab
You may provide the following information on the General tab:
Fig 4.2

Data Description
Name An alphanumeric description of the scenario (e.g. Power Failure). Up
to 40 characters are accepted.
System Back Pressure The system back pressure at the flare tip exit. This will normally be
atmospheric pressure, but can be set to represent system design
conditions at the exit point. If left empty, the value on the Calculation
Options Editor view will be used. The minimum value is 0.01 bar abs.

4 Scenarios 43
Constraints Tab
The Constraints tab requires the following information for both headers and
tailpipes.
Fig 4.3

Tailpipes are indicated by the Tailpipe field on the Connections tab of the
Pipe Editor view.

Data Description

You may provide Mach Number The maximum allowable Mach number for all pipe segments. Calculated values
different design that exceed this number will be highlighted in the results.
information (Mach Vapor The maximum allowable vapor velocity. Calculated velocities that exceed this
Number, Noise at 1 Velocity value will be indicated in the results.
m, Vapor Velocity,
Liquid The maximum allowable liquid velocity. Calculated velocities that exceed this
Liquid Velocity) for
Velocity value will be indicated in the results.
the Headers and
Tailpipes. Rho V2 It is the density times the velocity square. This value is normally used as a
limiting factor to prevent erosion.
Any field may be left Noise The maximum allowable sound pressure level at a distance of 1 meter for all
empty, in which case pipe segments. This is an average value over the length of the pipe. Calculated
they will be ignored. values that exceed this specification will be highlighted in the results.

Note: Whilst rating the network you may define a Mach number
constraint of 1.00, in order to highlight only choked flow conditions.
This is not recommended for design calculations where a more
reasonable value such as 0.5 or 0.7 will lead to a more rapid
solution towards the maximum allowable back pressure constraints.

4 Scenarios 44
Sources Tab
When you select the Sources tab, you will see a view similar to the one
If a source is ignored,
the MABP constraint is shown in Figure 4.4. All sources are displayed on this tab.
ignored by sizing
calculations.
Note: If you are setting up a new case, the Sources tab will not
show any sources.

Fig 4.4

This tab is useful in that you can easily toggle whether or not individual
sources are to be included in the current scenario, without having to either
unnecessarily delete sources or set the flow of a source to zero.

Estimates Tab
The Estimates tab allows some control over the selection and initialization of
flowrates for pipes which are to be used as tears in the solution of looped
systems. The use to which each field is put is dependant upon the Structure
Analyzer setting on the Solver tab of the Calculation Options Editor view.
The checkboxes in the No Tear column of the table allow you to prevent
pipes from being used as tears - select the checkbox to prevent a pipe from
being used as a tear or clear it to allow it. This setting has no effect if the
Simultaneous structural analyzer is used.
When the Convergent structural analyzer is used, the Molar Flow column
recommends a tear location and initial value for the flow at the tear location.
If the structural analyzer does find that the pipe may be a valid tear location
then this value is ignored.

4 Scenarios 45
When the Simultaneous structural analyzer is used, the Molar Flow column
is used to seed the analyzer. This value will always impact the initialization as
long as the structural analysis succeeds but the pipe will not necessarily be
selected as a tear pipe. In the event that the structural analysis fails with any
Molar Flow estimates then the model will be initialized by the default values.
Fig 4.5

Since the Simultaneous structural analyzer generally offers better


performance than the Convergent analyzer it will rarely be necessary to
specify information on the Estimates tab other than for the purpose of
improving the speed of convergence of the model. In the event that a model
proves problematic to converge, a number of additional columns are available
to tune the convergence algorithms. These may be exposed by stretching the
view horizontally.

4 Scenarios 46
Fig 4.6

The Max. Step column defines the maximum change to the flow in a tear
pipe over a single iteration whilst the Max. Flow and Min. Flow columns
constrain the flow in a tear pipe. Not all these values are used by all the Loop
Solver algorithms.
Max. Step Max. Flow Min. Flow
Newton-Raphson 3 3 3
Brogden 3 3 3
Force Convergent
Levenberg-Marquardt 3 3
Conjugate Gradient Minimization
Quasi-Newton Minimization

Scenario Tools
The complete analysis of a flare system should ideally include analysis of the
system for the scenarios in which each source relieves on its own. For a large
network with many sources, it can become tedious to define each of these
scenarios. These can automatically be added to your model as follows.

Adding Single Source Scenarios


Select Add Single Source Scenarios from the Tools menu or use the hot
key combination ALT T N.
This will analyze your model and add a scenario for each source that has a
non-zero flow rate defined in at least one scenario. Source data will be copied
from the scenario in which it has the highest flow rate.

4 Scenarios 47
5 Pipe Network

The pipe network comprises a series of interconnected pipes. These pipes can
be added, edited and deleted from the Pipe Manager.

Pipe Manager
To access the Pipe Manager, select Pipes from the Build menu.
Fig 5.1

The following buttons are available:

Button Description
Add Adds a new pipe. This new pipe will be named with a number depending upon
the number of pipes already added.
Edit Allows you to edit the currently highlighted pipe.
Delete Allows you to remove the currently highlighted pipe.
Sort Sort the pipes list alphabetically (in descending order) either by name or
location.
Up and Move the highlighted pipes up and down the list.
Down Arrow
Swap Swap the two selected pipes in the list.
OK Closes the view.

5 Pipe Network 48
Ignoring/Restoring Pipes
When you ignore a You can ignore single or multiple pipes within the model. When you ignore a
single pipe, all single pipe, all upstream nodes are automatically ignored. This enables you to
upstream pipes are
do what if type calculations, where part of the network can be excluded from
automatically
ignored. the calculation without the need for deletion and reinstallation of the
appropriate nodes.
To ignore a pipe:
1 Open the pipe editor view of the pipe that you want to ignore.
2 On the Connections tab, activate the Ignore checkbox.

Fig 5.2

To restore a pipe that has previously been ignored:


1 Open the pipe editor view of the pipe that you want to restore.
2 On the Connections tab, deactivate the Ignore checkbox.

5 Pipe Network 49
Connections Tab
The name of the pipe segment and connectivity information is specified here.
Fig 5.3

The following fields are available on this tab:

Input Data Description


Name An alphanumeric description of the pipe segment. Up to 30 characters are
accepted.
Location An alphanumeric description of the location within the plant for the segment.
This is a useful parameter for grouping pipes together via the Sort command.
Upstream Node This is the name of the node upstream of the pipe. The drop-down list allows
you to select from a list of existing unconnected nodes in the model.
Alternatively the name of a new node can be entered. If this is done you will
be asked to specify the type of node through a pop-up list when you move to
the next entry.
Downstream This is the name of the node upstream of the pipe. The drop-down list allows
Node you to select from a list of existing unconnected nodes in the model.
Alternatively the name of a new node can be entered. If this is done you will
be asked to specify the type of node through a pop-up list when you move to
the next entry.
Tailpipe This drop-down list allows you to select whether the pipe should be treated
as a tailpipe. If set to Yes and the Rated Flow for Tailpipes calculation option
is selected in the Calculation Options view, the pressure drop for this pipe
will be calculated using the rated flow in place of the relieving flow rate.
Ignore This checkbox may be selected to remove the pipe from calculations
temporarily. When selected the pipe and all upstream nodes and pipes will
be ignored during calculations.

5 Pipe Network 50
You have the option of modeling a pipe segment as a main header or a
tailpipe. The ability to classify a pipe as either a tailpipe or a header allows us
to perform calculations in which the pressure drop for tailpipes is determined
by the rated flow and that for headers is determined by the nominal flow. This
is in accordance with API-RP-521.
In the Scenario Editor view, you can set design limits for the Mach Number,
Vapor and Liquid Velocities, Rho V2 and Noise separately for the main
headers and the tailpipes.

Dimensions Tab
The physical dimensions and characteristics of the pipe segment are specified
here.
Fig 5.4

5 Pipe Network 51
The following fields are available on this tab:

Input Data Description


Length The physical length of the pipe segment. This length is used in
association with the fittings loss coefficients to calculate the equivalent
length of the pipe. If you have equivalent length data for your network,
enter this data here as the sum of the actual length plus the equivalent
length of the fittings and enter zero for the fittings loss coefficients.
Elevation Change A positive elevation indicates that the outlet is higher than the inlet.
Material The pipe material, either Carbon Steel or Stainless Steel.
Schedule Numbers:
Roughness The surface roughness of the pipe segment. Whenever a material is
Carbon Steel: selected, the absolute roughness is initialized to the default value for the
material as defined on the Preferences view. Valid values are between
10, 20, 30, 40, 60, 0.00001 inches and 0.1 inches.
80, 100, 120, 140, Thermal The thermal conductivity of the pipe wall. This is used by the heat
160, STD, XS, XXS Conductivity transfer calculations when these are enabled.
Nominal Diameter The nominal pipe diameter used to describe the pipe size. For pipes with
a nominal diameter of 14 inches or more, this will be the same as the
Stainless Steel: outside diameter of the pipe.

5S, 10S, 40S, 80S Schedule Number If a pipe schedule other than "-" is selected, you will be able to select a
nominal pipe diameter from the pipe databases. It will not be necessary
to specify the internal diameter or the wall thickness for the pipe.
If you select "-" you will be unable to select a nominal pipe diameter from
the pipe databases and you will then have to specify both the internal
diameter and wall thickness for the pipe.
Internal Diameter The pipe diameter used for the pressure drop calculations.
Wall Thickness The thickness of the pipe wall. Valid values are any positive number or
zero.
Pipe Class and If you want the pipe segment to be resized by sizing calculations, the
Sizeable drop-down Sizeable option should be set to Yes. You might set the Sizeable option to
list No when debottlenecking an existing plant containing sections of the flare
network that would be difficult to change. Setting sizeable to No for these
pipes would prevent sizing calculations from changing their size.
Set the Use Pipe Class option to Yes to restrict the pipe sizes to those
defined by the Pipe Class tool.

5 Pipe Network 52
Fittings Tab
A list of pipe fittings may be added to the pipe segment. These fittings will be
modeled as an additional equivalent length applied linearly over the physical
length of the pipe segment.
Fig 5.5

The following fields are available on this tab:

Input Data Description


Length Multiplier The length of the pipe is multiplied by this value to determine the
equivalent length used for the pressure drop calculation. If left blank then
the value on the Calculation Options Editor is used. This option is useful for
making an allowance for bends and other fittings if these are not known.
Fittings Loss The fittings "K" factor is calculated from the following equation in which Ft
is the friction factor for fully developed turbulent flow:
K = A + BFt
Valid values are any positive number or 0.
External HTC This is the outside heat transfer coefficient.

5 Pipe Network 53
From the Database Fitting list, select the appropriate type of fitting, and
then click the Add button to move the selection to the Selected Fitting list.
You can select as many fittings as required. The final fitting loss equation,
which will be a sum of all the selected fittings, will appear in a display field
underneath the Selected Fitting list. Click Link to transfer the coefficients
for this equation into the Fittings Loss field, while maintaining the list of
fittings. Click Paste to transfer the coefficients for the fitting equation into the
Fittings Loss field on the Pipe Editor view. The selected list of fittings will not
be retained. To remove the selected fitting individually, select the fitting and
click the Delete button.
Note: The network cannot be sized correctly if you specify
equivalent length data to model fittings losses, since the
equivalent length of any pipe fitting is a function of the pipe
diameter and will therefore be incorrect when the diameters
change.

Heat Transfer Tab


The pipe segment may perform calculations taking into account heat transfer
with the external air.
Fig 5.6

5 Pipe Network 54
The following fields are available on this tab:

Input Data Description


External Conditions Group
Temperature Enter the temperature of the external air. If
this field is left blank then the global value set
via the Calculation Options view is used.
Wind Velocity Enter the velocity of the external air If this
field is left blank then the global value set via
the Calculation Options view is used.
Heat Transfer Enabled This drop-down list selects whether heat
transfer calculations are to be performed for
the pipe. Furthermore, setting only enables
heat transfer calculations if the Enable Heat
Transfer option is also selected in the
Calculation Options view.
External Radiative HTC This drop-down list selects whether or not the
external Radiative heat transfer coefficient is
included within the heat transfer calculations
Emissivity Enter the fractional Emissivity to be used for
Radiative heat transfer calculations.
Multiple Element Calculation This drop-down list selects whether the heat
transfer calculation is done using a single
element or the same number of elements as
the pressure drop calculation. If Yes is
selected then the heat transfer calculation
sues the same number of elements as the
pressure drop calculation
Insulation Group
Description A brief description to identify the type of pipe
insulation.
Thickness Supply the insulation thickness.
Thermal Conductivity Enter the insulation thermal conductivity.
Heating Group
Outlet Temp You can explicitly set an outlet temperature
for this segment, or leave it blank. A heater in
a flare knockout drum is an example of
process equipment that may require a fixed
outlet temperature. Valid values are between -
260oC and 999 oC.
Duty Enter the heating duty and the outlet
temperature will be calculated based on the
inlet temperature and the defined duty.

5 Pipe Network 55
Methods Tab
Calculation methods are specified here.
Fig 5.7

The following fields are available on this tab:

Input Field Description


VLE Method
Group
VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows (see
Appendix A - Theoretical Basis for more details):
Compressible Gas - Real Gas relationship
Peng Robinson - Peng Robinson Equation of State
The two phase Soave Redlich Kwong - Soave Redlich Kwong Equation of State
methods are really Vapor Pressure - Vapor Pressure method as described in API Technical Data
meant for Book Volume 113.
incompressible fluids.
If the pressure drop is Model Default - If this is selected, the Default method for the VLE method (as
greater than 10% of defined on the Calculation Options Editor view) will be used.
the inlet pressure Pressure
then the Drop Group
compressibility effects Horizontal The Horizontal/Inclined methods apply only when you have selected Two-
become significant and Inclined Phase pressure drop. The options are:
you can approximate Pipes
compressible Isothermal Gas - This is a compressible gas method that assumes isothermal
elements in the pipe. expansion of the gas as it passes along the pipe. FLARENET uses averaged
properties of the fluid over the length of the pipe. The outlet temperature from
the pipe is calculated by adiabatic heat balance either with or without heat
transfer. Pressure losses due to change in elevation are ignored.
continued

5 Pipe Network 56
Input Field Description
Adiabatic Gas - This is a compressible gas method that assumes adiabatic
expansion of the gas as it passes along the pipe. As with the Isothermal Gas
method, pressure losses due to changes in elevation are ignored.
Beggs & Brill - The Beggs and Brill method is based on work done with an air-
water mixture at many different conditions, and is applicable for inclined flow.
For more details, see Appendix A - Theoretical Basis.
Dukler - Dukler breaks the pressure drop in two-phase systems into three
components - friction, elevation and acceleration. Each component is
evaluated independently and added algebraically to determine the overall
pressure drop. For more details, see Appendix A - Theoretical Basis.
Lockhart Martinelli – Lockhart Martinelli correlations models the two phase
pressure drop in terms of a single phase pressure drop multiplied by a
correction factor. Acceleration changes are not included.
Beggs and Brill (No Acc.) – The Beggs and Brill methods without the
acceleration term.
Beggs and Brill (Homog.) – The Beggs and Brill methods with a homogeneous
acceleration term.
Model Default - If this is selected, the Default method for the
Horizontal/Inclined method (as defined on the Calculation Options Editor view)
will be used.
Vertical Pipes The Vertical method applies only when you have selected Two-Phase pressure
drop. The options are:
Isothermal Gas - This is a compressible gas method that assumes isothermal
expansion of the gas as it passes along the pipe. FLARENET uses averaged
properties of the fluid over the length of the pipe. The outlet temperature from
the pipe is calculated by adiabatic heat balance either with or without heat
transfer. Pressure losses due to change in elevation are ignored.
Adiabatic Gas - This is a compressible gas method that assumes adiabatic
expansion of the gas as it passes along the pipe. As with the Isothermal Gas
method, pressure losses due to changes in elevation are ignored.
Beggs & Brill - Although the Beggs and Brill method was not originally intended
for use with vertical pipes, it is nevertheless commonly used for this purpose,
and is therefore included as an option for vertical pressure drop methods. For
more details, see Appendix A - Theoretical Basis.
Dukler - Although the Dukler method is not generally applicable to vertical
pipes, it is included here to allow comparison with the other methods.
Orkiszewski - This is a pressure drop correlation for vertical, two-phase flow
for four different flow regimes - bubble, slug, annular-slug transition and
annular mist. For more details, see Appendix A - Theoretical Basis.
Lockhart Martinelli – Lockhart Martinelli correlations models the two phase
pressure drop in terms of a single phase pressure drop multiplied by a
correction factor. Acceleration changes are not included.
Beggs and Brill (No Acc.) – The Beggs and Brill methods without the
acceleration term.
Beggs and Brill (Homog.) – The Beggs and Brill methods with a homogeneous
acceleration term.
Model Default - If this is selected, the Default method for the Vertical method
(as defined on the Calculation Options Editor view) will be used.
Two Phase For two-phase calculations, the pipe segment is divided into a specified
Elements number of elements. On each element, energy and material balances are
solved along with the pressure drop correlation. In simulations involving high
heat transfer rates, many increments may be necessary, due to the non-
linearity of the temperature profile. Obviously, as the number of increments
increases, so does the calculation time; therefore, you should try to select a
number of increments that reflects the required accuracy.
continued

5 Pipe Network 57
Input Field Description
Friction Factor The Friction Factor Method applies only when you have entered a value for
Method friction factor. The options are:
Round - This method has been maintained primarily for historical purposes in
order for older FLARENET calculations to be matched. It tends to over predict
the friction factor by up to 10% in the fully turbulent region.
Chen - It should always be the method of preference since it gives better
predictions at the fully turbulent flow conditions normally found within flare
systems.
Model Default - If this is selected, the Default method for the Friction Factor
Method (as defined on the Calculation Options Editor view) will be used.
Ignore The Elevation Pressure change may be ignored for downflow (negative
Downflow elevation change).
Head
Recovery
Solver Group
Damping The damping factor used in the iterative solution procedure. If this is left
Factor blank, the value in the Calculation Options Editor view is used.

Summary Tab
The results of the calculation are displayed.
Fig 5.8

5 Pipe Network 58
Multiple Editing
You can edit multiple pipe segments simultaneously by highlighting them in
the Pipe Manager with the mouse cursor while keeping the SHIFT key pressed.
After you have finished selecting pipe segments, double click any of them to
open the common Pipe Editor view.
The common pipe editor view differs from that of the single pipe editor view
in the following respects:
• Only fields that can be edited in multiple mode are displayed.
• Drop-down list boxes have an additional entry, *. This entry indicates that
the value should remain at the pre edit value.
In the following figure of the Dimensions tab; we enter * for the Length and
Elevation Change fields to indicate that these must not be changed. We
specify new values for the Roughness and the Thermal Conductivity. We
select * for the Use Class and Sizeable drop down lists to indicate that these
must be changed.
Fig 5.9

5 Pipe Network 59
Pipe Class Editor
The Pipe Class Editor allows you to edit the allowable schedules for each
nominal diameter, for both Carbon Steel and Stainless Steel, during sizing
calculations. It also allows you to restrict the range of pipe sizes that may be
selected by FLARENET during design calculations.
To access the Pipe Class Editor, select Pipe Class from the Tools menu.
Fig 5.10

Note: If you have selected Use Pipe Class When Sizing in the Run
Options view, these are the schedules which will be used.

5 Pipe Network 60
6 Nodes

Pipes are connected via nodes, which can be added, edited and deleted from
the Node Manager. Sources are also added through the Node Manager view.

Node Manager
To access the Node Manager, select Nodes from the Build menu.
Fig 6.1

6 Nodes 61
The following buttons are available:

Button Description
Add You will be prompted to select the type of node. This new node will be named
with a number depending upon the number of nodes of that type already added.
Edit Allows you to edit the currently highlighted node. The form varies, depending on
the type of node, as discussed below.
Delete Allows you to remove the currently highlighted node.
Sort Sort the nodes list alphabetically (in descending order) either by name or
location or type of node.
Up and Move the highlighted nodes up and down the list.
Down Arrow
Swap Swap the two selected nodes in the Node list.
OK Closes the view.

Ignoring/Restoring Nodes
You can ignore single or multiple nodes within the model. When you ignore a
When you ignore a
single node, all upstream nodes are automatically ignored. This enables you
single node, all
upstream nodes are to do what if type calculations, where part of the network can be excluded
automatically from the calculation without the need for deletion and reinstallation of the
ignored. appropriate nodes.
To ignore a node:
1 Open the node editor view of the node that you want to ignore.
2 On the Connections tab, activate the Ignore checkbox. The following
figure shows this for a connector node

Fig 6.2

To restore a node that has previously been ignored:


1 Open the node editor view of the node that you want to restore.

6 Nodes 62
2 On the Connections tab, deactivate the Ignore checkbox.

Connection Nodes
The following types of connection nodes are available in FLARENET. A
connection node is one that links two or more pipe segments.
• Connector.
• Flow Bleed.
• Horizontal Separator.
• Orifice Plate.
• Tee.
• Vertical Separator.

Connector
The connector is used to model the connection of two pipes. The diameters of
each pipe may be different.

Connections Tab
The name of the connector and connectivity information is specified here.
Fig 6.3

The location can


have an
The following fields are available on this tab:
alphanumeric
name. This feature
is useful for large Field Description
flowsheets, because
you can provide a Name The alphanumeric description of the node (e.g. - HP Connect 1).
different “location” Location You may want to specify the location of the node in the plant.
name to different Upstream/ Either type in the name of the pipe segment or select from the drop-down list.
sections to make it Downstream
more
comprehensible. At You can specify the end of the pipe segment attached to the connector.
Ignore Select the ignore checkbox to ignore this connector in the calculations. Clear the
checkbox to re-enable it.

6 Nodes 63
Calculations Tab
Calculation methods are specified here.
Fig 6.4

The following fields are available on this tab:

Field Description
Theta Specify the connector expansion angle. If not defined, it will be calculated to
the length.
Length Enter the connector length. If not defined, it will be calculated from theta.
Fitting Loss The available options are;
Method Equal Static Pressure – Pressure drop calculation is ignored and static
pressure is balanced.
Calculated – Pressure drop is calculated in accordance with the Swage
method.
Equal Total Pressure - Pressure drop calculation is ignored and total pressure
is balanced.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the connector will not update during iterative calculations for
pressure loss i.e. a PT flash will be used to update the inlet properties. If the
option is set to No then a more rigorous PH flash will be used to update the
inlet properties.
The connector will do one size change calculation between the inlet and
outlet diameters selecting expansion or contraction as appropriate.
Setting this option to Yes can speed up calculations in some cases at cost of
a minor loss of accuracy.
Swage Group
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase flow
Correction will be calculated using properties corrected for liquid slip. If set to No then
the homogenous properties of the fluid will be used in calculating the
pressure loss coefficient.
continued

6 Nodes 64
Field Description
Swage Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible flow
through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the assumption
of incompressible flow. If the pressure loss expressed as a percentage of the
inlet pressure is greater than the defined compressible transition value then
the pressure drop will be recalculated using the compressible flow method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate
at higher pressure drops. The Transition method can cause instabilities in
some cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure at
Transition which compressible flow pressure drop calculations should be used. It applies
only when the Transition method is selected.

Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.5

Flow Bleed
The Flow Bleed is a simple calculation block that allows you to;
• Specify a fixed pressure drop
• Specify a constrained flow offtake where the flow offtake is calculated
from the following equation
Offtake = Multiplier x Inlet Flow + Offset

The calculated Offtake is constrained to maximum and minimum values.

6 Nodes 65
Connections Tab
The name of the flow bleed and connectivity information is specified here.
Fig 6.6

The following fields are available on this tab:

Field Description
Name The alphanumeric description of the Flow Bleed (e.g. - HP Connect XX).
Location You may want to specify the location of the Flow Bleed in the plant.
Upstream/ Either type in the name of the pipe segment or select from the drop-down
Downstream list.
At You can specify the end of the pipe segment attached to the Flow Bleed.
Ignore Select the ignore checkbox to ignore this flow bleed in the calculations. Clear
the checkbox to re-enable it.

Calculations Tab
Calculation methods are specified here.
Fig 6.7

6 Nodes 66
The following fields are available on this tab:

Field Description
Offtake Multiplier Specify the Offtake multiplier. The default value is 0.
Offtake Offset Specify the Offset for the Offtake to compensate for the changes in the
inlet flow.
Offtake Minimum Specify the minimum value for the Offtake.
Offtake Maximum Specify the maximum value for the Offtake.
Pressure Drop Enter the pressure drop across the Flow Bleed.

Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.8

Horizontal Separator
Horizontal separators are used to allow liquid to separate from the feed
stream so that it can be removed from the flare system. The liquid phase in
the Horizontal Separator feed is removed from network. In FLARENET, the
Horizontal Separator has one primary inlet, one secondary inlet/ outlet, and
one vapor outlet stream.

6 Nodes 67
Connections Tab
The name of the horizontal separator and connectivity information is specified
here.
Fig 6.9

The following fields are available on this tab:

You only need to


Field Description
provide 2 of 3 Name The alphanumeric description of the Horizontal Separator (e.g. - HP
connections to be KO Drum).
able to solve the
separator. This Location You may want to specify the location of the Horizontal Separator in
allows for the plant.
solution(s) to The location can have an alphanumeric name. This feature is useful
partially built for large flowsheets, because you can provide a different “location”
networks. name to different sections to make it more comprehensible.
Primary Inlet/Secondary Either type in the name of the pipe segment or select from the
Inlet/Vapor Outlet drop-down list.
At You can specify the end of the pipe segment attached to the
horizontal separator.
Ignore Select the ignore checkbox to ignore this horizontal separator in the
calculations. Clear the checkbox to re-enable it.

6 Nodes 68
Calculations Tab
Calculation methods are specified here.
Fig 6.10

The following fields are available on this tab:

Field Description
Diameter The internal diameter of the vessel.
Liquid Level The liquid level in the vessel. Pressure drop is calculated based upon the
vapor space above the liquid.
Methods Group
Fittings Loss The available options are;
Method Equal Static Pressure – Pressure drop calculation is ignored and static
pressure is balanced.
Calculated – Pressure drop is calculated in accordance with the Swage
method.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the separator will not update during iterative calculations for
pressure loss i.e. a PT flash will be used to update the inlet properties. If
the option is set to No then a more rigorous PH flash will be used to update
the inlet properties.
The horizontal separator does three size change calculations, one between
each stream connection and the vessel body. Normally these will be
expansion calculations for the primary and secondary inlets and a
contraction calculation for the vapor outlet but they will automatically
change if flows are reversed.
Setting this option to Yes can speed up calculations in some cases at cost
of a minor loss of accuracy.
Size Change
Group
continued

6 Nodes 69
Field Description
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase
Correction flow will be calculated using properties corrected for liquid slip. If set to No
then the homogenous properties of the fluid will be used in calculating the
pressure loss coefficient.
Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible
flow through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients
are calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the assumption
of incompressible flow. If the pressure loss expressed as a percentage of
the inlet pressure is greater than the defined compressible transition value
then the pressure drop will be recalculated using the compressible flow
method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients
are calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate
at higher pressure drops. The Transition method can cause instabilities in
some cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure
Transition at which compressible flow pressure drop calculations should be used. It
applies only when the Transition method is selected.
Body Dimension If this option is set to Full Body Area the calculation for the primary
inlet/vessel and secondary inlet/vessel size change will use the whole
vessel area. If the Partial Body Area on Flow option is selected the vessel
area is reduced in proportion to the appropriate flow i.e. if the secondary
inlet volumetric flow is 20% of the total volumetric flow in the tee then
20% of the body area will be used in the size change calculation. The use
of the Partial Body Area on Flow option has the effect of increasing the
pressure loss calculated by simple fixed K factors.

Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.11

6 Nodes 70
Orifice Plate
An Orifice Plate is a thin plate, which has a clean-cut hole with straight walls
perpendicular to the flat upstream face of the plate placed crossways in the
pipe. Orifice plates are generally used to restrict the flow downstream of a
blow down valve or restrict the flow from a high pressure section of a flare
system to a low pressure section. They may also be used to allow flow
measurement.

Connections Tab
The name of the orifice plate and connectivity information is specified here.
Fig 6.12

The following fields are available on this tab:

Field Description
Name The alphanumeric description of the Orifice Plate (e.g. - HP OP).
Location You may want to specify the location of the Orifice Plate in the plant.
Upstream/Downstream Either type in the name of the pipe segment or select from the drop-
down list.
At You can specify the end of the pipe segment attached to the Orifice
Plate.
Ignore Select the ignore checkbox to ignore this orifice in the calculations.
Clear the checkbox to re-enable it.

6 Nodes 71
Calculations Tab
Calculation methods are specified here.
Fig 6.13

The following fields are available on this tab:

Field Description

You only need to Diameter The diameter of the orifice hole. Valid values are between 0 and 1000 mm.
provide 1 of 3 Upstream This is the ratio of the throat diameter to the Upstream pipe diameter.
sizing parameters. Diameter
For Example, if you Ratio
entered the
Downstream This is the ratio of the throat diameter to the Downstream pipe diameter.
Diameter then
Diameter
FLARENET will
Ratio
calculate the
Upstream Diameter Methods
Ratio and the Group
Downstream Fittings Loss The Fitting Loss drop-down list have the following three options available:
Diameter Ratio. Method Ignored - If this option is selected, the fitting losses for the orifice plate would
not be calculated. Static pressure is balanced.
Thin Orifice - The fitting losses for the orifice plate will be calculated using the
equations for the thin orifice plate.
Contraction/Expansion - For this method, orifice plates will be modeled as a
sudden contraction from the inlet line size to the diameter of the hole followed
by a sudden expansion from the diameter of the hole to the outlet line size.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the orifice plate will not update during iterative calculations for
pressure loss i.e. a PT flash will be used to update the inlet properties. If the
option is set to No then a more rigorous PH flash will be used to update the
inlet properties.
The orifice plate will do one contraction calculation and one expansion
calculation if the Fittings Loss method is set to Contraction/Expansion.
continued

6 Nodes 72
Field Description
Setting this option to Yes can speed up calculations in some cases at cost of a
minor loss of accuracy.
Size Change
Group
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase flow
Correction will be calculated using properties corrected for liquid slip. If set to No then the
homogeneous properties of the fluid will be used in calculating the pressure
loss coefficient.
Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible flow
through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the assumption of
incompressible flow. If the pressure loss expressed as a percentage of the inlet
pressure is greater than the defined compressible transition value then the
pressure drop will be recalculated using the compressible flow method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate at
higher pressure drops. The Transition method can cause instabilities in some
cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure at
Transition which compressible flow pressure drop calculations should be used. It applies
only when the Transition method is selected.

Summary Tab
Fig 6.14

The result of the calculations at each of the pipe connections is displayed.

6 Nodes 73
Tee
The connector is used to model the connection of two pipes. The diameters of
each pipe may be different.

Connections Tab
The name of the tee and connectivity information is specified here.
Fig 6.15

The following fields are available on this tab:

Field Description
You only need to
Name The alphanumeric description of the node (e.g. - HP Tee 1).
provide 2 of 3
connections to be Location You may want to specify the location of the node in the plant.
able to solve the The location can have an alphanumeric name. This feature is
tee. This allows for useful for large flowsheets, because you can provide a
solution(s) to different “location” name to different sections to make it more
partially built comprehensible.
networks. Upstream/Downstream/Branch Either type in the name of the pipe segment or select from the
drop-down list.
At You can specify the end of the pipe segment attached with the
tee.
Ignore Select the ignore checkbox to ignore this tee in the
calculations. Clear the checkbox to re-enable it.

6 Nodes 74
Calculations Tab
Calculation methods are specified here.
Fig 6.16

The following fields are available on this tab:

Field Description
Theta Specify the angle of the branch to the inlet of the tee.
Body Specify the diameter of the body of the tee.
Allowable choices are:
Run - the diameter will be that of the inlet pipe.
Tail - the diameter will be that of the outlet pipe.
Branch - the diameter will be that of the branch pipe.
Auto - FLARENET will set the body diameter to be larger of the inlet and
branch pipe diameters.
Methods
Group
Fittings Loss The available options are:
Method Ignored - FLARENET will not calculate the fitting loss if this is selected.
Simple - FLARENET uses a constant, flow ration independent K factor for the
loss through the branch and run.
Miller - This method uses a K factor which is interpolated using Miller Curves,
which are functions of the flow and area ratios of the branch to the total flow
as well as the branch angle. Loss coefficients at low values of the branch are
to body area are extrapolated from the data presented on the charts.
Miller (Area Ratio Limited) – This method uses a K factor which is
interpolated using Miller Curves, which are functions of the flow and area
ratios of the branch to the total flow as well as the branch angle. The ratio of
the branch area to body area is constrained by the lower limit presented on
the charts.
continued

6 Nodes 75
Field Description
Connector If If this option is set to Yes, FLARENET will treat the Tee as a straight
Incomplete connector, ignoring the effect of the branch on pressure drop.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the tee will not update during iterative calculations for
pressure loss i.e. a PT flash will be used to update the inlet properties. If the
option is set to No then a more rigorous PH flash will be used to update the
inlet properties.
The tee will do three Swage Group
size change
calculations between; Two Phase If this option is set to Yes then the pressure loss coefficient in two phase flow
inlet/body, Correction will be calculated using properties corrected for liquid slip. If set to No then
branch/body and the homogenous properties of the fluid will be used in calculating the
body/outlet selecting pressure loss coefficient.
expansion or Method The following options are available:
contraction Compressible - pressure losses will be calculated assuming compressible flow
calculations as through the connector at all times.
appropriate.
Incompressible (Crane) - pressure losses will be calculated assuming
Setting this option to incompressible flow through the connector at all times. Loss coefficients are
Yes can speed up calculated using Crane coefficients.
calculations in some Transition - pressure losses will be calculated initially using the assumption
cases at cost of a of incompressible flow. If the pressure loss expressed as a percentage of the
minor loss of inlet pressure is greater than the defined compressible transition value then
accuracy. the pressure drop will be recalculated using the compressible flow method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate
at higher pressure drops. The Transition method can cause instabilities in
some cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure at
Transition which compressible flow pressure drop calculations should be used. It applies
only when the Transition method is selected.
Body Dimension If this option is set to Full Body Area the calculation for the inlet/body and
branch/body size change will use the whole body area. If the Partial Body
Area on Flow option is selected the body area is reduced in proportion to the
appropriate flow i.e. if the branch volumetric flow is 20% of the total
volumetric flow in the tee then 20% of the body area will be used in the size
change calculation. This option is ignored if the fittings loss method is set to
Miller. The use of the Partial Body Area on Flow option has the effect of
increasing the pressure loss calculated by simple fixed K factors bringing the
results closer to those calculated by the ore accurate Miller K factors.

6 Nodes 76
Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.16

Vertical Separator
Vertical separators are used to allow liquid to separate from the feed stream
so that it can be removed from the flare system. The liquid phase in the
Vertical Separator feed is removed from network. In FLARENET, the Vertical
Separator has only one inlet and one vapor outlet stream.

Connections Tab
The name of the vertical separator and connectivity information is specified
here.
Fig 6.17

6 Nodes 77
The following fields are available on this tab:

The location can have


an alphanumeric Field Description
name. This feature is
useful for large Name The alphanumeric description of the Vertical Separator (e.g. - HP KO Drum).
flowsheets, because Location You may want to specify the location of the Vertical Separator in the plant.
you can provide a
different “location” Inlet/Vapor Either type in the name of the pipe segment or select from the drop-down list.
name to different Outlet
sections to make it At You can specify the end of the pipe segment attached to the Vertical Separator.
more comprehensible. Ignore Select the ignore checkbox to ignore this vertical separator in the calculations.
Clear the checkbox to re-enable it.

Calculations Tab
Calculation methods are specified here.
Fig 6.18

The following fields are available on this tab:

Field Description
Diameter The internal diameter of the vessel.
Methods
Group
Fittings Loss The available options are;
Method Equal Static Pressure – Pressure drop calculation is ignored and static
pressure is balanced.
Calculated – Pressure drop is calculated in accordance with the Swage
method.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the separator will not update during iterative calculations for
pressure loss i.e. a PT flash will be used to update the inlet properties. If the
option is set to No then a more rigorous PH flash will be used to update the
inlet properties.
The vertical separator will do one expansion calculation for the inlet stream
entering the vessel and one contraction calculation for the flow from the
vessel to the outlet. These will automatically change if flows through the
vessel are reversed.
continued

6 Nodes 78
Field Description
Setting this option to Yes can speed up calculations in some cases at cost of
a minor loss of accuracy.
Size Change
Group
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase flow
Correction will be calculated using properties corrected for liquid slip. If set to No then
the homogenous properties of the fluid will be used in calculating the
pressure loss coefficient.
Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible flow
through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the assumption
of incompressible flow. If the pressure loss expressed as a percentage of the
inlet pressure is greater than the defined compressible transition value then
the pressure drop will be recalculated using the compressible flow method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate
at higher pressure drops. The Transition method can cause instabilities in
some cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure at
Transition which compressible flow pressure drop calculations should be used. It applies
only when the Transition method is selected.

Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.19

6 Nodes 79
Boundary Nodes
The following types of boundary nodes are available in FLARENET. A boundary
node is one that is connected to only one pipe segment.
• Control Valve.
• Relief Valve.
• Flare Tip.
The relief valve and control valve node types represent sources or inflows into
the system. The control valve, in particular, may also be used to model
alternative types of sources such as; blow down valves, rupture disks, purge
valves, etc.

Control Valve
The control valve is used to model a constant flow source such as purge
valves, bursting disks and blow down valves. The most significant difference
to the relief valve is that the rated flow equals the nominal flow.

Connections Tab
The name of the control valve and connectivity information is specified here.
6.20

6 Nodes 80
The following fields are available on this tab:

The location can have


Field Description
an alphanumeric Name The alphanumeric description of the Control Valve (e.g. - FCV 1).
name. This feature is
useful for large Location You may want to specify the location of the Control Valve in the plant.
flowsheets, because Outlet Either type in the name of the pipe segment or select from the drop-down list.
you can provide a
At You can specify where the pipe segment is to be attached to the Control Valve.
different “location”
name to different Ignore Select the ignore checkbox to ignore this control valve in the calculations. Clear
sections to make it the checkbox to re-enable it.
more comprehensible.

Conditions Tab
Fluid conditions are specified here.
Fig 6.21

The following fields are available on this tab:

Field Description
Inlet Pressure The pressure of the source on the upstream side of the valve. Valid values are
between 0.01 and 600 bar.
It is recommended
that a value for Inlet Temp The temperature specification of the source on the upstream side of the relief
Outlet Temperature Spec. valve. Valid values are between -250oC and 1500oC.
which corresponds to You can select the fluid condition from the drop-down list on the left side. The
an isenthalpic flash available option are:
from the upstream
Actual - it uses the given inlet temperature as the actual fluid temperature.
conditions down to
the Allowable Back Subcool - If this option is selected, enter the amount of subcooling.
Pressure. This will Superheat - If this option is selected, enter the amount of superheat.
give the highest
Allowable The Allowed Back Pressure is the pressure that is allowed to exist at the outlet
probable entry
Back Pressure of a pressure relief device as a result of the pressure in the discharge system.
temperature into the
It is the sum of the superimposed and built-up back pressure. Clicking the Set
system which will in
button calculates the Allowable Back Pressure as a function of the Inlet
turn give the highest
Pressure. Checking the Auto checkbox will automatically calculate the
velocities.
continued

6 Nodes 81
Field Description
Allowable Back Pressure whenever the Inlet Pressure changes. Valid values are
between 0.01 to 600 bar.
Outlet This is the temperature of the source at the flange on the downstream side of
Temperature the valve.
If the enthalpy method chosen is the Ideal Gas model, then this temperature
is used to determine the enthalpy of the source at the entrance to the pipe
network, otherwise this enthalpy is calculated from the upstream pressure and
temperature. If the Set button was clicked and the enthalpy model is Peng
Robinson, Soave Redlich Kwong or Lee Kesler then the outlet temperature will
be calculated from the upstream temperature and pressure after isenthalpic
expansion to the defined MABP. Valid values are between -250oC and 1500oC.
Mass Flow This is the mass flow of the source. Valid values are between 0 and
100,000,000 kg/hr.
Flange This is the diameter of the flange at the valve discharge.
Diameter The flange diameter may be left unknown in which case it will be assumed to
be the same as the outlet pipe.

Composition Tab
The fluid composition is specified here.
Fig 6.22

6 Nodes 82
The following fields are available on this tab:

Field Description
Basis This is the composition basis, which may be either Mol. Wt., Mole Fraction or
Mass Fraction.
Mol. Wt. It is the molecular weight of the fluid. You can only enter data here if the
composition basis selected is Molecular Weight. Valid values are between 2
and 500.
If the composition basis selected is Mole or Mass Fraction, the molecular
weight is updated when you enter or change the component fractions.
Fluid Type If Molecular Weight is selected in the composition basis drop-down list, you
need to select the Fluid Type to calculate a binary composition in order to
match the molecular weight. If the two components of the specified fluid
type are not found then the other components are used.
Component This is the fluid composition in either mole or mass fractions. You can only
Fractions enter data here if the composition basis selected is Mole or Mass Fraction.
When you exit the Source view, you will be prompted about the Invalid
Composition if the sum of these fractions is not equal to one. You can
normalize the composition by either manually editing the component
fractions or by clicking the Normalize button.
If the composition basis selected is Molecular Weight, the component
fractions are estimated when you change the molecular weight.

Methods Tab
Calculation methods are specified here.
Fig 6.23

6 Nodes 83
The following fields are available on this tab:

Fields Description
VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows
(see Appendix A - Theoretical Basis):
Compressible Gas - Real Gas relationship.
Peng Robinson - Peng Robinson Equation of State.
Soave Redlich Kwong - Soave Redlich Kwong Equation of State.
Vapor Pressure - Vapor Pressure method as described in API Technical Data
Book - Volume 1.
Model Default - If this is selected, the Default method for the VLE method
(as defined on the Calculation Options view) will be used.
Swage Group
Fittings Loss The available options are;
Method Equal Static Pressure – Pressure drop calculation is ignored and static
pressure is balanced.
Calculated – Pressure drop is calculated in accordance with the Swage
method.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the control valve will not update during iterative calculations
for pressure loss i.e. a PT flash will be used to update the inlet properties.
If the option is set to No then a more rigorous PH flash will be used to
update the inlet properties.
The control valve will do one size change calculation from the defined
flange diameter to the outlet pipe diameter. This will normally be an
expansion.
Setting this option to Yes can speed up calculations in some cases at cost
of a minor loss of accuracy.
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase
Correction flow will be calculated using properties corrected for liquid slip. If set to No
then the homogeneous properties of the fluid will be used in calculating the
pressure loss coefficient.
Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible
flow through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients
are calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the assumption
of incompressible flow. If the pressure loss expressed as a percentage of
the inlet pressure is greater than the defined compressible transition value
then the pressure drop will be recalculated using the compressible flow
method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients
are calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate
at higher pressure drops. The Transition method can cause instabilities in
some cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure
Transition at which compressible flow pressure drop calculations should be used. It
applies only when the Transition method is selected.
continued

6 Nodes 84
Fields Description
Estimated
Properties at
Header
Conditions
Group
Vapor Fraction The initial estimates for the flow profile in looped systems are generated
based on the assumption of vapor phase flow without any liquid knockout
in the system. It is not uncommon for sources to pass through a knockout
drum before connection to the main header (see Figure 6.17). Specification
of an estimate of vapor fraction of the fluid at the knockout drum can
considerably enhance the automatically generated flow profile.
If this value is not specified then it is assumed to be all vapor.
Vapor Mol. Wt. Specify the estimated vapor molecular weight for the vapor fraction given
above.
If this value is not specified then it is assumed to be the same as that of
the total fluid.

Inlet Piping Tab


Details of the piping between the protected equipment and the inlet to the
relief valve are specified here. This data is used to calculate the pressure drop
in the inlet piping. The diameter of the inlet piping is also used to calculate
the inlet velocity of the source fluid when the Include Kinetic Energy option
is selected in the Calculation Options view.
Fig 6.24

6 Nodes 85
The available fields are:

Fields Description
Length The length of the inlet piping.
Elevation The change in elevation of the inlet piping. This cannot be greater than the
Change length of the piping.
Properties
Group
Material The material of the inlet pipe either Carbon Steel or Stainless Steel.
Roughness The surface roughness of the inlet pipe. Whenever a material is selected, the
absolute roughness is initialized to the default value for the material as defined
on the Preferences view. Valid values are between 0.00001 inches and 0.1
inches.
Diameter
Nominal The nominal pipe diameter used to describe the inlet pipe size. For pipes with
Diameter a nominal diameter of 14 inches or more, this will be the same as the outside
diameter of the pipe.
Schedule If a pipe schedule other than “-” is selected, you will be able to select a
nominal pipe diameter from the pipe databases. It will not be necessary to
specify the internal diameter. If you select “-” you will be unable to select a
nominal pipe diameter from the pipe databases and you will then have to
specify both the internal diameter.
Internal The pipe diameter used for the pressure drop calculations.
Diameter
Use Pipe Class Select this checkbox to restrict the sizes of the inlet piping selected by
FLARENET to those defined by the Pipe Class tool.
Fittings
Groups
Loss Enter the A and B parameters for the following fittings “K” factor equation in
Coefficient which Ft is the friction factor for fully developed turbulent flow:
K = A + BFt .
Valid values are any positive number or 0.

Summary Tab
The result of the calculations is displayed.
Fig 6.25

6 Nodes 86
Copy Source Data
The Copy To button may be used to copy source data to other scenarios.
When this button is pressed you will see a view similar to the following:
Fig 6.26

Select the scenarios to which the data should be copied by activating the
corresponding check box in the Copy column.
This technique for coping source data may also be applied to relief valves.

Relief Valve
The Relief Valve source can be used to model types of spring loaded relief
valves. Relief valves are used frequently in many industries in order to
prevent dangerous situations occurring from pressure build-ups in a system.

6 Nodes 87
Connections Tab
The name of the relief valve and connectivity information is specified here.
Fig 6.26

The following fields are available on this tab:

Field Description
The location can have
an alphanumeric Name The alphanumeric description of the Control Valve (e.g. - FCV 1).
name. This feature is
Location You may want to specify the location of the Control Valve in the plant.
useful for large
flowsheets, because Outlet Either type in the name of the pipe segment or select from the drop-down list.
you can provide a At You can specify where the pipe segment is to be attached to the Control Valve.
different “location”
Ignore Select the ignore checkbox to ignore this control valve in the calculations. Clear
name to different
the checkbox to re-enable it.
sections to make it
more comprehensible.

6 Nodes 88
Conditions Tab
Fluid conditions are specified here.
Fig 6.27

The following fields are available on this tab:

Field Description
Inlet Pressure The pressure of the source on the upstream side of the valve. Valid values are
between 0.01 and 600 bar.
Inlet Temp The temperature specification of the source on the upstream side of the relief
Spec. valve. Valid values are between -250oC and 1500oC.
You can select the fluid condition from the drop-down list on the left side. The
It is recommended available option are:
that a value for
Actual - it uses the given inlet temperature as the actual fluid temperature.
Outlet
Temperature Subcool - If this option is selected, enter the amount of subcooling.
which corresponds Superheat - If this option is selected, enter the amount of superheat.
to an isenthalpic
Allowable The Allowed Back Pressure is the pressure that is allowed to exist at the outlet
flash from the
Back Pressure of a pressure relief device as a result of the pressure in the discharge system.
upstream
It is the sum of the superimposed and built-up back pressure. Clicking the Set
conditions down to
button calculates the Allowable Back Pressure as a function of the Inlet
the Allowable
Pressure. Checking the Auto checkbox will automatically calculate the
Back Pressure.
Allowable Back Pressure whenever the Inlet Pressure changes. Valid values are
This will give the
between 0.01 to 600 bar.
highest probable
entry temperature Outlet This is the temperature of the source at the flange on the downstream side of
into the system Temperature the valve.
which will in turn If the enthalpy method chosen is the Ideal Gas model, then this temperature
give the highest is used to determine the enthalpy of the source at the entrance to the pipe
velocities. network, otherwise this enthalpy is calculated from the upstream pressure and
temperature. If the Set button was clicked and the enthalpy model is Peng
Robinson, Soave Redlich Kwong or Lee Kesler then the outlet temperature will
be calculated from the upstream temperature and pressure after isenthalpic
expansion to the defined MABP. Valid values are between -250oC and 1500oC.
continued

6 Nodes 89
Field Description
Mass Flow This is the mass flow of the source. Valid values are between 0 and
100,000,000 kg/hr.
Flange This is the diameter of the flange at the valve discharge.
Diameter The flange diameter may be left unknown in which case it will be assumed to
be the same as the outlet pipe.

Composition Tab
The fluid composition is specified here.
Fig 6.28

The following fields are available on this tab:

Field Description
Basis This is the composition basis, which may be either Mol. Wt., Mole Fraction or Mass
Fraction.
Mol. Wt. It is the molecular weight of the fluid. You can only enter data here if the
composition basis selected is Molecular Weight. Valid values are between 2 and 500.
If the composition basis selected is Mole or Mass Fraction, the molecular weight is
updated when you enter or change the component fractions.
Fluid Type If Molecular Weight is selected in the composition basis drop-down list, you need to
select the Fluid Type to calculate a binary composition in order to match the
molecular weight. If the two components of the specified fluid type are not found
then the other components are used.
Component This is the fluid composition in either mole or mass fractions. You can only enter
Fractions data here if the composition basis selected is Mole or Mass Fraction.
When you exit the Source view, you will be prompted about the Invalid Composition
if the sum of these fractions is not equal to one. You can normalize the composition
by either manually editing the component fractions or by clicking the Normalize
button.
If the composition basis selected is Molecular Weight, the component fractions are
estimated when you change the molecular weight.

6 Nodes 90
Methods Tab
Calculation methods are specified here.
Fig 6.29

The following fields are available on this tab:

Fields Description
VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows
(see Appendix A - Theoretical Basis):
Compressible Gas - Real Gas relationship.
Peng Robinson - Peng Robinson Equation of State.
Soave Redlich Kwong - Soave Redlich Kwong Equation of State.
Vapor Pressure - Vapor Pressure method as described in API Technical Data
Book - Volume 1.
Model Default - If this is selected, the Default method for the VLE method
(as defined on the Calculation Options view) will be used.
Swage Group
Fittings Loss The available options are;
Method Equal Static Pressure – Pressure drop calculation is ignored and static
pressure is balanced.
Calculated – Pressure drop is calculated in accordance with the Swage
method.
Isothermal If this option is set to Yes, the inlet temperatures used for the size change
Pressure Drop calculations in the control valve will not update during iterative calculations
for pressure loss i.e. a PT flash will be used to update the inlet properties.
If the option is set to No then a more rigorous PH flash will be used to
update the inlet properties.
The control valve will do one size change calculation from the defined
flange diameter to the outlet pipe diameter. This will normally be an
expansion.
continued

6 Nodes 91
Fields Description
Setting this option to Yes can speed up calculations in some cases at cost of
a minor loss of accuracy.
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase flow
Correction will be calculated using properties corrected for liquid slip. If set to No then
the homogeneous properties of the fluid will be used in calculating the
pressure loss coefficient.
Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible flow
through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the assumption
of incompressible flow. If the pressure loss expressed as a percentage of the
inlet pressure is greater than the defined compressible transition value then
the pressure drop will be recalculated using the compressible flow method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients are
calculated using HTFS correlations
The Incompressible method calculations are faster but will be less accurate
at higher pressure drops. The Transition method can cause instabilities in
some cases if the calculated pressure drop is close to the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure at
Transition which compressible flow pressure drop calculations should be used. It applies
only when the Transition method is selected.
Sizing Group
Sizing Method The two Sizing Method options available are:
API (1976) - American Petroleum Institute method in the 1976 edition of RP
520 pt 1
HEM - Homogeneous Equilibrium Model
API (2000) - American Petroleum Institute method in the 2000 edition of RP
520 pt 1
Back Pressure Back pressure to be used for rating the relief valve. If this value is not
specified then the maximum allowable back pressure is used.

Multiphase Cd Discharge coefficient to be used of relief valve in multiphase service


Liquid Cd Discharge coefficient to be used for relief valves in liquid service
Kb User defined back pressure correction factor. If this field is left blank then
the back pressure correction factor is calculated. This value should only be
specified in exceptional cases.
Estimated
Properties at
Header
Conditions
Group
Vapor Fraction The initial estimates for the flow profile in looped systems are generated
based on the assumption of vapor phase flow without any liquid knockout in
the system. It is not uncommon for sources to pass through a knockout
drum before connection to the main header (see Figure 6.17). Specification
of an estimate of vapor fraction of the fluid at the knockout drum can
considerably enhance the automatically generated flow profile.
If this value is not specified then it is assumed to be all vapor.
Vapor Mol. Wt. Specify the estimated vapor molecular weight for the vapor fraction given
above.
If this value is not specified then it is assumed to be the same as that of the
total fluid.

6 Nodes 92
Inlet Piping Tab
Details of the piping between the protected equipment and the inlet to the
relief valve are specified here. This data is used to calculate the pressure drop
in the inlet piping to ensure that it does not exceed the recommended limit of
3% of the inlet pressure. The diameter of the inlet piping is also used to
calculate the inlet velocity of the source fluid when the Include Kinetic
Energy option is selected in the Calculation Options view.
Fig 6.30

The available fields are:

Fields Description
Length The length of the inlet piping.
Elevation The change in elevation of the inlet piping. This cannot be greater than the
Change length of the piping.
Properties
Group
Material The material of the inlet pipe either Carbon Steel or Stainless Steel.
Roughness The surface roughness of the inlet pipe. Whenever a material is selected, the
absolute roughness is initialized to the default value for the material as defined
on the Preferences view. Valid values are between 0.00001 inches and 0.1
inches.
Diameter
Nominal The nominal pipe diameter used to describe the inlet pipe size. For pipes with
Diameter a nominal diameter of 14 inches or more, this will be the same as the outside
diameter of the pipe.
Schedule If a pipe schedule other than “-” is selected, you will be able to select a
nominal pipe diameter from the pipe databases. It will not be necessary to
specify the internal diameter. If you select “-” you will be unable to select a
nominal pipe diameter from the pipe databases and you will then have to
specify both the internal diameter.
Internal The pipe diameter used for the pressure drop calculations.
Diameter
continued

6 Nodes 93
Fields Description
Use Pipe Class Select this checkbox to restrict the sizes of the inlet piping selected by
FLARENET to those defined by the Pipe Class tool.
Fittings
Groups
Loss Enter the A and B parameters for the following fittings “K” factor equation in
Coefficient which Ft is the friction factor for fully developed turbulent flow:
K = A + BFt .
Valid values are any positive number or 0.

Summary Tab
The result of the calculations is displayed.
Fig 6.31

Source Tools
The initial sizing of a flare system is time consuming both in terms of time
taken to build the model and the computation time. Using an Ideal Gas
method can speed up the calculation during the initial sizing estimation.
Speed is an important issue during sizing calculations especially for a complex
multiple scenario case. Typically, the back pressure should be used for
calculations. Rigorous rating calculation for all scenarios can be done by the
Peng Robinson enthalpy method or any other enthalpy methods with pressure
dependency and provides the down stream temperature.

Updating Downstream Temperatures


The downstream temperatures are only used to define the system entry
temperature when ideal gas enthalpies are used. After several cycles of rating
and sizing calculations, the original values for each source may no longer be
valid. These values may be updated to reflect the results of the last
calculation using an equation of state enthalpy method as follows.
Select Refresh Source Temperatures from the Tools menu.

6 Nodes 94
Adding Single Source Scenarios
The thorough evaluation of a flare network will require the evaluation of many
scenarios. In most systems, there will be the possibility of each relief valve
lifting on its own. In the case of a petrochemical complex, this could have
several hundred relief valves and the task of setting up the scenarios for each
relief valve would be time consuming and error prone.
Once all the major scenarios have been defined, select Add Single Source
Scenarios from the Tools menu. Click Yes to allow FLARENET to analyze the
existing scenarios to determine the greatest flow rate for each relief valve and
create a scenario using this data.

Flare Tip
The Flare tip is used to model outflows from the system. It can model either
ignited combustible gas flare tips or open vents. Non physical equipment such
as a connection to a fixed pressure exit at a plant boundary can also be
modeled.

Connections Tab
The name of the flare tip and connectivity information is specified here.
Fig 6.32

The following fields are available on this tab:


The location can have
an alphanumeric
name. This feature is
Field Description
useful for large
flowsheets, because Name The alphanumeric description of the node (e.g. - HP Flare Tip).
you can provide a
different “location” Location You may want to specify the location of the node in the plant.
name to different Inlet Either type in the name of the pipe segment or select from the drop-down list.
sections to make it At You can specify the end of the pipe segment attached to the flare tip.
more comprehensible.
Ignore Select the ignore checkbox to ignore this flare tip in the calculations. Clear the
checkbox to re-enable it.

6 Nodes 95
Calculations Tab
Calculation methods are specified here.
Fig 6.33

The following fields are available on this tab:

Field Description
Diameter You can specify a diameter for the tip.
If this value is not specified then the diameter of the connected pipe is
used.
Methods Group
Use Curves Select this checkbox if you are supplying pressure drop curves to
calculate the pressure drop of the flare tip. Data for these curves is
entered on the Curves tab.
Fittings Loss The fitting loss coefficient will be used to calculate the pressure drop
Coefficient through the flare tip.
Fittings Loss Select whether the supplied Fittings Loss Coefficient will calculate the
Coefficient Basis Total Pressure loss including velocity pressure loss or Static Pressure loss
only.
Isothermal If this option is set to Yes, the inlet temperatures used for the size
Pressure Drop change calculations in the flare tip will not update during iterative
calculations for pressure loss i.e. a PT flash will be used to update the
inlet properties. If the option is set to No then a more rigorous PH flash
will be used to update the inlet properties.
The flare tip will do a one size calculation for the change in diameter
between inlet pipe and the flare tip.
Setting this option to Yes can speed up calculations in some cases at cost
of a minor loss of accuracy.
Pipe To Flare Tip
Swage Group
Two Phase If this option is set to Yes then the pressure loss coefficient in two phase
Correction flow will be calculated using properties corrected for liquid slip. If set to
No then the homogenous properties of the fluid will be used in calculating
the pressure loss coefficient.
continued

6 Nodes 96
Field Description
Method The following options are available:
Compressible - pressure losses will be calculated assuming compressible
flow through the connector at all times.
Incompressible (Crane) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients
are calculated using Crane coefficients.
Transition - pressure losses will be calculated initially using the
assumption of incompressible flow. If the pressure loss expressed as a
percentage of the inlet pressure is greater than the defined compressible
transition value then the pressure drop will be recalculated using the
compressible flow method.
Incompressible (HTFS) - pressure losses will be calculated assuming
incompressible flow through the connector at all times. Loss coefficients
are calculated using HTFS correlations
The Incompressible method calculations are faster but will be less
accurate at higher pressure drops. The Transition method can cause
instabilities in some cases if the calculated pressure drop is close to the
transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet pressure
Transition at which compressible flow pressure drop calculations should be used. It
applies only when the Transition method is selected.

Curves Tab
User specified pressure drop curves are specified here. These will only be
used if the Use Curves field on the Calculation Tab is unchecked.
Fig 6.34

6 Nodes 97
Field Description
Ref. Temp. Enter the reference temperature to which the pressure drop curves
correspond. All curves must be for the same reference temperature.
Pressure Correction If checked then the static pressure correction takes into account density
differences due to both the calculated inlet pressure and calculated inlet
pressure. The temperature correction is automatically applied but this
box must be checked in order for pressure effects to be modeled. This
box should normally be checked
Mol. Wt. Enter the molecular weight at which the pressure drop curve applies. The
Add Mol. Wt button can be used to add additional curves. The drop-down
list can then be used to select which pressure drop curve is displayed.
The Delete Mol. Wt button will delete the selected pressure drop curve.
Mass Flow/Pres. These pairs of data define points in the pressure drop curve. Points may
Drop be added and removed from the curve by using the Add and Delete
buttons. Up to 10 data points can be supplied for each curve. Pressure
drops for flows between those in the table are calculated using linear
interpolation.
Mol. Wt. If this field is checked then extrapolation beyond the range of supplied
Extrapolation molecular weight curves is performed if necessary, otherwise the
bounding molecular weight curve is used.
Flow Extrapolation If this field is checked then extrapolation beyond the range of supplied
mass flow rates is performed if necessary, otherwise the bounding mass
flow is used.

Summary Tab
The result of the calculation is displayed.
Fig 6.35

6 Nodes 98
7 Calculations

Calculation Options
The selection of settings and options for the calculations is managed from the
Calculation Options Editor view. To access the Calculation Options Editor view,
select Options from the Calculations menu.

General Tab
Global calculation parameters and calculation options are specified here.
Fig 7.1

7 Calculations 99
The following fields are available on this tab:

Field Description
External
Conditions Group
Atmospheric Specify the atmospheric pressure. The default values are 1.01325 bar
Pressure abs or 14.696 psia.
Ambient The Ambient temperature must be in the range -100oC to 100oC.
Temperature
Wind Velocity The average wind velocity.
Enable Heat If checked, heat transfer calculations between pipe segments and the
Transfer surroundings are performed for those pipe segments that have Heat
Transfer with Atmosphere enabled.
External Radiative If checked, heat transfer calculations between pipe segments and the
HTC surroundings will include the external radiative heat transfer coefficient
for those pipe segments that have External Radiative HTC enabled
Energy Balance
Group
Include Kinetic If checked the kinetic energy of the fluids entering and leaving each node
Energy is included in the energy balance. Specifically:

v2
If checked the energy balance equation is H0 = H + , which is
2
constant across each node.

If not checked the energy balance is H0 = H , which is constant across


each node.
Where:
H0 = stagnation enthalpy
H = fluid enthalpy
v = fluid velocity
Inlet Velocity This entry selects the velocity to be used to determine the kinetic energy
of the fluids entering the flare system when required. The choices are:
Inlet Pipe Velocity - The inlet pipe diameter defined for each relief valve
and control valve is used to determine the inlet velocity.
Zero Velocity - The velocity of the fluid at the inlet to each relief valve
and control valve is 0.0.
Mode Group
Calculation Mode This drop-down list selects and displays the current calculation mode. The
options are:
Rating - It is used to check the existing flare system in a plant. This
method calculates the pressure profile for the existing pipe network.
Design - It is used to design a new flare system for the plant. During
calculation it adjusts the diameters of all pipes until all the design
constraints of MABP, velocity, etc, have been met. These diameters can
be smaller than the initially defined data.
Debottleneck - It is used to determine sections of the flare system that
must be increased in size due to either the uprating of the existing plant
and hence flare loading, or the tie-in of new plant. It can only increase
existing pipe sizes, not reduce them.
The calculation mode can also be set using the selector on the main
toolbar.
continued

7 Calculations 100
Field Description
Calculate Ignored If checked this causes sources that have been ignored to be treated as if
Sources with Zero they have a zero flow. This will result in the back pressure being
calculated and limit checked against the source MABP even if the source
has been ignored.
Use MABP for If checked this causes the back pressure for inactive sources to be
Inactive Sources calculated and then used to trigger pipe size changes during design
When Sizing calculations. Otherwise these sources will be ignored when determining
required pipe sizes. An inactive source is one that is ignored or has a zero
flow.
Ignore Source to If checked this causes the pressure loss resulting from the size change
Pipe Pressure Loss between flange diameter of control or relief valves and the outlet pipe to
in Design Mode be ignored during design calculations. Selecting this option will speed up
calculations and reduce instability in cases where the flange diameter has
been set to an unrealistically small value.
Choked Flow Check If left unchecked, velocities will not be limited to the sonic condition. This
is useful in sizing calculations since the mach number limitations will still
be met by the time the final solution is reached. Calculation speed is
greater at the risk of numerical instability and convergence failure.
Rated Flow for If checked, the rated flow will be used in the pressure drop calc
Tailpipes calculations for the tailpipes (as opposed to the actual flowrates). The API
guide for the Pressure-Relieving and Depressuring Systems recommends
that tailpipes be sized based on the rated capacity.
Rated Flow For If checked, the rated flow will be used in the pressure drop calc
Nodes Attached To calculations for the nodes attached to tailpipes (as opposed to the actual
Tailpipes flowrates
Rated Flow For If checked, the pressure loss in the inlet piping to relief valves will be
Inlet Pipes based upon the rated flow for the valve rather than the nominal flow.
Warn At A warning will be issued if the non recoverable pressure loss in the inlet
piping to a relief valve exceeds this percentage of the maximum
allowable working pressure (set pressure)

7 Calculations 101
Scenarios Tab
The Scenarios tab allows the selection of the scenarios that will be calculated.
The options provided by the Calculate drop-down list are Current Scenario,
All Scenarios and Selected Scenarios.
Fig 7.2

If the option is set to Selected Scenarios the only scenarios calculated will
be those where the checkbox is selected in the Calculate column next to the
scenario name.
The scenario selection setting is also used to determine which scenario data
will be exported by the Data Export option i.e. only those scenarios which are
selected for calculation will be exported.
Note: The current scenario is displayed in the scenario selector on
the main FLARENET toolbar. The current scenario may be changed
either using the Scenario Selector on the main toolbar or by
selecting a scenario in the Scenario Manager and clicking the
Current. See Selecting Components.

7 Calculations 102
Methods Tab
Global calculation methods are specified here.
Fig 7.3

The following fields are available on this tab:

Input Field Description


Refer to Appendix A –
Properties
Theoretical Basis for
Group
more details.
VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows:
(Overall) Compressible Gas - Real Gas relationship.
Peng Robinson - Peng Robinson Equation of State.
Soave Redlich Kwong - Soave Redlich Kwong Equation of State.
Vapor Pressure - Vapor Pressure method as described in API Technical Data
Book - Volume 113.
Enthalpy The following calculation method for the determination of fluid enthalpies are
Method available:
(Overall) Ideal Gas - This method uses the specified downstream temperature of a
source to calculate the heat balance within the network.
Peng Robinson - The Peng Robinson enthalpy is determined rigorously.
Soave Redlich Kwong - The Soave Redlich Kwong enthalpy is determined
rigorously.
Lee-Kesler - This method uses the specified upstream temperature and
pressure of a source to calculate the heat balance within the network. The Lee
Kesler enthalpies may be more accurate than the Property Package enthalpies,
but they require solution of a separate model.
continued

7 Calculations 103
Input Field Description
VLE Method The VLE method that will be used for the estimation of the temperature at the
(Source downstream flange for source nodes. The options are the same as for the
Outlet Overall VLE Method.
Temperature
Estimation)
Enthalpy The enthalpy method that will be used for the estimation of the temperature at
Method the downstream flange for source nodes. The options are the same as for the
(Source Overall enthalpy Method.
Outlet
Temperature
Estimation)
Pressure
Drop Group
Horizontal The options are:
and Inclined Isothermal Gas - This is a compressible gas method that assumes isothermal
Pipes expansion of the gas as it passes along the pipe. FLARENET uses averaged
properties of the fluid over the length of the pipe. The outlet temperature from
the pipe is calculated by adiabatic heat balance either with or without heat
transfer. Pressure losses due to change in elevation are ignored.
Adiabatic Gas - This is a compressible gas method that assumes adiabatic
expansion of the gas as it passes along the pipe. As with the Isothermal Gas
method, pressure losses due to changes in elevation are ignored.
Beggs & Brill - The Beggs and Brill method is based on work done with an air-
water mixture at many different conditions, and is applicable for inclined flow.
For more details, see Appendix A - Theoretical Basis.
Dukler - Dukler breaks the pressure drop in two-phase systems into three
components - friction, elevation and acceleration. Each component is
evaluated independently and added algebraically to determine the overall
pressure drop. For more details, see Appendix A - Theoretical Basis.
Lockhart Martinelli – Lockhart Martinelli correlations models the two phase
pressure drop in terms of a single phase pressure drop multiplied by a
correction factor. Acceleration changes are not included.
Beggs and Brill (No Acc.) – The Beggs and Brill methods without the
acceleration term.
Beggs and Brill (Homog.) – The Beggs and Brill methods with a homogeneous
acceleration term.
Model Default - If this is selected, the Default method for the
Horizontal/Inclined method (as defined on the Calculation Options Editor view)
will be used.
Vertical Pipes The options are:
Isothermal Gas - This is a compressible gas method that assumes isothermal
expansion of the gas as it passes along the pipe. FLARENET uses averaged
properties of the fluid over the length of the pipe. The outlet temperature from
the pipe is calculated by adiabatic heat balance either with or without heat
transfer. Pressure losses due to change in elevation are ignored.
Adiabatic Gas - This is a compressible gas method that assumes adiabatic
expansion of the gas as it passes along the pipe. As with the Isothermal Gas
method, pressure losses due to changes in elevation are ignored.
Beggs & Brill - Although the Beggs and Brill method was not originally intended
for use with vertical pipes, it is nevertheless commonly used for this purpose,
and is therefore included as an option for vertical pressure drop methods. For
more details, see Appendix A - Theoretical Basis.
Dukler - Although the Dukler method is not generally applicable to vertical
pipes, it is included here to allow comparison with the other methods.
continued

7 Calculations 104
Input Field Description
Orkiszewski - This is a pressure drop correlation for vertical, two-phase flow
for four different flow regimes - bubble, slug, annular-slug transition and
annular mist. For more details, see Appendix A - Theoretical Basis.
Lockhart Martinelli – Lockhart Martinelli correlations models the two phase
pressure drop in terms of a single phase pressure drop multiplied by a
correction factor. Acceleration changes are not included.
Beggs and Brill (No Acc.) – The Beggs and Brill methods without the
acceleration term.
Beggs and Brill (Homog.) – The Beggs and Brill methods with a homogeneous
acceleration term.
Model Default - If this is selected, the Default method for the Vertical method
(as defined on the Calculation Options Editor view) will be used.
Two Phase For two-phase calculations, the pipe segment is divided into a specified
Elements number of elements. On each element, energy and material balances are
solved along with the pressure drop correlation. In simulations involving high
heat transfer rates, many increments may be necessary, due to the non-
linearity of the temperature profile. Obviously, as the number of increments
increases, so does the calculation time; therefore, you should try to select a
number of increments which reflects the required accuracy.
Friction Factor The Friction Factor Method applies only when you have entered a value for
Method friction factor. The options are:
Round - This method has been maintained primarily for historical purposes in
order for older FLARENET calculations to be matched. It tends to over predict
the friction factor by up to 10% in the fully turbulent region.
Chen - It should always be the method of preference since it gives better
predictions at the fully turbulent flow conditions normally found within flare
systems.

7 Calculations 105
You can set the level Warnings Tab
of detail of the
warnings by checking There are three groups available on the Warnings tab:
the appropriate • Design Problems.
checkboxes. By
default, they are all • Calculation Problems.
checked.
• Sizing Status.
Fig 7.4

Design Problems Group


The following options can be selected in this group:
• Mach Number.
• Velocity.
• Rho V2.
• Noise.
• Back Pressure.
• Choked Flow.
• Slug Flow.
• Temperature.
• Carbon Steel Min./Max Temp.
• Carbon Steel Min./Max Temp.

7 Calculations 106
Calculation Problems Group
The Calculation Problems group contains the following checkboxes:
• Physical properties Failure.
• Heat Balance Failure.
• Choke Pressure Failure.
• Pressure Drop Failure.
• Liquid With Vapor Only Method.

Sizing Status Group


The checkboxes available in this group are:
• Initialization.
• Size Change.
• Limited Reached.

Solver Tab
Solver control parameters are specified here.
Fig 7.5

7 Calculations 107
The following fields are available on this tab:

Field Description
Tolerances Group
Properties Pressure This is the tolerance for the maximum difference between the pressure
used to calculate physical properties and the calculated inlet and outlet
pressures across the network. It should be tighter (i.e. smaller) than the
Unit Operations pressure tolerance and the Loop pressure tolerance.
Unit Operations This is the tolerance for the difference in pressure drop when iterating to
Pressure calculate the pressure drop for each individual unit operation.

Loop Pressure This is the tolerance for the maximum pressure difference between two
streams converging or diverging in a looped flare network. It should be
slacker (i.e. higher) than the properties pressure tolerance and unit
operations pressure tolerance.
Loop Mass Balance This is the tolerance for the maximum error in the mass balance over a
node where streams converge or diverge in looped system calculations.
Valid values are between 0.00001% and 10%; the default is 0.01%.
Iteration Limits
Group
Properties This is the maximum number of iterations allowed for converging the
inner properties pressure loop of a looped flare system, or for overall
convergence of a convergent flare system. The default of 25 should be
adequate for most cases.
Loop This is the maximum number of iterations allowed for overall
convergence of a looped flare system. The default is 500.
Damping Factors
Group
Properties This is the damping factor applied to the pressure step when solving the
inner properties pressure loop. Values less than 1.0 may be specified to
prevent oscillation in the properties pressure loop to improve
convergence.
Loop This is the damping factor applied to the steps taken when solving the
outer pressure / flow loop when solving looped systems. Values less than
1.0 may be specified to prevent oscillations in the pressure / flow loop to
improve convergence.
Loop Solver The following methods are available:
Newton-Raphson - provides the best combination of solution speed vs
convergence success.
Broyden - provides a faster solution than Newton-Raphson since the
Jacobian matrix computation is required less frequently, but requires
better initial guesses.
Force Convergent - this option may be used if you are modeling a
convergent flare system with two flare tips. This type of system is
commonly found on offshore production facilities. Use of the Newton-
Raphson solver with the Simultaneous structural analyzer may be faster
for these systems.
Conjugate Gradient Minimization, Quasi-Newton Minimization - provide a
very robust but slow solution method. These methods can be useful if
many Recycle warnings appear in the Trace number.
One Step - performs a single iteration using user estimates for the molar
flows.
Structural Analyzer This option selects the analyzer used by FLARENET to detect and initialize
looped systems. The options are:
continued

7 Calculations 108
Field Description
Convergent - this uses a heuristic forwards and backwards algorithm to
detect loops in the flare system and identify which pipes to use as tears.
It allows the user to control the initialization of the loop solver by
specifying the set of pipes that may be used as tears and flow estimates
through the Estimates tab of the Scenario Edit view.
The Simultaneous Simultaneous - this generates a simplified linear model of the flare
Structural Analyzer system and solves it to identify a set of tear stream. It will use the flow
should always be used estimates supplied by the user but will repeat its calculation ignoring
for new models. these if it does not find a valid solution. This analyzer always ignores any
specification of pipes to be used as tears.
In general the Simultaneous loop analyzer is faster and more reliable
than the Convergent analyzer and will calculate better initial estimates.
The Convergent analyzer should be used for compatibility with legacy
FLARENET cases or when the user wishes to force a particular set of pipes
to be used as tears and/or flow estimates.
Echo Error History When checked, it will generate additional messages giving details of
intermediate calculations. This should be left unchecked unless you have
convergence problems.
Preserve When checked, failure of calculations will not erase the results after the
Unconverged final iteration. This can be useful for the diagnosis of difficult problems.
Results for Looped
Calculations
Estimates Upon completion of the calculations, the tear flow estimates for the
scenario can be automatically updated. The options are:
Do Not Update – The estimates will not be updated.
Update If Converged – The estimates will only be updated if the
calculations have fully converged.
Always Update – The estimates will be updated regardless of the
convergence status.

Initialization Tab
Global parameters that can enhance convergence speed and reliability are
specified here:
Fig 7.6

7 Calculations 109
Field Description
Pressure This specifies the initial value for the pressure for physical property
calculations. It should be at least equal to the system exit pressure.
Length Multiplier This specifies a global length multiplier to be applied to all the pipes in the
system. It is useful in the early stages of flare system design to allow for
bends and other fittings losses that will not be known until later. This
global value is overridden by Length Multipliers defined for individual pipes.
Design Mode This drop-down list provides the following options:
Initialization Multiphase - FLARENET will assume that two phase flow is possible in the
flare system when determining the initial pipe sizes in Design mode.
Vapor - FLARENET will assume that all flows are vapor phase when
determining the initial pipe size in Design mode.
Selection of the Vapor option will initialize calculations with larger pipe
diameters than those selected for multiphase flow. This will speed up
design calculations but there will be a risk that some pipes will be
oversized.

Check Model
The Check Model menu option allows the user to check the current status of
the model to identify rapidly any data items that are likely to cause problems
during calculations or invalidate the results. Any items that are identified as
potential problems are displayed in the Model Check pop up view as shown
below.
Fig 7.7

The major checks carried out are:


• Ignored Pipes and Connector Nodes. A check is made for pipes and
connector nodes that have the ignored option selected to remove them
from the calculations. Since an ignored pipe or connector node will cause
all upstream sources, pipes and nodes to be excluded from in calculations
it is important that the user be aware of them. Source nodes are
commonly ignored so they are not included in this check.
• Zero Length Pipes. A check is made for pipes with a length of 0.0. While
it is legitimate to set a pipe length to 0.0 to temporarily eliminate its
pressure loss in a model, it is more likely that this indicates an oversight
on the part of the user or an incomplete data import.

7 Calculations 110
• Zero Diameter Pipes. A check is made for pipes with a diameter of 0.0.
A pipe diameter of 0.0 is likely to cause a calculation failure in all or part
of the model and is a problem that should be corrected by the user.
• Incomplete Connectivity. A check is made that all nodes and pipes are
completely connected without any dangling connections. While FLARENET
may be able to solve the incomplete network, it is likely that any missing
connections are a result of them being overlooked by the user or left
unspecified during data import from an external file.
• Damaged Connectivity. A check is made that all nodes and pipes have
specified connection points. Omission of these may result in a model that
will not solve correctly. This problem is more likely to arise from an
incomplete data import than normal interactive use of the program.
The Memory Button displays a view that shows memory usage and instance
counts for the components that comprise the model. This can be useful for
diagnosing performance related issues.
Fig 7.8

Starting The Calculations


To start the calculations, select Calculate from the Calculations menu.
The following words Alternatively, you could select the Start Calculations icon on the toolbar.
before the object on
the status bar show The status of the rating calculations is shown on the status bar. In the
the type of calculation following screen shot, the second display field on the status bar shows that
being performed: the node mass and energy balance calculations have been performed for Tee
B = Mass and Energy
1. The third display field shows firstly the inner properties loop iteration
Calculations number, then the maximum pressure error for that iteration and finally the
name of the pipe segment responsible for the error.
P = Pressure Drop
Calculations The fourth display field shows firstly the number of iterations taken by the
loop solver and then the error in the objective function being solved by the
loop solver.

7 Calculations 111
Fig 7.9

To abort calculations, click the Stop Calculations icon, which takes the place
of the Start Calculations icon during calculations.
Note: Due to speed considerations, it is recommended that sizing
calculations be performed subject to the constraints:

• Compressible Gas VLE


• Ideal Gas Enthalpy Method
• No Heat Transfer Calculations

Efficient Modeling Techniques


Efficient modeling of a flare network requires some forethought in order to
meet the primary objectives which are in general:
1 Definition of the design constraints for the flare system. These will usually
be defined by company standards or by local health and safety
regulations. If unavailable, standard texts such as API-RP-521 can be
used to select preliminary acceptable values.
2 Efficient acquisition of the data for the piping configuration and layout.
3 Definition of the scenarios or contingencies which should be evaluated.
Grass roots design will require analysis of a far wider range of scenarios to
those required by the simple expansion of a flare system to incorporate a
new relief valve.
4 Rapid construction of the computer model of the flare system.
5 Fast and efficient calculation of the computer model of the flare system.

Objectives 1 to 3 can only be achieved by the use of engineering skill and


judgment. Once complete, the efficient use of FLARENET can lead to a
satisfactory project conclusion.

7 Calculations 112
Data Entry
FLARENET has a wide range of methods for entering the data for each object
within the model. In general, you should use the method that you are most
comfortable with, but experience has shown that use of the PFD environment
for definition of the piping configuration and layout can save many man days
of labor with large flare networks.
Although there is no set order in which the model must be built, the
recommended sequence of data entry for building the model is:
1 Define the project description, user name, etc. by selecting Description
under File in the menu bar.
2 Set preferences for the default piping materials, type of tee, composition
basis, etc. from the Preferences view, accessed via the File command in
the menu bar. These may be overwritten on an object by object basis at
any stage. Ensure that the Edit Objects On Add checkbox is active if you
want to edit the object data as each new flowsheet object is created.
3 Define a pipe class if appropriate. This will ensure that you only use pipe
sizes as allowed by your project. Open the Pipe Class Editor using the
Tools command in the menu bar.
4 With the Calculation Options Editor, define default calculation methods for
VLE, Pressure drop, etc. To open this view, select Options under the
Calculations menu.
5 Define all the source nodes (relief valves and control valves) for the first
scenario. The first scenario should be the one that has the greatest level
of common data amongst the complete set of scenarios. The
recommended method of creation is to drag the nodes from the toolbox to
the PFD.
6 Define the design constraints on Mach number, noise, etc for the first
scenario using the Scenario Manager. To access this view, select the Build
menu, then Scenarios from the drop-down list.
7 Define the pipe network (common to all scenarios). If the network is to be
sized, some care must be taken in defining reasonable estimates for the
pipe diameters.
8 Add the next scenario by clicking the Add button on the Scenario
Manager. The data for the sources should be cloned from the previously
defined scenario that has the most similar data. Edit the design
constraints of this scenario if necessary.
9 Make the new scenario current. Highlight it on the Scenario Manager and
click the Current button.
10 Edit the source data for each source for the new scenario. Double click
sources on the PFD

Repeat steps #8 through #10 for all scenarios

7 Calculations 113
Calculation Speed
Calculation time will often be only a small percentage of the time taken to
construct the computer model. However, on low specification personal
computers, a sizing calculation for a complex multiple scenario model could
take several hours, if not days, if care is not taken in the selection of the
thermodynamic models or in the definition of the component slate.
When considering the desired accuracy for the calculations, due consideration
must be given to the fact that you are modeling a system that will rarely if
ever come close to a steady state condition, with a steady state modeling
tool.

Component Slate
As a rule of thumb you can assume that the calculation time is proportional to
the square of the number of components. This is especially true when the VLE
is calculated by an equation of state instead of treating the fluids as a simple
compressible gas.
Flare systems generally operate at conditions in which heavy components
such as hexane or heavier will stay in the liquid phase throughout the system.
You should therefore endeavor to characterize the heavy ends of petroleum
fluids by as few components as possible. The properties that you use for the
characterization should be optimized to:
• Ensure the component stays in the liquid phase.
• Match the liquid phase density.

VLE Method
Source compositions may be modeled either by definition of a molecular
weight or by a detailed component by component analysis. When a
composition is defined solely by molecular weight FLARENET analyzes the
user defined component slate to select a pair of components whose molecular
weights straddle the defined value. A binary composition is then calculated to
match this value. This type of fluid characterization is only suitable for
network analyses in which the fluids are assumed to be vapor, since the VLE
behavior cannot be reasonably predicted from this level of detail. Thus the
Compressible Gas VLE method is the only one that should ever be used in
association with molecular weight modeling.
When modeling using a detailed component by component analysis, if you are
confident that the system will be liquid free then the Compressible Gas VLE
method should be used since it does not have the overhead of determining
the vapor/liquid equilibrium split. The computation time for the fluid
properties then becomes several orders of magnitudes faster that those
involving a liquid phase.
When modeling a system in which two phase effects are important,
consideration must be given to the pressures both upstream of the sources
and within the flare piping. The Vapor Pressure VLE method, which is the
fastest of the multiphase methods, is, strictly speaking, only valid for
pressures below 10 bar. The reduced temperature of the fluid should also be
greater than 0.3. Experience has shown that it also works to an acceptable
degree of accuracy for flare system analysis at pressures well beyond this. If

7 Calculations 114
speed is an issue, then it is recommended that a scenario with as many active
sources as possible be rated both using one of the cubic equations of state
and this method. If acceptable agreement between the results is achieved
then it may be reasonably assumed that the extrapolation is valid.

Sizing Calculations
The final calculations upon which a flare system is built should of course be
made using the most detailed model consistent with the quality of data
available, but for initial sizing calculations a number of points should be
considered when selecting appropriate calculation methods.
• There is not generally a great deal of difference between the pressure
drops calculated for a two phase system, whether calculated by treating
the system as a compressible gas or as a two phase fluid. This occurs
since as the fluid condenses the velocities will decrease but the two-phase
friction factor will increase.
• Unless choked flow is allowed in the system, the back pressure on each
source should not vary greatly with line size. The specification of a
reasonable fixed downstream temperature for each source for use with the
ideal gas enthalpy model should therefore give reasonable results.
The recommended procedure for performing sizing calculations is as follows:
1 Build the network using reasonable estimates for the pipe diameters.
Estimate the diameters from:

W
d=
300 PM
d = Diameter (m)
W = Mass flow (kg/s)
P = Tip pressure (bar abs)
M = Design mach number
2 Rate the network for all the scenarios with your desired detailed model for
the VLE and enthalpies. This will give reasonable temperatures
downstream of each source.
3 Copy the calculated temperatures downstream of each source to the
source data by the Refresh Source Temperatures option under the
Tools menu.
4 Size the network for all scenarios using Compress Gas VLE and Ideal Gas
enthalpies.
5 Rate the network for all the scenarios with your desired detailed model for
the VLE and enthalpies. If there are any design violations, make a
debottlenecking calculation with these methods.

7 Calculations 115
8 Databases

Overview
The data for the various installable components of the model are stored in
user-modifiable database files.
The database files are:
• SCHEDULE.MDB - The pipe schedule database. This contains data for
both carbon steel and stainless steel pipe.
• FITTINGS.MDB - The pipe fittings database.
• COMPS.MDB - The pure component database.
These files are initially installed to the Database sub-directory in your main
FLARENET directory.
Note: You may add and edit your own data to the databases.
However, you cannot edit or delete any of the original data.

The databases may be password protected by a single password common to


each. If the password has been disabled, or an incorrect access password has
been entered, the databases may be reviewed in read-only mode. You must
have defined an access password before any database can be edited.
Note: Original data is always read-only.

8 Databases 116
Database Features
Selection Filter
The Selection Filter may be used to restrict the data which is shown. You may
use the following wildcard characters:
• ? - Represents a single character.
• * - Represents a group of characters of undefined length.
• Any filter string has an implied * character at the end.
Some examples are shown below:

Filter Application Result


As you navigate
*0 Pipe Schedule 10, 20, 30, 40, 60, 80, 100, 120, 140, 160
through the table, you
will see that the 1?0 Pipe Schedule 100, 120, 140, 160
standard database 1* Pipe Schedule 10, 100, 120, 140, 160
records are shown in
*90* Fittings All 90 degree bends and elbows
black. User-defined
records, which may be *Entrance* Fittings All Pipe Entrance fittings
edited, are shown in *thane Components Methane, Ethane
blue.
M* Components Methane, Mcyclopentane, etc.

8 Databases 117
Maneuvering Through the Table
Click the table to select a record, and then navigate through the table using
the navigator and scroll bar controls.
Fig 8.1

Printing
Click the Print All button to print the pipe schedule, fittings or component
data, depending on which editor you are currently using. FLARENET prints
formatted output using the default printer settings.

Adding/Deleting Data
When the Add button is clicked, the cursor will move to the last record on the
table and insert a new record that contains dummy data. You should override
this data with your actual data.
Note: User-defined data is shown in blue.

When you add items, they will then become immediately available to the
simulation.
Click the Delete button to delete the current record.
Note: You can only delete your own data.

Click OK to close the Database Editor view.

8 Databases 118
Setting The Password
To set or modify the password:
1 Select Set Password from the Database menu on the menu bar.
The Password Editor view will now be displayed.
Fig 8.2

If you have already


set your password,
you first need to enter
the existing password
before supplying the 2 Enter your existing password in the Old Password field.
new one.
3 Enter your new password in both the New Password and Confirm New
Password field and then click OK, or Cancel to abort the procedure.

Pipe Schedule Database Editor


The Pipe Schedule Database Editor allows you to view the pipe schedule data
for all pipes in the database, and to add and edit user-defined entries.
To use the Pipe Schedule Database Editor, select Pipe Schedule from the
Database menu. After you enter the password, the Pipe Schedule Database
Editor view will be displayed, as shown in Fig 8.3.

8 Databases 119
Fig 8.3

If you have already


set your password,
you will need to enter
the password before
accessing the
databases.

Select the material you want to view using the Material drop-down list. This
may be either Carbon Steel or Stainless Steel.
The Nominal Diameter, Schedule, Internal Diameter, Wall Thickness and
Group for each entry is tabulated.
The database can be modified by either adding or deleting the entries using
the Add or Delete button, respectively. Click the Print All button to print the
database to the printer defined in the Printer Setup view.
For information on the Database view features that are common to the Pipe
Schedule, Fittings and Components Databases, see Database Features.

8 Databases 120
Fittings Database Editor
The Fittings Database Editor allows you to view the pipe fittings data for all
fittings types in the database, and to add and edit user-defined entries.
To display the Fittings Database Editor, select Pipe Fittings from the
Database menu. After you enter the password, the Fittings Database Editor
view will be displayed, as shown in Fig 8.4.
Fig 8.4

The description of each fitting, as well as the A and B term in the pipe fitting
equation is tabulated. The Reference defines the literature source for the
data.
The pipe fitting equation is:
K = A + BFt
For information on the Database view features that are common to the Pipe
Schedule, Fittings and Components Databases, see Database Features.

8 Databases 121
Component Database Editor
The Component Database Editor allows you to view the component data for
all the pure components in the database, and to add and edit user defined
entries.
To display the Component Database Editor, select Component from the
Database menu. After you enter the password, the Component Database
Editor view will be displayed, as shown in Fig 8.5.
Fig 8.5

The data for each component in the database is tabulated.


For information on the Database view features that are common to the Pipe
Schedule, Fittings and Components Databases, see Database Features.

Importing Component Data


Additional components may be added to the database via an ASCII file whose
format is given in Appendix B – File Format.
The component data file can be read into FLARENET by clicking the Import
button on the Component Database Editor view.
The Import button is unique to the Component Database Editor. This feature
allows you to specify the text file, which must be created previously within
HYSIM, on the Select Import File view.

8 Databases 122
Fig 8.6

A utility to create this file from a HYSIM case is supplied. Two steps are
necessary in order to import component data from HYSIM Version 2.60 into
the component database.
1 Export the component data from HYSIM. A calculator program must be
executed within HYSIM in order to convert the component data to the
proper format.
2 Import the component data into FLARENET, via the component database
editor.

In order to create the HYSIM transfer file:


1 Load the HYSIM case containing the component data into HYSIM.
2 At the main HYSIM command line prompt, type the command !EXPORT.
You must previously have copied the file EXPORT.HCL into the HYSIM
working directory from the \HYSIM directory under your main program
directory. This need be done only once.
3 When prompted for the name of the export file, enter the file name. This
file will be given the extension .TXT. The transfer file will now be created
(in your HYSIM directory).

8 Databases 123
9 Viewing Data and Results

Tabulated Data and Results can be viewed from the View menu in the menu
bar.
Note: For all of these views, columns can be resized and moved as
described in Changing Column Width and Changing Column Order.

Components Data
Properties for all components in the current case can be viewed by selecting
Data-Components from the View menu. Alternatively, you can use the key
combination ALT V D C.
Fig 9.1

Hypothetical components can be edited and database components viewed in


the Component Editor view, by double clicking on any cell in the appropriate
row. For more information on editing the components see Adding/Editing
Components.

9 Viewing Data and Results 124


Scenarios Data
Scenario data for all the scenarios in the case can be viewed by selecting
Data-Scenarios from the View menu. Alternatively, you can use the key
combination ALT V D C.
Fig 9.2

The Scenario Editor can be accessed by double clicking on any cell in the
appropriate row. See Adding/Editing Scenarios for more information on
editing scenarios.

Pipes Data
Properties of the pipe network on a segment-by-segment basis can be viewed
by selecting Data-Pipes from the View menu. Alternatively, you can use the
key combination ALT V D P.
Fig 9.3

9 Viewing Data and Results 125


You can edit an individual segment by double clicking on any cell in the
appropriate row. See Pipes Network for more information on editing pipe
segments.
Segments that are resizable are displayed in black and segments that are not
resizable are displayed in blue. Once calculations are performed (and
convergence is achieved), all segments whose size has been changed are
displayed in magenta.

Sources Data
Source data can be viewed by selecting Data-Sources from the View menu.
Alternatively, you can use the key combination ALT V D P.
Fig 9.4

To change scenarios,
you could select the
appropriate scenario
tab, or select one You can edit an individual source by double clicking on any cell in the
from the Scenario appropriate row. See Boundary Nodes for more information on editing
Manager. sources.
To view source data for a different scenario select the appropriate scenario in
the scenario selector on the toolbar, and the Sources view will change
accordingly.

9 Viewing Data and Results 126


Nodes Data
Properties for all the nodes in the current case can be viewed by selecting
Data and then Nodes from the View menu. Alternatively, you can use the
key combination ALT V D N.
Fig 9.5

You can edit an individual node by double-clicking on any cell in the


appropriate row. For information on editing nodes see Node Manager.
The messages that
are displayed depend
on the Message
options you have
selected (see
Messages
Warnings Tab). Messages can be viewed by selecting Results-Messages from the View
menu. Alternatively, you can use the key combination ALT V R M.
Note: The result messages can be viewed only after you have run
the calculations.

9 Viewing Data and Results 127


Problems Tab
Any violations of the design constraints are shown on this tab.
The following design Fig 9.6
constraints will be
checked for violations:

Mach Number
Velocity
pv2
Noise
Back Pressure
Temperature
Slug Flow
Ice Formation

Data Echo Tab


The Data Echo tab shows the options chosen for the calculation.
Fig 9.7

9 Viewing Data and Results 128


Solver Tab
This tab displays any complications encountered by the solver.
Fig 9.8

Sizing Tab
This tab displays the sequence of line size changes during sizing calculations.
Fig 9.9

9 Viewing Data and Results 129


Loops tab
This tab displays the solution history for looped network calculations.
Fig 9.10

The following
variables are shown:
Mass Flowrate
Molar Flowrate
Rated Flowrate
Static Pressure Drop
Noise
Static Source Back
Pressure

Pressure/Flow Summary
Upstream (US) Static
Pressure
US Temperature
US Velocity After running the case, you can view the Pressure/Flow Summary by
US Mach No.
US Rho V2
selecting Results-Pressure/Flow Summary from the View menu.
US Energy Fig 9.11
Downstream (DS)
Static Pressure
DS Temperature
DS Velocity
DS Mach No.
DS Rho V2
DS Energy
Flow Regime
Static Pipe
Acceleration Loss
Static Pipe Elevation
Loss
Static Pipe Fittings
Loss
Friction Factor
Reynolds Number
Duty
Overall HTC
External HTC
Internal HTC
Equivalent Length
Physical Length

9 Viewing Data and Results 130


If any value violates a design limitation (e.g. - a Mach number is greater than
the maximum allowable Mach number), it is displayed in emboldened red.

Compositions
After running the case, you can view the Compositions for each pipe segment
by selecting Results-Compositions from the View menu. You can also use
the ALT V R C key combination to access the view.
Fig 9.12

The Compositions view may not be available if Save Phase Properties is not
active on the General tab of the Preferences Editor view.

9 Viewing Data and Results 131


Physical Properties
After running the case, you can view the Physical Properties for each pipe
segment by selecting Results-Physical Properties from the View menu.

The following Alternatively, you can use the key combination ALT V R R.
properties are
displayed (Upstream
Fig 9.13
and Downstream):
Density
Enthalpy
Entropy
Phase Fraction
Heat Capacity
Molecular Weight
Surface Tension
Thermal Conductivity
Viscosity
Z Factor

The Physical Properties view may not be available if Save Phase Properties
is not active on the General tab of the Preferences Editor view.
You can view properties for different fluid phases by double-clicking anywhere
inside the view. Each line expands to display properties for the various
phases.
Fig 9.14
F = Fluid (Overall)
V = Vapor Phase
L = Liquid Phase
W = Water Phase
M = Mixed (Water &
Liquid)

9 Viewing Data and Results 132


Double clicking again, inside the view, will contract the view to its original
state.

Profile
After running the case, you can view the properties profile by selecting
Results-Profile from the View menu or by pressing the key combination ALT
V R P.

Fig 9.15
The following
properties profiles are
available:

Pressure
Temperature
Mass Flow
Molar Flow
Mach No.
Noise
Rho V2

You can select the property type from the drop-down list. The Profile displays
the profile from the selected Source (which may be chosen from the drop-
down list at the top of the view) to the Flare.

9 Viewing Data and Results 133


Five icons are available:

Name Icon Description


Print Print the graph using the current printer settings. The output
also includes important information such as the name of the
file, the scenario, and the model statistics.
Preview Print Previews a summary of what the print out will look like.
Summary
Save Save the graph to a windows metafile .wmf. You will be
prompted for the file name and path.
Copy Copy the graph to the Windows clipboard. It can then be
pasted in other applicable Windows applications (such as your
word processor).
Toggle View Type Switch display from graph to table.

The plot can be modified by the 2D Chart Control Properties which is


available on right clicking the mouse in the plot area. See Graph Control for
more information on 2D Chart Control Properties view.

Flow Map
The flow map available in FLARENET displays the flow pattern correlation of
Gregory Aziz and Mandhane which is currently the most widely used method.
It was based on almost 6,000 flow pattern observations, from a variety of
systems, and many independent studies and it is strictly applicable only to
horizontal flow. Typically, the superficial gas and liquid velocities in a
horizontal pipe are the most important single parameters influencing the flow
pattern.
After running the case, you can view the Gregory Aziz and Mandhane flow
map by selecting Results-Flow Map from the View menu or by pressing the
key combination ALT V R W.

9 Viewing Data and Results 134


Fig 9.16

You can display the flow map for each pipe segment by selecting the desired
pipe segment from the drop-down list on the top of the view. The upstream
and downstream conditions are marked with a red dot and a label on the flow
map. Unless the pipe segment has a single phase flow with a large pressure
drop, both upstream and downstream pipe conditions will generally be close
to each other.
Four icons are available:

Name Icon Description


Print Print the graph using the current printer settings. The output also
includes important information such as the name of the file, the
scenario, and the model statistics.
Preview Print Previews a summary of what the print out will look like.
Summary
Save Save the graph to a windows metafile .wmf. You will be prompted
for the file name and path.
Copy Copy the graph to the Windows clipboard. It can then be pasted in
other applicable Windows applications (such as your word
processor).

9 Viewing Data and Results 135


Scenario Summary
After running the case, you can view the Scenario Summary by selecting
Results-Scenario Summary from the View menu.
Fig 9.17

You can select a source from the drop-down menu at the top of the view.
Three icons are also available:

Name Icon Description


Print Print the results using the current printer settings. The output
also includes important information such as the name of the file,
scenario, and the model statistics.
Preview Print Previews a summary of what the print out will look like.
Summary
Save Save the results to an ASCII text file .txt. You will be prompted
for the file name and path.

9 Viewing Data and Results 136


Graph Control
You can customize each individual plot in FLARENET using the Chart Control
tool. You can modify many of the plot characteristics, which are categorized
into the six tabs of the 2D Chart Control Properties view: Control, Axes,
ChartStyles, Legend, ChartArea and PlotArea.
The number of Pipe
Segments, Nodes, Fig 9.18
Sources, Components
and Scenarios is
displayed, as well as
the name and path of
the current file.

You can open the 2D Chart Control Properties view by object inspecting any
spot on an active plot.

9 Viewing Data and Results 137


Control Tab
The Control tab is used to specify the background border, background and
foreground colors and background image.
Fig 9.19

The inner tabs available on the Control tab are:

Inner Option Description


Tab
General IsBatched When checked, changes to the chart are not displayed
You can specify the on the screen.
color in three ways: IsDoubleBuffered When checked, changes to the chart are buffered so the
screen is updates as smoothly as possible.
Enter the hexadecimal
number in the RGB Load/Save buttons Click the Load button to load a new chart description
box. file.
Select the color from You can save the current chart to a chart description
the Name drop-down file, using the Save button.
list. Border Type Select the border type drawn around the area from the
Click on the color drop-down list.
button and select the
desired color from the Width Enter the boarder type width in pixels. Valid values are
Windows Color view between 0 and 20 pixels.
by either double Interior Background Color RGB The colored square button labeled “...” provides access
clicking on the color to the standard Windows color picker dialogue view to
or clicking once and allow selection of the background color for the graph.
then clicking the OK The color of the button shows the current selection.
button. The color
Background Color Select the color name from the drop-down list.
button displays the
Name
current color
continued

9 Viewing Data and Results 138


Inner Option Description
Tab
Foreground Color RGB The colored square button labeled “...” provides access
to the standard Windows color picker dialogue view to
allow selection of the background color for the graph.
The color of the button shows the current selection.
Foreground Color Select the Color name from the drop-down list.
Name
Image File Specifies the background image file either by entering
the file path or by clicking the extension button and
then selecting the appropriate file from the File Open
view.
Layout Select the way you want the image to be displayed in
the background.
IsEmbedded When checked, the image is embedded into the chart.
When unchecked, the chart looks for the image in the
specified location.
Reset button Click this button to return the chart element
background to its default.

When the Name drop-


down list displays:
Axes Tab
Automatic. The
background is The Axes tab allows you to customize the plot area, using the following inner
transparent. tabs:
Undefined. There is
no matching color Fig 9.20
name for the specified
color.

9 Viewing Data and Results 139


Inner Tab Option Description
General IsShowing Displays or hides the selected axis.
IsLogarithmic When checked, the selected axis will be interpreted logarithmically (log
base 10) instead of linearly.
IsReversed If checked, the selected axis will be displayed in reverse direction.
Is100Percent When checked, each series in a Stacking Bar chart is scaled to represent
100 percent, and each value within the series is a given percentage of the
total.
Annotation Annotation Specifies how the axis is annotated. Click the button on the right to specify
Method additional information for this annotation method.
Annotation Specifies where to place the annotation. If this option is disabled, it does
Place not apply to the selected axis.
Origin Place Specifies where to place the origin. If this option is disabled, it does not
apply to the selected axis.
Annotation Rotates annotation text at the angle you specify.
Rotation
Numerical You can specify whether to round axis numbering.
Method
Y Multiplier Creates values for a second Y-axis (Y2) by multiplying Y-axis numbering
by this value. This option is only enabled for the Y2-axis.
Y Constant Add this value to Y2-axis numbering generated by Y Multiplier. This option
is only enabled for Y2-axis.
Scale Data Maximum Specify the highest possible data value for the selected axis.
Data Minimum Specify the lowest data value for the selected axis.
Maximum Specify the maximum axis value.
Minimum Specify the minimum axis value.
Origin Specify the origin of the selected axis.
Title Text Enter the title text for the selected axis.
Title Rotation Rotates title text at the angle you specify. The x-axis title text cannot be
rotated.
Grid IsStyleDefault When checked, the GridStyle returns to the default. If this option is
disabled, it does not apply to the selected axis.
Spacing Specifies the grid increment. If this option is disabled, it does not apply to
the selected axis.
AxisStyle & Pattern List the available line patterns.
GridStyle Width Specify the width of the line, in pixels.
Color RGB The colored square button labeled “...” provides access to the standard
Windows color picker dialogue view to allow selection of the color used for
the selected axis and its label. The color of the button shows the current
selection.
Color name List the name of the specified line color. To choose a new color by its
name, click the down arrow or type the name of the color here.
When displaying Undefined, there is no matching color name for the
specified color.
Font Description List the current font setting for the text. Click the button on the right to
choose a new font, size, or style.
Sample Shows a sample of how text will appear with the specified font setting.
Polar/Radar Origin Base Specify where on the y-axis the x-axis is located.
Annotation Specify the angle from the origin where the axis is annotated.
Angle

9 Viewing Data and Results 140


ChartGroup Tab
This tab allows you to customize ChartGroups attributes, such as the chart
type and the data itself.
Fig 9.21

The inner tabs available on the ChartGroup tab are:

Inner Tab Option Description


General ChartType Select the chart type, from the drop-down list, for the
selected ChartGroup.
DrawingOrder Specifies the order that the selected ChartGroup is
drawn.
Data Layout Specifies the format of the chart data.
Hole Specifies the value that represents the missing data
values or holes.
NumSeries Specifies the number of series in the data.
NumPoints Specifies the number of points in the data.
XValue Lists an editable X data value at ThisSeries and
ThisValue.
YValue Lists an editable Y data value at ThisSeries and
ThisValue.
ThisSeries Selects a data series to view or edit. Use with
ThisPoint to select a particular data point. XValue and
YValue display the X and Y coordinates at this
series/point.
ThisPoint Selects a data point to view or edit. Use with
ThisSeries to select a particular data point. XValue
and YValue display the X and Y coordinates at this
series/point.
continued

9 Viewing Data and Results 141


Inner Tab Option Description
Load button Load new data into the ChartGroup.
Save button Save the selected ChartGroup’s data to a file.
Edit button Edit chart data
Series button Select the series you want to display.
Sort button Sort the points in each series from lowest to highest X
value.
Labels Text Enter the label text for the currently-defined Point-
Label and Series-Label.
Add button Add a label after the selected Label in the list.
Remove button Remove the selected Label from the list.
Internet Datapath Specify a URL to load a chart description form.
Binding Field Specifies which field from the bound database is
drawn.
Add button Add a bound database to the chart.
Remove button Remove a bound database from the chart.
Set Applies the field name typed in the Field drop-down
list.
Bar ClusterOverlap Specifies the spacing within each bar cluster. Positive
values overlap the bars, negative values space the
bar apart.
ClusterWidth Specifies the percentage of space used by each bar
cluster.
Candle IsComplex When checked, the chart displays as a complex
Candle type.
Polar IsHalfRange When checked, the X-axis is represented as 180
degrees. X values that are greater than 180 degrees
are represented as negative.
HiLoOpenClose IsShowingOpen When checked, the chart displays the Open value line.
IsShowingClose When checked, the chart displays the Close value line.
IsOpenCloseFullWidth When checked, the chart displays the Open and Close
value lines.
Pie SortOrder Specifies the order that pie slices are displayed.
ThresholdMethod Specifies the method used to group low values into
the other slice.
ThresholdValue Provides a place for you to enter the value used with
ThresholdMethod. To disable creation of the other
slice, set this to 0.
MinSlices Specifies the minimum number of pie slices to display
before grouping values into the other slice.
OtherSlice Text Change the text used to label the other pie slice.
Pattern Lists the available fill patterns.
Color RGB Lists the RGB value of the fill color. Valid values are
between #000000 and #ffffff.
Color Name Lists the name of the specified fill color. To choose a
new color by its name, click the down arrow or type
the name of the color here.
When displaying Undefined, there is no matching
color name for the specified color.

9 Viewing Data and Results 142


ChartStyles Tab
The ChartStyles tab allows you to customize how data series look in the
chart. The inner tabs available on the ChartStyles tab are:
Click the Add button Fig 9.22
to add a ChartStyle
after the selected
Style in the list.

Click the Remove


button to remove the
selected ChartStyle
from the list.

Inner Tab Option Description


FillStyle Pattern This drop-down list lists the available fill patterns.
Color RGB The colored square button labeled “...” provides access
to the standard Windows color picker dialogue view to
allow selection of the color used for the selected fill. The
color of the button shows the current selection.
Color Name Lists the name of the specified fill color. To choose a
new color by its name, click the down arrow or type the
name of the color here.
When displaying Undefined, there is no matching color
name for the specified color.
LineStyle Pattern Lists the available line patterns.
Width Specifies the width of the line, in pixels.
Color RGB The colored square button labeled “...” provides access
to the standard Windows color picker dialogue view to
allow selection of the color used for the selected line.
The color of the button shows the current selection.
Color Name Lists the name of the specified fill color. To choose a
new color by its name, click the down arrow or type the
name of the color.
When displaying Undefined, there is no matching color
name for the specified color.
SymbolStyle Shape Lists the available symbol shapes.
Size Specifies the size of the symbol.
continued

9 Viewing Data and Results 143


Inner Tab Option Description
Color RGB The colored square button labeled “...” provides access
to the standard Windows color picker dialogue view to
allow selection of the color used for the selected
symbol. The color of the button shows the current
selection.
Color Name Lists the name of the specified symbol color. To choose
a new color by its name, click the down arrow or type
the name of the color here.
When displaying Undefined, there is no matching color
name for the specified color.

Titles Tab
You can customize the header and footer on the following inner tabs of the
Title tab.

Fig 9.23

9 Viewing Data and Results 144


Inner Tab Option Description
General Adjust You can specify how to align multiple lines of header
or footer.
IsShowing Displays the header or footer, if its label contains
text.
Label Text Provides a place for you to enter or change the text
of this label. You can enter multiple lines of test by
pressing enter at the end of each line.
Location Left Specifies the distance from the left edge of the chart
to the area, in pixels. If this option is disabled, you
cannot change the position of this area.
Top Specifies the distance from the top edge of the chart
to the area, in pixels. If this option is disabled, the
distance cannot be changed.
Width Specifies the width of the area in pixels. If this
option is disabled, the width cannot be changed.
Height Specifies the height of the area in pixels. If this
option is disabled, the height cannot be changed.
Border Type Specifies the type of border drawn around the area.
If this option is disabled, you cannot change the
border type.
Width Specifies the width of the border in pixels.
Interior Background Color Enter the RGB value for the specified background
RGB color. Valid values are between #000000 and #ffffff.
Background Color List the name of the specified background color. To
Name choose a new color by its name, click the down
arrow or type the name of the color.
Foreground Color Enter the RGB value for the specified foreground
RGB color. Valid values are between #000000 and #ffffff.
Foreground Color List the name of the specified foreground color. To
Name choose a new color by its name, click the down
arrow or type the name of the color.
Font Description List the current font setting for the text. Click the
button on the right to choose a new font, size, or
style.
Sample Shows a sample of how text will appear with the
specified font setting.
Image File Specifies the file name and path of the image you
want to load into the chart element.
Layout Select the way you want the image to be displayed
in the background.
IsEmbedded When checked, the image is embedded into the
chart. When unchecked, the chart looks for the
image in the specified location.
Reset button Click this button to return the chart element
background to its default.

9 Viewing Data and Results 145


Legend Tab
The Legend tab allows you to customize the legend on the following inner
tabs:
Fig 9.24

9 Viewing Data and Results 146


Inner Tab Option Description
General Anchor Specifies where the legend is positioned, relative to the
ChartArea. You can fine-tune the positioning with the
Location inner tab.
Orientation Specifies the layout of items in the Legend.
IsShowing Displays the label, if Series-labels have been defined.
Location Left Specifies the distance from the left edge of the chart to
the area, in pixels. If this option is disabled, you cannot
change the position of this area.
Top Specifies the distance from the top edge of the chart to
the area, in pixels. If this option is disabled, the
distance cannot be changed.
Width Specifies the width of the area in pixels. If this option is
disabled, the width cannot be changed.
Height Specifies the height of the area in pixels. If this option
is disabled, the height cannot be changed.
Border Type Specifies the type of border drawn around the area. If
this option is disabled, you cannot change the border
type.
Width Specifies the width of the border in pixels.
Interior Background Color The colored square button labeled “...” provides access
RGB to the standard Windows color picker dialogue view to
allow selection of the color used for the legend
background. The color of the button shows the current
selection.
Background Color List the name of the specified background color. To
Name choose a new color by its name, click the down arrow or
type the name of the color.
Foreground Color The colored square button labeled “...” provides access
RGB to the standard Windows color picker dialogue view to
allow selection of the color used for the legend label
text. The color of the button shows the current
selection.
Foreground Color List the name of the specified foreground color. To
Name choose a new color by its name, click the down arrow or
type the name of the color.
Font Description List the current font setting for the text. Click the
button on the right to choose a new font, size, or style.
Sample Shows a sample of how text will appear with the
specified font setting.
Image File Specifies the file name and path of the image you want
to load into the chart element.
Layout Select the way you want the image to be displayed in
the background.
IsEmbedded When checked, the image is embedded into the chart.
When unchecked, the chart looks for the image in the
specified location.
Reset button Click this button to return the chart element
background to its default.

9 Viewing Data and Results 147


ChartArea Tab
The ChartArea tab allows you to customize the chart area in detail.
Fig 9.25

9 Viewing Data and Results 148


Inner Tab Option Description
General IsHorizontal Reverses the orientation of X- and Y-axis,
making the chart appear horizontal.
IsShowingOutlines When checked the chart outlines each series.
AngleUnit For Polar, Radar and Filled Radar charts,
specifies the angle of measurement.
Location Left Specifies the distance from the left edge of the
chart to the area, in pixels. If this option is
disabled, you cannot change the position of this
area.
Top Specifies the distance from the top edge of the
chart to the area, in pixels. If this option is
disabled, the distance cannot be changed.
Width Specifies the width of the area in pixels. If this
option is disabled, the width cannot be changed.
Height Specifies the height of the area in pixels. If this
option is disabled, the height cannot be changed.
Border Type Specifies the type of border drawn around the
area. If this option is disabled, you cannot
change the border type.
Width Specifies the width of the border in pixels.
Interior Background Color RGB The colored square button labeled “...” provides
access to the standard Windows color picker
dialogue view to allow selection of the color used
for the chart area background. The color of the
button shows the current selection.
Background Color Name List the name of the specified background color.
To choose a new color by its name, click the
down arrow or type the name of the color.
Foreground Color RGB The colored square button labeled “...” provides
access to the standard Windows color picker
dialogue view to allow selection of the color used
for the chart axes. This selection will be
overridden by any axis setting (see Axes Tab).
The color of the button shows the current
selection.
Foreground Color Name List the name of the specified foreground color.
To choose a new color by its name, click the
down arrow or type the name of the color.
Image File Specifies the file name and path of the image
you want to load into the chart element.
Layout Select the way you want the image to be
displayed in the background.
IsEmbedded When checked, the image is embedded into the
chart. When unchecked, the chart looks for the
image in the specified location.
Reset button Click this button to return the chart element
background to its default.

9 Viewing Data and Results 149


Plot Area Tab
The plot area can be customized on the PlotArea tab using the following
inner tabs:
Fig 9.26

9 Viewing Data and Results 150


Inner Tab Option Description
General IsBoxed Draws a box around the plot area.
Top Specifies the distance from the top of the chart area to the
axis. Positive values allow space for axis labels; negative
values let you “zoom in” on a chart.
Bottom Specifies the distance from the bottom of the chart area to
the axis. Positive values allow space for axis labels;
negative values let you “zoom in” on a chart.
Left Specifies the distance from the left side of the chart area to
the axis. Positive values allow space for axis labels;
negative values let you “zoom in” on a chart.
Right Specifies the distance from the right side of the chart area
to the axis. Positive values allow space for axis labels;
negative values let you “zoom in” on a chart.
Interior Background The colored square button labeled “...” provides access to
Color RGB the standard Windows color picker dialogue view to allow
selection of the color used for the plot area background.
The color of the button shows the current selection.
Background List the name of the specified background color. To choose
Color Name a new color by its name, click the down arrow or type the
name of the color.
Foreground The colored square button labeled “...” provides access to
Color RGB the standard Windows color picker dialogue view to allow
selection of the color used for the plot area foreground. The
color of the button shows the current selection.
Foreground List the name of the specified foreground color. To choose a
Color Name new color by its name, click the down arrow or type the
name of the color.
Image File Specifies the file name and path of the image you want to
load into the chart element. The button labeled “...” allows
you to use the standard Windows file browser to search for
and select the file.
Layout Select the way you want the image to be displayed in the
background.
IsEmbedded When checked, the image is embedded into the chart.
When unchecked, the chart looks for the image in the
specified location.
Reset button Click this button to return the chart element background to
its default.

9 Viewing Data and Results 151


ChartLabel Tab
The ChartLabel tab allows you to customize chart labels and text annotation
which you can add to the chart.
Fig 9.27

The inner tabs available on this tab are:

Inner Tab Option Description


General Name Enter the name of the selected ChartLabel.
Offset Specifies the distance between the ChartLabel and
its attachment point.
Anchor Specifies where the ChartLabel is positioned, relative
to where it is attached.
IsShowing Displays the selected ChartLabel, if the text is
displayed on the Label tab.
Adjust Specifies how to align multiple lines of text in the
selected ChartLabel.
IsConnected Draw a line connecting the ChartLabel to its
attachment location.
Rotation Specifies the degree of rotation for the selected
ChartLabel.
AttachMethod Click this to set how and where to attach the
selected ChartLabel to the chart.
ChartLabels can be attached to screen coordinates,
graph coordinates, a series and point in the data, or
a Y-value at a series/point.
continued

9 Viewing Data and Results 152


Inner Tab Option Description
Label Text Provides a place for you to enter or change the text
of this label. You can enter multiple lines of text by
pressing enter at the end of each line.
Border Type Specifies the type of border drawn around the area.
If this option is disabled, you cannot change the
border type.
Width Specifies the width of the border in pixels.
Interior Background Color Enter the RGB value for the specified background
RGB color. Valid values are between #000000 and #ffffff.
Background Color List the name of the specified background color. To
Name choose a new color by its name, click the down
arrow or type the name of the color.
Foreground Color Enter the RGB value for the specified foreground
RGB color. Valid values are between #000000 and #ffffff.
Foreground Color List the name of the specified foreground color. To
Name choose a new color by its name, click the down
arrow or type the name of the color.
Font Description List the current font setting for the text. Click the
button on the right to choose a new font, size, or
style.
Sample Shows a sample of how text will appear with the
specified font setting.
Location Left Specifies the distance from the left edge of the chart
to the area, in pixels. If this option is disabled, you
cannot change the position of this area.
Top Specifies the distance from the top edge of the chart
to the area, in pixels. If this option is disabled, the
distance cannot be changed.
Width Specifies the width of the area in pixels. If this
option is disabled, the width cannot be changed.
Height Specifies the height of the area in pixels. If this
option is disabled, the height cannot be changed.
Image File Specifies the file name and path of the image you
want to load into the chart element.
Layout Select the way you want the image to be displayed
in the background.
IsEmbedded When checked, the image is embedded into the
chart. When unchecked, the chart looks for the
image in the specified location.
Reset button Click this button to return the chart element
background to its default.

9 Viewing Data and Results 153


View3D tab
The View3D tab allows you to customize 3D effect you can use with bar,
sticking bar, or pie charts.
Fig 9.28

Inner Tab Option Description


General Depth Specifies depth of bar/pie 3D effect, as a percentage of the
total width of the chart. This must be greater than zero to
display any 3D effect.
Elevation Specifies the elevation angle of the 3D effect, as degrees
above the X-axis.
Rotation Specifies the rotation angle of the 3D effect, as degrees to
the right of the Y-axis. This is not applicable to the pie
charts.
Shading Specifies the shading method for the 3D portions of the
graph. The Dithering shading method uses the graph color
and uses either white or blacks dots to make the resulting
color lighter or darker, respectively. The Color shading
method uses either a darker or lighter shade of the graph
color to create the 3D effect.

9 Viewing Data and Results 154


Markers Tab
The Markers tab allows you to add and customize markers on the chart using
the following inner tabs:
Fig 9.29

Inner Tab Option Description


General IsShowing Display the marker, if a location has been specified on the
Attach tab.
IsStyleDefault When checked, the LineStyle returns to default.
Attach By Value Locates the selected marker at graph coordinates. Use X,
Y, and Group to specify the graph coordinates.
X Specifies the X coordinate at which to locate the marker.
If this option is disabled, it does not apply to the selected
marker.
Y Specifies the Y coordinate at which to locate the marker.
If this option is disabled, it does not apply to the selected
marker.
Group Specifies which ChartGroup’s data to use for the
coordinates.
By Data Locates the selected marker at a data point (X marker
only). Use Series, Point and Group to specify the data
point.
Series Specifies the series at which to locate the marker. This
option is only enabled for the X marker.
Point Specifies the point at which to locate the marker. This
option is only enabled for the X marker.
Group Specifies which ChartGroup’s data to use for the value.
This option is only enabled for the X marker.
continued

9 Viewing Data and Results 155


Inner Tab Option Description
LineStyle Pattern Lists the available line patterns.
Width Specifies the width of the line, in pixels.
Color RGB Lists the RGB value of the fill color. Valid values are
between #000000 and #ffffff.
Color Name Lists the name of the specified fill color. To choose a new
color by its name, click the down arrow or type the name
of the color.
When displaying Undefined, there is no matching color
name for the specified color.

Trace Window
The Trace window is opened using the Trace option from the View menu.
When open, it is used by FLARENET to list the progress of calculations as they
are carried out. It may also be used to list the actions taken during import of
data from an Access, Excel or XML data file through the Import Wizard. The
Trace window must be opened prior to starting calculations or the import
process. The number of entries held in the Trace window can be set using the
Trace Buffer option in the Preferences Editor view.

9 Viewing Data and Results 156


10 PFD

Overview
One of the key benefits of the Process Flow Diagram (PFD) is that it provides
the best representation of the flare system model as a whole. From this one
location, you have an immediate reference to your current progress in
building the Flare network.
The PFD has been developed to satisfy a number of functions. In addition to
the graphical representation, you can build your flowsheet within the PFD
using the mouse to install objects and make connections. You can also
reposition objects, resize icons and reroute connections.
The PFD also possesses analytical capabilities in that you can access the Edit
views for nodes, pipe segments, and sources which are displayed.

10 PFD 157
Each object has a specific icon to represent it:

Object Icon
Pipe-Segment

Flare Tip

Connector

Tee

Relief Valve

Control Valve

Vertical Separator

Horizontal Separator

Orifice Plate

Flow Bleed

10 PFD 158
To open the PFD, select PFD-Open from the View menu. A separate view
with its own tool bar is opened.
Fig 10.1

Object Inspection
One of the key features of the FLARENET PFD is the ability to inspect objects
in the flowsheet. If you double-click on any pipe-segment, source or node,
the appropriate edit view will be opened for that object.

PFD Toolbar
There are several tools that help to simplify your interaction with the PFD.
The most basic tools relate to what is displayed in the PFD view.

PFD Toolbar Icons


The PFD toolbar icons are arranged as follows:
Fig 10.2

10 PFD 159
These icons perform the functions explained below:

Name Icon Description


Print PFD Print the PFD to the Printer.

Preview Print PFD Previews a summary of what the print out will look
like.
Save Image as Save the PFD to file. It is saved in .emf format
Windows Metafile (Enhanced Metafile).
Copy Image to Copies the PFD to the clipboard, allowing you to
Clipboard paste it into other applications.
Toggle Grid Toggle the grid on and off. When the grid is on, this
Display icon will be faded.
Coarser Grid This icon increases grid spacing. All objects you
move or add "snap to" the current grid spacing.
Finer Grid This icon decreases grid spacing. All objects you
move or add "snap to" the current grid spacing.
The CTRL SHIFT S hot Toggle Snap To Toggles the snap to grid option on and off. When the
key snaps the Grid On/Off snap to grid is on all pipe segments and nodes will
objects to the grid. be snapped to the closest grids.
While in the snap
mode, the Status bar Zoom In This icon zooms the display in.
displays the word
Snap. Zoom Out This icon zooms the display out.

Zoom to Fit Fit PFD in the view. When you click this icon, the
entire PFD will be reduced and enlarged to fit the
PFD view.
Zoom Full Zoom to the normal size (100%). At this size, all
text and icons are easily readable.
Rotate Selected Rotate the selected pipe segments and nodes.
PFD Objects
Toggle Toggle between bent and straight connections. All
Direct/Orthogonal current connections (and any connections you
connections subsequently make) will conform to the connection
method you have selected.
Toggle Toggle between Arrange and Connect modes.
Connect/Arrange Arrange mode allows you to move icons and labels.
Mode Connect mode allows you to graphically connect
compatible objects. The status bar on the PFD shows
which mode is activated.
Add Annotation The Add Annotation icon allows you to add blocks of
text or notes to the PFD. Clicking it displays the
Annotation Editor view shown below as Figure 10.3.
Toggle Palette This icon toggles the Toolbox view.
Display

10 PFD 160
Fig 10.3

The data entry items and buttons on the Annotation Editor are as follows:

Item Description
Text This panel allows you to enter the text to be displayed on the PFD. The text
entered will not word wrap, but line breaks can be inserted using the shift
enter key combination.
Alignment This drop-down list allows selection of the alignment of the annotation. The
options are Left, Right and Center.
Font Button The Font button allows selection of the font to be used to display the
annotation using the Windows Font Picker. The default font face and size that
will be used may be set through the PFD tab of the Preferences Editor view see
PFD Tab.
OK Button Click this button to close the annotation view and display the annotation.

Print Options
You can specify the area of the PFD that you desire to print by selecting the
following options available on the PFD toolbar.

Option Description
Print Visible Print part of the PFD visible on the screen.
Print All Print the whole PFD.
Print Selected Print only the selected part of the PFD. You can highlight the part of the PFD by
clicking once on the PFD and than dragging the section of PFD. The PFD is
printed without the page header and footer to allow compilation of a multiple
tiled image.

10 PFD 161
Stream Label Options
The following By default, each object on the PFD has a label that displays its name. You can
properties are
available: change all object name labels so that the current value of a key variable is
shown in the place of each object name.
Energy Flow
Length You can choose between the type of labels for the pipe segments and nodes
Mach Number by selecting the property drop-down list on the PFD toolbar.
Mass Flow
Molecular Weight Fig 10.4
Molar Flow
Noise
Nominal Diameter
Pressure
Rho V2
Temperature
Vapor Fraction
Velocity
Velocity (Liq)
Velocity (Vap)
Pressure / Mass Flow
option
Pressure /
Temperature
Pressure / Mach No. The display field on the right side of the property drop-down list displays the
Length / Nom. Diam default units for the chosen property.
MABP Approach.
If the object label is red in color it indicates that the object violated the limits
setup in the Scenarios Editor or the fluid is in the slug region. Some of the
possible causes are ice formation, slug flow, temperature violation and source
back pressure. If the object label is gray in color it indicates that the object is
ignored for calculation by activating the Ignore checkbox on the object
property view.

Viewports Option
You have the option to change the PFD viewports. By default, a single PFD
viewport is defined as Overall. You can specify a different setting for each
viewport including percent zoom and stream labels.

Add a New Viewport


New viewports can be added to the PFD by right clicking the title bar of the
PFD view and selecting Add Viewport from the displayed menu. The new
viewport is created with the default PFD settings i.e. 100% size and No
property labels but will show the same view as the PFD. The Viewport
Selector on the PFD toolbar will show that a new view has been created.
Once multiple viewports have been created, the Viewport Selector drop-
down list on the PFD toolbar can be used to select the view required.

Delete an Existing Viewport


You can delete an existing viewport from the PFD by right clicking the PFD
view title bar and selecting the Delete Viewport from the menu.

10 PFD 162
Print Viewport
Visible viewports can be printed to a selected printer by right clicking on the
PFD view title bar and choosing the Print Window from the menu.

Installing Objects
The PFD can be used to install objects into the flowsheet, as well as connect
compatible objects. Object specifications are then supplied via the appropriate
Property view which can be accessed by double-clicking the object icon.
The PFD Toolbox is used to install operations. The Toolbox can be accessed by
doing one of the following:
• Open the View menu and then open the PFD sub-menu. Select Toolbox.
• Press the F4 key.
• Click the Toolbox icon on the PFD toolbar.
Fig 10.5

The procedure for installing operations via the Toolbox is as follows:


If the Edit Objects
on Add checkbox is 1 Click the desired object in the PFD Toolbox. You will see the icon being
activated in the depressed.
Preferences editor,
the Object editor view 2 Click in the specific area in the PFD where you want to place the object
will be open for each icon. The object then appears in the PFD.
new object which is
added to the PFD. 3 Drag and drop the desired object using the secondary mouse key.

To delete an object, select the object you want to delete, and then press the
DELETE key.

10 PFD 163
Connecting Objects
To connect objects:
1 Enter connect mode by clicking the Connect icon on the toolbar. This
toggles between connect and arrange modes.
2 Click on the source object to select it.
3 Move the mouse pointer over the central handle point (blue fill instead of
white for this handle point) then press the left mouse button.
4 Drag off the source object and over the destination object.
5 Release the left mouse button.

The current mode is displayed on the left of PFD status bar.

Manipulating the PFD


Note: FLARENET allows you to select single objects as well as
multiple objects, but in order to select an object, you must be in
Arrange mode.
There are a number of features built into the PFD interface to modify its
appearance. The manipulations apply to all objects that are installed in the
PFD.

Selecting PFD Objects


To select a single object, position the mouse pointer on top of the object, and
then click once with the left mouse button. The selected object will have eight
small boxes outlining its border. These small boxes are used to size an object.
Note: The text must be selected separately; that is, when you
select an object, the corresponding text is not also automatically
selected.
There are two methods you can use to select multiple objects:

Method One
1 If the objects are all contained within the same area, the quickest and
easiest way is to marquee select that group. Press the left mouse button
(outside the group), and drag the mouse so that a box appears.
2 Continue dragging until this box contains all the objects that you want
selected.
3 When you release the mouse button, each object will have its own
rectangular box surrounding it, indicating it has been selected.

10 PFD 164
Method Two
1 Position the mouse pointer on the first object in the PFD you want to
select.
2 Press the left mouse button to select this object.
3 To select a second object, hold down the SHIFT key or CTRL key, and then
click on the second object with the left mouse button. Two objects will
now be selected.
4 Continue this method for the remainder of the objects you want to select.

Unselecting Objects
The following methods can be used:
• Click on an empty spot in the PFD with the left mouse button.
• To unselect only one item, press the SHIFT key and click on the object with
the left mouse button.

Moving Objects
You can move objects individually, or as a group.
If the grid is on, all
objects which are 1 Select the item or items you want to move.
moved will "snap to"
the grid. Their 2 Position the mouse pointer on one of the objects and press the left mouse
movement will be button.
constrained to the
grid spacing. 3 Drag the mouse to the new position on the PFD and release the mouse
button. All selected items will move to the new location.

Locating Objects on the PFD


You can locate individual objects on the PFD by pressing the CTRL SHIFT F hot
keys, which displays the Locate Object view. You can select individual objects
from the list by clicking on them using the primary mouse key. The object will
be highlighted on the PFD.

Regenerate PFD
Use this function to reposition all objects in a logical manner. Select PFD-
Regenerate from the View menu.
This feature is a great time-saver especially when you have not laid out the
PFD as you were building the case. Rather than placing all objects yourself,
regenerate the PFD in this manner. You can then make additional changes to
further fine-tune your PFD. Regenerate PFD option places all the objects along
a vertical path in the best possible manner. It is not recommended to
regenerate well laid out PFDs.

10 PFD 165
Printing and Saving the PFD
Image
The first three toolbar icons are used to transfer the PFD to the printer,
Windows Metafile and to memory.
To print the PFD using the current Print Setup, click the Print PFD icon. For
more information on the Print Setup, see Printer Setup.
To save the PFD in .emf format (Enhanced Metafile), click the Save PFD
icon. You will be prompted to enter a file name:
Fig 10.6

Enter the file name and path and click OK. To view the PFD, you can then use
a program which is capable of reading .emf files (such as Corel DrawTM).
To copy the PFD to the clipboard, click the Copy PFD icon. You can then
paste it into other Windows applications as you would with any Windows
object.

10 PFD 166
Changing the PFD View Options
When in the PFD view, FLARENET allows you to select several view options,
namely, Grid, Rotate, and Connection. All of these options are available via
toolbar. The following is a description of each icon:

Toolbar Object Description


Toggle Grid Display When the Grid toolbar icon is selected, a grid is superimposed upon the
icon existing PFD. There are also 3 icons beside the Grid toolbar icon. These
icons allow you to either increase or decrease the grid density as well as
snap the elements to grid.
Rotate Selected You can select to rotate or mirror (flip) the selected object about its
PFD Objects icon center in one of the following five ways:
Rotate 90
Rotate 180
Rotate 270
Flip Y
Flip X
Zoom There are four buttons associated with the Zoom feature of the PFD,
Zoom in, Zoom out, Zoom to Fit and Zoom to Full Size. When the Zoom
In Button is pressed, the current PFD view's resolution is increased, while
its scope is decreased. Alternatively, when the Zoom Out button is
pressed, the resolution is decreased while the scope is increased. When
the Zoom to Fit button is selected, the view is redrawn in such a way as
to include the entire PFD in one view. If the Zoom to Full Size button is
pressed, the view will regenerate to its full size.
All objects you move or add "snap to" the current grid spacing. The grid
spacing is independent of the zoom.
Toggle These icons allow you to toggle between direct and orthogonal connecting
Direct/Orthogonal lines.
Connections

10 PFD 167
11 Printing, Importing
and Exporting

Data can be either exported to, or imported from a number of external


sources. The printing of data and results is included as an export function
since the printing functionality incorporated within FLARENET can also be used
to export data and results in a number of industry standard formats.
The following data may be exported from FLARENET:
• All data and results may be printed on any Windows-compatible printer.
• All data and results may be saved as either ASCII text, Comma-separated
text, or Tab-separated text.
• The Export Wizard allows selected data and results to be exported to
Access database files, Excel spreadsheet files or XML data files.
The following data may be imported into FLARENET:
• Source data from the HYSIM and HYSYS process simulators. This data is
transferred via an ASCII file. Consequently, it should be possible to import
source data from any external source provided it conforms to this file
format.
• Component data from the HYSIM process simulator, which is discussed in
Importing Component Data. This data is transferred via an ASCII file.
Consequently, it should be possible to import component data from any
external source provided it conforms to this file format.
• The Import Wizard allows selected data to be imported from Access
databases, Excel spreadsheets or XML data files.

11 Printing, Importing
and Exporting 168
Printing
In order to print either model data or calculation results that are not specific
to a single source, select Print from the File menu. The Print view will be
displayed.
Fig 11.1

Select the items that you want to print by checking the appropriate
checkboxes in the Database, Data and Results group.
By default, the printout is only for the current scenario. Check the All
Scenarios checkbox if you want printouts for all of the scenarios.
If you want the results to be saved as an ASCII text file, check the Print To
File checkbox. You will then be able to select the file format via the Text File
Format drop-down menu. The following file formats are supported:
• Text - Saves the data in ASCII format, with all values separated by
spaces.
• CSV, Comma Separated - Saves the data in ASCII format, with all
values separated by commas.
• TSV, Tab Separated - Saves the data in ASCII format, with all values
separated by tabs.
If you checked the Print To File checkbox, the Print To File view will be
displayed when you click OK.

11 Printing, Importing
and Exporting 169
Fig 11.2

Select or directly enter the file, then click OK.


If you did not check the Print To File checkbox, the results will immediately
be printed when you click OK on the Print view.

FMT Files
The printouts can be customized to a limited extent using a series of ASCII
text files with the extension ".fmt". These files may be edited using any ASCII
text editor such as the NOTEPAD application distributed with Microsoft
Windows.
The default ".fmt" files for each printed report are:

Report .fmt File


Component Database DbComps.fmt
Pipe Fittings Database DbFittings.fmt
Pipe Schedules Database DbSchedules.fmt
Components Comps.fmt
Scenarios Scenarios.fmt
Pipes Pipes.fmt
Source Sources.fmt
Nodes Nodes.fmt
Messages Messages.fmt
Pressure/Flow Summary Summary.fmt
Compositions MoleFracs.fmt
Physical Properties Properties.fmt
Scenario Summary ScenSum.fmt

11 Printing, Importing
and Exporting 170
By default, these files are located in the FLARENET program directory. You
can change the location and ".fmt" file for each report via the Reports tab on
the Preferences Editor view.
Fig 11.3

These files conform to the format shown in Appendix B - File Format.

11 Printing, Importing
and Exporting 171
Location-Specific Printing
Results that are specific to a single source must be printed individually. The
Profile, Flow Map and Scenario Summary views each have a Print icon which
can be clicked to print the displayed data. The Profile view is shown here:
Fig 11.4

11 Printing, Importing
and Exporting 172
Printer Setup
To edit the printer setup, select Printer Setup from the File menu or press
The Print Setup the ALT F R key combination. This is used to select the default/ specific printer,
Options vary for
different printers. print orientation, paper size, paper source, and any other settings applicable
to your printer. It is similar to the Printer Setup commands in other
Windows applications.
Fig 11.5

Import Wizard
The Import Wizard is a general data import utility that allows FLARENET to
import data from Access databases, Excel Spreadsheets or XML data files. The
Import Wizard allows you full control over the data to be imported whether a
complete FLARENET model or just a set of updated source flow rates.
Customized import definitions can be created and saved for later use.

Import Data Layouts


The Import Wizard is capable importing data from a fairly wide range of data
layouts within a particular data file type. The general rules for successful
importing of data are:
• Import data must be grouped by data type e.g. data for all pipes must
appear in one Access database table, on one Excel spreadsheet page or in
within a single XML group element.
• Import data for a given type must be defined in a consistent layout e.g. in
an Excel spreadsheet all the pipe data could be specified in 3 rows per
pipe spaced one row apart.

11 Printing, Importing
and Exporting 173
Samples of the type of data layout that can be imported and the
corresponding import definition file formats are given in Import/Export
Examples. A detailed description of the import definition file structure is given
in FMT Files Format.

Using the Import Wizard


You start the Import Wizard by selecting the Import Wizard option from the
File menu. This may be done either immediately after starting FLARENET in
order to import the data to create a FLARENET model from an external data
source or after loading a FLARENET case to extend and modify it with data
from the external source.
Once started the Import Wizard presents you with a 4 step dialogue to allow
you to specify the data you want to import. Three buttons are common to
each step:
• Next – moves the Import Wizard to the next stage. If the data on the
current step is incomplete the Next button may be disabled i.e. grayed
out. Clicking Next can also generate validation messages that prevent you
moving to the next step. If this happens you will need to fix the problem
described before continuing.
• Prev – move the Import Wizard back to the previous stage. You can use
this option to go back and change your mind about the type of file you
want to import or change the definition settings.
• Cancel – this button abandons the import process, closes the Import
Wizard and returns you to the standard FLARENET environment.

11 Printing, Importing
and Exporting 174
Import Wizard - Step 1
Fig 11.6

The view for the first step of the Import Wizard is shown in Fig 11.6. This
view asks you to enter the name of the data file containing the information
you want to import. You may either type the name or use the Browse button
to select it using the file browser view shown in Fig 11.7.
Fig 11.7

11 Printing, Importing
and Exporting 175
The file selected must be one of the following types:

File Type Extension Description


Access .MDB A Microsoft Access database file. Import of data from all
versions of Access up to version 4.0 (Access 2000) is
supported. You do not need a copy of Access on the PC that is
running FLARENET in order to use this option.
Excel .XLS A Microsoft Excel spreadsheet file. Import of data from all
versions of Excel up to Excel 2000 is supported. The PC that
is running FLARENET must have an installed copy of Excel.
XML .XML An XML data file. XML data files that comply with the XML 1.0
reference document from W3C are supported.

Once the file name has been entered click the Next button to move to the
next step.

Import Wizard – Step 2


Fig 11.8

Step 2 of the Import Wizard view is shown in Figure 11.8. This view asks you
to define the import definition file that will be used to control this import.
Three options are provided
• Use Default Definition File. This option selects the default import
definition file that has been defined through the Preferences view,
Import/Export tab.
• Create New Definition File. This option selects a blank definition file
ready for you to begin creating a new import definition. The default blank
definition file that will be selected is defined through the Preferences view,
Import/Export tab.

11 Printing, Importing
and Exporting 176
• Use Following File. This option allows you to enter the name of the
definition file to be use. The Browse button allows you to select the file
using the standard file browser view. The extension for an import
definition file is .fni. The definition file selected must have been created
for the type of import file you are using.
Whichever import definition file option you use, you will be given the
opportunity to update the definition in the next step. When you have selected
the definition file option click the Next button to move to the next step of the
import process.

Import Wizard – Step 3

Fig 11.9
Step 3 of the Import Wizard is shown in Figure 11.9. This view allows you to
update the import definition to define precisely which data items and data
fields are to be imported. The view is divided into three sections:
• Object selector.
• Source tab.
• Field Details tab.

Object selector
This is a tree view showing the different data objects that may be imported to
a FLARENET model. Selecting a data object in the tree by either clicking on it
or using the up or down arrow keys displays the import definition settings for
that object on the Source and Field Details tab.
Some data objects have subsections for which import options may be defined
separately from the parent data object. These are indicated in the tree by a

11 Printing, Importing
and Exporting 177
small + symbol. The tree will automatically expand to show the subsections
when the parent data object is selected.
The Object Selector view also provides a rapid overview of which data objects
have been selected for import by displaying these with a bold font.

Source Tab
The precise layout of the Source tab will vary with the type of data file that is
being imported.
If an Access database file is being imported the following fields will be
displayed:

Field Description
Import this type This checkbox allows you to define whether this type of data object should
of data be imported. If not selected then all objects of this type will be ignored
during the import.
Data is This checkbox is only enabled for data subsections. If selected then the
contained in import process will expect to find all the data for this subsection in the same
parent database table as the parent object and the remaining fields on the form will
be disabled. Clearing this checkbox allows you to specify a different database
table for the subsection data fields. E.g. All pipes and nodes allow PFDLayout
data to be held in a separate table.
Select Table This drop-down list allows you to select the database table that contains the
data for this object type. The list displays the tables found in the Access data
file that you specified in step 1.
Select This field allows you to define selection criteria that may be used to select
this type of data object from the defined database table. E.g. if the database
you are importing contains data for all node types in a single table, it would
require a field to identify the node type and you would define selection
criteria based on that field.

If an Excel spreadsheet file is being imported the following fields will be


displayed:

Field Description
Import this type This checkbox allows you to define whether this type of data object should
of data be imported. If not selected then all objects of this type will be ignored
during the import.
Data is This checkbox is only enabled for data subsections. If selected then the
contained in import process will expect to find all the data for this subsection in the same
parent worksheet as the parent object and the remaining fields on the form will be
disabled. Clearing this checkbox allows you to specify a different worksheet
within your spreadsheet workbook for the subsection data fields. E.g. All
pipes and nodes allow PFDLayout data to be held on a separate worksheet.
Select This drop-down list allows you to select the worksheet that contains the data
Worksheet for this object type. The list displays the worksheets found in the Excel
spreadsheet file that you specified in step 1. This entry is ignored when
importing data organized by Sheet - see below.
Select This field allows you to define selection criteria that may be used to select
this type of data object from the defined worksheet. E.g. if the spreadsheet
workbook you are importing contains data for all node types on a single
worksheet, it would require a row or column to identify the node type and
you would define selection criteria based on that row or column.
continued

11 Printing, Importing
and Exporting 178
Field Description
Data in Rows, These radio buttons allow you to specify whether the spreadsheet data for
Columns, this item is organized by Row, Column or Sheet.
Sheets Row means the import process will expect to find the data for this object in
sets of one or more rows for each object.
Column means the data is expected as a set of one or more columns for each
object.
Sheet means the import process will expect to find each data object on a
dedicated worksheet.
Start At This field is visible when the data is organized by Row or Column. It defines
the starting row or column for the data.
Per Item This field is visible when the data is organized by Row or Column. It defines
the number of rows or columns occupied by a single data object. This
number should include any blank rows or columns used to space out data.
Sheet Tag This field is visible when the data is organized by Sheet. It defines the name
tag by which worksheets containing this type of data object can be identified.
E.g. for a workbook containing pipe data worksheets Pipe-123A40, Pipe-
456A40, Pipe-789A40 you would set the Sheet Tag to “Pipe-“

If an XML data file is being imported the following fields will be displayed:

Field Description
Import this This checkbox allows you to define whether this type of data object should be
type of data imported. If not selected then all objects of this type will be ignored during the
import.
Data is This checkbox is only enabled for data subsections. If selected then the import
contained in process will expect to find all the data for this subsection in the same group
parent tag as the parent object and the remaining fields on the form will be disabled.
Clearing this checkbox allows you specify a different group tag for the
subsection data fields. E.g. All pipes and nodes allow PFDLayout data to be
held in a separate group.
Select Group This drop-down list allows you to select the XML group tag or element that
Tag contains the data for this object type. The list displays the top level elements
found in the XML data file that you specified in step 1.
Item Tag This field allows you to specify the item tag or element name used for each
individual data object.
Select This field allows you to define selection criteria that may be used to select this
type of data object from the defined Group Tag. E.g. if the XML file you are
importing contains data for all node types in a single group of elements, it
would require an element to identify the node type and you would define
selection criteria based on that element.

11 Printing, Importing
and Exporting 179
Field Details Tab
Fig 11.10

The Field Details tab provides a table that allows you to specify which data
fields are to be imported and where they can be found in the import data
source. The columns of the table are:

Column Description
Data Item This column lists the individual data items that may be imported for this object.
The items in this column cannot be changed.
Import This column of checkboxes allows you to select which data items are imported.
Check the checkbox to import an item, clear it to ignore the data item. The Import
All and Clear All buttons at the bottom of the table allow you to set or clear all of
the Import checkboxes with a single click.
Location The actual heading of this column and its contents will depend on the type of data
The letter number file being imported.
format (A1 etc) is not Access Files. The column will be headed Database Field and allows you to specify
supported. the database field name that corresponds to the data item. The drop-down list
contains a list of the default field names from the definition file or you can type in
the name if it is not in the list.
Excel Files. The column will be headed Row/Column Offset. It allows you to specify
the Row/Column offset of the data item in the spreadsheet in the format R#,C#.
i.e. the row and column number separated by a comma. If the data is contained in
a single Row then just the column number can be specified or if the data is
contained in a single Column the row number alone can be supplied.
XML Files. The column will be headed ItemTag and allows you to specify the
element tag that corresponds to the data item. The drop-down list contains a list
of the default item tag names from the definition file or you can type in the name
if it is not in the list.

11 Printing, Importing
and Exporting 180
When you have finished updating the import definition, click the Next button
to move to the final step of the Import Wizard.

Import Wizard - Step 4


Fig 11.11

The final step of the Import Wizard is shown in Figure 11.11. This view allows
you to specify whether the definition file is to be saved and whether you want
to create a log file detailing the results of the import process. The fields on
this view are:

Entry Description
Select Import This set of radio buttons allows you to select whether the import
Options definition file is to be saved and whether to run the import. The options
are:
Save import definition file then import data. If this option is selected you
will be prompted to save the import definition file before the import
process runs.
Import data without saving import definition file. Select this option if you
Import actions will be do not want to save changes to the definition file before running the
recorded in the Trace import process.
window if the Save import definition file without importing data. Select this option if
checkbox was checked you want to save the definition file without running the import process.
before starting the
Import Wizard. Log Import Actions Select this checkbox if you want to record the details of the import
to File process to file.
Log File Name Enter the name of the file to be used to log details of import actions. The
Browse button may be used to select this through the standard Windows
file browser if required.

Once you have completed the entries on this form click the Finish button to
complete the Import Wizard and start the import process.

11 Printing, Importing
and Exporting 181
Import Process
If you have asked to save the import definition file, FLARENET will display the
standard Windows file browser to allow you to specify where the import
definition file is to be stored. This option can be cancelled through the file
browser if required.
Then if you have asked to run the import process the progress view will be
displayed as shown in Figure 11.12. The Cancel button can be used to
interrupt and terminate the import process as required. When the import is
complete the progress view will be closed and you will be returned to the
normal FLARENET views.
Fig 11.12

During the import process FLARENET reads each data object in turn from the
import data source and checks its name. If the object already exists in the
FLARENET model then the import data will be used to update the existing
object. If not then a new data object will be created. Source data associated
with relief valves and control valves will be assigned to the scenario that is
active when the import process is run. If any data item cannot be found then
it will be left set to the current value or default value in the case of new data
objects.

Importing Source Data


In addition to the Import Wizard features, FLARENET allows you to import
source data from a specially formatted text file. Utilities are provided to
export data in this format from the HYSYS process simulator or the HYSIM
process simulator. FLARENET also allows you to import data directly from the
HYSYS process simulator.

11 Printing, Importing
and Exporting 182
ASCII Text Files
To access the ASCII text files containing the source data, select Import
Sources from the File menu and then select Text File Sources from the
Import submenu.
The Text Import of Source Data view will be displayed:
11.13

Fig

The following objects are available on this view:

Object Description
File Specify the file from which the source data will be imported. Clicking the
Browse button opens the Text File For Source Data view. Select the text file
from this view and click the OK button. Click the Open button to load the
source data file in FLARENET.
P/T Location Specify the pressure and temperature location for the source. If Upstream is
selected from the drop-down list, the relieving pressure and the actual Inlet
temperature specification is copied from the source data file. If Downstream
is selected from the drop-down list, the allowable back pressure and the
outlet temperature is copied from the source data file.
Component Specify the action to be taken if similar components exist in the text file and
Data the FLARENET case. The Ignore Existing selection does not copy the same
components from the text file to the FLARENET case, whereas the Overwrite
Existing copies all the component data from text file to the FLARENET case.
Stream List all the streams available to be imported in FLARENET.
Source Select the source to which the source data will be imported.
Scenarios List all the scenarios available in the FLARENET case. You can select the
scenarios to which the data will be copied.

11 Printing, Importing
and Exporting 183
Example 1: Importing From HYSYS
Two steps are necessary in order to import source data from HYSYS though
an ASCII text file.
1 Export the source data from HYSYS. A program must be executed
externally to HYSYS in order to convert the source data to the proper
format.
2 Import the source data into FLARENET, using the File Import feature.

In order to create the HYSYS transfer file:


1 Run the FNETEXPT.EXE program. This is initially installed in the HYSIM
sub-directory under your main FLARENET program directory. The following
view will be displayed.
Fig 11.14

2 Enter the name of the HYSYS file containing the streams of interest, then
click Open. The Flowsheet Streams list will then contain a list of all the
material streams in the file.
3 Select the streams to export as well as the location that the pressure and
temperature represent (P&T Location).
4 Click Export. Select a name for the transfer file then click OK. The
transfer file will now be created.

11 Printing, Importing
and Exporting 184
In order to import the HYSYS transfer file:
1 Select Import-Text File Sources from the File menu. When prompted
for the Text Import File as shown below, enter the file name.
Fig 11.15

Blank source name


fields means that the
stream data is not
imported. 2 On the Text Import Of Source Data view, enter the source number for the
selected scenario within the FLARENET model that corresponds to each
HYSYS stream. Specify the P/T Location and the Component Data from
the drop-down list.

Example 2: Importing from HYSIM


Two steps are necessary in order to import source data from HYSIM Version
2.6 or later through an ASCII text file.
1 Export the source data from HYSIM. A calculator program must be
executed within HYSIM in order to convert the source data to the proper
format.
2 Import the source data into FLARENET, using the File Import feature.

In order to create the HYSIM transfer file:


1 Load the HYSIM case containing the source data into HYSIM.
2 At the main HYSIM command line prompt, type the command !FNW26 as
shown below. You must previously have copied the file FNW26.HCL into
the HYSIM working directory from the \HYSIM program directory under
your main program directory. This need be done only once.

11 Printing, Importing
and Exporting 185
Fig 11.16

3 When prompted for the name of the export file as shown below, enter the
file name. This file will be given the extension .PRN.
Fig 11.17

4 When prompted for the pressure and temperature location as shown


below, define whether the conditions for the streams within the simulation
case represent either conditions upstream or downstream of the source
valve.
Fig 11.18

5 When prompted for the streams to export as shown below, select as many
streams as you want (do not select energy streams), by using the
standard HYSIM stream selection methods.
Fig 11.19

The transfer file will now be created (in your HYSIM directory).

11 Printing, Importing
and Exporting 186
In order to import the HYSIM transfer file:
1 Select Import-Text File Sources from the File menu. When prompted
for the Text Import File as shown below, enter the file name.
Fig 11.20

2 On the Text Import Of Source Data view, enter the source number for the
selected scenario within the FLARENET model that corresponds to each
HYSIM stream. Specify the P/T Location and the Component Data from
the drop-down list.

Importing HYSYS Source Data


The Source data can also be imported directly from HYSYS. To access the
HYSYS files containing the source data, select Import Sources from the File
menu and then select HYSYS Sources from the submenu. The HYSYS Import
of Source Data view will be displayed:
Note: You must have a copy of HYSYS installed on the PC on which
you are running FLARENET to use this option.

11 Printing, Importing
and Exporting 187
Fig 11.21

The following objects are available on this view:

Object Description
File Specify the HYSYS file from which the source data will be imported.
Clicking the Browse button opens the HYSYS File For Source Data view.
Select the HYSYS file from this view and click the OK button. Click the
Open button to load the source data file in FLARENET.
P/T Location Specify the pressure and temperature location for the source. If
Upstream is selected from the drop-down list, the relieving pressure and
the actual Inlet temperature specification is copied from the source data
file. If Downstream is selected from the drop-down list, the allowable
back pressure and the outlet temperature is copied from the source data
file.
Component Data Specify the action to be taken if similar components exist in the HYSYS
file and the FLARENET case. The Ignore Existing selection does not copy
the same components from the HYSYS file to the FLARENET case,
whereas the Overwrite Existing copies all the component data from the
HYSYS file to the FLARENET case.
Stream List all the streams available in HYSYS file which can be imported in
FLARENET.
Source Select the source to which the source data will be imported.
Scenarios List all the scenarios available in the FLARENET case. You can select the
scenarios to which the data will be copied.

11 Printing, Importing
and Exporting 188
Export Wizard
The Export Wizard is a general data export utility that allows FLARENET to
export data to Access databases, Excel Spreadsheets or XML data files. The
Export Wizard allows you full control over the data to be exported whether a
complete FLARENET model for archive purposes, a set of data sheets for a
particular data type or a selected set of results. The Export Wizard also
provides a mechanism for merging FLARENET cases. Customized export
definitions can be created and saved for later use.

Export Data Layouts


The Export Wizard is capable of creating output of a fairly wide range of data
layouts within a particular data file type. The general limits when exporting
data are:
• Export data will be grouped by data type e.g. data for all pipes will appear
in one Access database table, on one Excel spreadsheet page or in within
a single XML group element.
• Export data for a given type will be output in a regular layout e.g. in an
Excel spreadsheet all the pipe data could be output as 3 rows per pipe
spaced one row apart.

Samples of the type of data layouts that can be generated and the
corresponding definition file formats are given in Import/Export Examples.
Detailed descriptions of the definition file structure are given in FMT Files
Format.

Using the Export Wizard


The Export Wizard exports data from the FLARENET model that is currently
loaded. You start the Export Wizard by selecting the Export Wizard option
from the File menu.
Once started the Export Wizard presents you with a 4 step dialogue to allow
you to specify the data you want to export. Three buttons are common to
each step:
• Next - moves the Export Wizard to the next stage. If the data on the
current step is incomplete the Next button may be disabled i.e. grayed
out. Clicking Next can also generate validation messages that prevent you
moving to the next step. If this happens you will need to fix the problem
described before continuing.
• Prev - move the Export Wizard back to the previous stage. You can use
this button to go back and change your mind about the type of file you
want to export to or change the definition settings.
• Cancel - this button abandons the export process, closes the Export
Wizard and returns you to the standard FLARENET environment.

11 Printing, Importing
and Exporting 189
Export Wizard - Step 1
Fig 11.22

The view for the first step of the Export Wizard is shown in Fig 11.22.
This view asks you to enter the name of the data file which you want to
export data to. You may either type the name or use the Browse button to
select it using the file browser view shown in Fig 11.23.
Fig 11.23

11 Printing, Importing
and Exporting 190
The file selected must be one of the following types:

File Type Extension Description


Access .MDB A Microsoft Access database file. Export of data to either
Access version 3.0 (Access 97) or Access version 4.0 (Access
2000) is supported. You do not need a copy of Access on the
PC that is running FLARENET in order to use this option.
Excel .XLS A Microsoft Excel spreadsheet file. The export of data will be
made to the version of Excel that is installed on the PC that is
running FLARENET.
XML .XML An XML data file. XML data files that comply with the XML 1.0
reference document from W3C are generated.

Selecting the Clear


all... option will clear The remaining fields on this form are as follows:
ALL data even if it did
not originate from a
previous FLARENET
Entry Description
export. The clearing of
data will not take Clear all existing data Select this checkbox if you want to clear the target file of all existing
place until the export before export data before exporting the new values from FLARENET.
process runs.
Create new Access files These radio buttons allow you to specify whether a new Access
as database will be created as a version 3.0 file or a version 4.0 file.
Existing databases are used at their current version level.

Once you have made these entries click the Next button to move to the next
step.

Export Wizard - Step 2


Fig 11.24

11 Printing, Importing
and Exporting 191
Step 2 of the Export Wizard view is shown in Figure 11.24. This view asks you
to define the export definition file that will be used to control this export.
Three options are provided
• Use Default Definition File. This option selects the default export
definition file that has been defined through the Preferences view,
Import/Export tab.
• Create New Definition File. This option selects a blank definition file
ready for you to begin creating a new export definition. The default blank
definition file that will be selected is defined through the Preferences view,
Import/Export tab.
• Use Following File. This option allows you to enter the name of the
definition file to be used. The Browse button allows you to select the file
using the standard file browser view. The extension for an export
definition file is .fne. The definition file selected must have been created
for the type of export file you selected at step 1.
Whichever export definition file option you use, you will be given the
opportunity to update the definition in the next step. When you have selected
the definition file option click the Next button to move to the next step of the
export process.

Export Wizard - Step 3


Fig 11.25

Step 3 of the Export Wizard is shown in Figure 11.25. This view allows you to
update the export definition to define precisely which data items and data
fields are to be exported.
The view is divided into four elements:
• Object selector.
• Target tab.

11 Printing, Importing
and Exporting 192
• Field Details tab.
• Force default composition basis checkbox.

Object selector
This is a tree view showing the different data objects that may be exported
from a FLARENET model. Selecting a data object in the tree by either clicking
on it or using the up or down arrow keys displays the export definition
settings for that object on the Target and Field Details tab.
Some data objects have subsections for which export options may be defined
separately from the parent data object. These are indicated in the tree by a
small + symbol. The tree will automatically expand to show the subsections
when the parent data object is selected.
The object selector view also provides a rapid overview of which data objects
have been selected for export by displaying these with a bold font.

Target Tab
The precise layout of the target tab will vary with the type of data file that is
being exported.
If an Access database file is being exported the following fields will be
displayed:

Field Description
Export this type This checkbox allows you to define whether data for this type of object
of data should be exported. If not selected then all objects of this type will be
ignored during the export.
Data is contained This checkbox is only enabled for data subsections. If selected then the
in parent export process will write all the data for this subsection to the same
database table as the parent object and the remaining fields on the form
will be disabled. Clearing this checkbox allows you specify a different
database table for the subsection data fields. E.g. All pipes and nodes allow
PFDLayout data to be output to a separate table.
Table Name This entry allows you to define the database table that will contain the data
for this object type. The table will be created if it does not already exist in
the database.

If an Excel spreadsheet file is being exported the following fields will be


displayed:

Field Description
Export this type This checkbox allows you to define whether data for this type of object
of data should be exported. If not selected then all objects of this type will be
ignored during the export.
Data is This checkbox is only enabled for data subsections. If selected then the
contained in export process will write all the data for this subsection in the same
parent worksheet as the parent object and the remaining fields on the form will be
disabled. Clearing this checkbox allows you to specify a different worksheet
within your spreadsheet workbook for the subsection data fields. E.g. All
pipes and nodes allow PFDLayout data to be written to a separate worksheet.
continued

11 Printing, Importing
and Exporting 193
Field Description
Worksheet This entry allows you to specify the worksheet that will contain the data for
name this object type. The worksheet will be created if it does not already exist in
the workbook. This entry is ignored when exporting data by Sheet but a
dummy name must be entered - see below.
Data in Rows, These radio buttons allow you to specify whether the spreadsheet data for
Columns, this item is output by Row, Column or Sheet.
Sheets Row means the export process will write data for this object in sets of one or
more rows for each object.
Column means the data will be written as a set of one or more columns for
each object.
Sheet means the export process will write each data object on a dedicated
worksheet.
Start At This field is visible when the data is output by Row or Column. It defines the
starting row or column for the data.
Per Item This field is visible when the data is output by Row or Column. It defines the
number of rows or columns occupied by a single data object. This number
should include any blank rows or columns used to space out data.
Sheet Tag This field is visible when the data is output by Sheet. It defines the name of
a “format” worksheet that should be copied when creating a new worksheet
to output data for the selected data object. These “format” worksheets must
have a name that begins with a “%” character to allow them to be identified
and preserved in the event that the Export Wizard is asked to clear a
workbook before output.

If an XML data file is being exported the following fields will be displayed:

Field Description
Export this type This checkbox allows you to define whether this type of data object should
of data be exported. If not selected then all objects of this type will be ignored
during the export.
Data is This checkbox is only enabled for data subsections. If selected then the
contained in export process will write all the data for this subsection in the same group
parent tag as the parent object and the remaining fields on the form will be
disabled. Clearing this checkbox allows you to specify a different group tag
for the subsection data fields. E.g. All pipes and nodes allow PFDLayout data
to be held in a separate group.
Group Tag This entry allows you to define the XML group tag or element that will
contain the data for this object type.
Item Tag This field allows you to specify the item tag or element name used for each
individual data object.

11 Printing, Importing
and Exporting 194
Field Details Tab
Fig 11.26

The Field Details tab provides a table that allows you to specify which data
fields are to be exported and where they should be written in the target
output file. The columns of the table are:

Column Description
Data Item This column lists the individual data items that may be exported for this
object. The items in this column cannot be changed.
Export This column of checkboxes allows you to select which data items are exported.
Check the checkbox to export an item, clear it to ignore the data item. The
Export All and Clear All buttons at the bottom of the table allow you to set or
clear all of the Export checkboxes with a single click.
Location The heading of this column and its contents will depend on the type of data file
being exported.
The letter number Access Files. The column will be headed Database Field and allows you to
format (A1 etc) is not specify the database field name that will hold the data item.
supported.
Excel Files. The column will be headed Row/Column Offset. It allows you to
specify the Row/Column offset of the data item in the spreadsheet in the
format R#,C#. i.e. the row and column number separated by a comma. If the
data is contained in a single Row then just the column number can be specified
or if the data is contained in a single Column the row number alone can be
supplied.
XML Files. The column will be headed Item Tag and allows you to specify the
element tag that corresponds to the data item.

11 Printing, Importing
and Exporting 195
Force Default Composition Basis Checkbox
This checkbox provides a single global setting that tells the Export Wizard
how to write composition data. Selecting this option will write out all
compositions using the Composition Basis set in the Default tab of the
Preferences Editor. If the option is clear the composition of each source will
be written using the basis that it is currently set to.
Note: There is a potential trap here. If you clear this checkbox and
then omit to export the data item that defines the composition basis
the exported file might contain compositions with an inconsistent
basis i.e. mixed mole and mass fraction data with no way to
distinguish which is which.
When you have finished updating the export definition, click the Next button
to move to the final step of the Export Wizard.

Export Wizard – Step 4


Fig 11.27

The final step of the Export Wizard is shown in Fig 11.27. This view allows you
to specify whether the definition file is to be saved and whether you want to
create a log file detailing the results of the export process.

11 Printing, Importing
and Exporting 196
The fields on this view are:

Entry Description
Select Export This set of radio buttons allows you to select whether the export definition
Options file is to be saved and whether to run the export. The options are:
Save definition file then perform data export. If this option is selected you
will be prompted to save the export definition file before the export process
runs.
Export data without saving definition file. Select this option if you do not
want to save changes to the definition file before running the export process.
Save definition file without performing data export. Select this option if you
want to save the definition file without running the export process.

Once you have completed the entries on this form click the Finish button to
complete the Export Wizard and start the export process.

Export Process
If you have asked to save the export definition file, FLARENET will display the
standard Windows file browser to allow you to specify where the export
definition file is to be stored. This option can be cancelled through the file
browser if required.
Then if you have asked to run the export process the progress view will be
displayed as shown in Fig 11.28. The Cancel button can be used to interrupt
and terminate the export process as required. When the export is complete
the progress view will be closed and you will be returned to the normal
FLARENET views.

11 Printing, Importing
and Exporting 197
Fig 11.28

During the export process FLARENET works through each data object to be
written in turn and checks for its name in the output file. If the object already
exists in the output file then the current FLARENET data will be used to
overwrite it. If not then a new entry for the data object will be created.
Scenario data and results data will only be output for those scenarios that are
set to be active in the Calculation Options view, Scenarios tab. E.g. if All
Scenarios is set here, data will be exported for all scenarios. Source data
associated with relief valves and control valves will be taken from the
scenario that is active when the export process is run.

Import/Export Examples
A number of sample data files and the corresponding import or export
definition files have been supplied in the samples directory. These examples
show how different data source types and layouts can be read by the Import
Wizard or generated by the Export Wizard.

Default XML Import


In this example we are going to import a complete FLARENET model from an
XML data file. The structure of XML data file is the same as the default layout
assumed by FLARENET. The steps are:
1 Start up FLARENET or, if FLARENET is already running with a case loaded,
click the New Case button on the toolbar and then click the OK button to
close both the Case Description and Component Manager views that will
appear without entering any information.

11 Printing, Importing
and Exporting 198
2 Start the Import Wizard by selecting it from the File menu.
3 In Import Wizard Step 1 either type in the name of the XML file to be
imported:
<Your FLARENET Directory>\Samples\ImportExport\Sample1.xml
or use the Browse button to look for and select this file using the
Windows file browser. Then click the Next button.
4 In Import Wizard Step 2 select the Use the default definition file radio
button then click the Next button.
5 In Import Wizard Step 3 you will see that all of the data objects listed in
the tree view to the left of the screen are displayed in bold type indicating
that import of all these data objects is selected. The default import
definition files shipped with FLARENET are configured to import all data
objects. In this case this is what we want to do so simply click the Next
button to move to the next stage.
6 In Import Wizard Step 4 select the second radio button, Import data
without saving definition file. We will also select the checkbox Log
import actions to file so that we will have a record of the data objects
that will be imported. The log file name may be left at the default name;
the file will be created in the default FLARENET working directory. Finally
click Finish.
7 You will see the Import Progress view report progress as the data objects
are imported though it will probably update too quickly to read. When the
import process is finished the view closes and you are returned to the
main FLARENET environment from where you can use the various
manager views and summary views to inspect the data that has been
imported. You might also want to view or print the log file.

Note: Only data items are imported and you will need to run the
case to view the results.

Access Database Import Using Select


Criteria
In this example we are going to import a flare system model from an Access
database file. The structure of the database we are importing is different to
the default database structure assumed by FLARENET so it will be necessary
to create a new customized import definition file.
The database to be imported is:
<Your FLARENET Directory>\Samples\ImportExport\Sample2.mdb.

11 Printing, Importing
and Exporting 199
It contains the following 4 tables:

Components Table

Component Name Boiling Point Std Density Mole Weight


Methane 111.63 299.39 16.043
Ethane 184.55 355.68 30.07
Propane 231.05 506.68 44.097
n-Butane 272.65 583.22 58.124
n-Pentane 309.21 629.73 72.151
n-Hexane 341.88 662.66 86.178

Pipes Table

Name Length Elevation Nominal Fittings Inlet Outlet


Diameter Loss
TP-123A 15 0 12 inch 0.5 PSV-123A T1
TP-145A 15 0 8 inch 0.5 PSV-145A T1
TP-112B 5 0 12 inch 0.1 BDV-112B RO-112B
BD-101A 50 0 16 inch 0.1 T1 T2
BD-112B 20 0 12 inch 0.5 RO-112B C1
BD-103A 60 0 24 inch 0.1 T2 C2
BD-104A 200 0 24 inch 0.2 C2 C3
FS-100A 50 50 24 inch 0.3 C3 FT-100
BD-102A 40 0 12 inch 0.1 C1 T2

Nodes Table

Node Type Node Name Param1 Param2


PSV PSV-123A 0 0
PSV PSV-145A 0 0
BDV BDV-112B 0 0
RO RO-112B 0.85 0
Manifold T1 0 0
Join C1 0 0
Manifold T2 0 0
Join C2 0 0
Join C3 0 0
Tip FT-100 574.65 1

11 Printing, Importing
and Exporting 200
FlowData Table

Source Pres- Inlet MABP Mass Frac Frac Frac Frac Frac Frac
Name sure Temp Flow 1 2 3 4 5 6
PSV- 10 20 4 50000 0.75 0.1 0.06 0.05 0.03 0.01
123A
PSV- 8 15 3.5 40000 0.05 0.1 0.8 0.05 0 0
145A
BDV- 5 15 3 30000 0.8 0.2 0 0 0 0
112B

The steps required to import this database are:


1 Start up FLARENET or, if FLARENET is already running with a case loaded,
click the New Case icon on the toolbar and then click the OK button to
close both the Case Description and Component Manager views that will
appear without entering any information.
2 Open the Preferences Editor and ensure that the default Composition
Basis is set to Mole Fractions.
The Import Wizard is capable of reading composition basis during the
import process but in this case our database does not have entries
defining this. Therefore we must set an appropriate default for the data
we are importing.
3 Start the Import Wizard by selecting it from the File menu.
4 In Step 1 either type in the name of the Access file to be imported:
<Your FLARENET Directory>\Samples\ImportExport\Sample2.mdb
or use the Browse button to look for and select this file using the
Windows file browser. Then click the Next button.
5 In Step 2 select the Create a new import definition file radio button
then click the Next button. When the Step 3 view appears you will see
that no data objects have been selected for import i.e. all object names in
the tree view are displayed in normal type. We now need to specify which
objects will be imported.
As an alternative you could select the pre-built import definition file for
this sample:
<Your FLARENET Directory>\Samples\ImportExport\Sample2.fni
which contains the results of steps 6 to 19. If you do this it is still worth
reading through these steps to see how the settings in the import
definition file are used to tell the Import Wizard about the database we
are importing.
6 Click on Components in the Object Selector tree view. On the Source
tab select the checkbox Import this type of data and confirm that the
Select Table drop-down list is displaying Components.
7 Click on the Field Details tab.

11 Printing, Importing
and Exporting 201
8 On the Field Details tab we need to select the import checkboxes and
specify the database field names as follows:

Data Item Database Field


Name ComponentName
MolWt MoleWeight
StdDensity StdDensity
NBP BoilingPoint

9 Next click on Connectors in the Object Selector tree view. On the Source
tab select the checkbox Import this type of data and then select Nodes
as the source table using the Select Table drop-down list.
Since the Nodes table we are importing contains data for multiple node
types we have to tell this Import Wizard which entries are connectors.
This is done by typing selection criteria into the Select entry. In our case
the Nodes database has a NodeType field that identifies Connectors as
a Join so the select entry we need is:
NodeType=’Join’
10 Now click on the Field Details tab and make the following entry,
remembering to select the Import checkbox.

Data Item Database Field


Name NodeName

11 Next click ControlValves in the Object Selector tree view. On the Source
tab check the Import checkbox and select the Nodes table from the
Select Table drop-down list. In the Select entry type NodeType=’BDV’.
12 In the Field Details define the entries to import the name field as in step
9.
13 Next click on the SourceData subsection entry beneath ControlValves in
the Object Selector tree view. On the Source tab check the Import
checkbox and select the FlowData table from the Select Table
dropdown.
Since our FlowData data table contains entries for all the sources we
need to enter selection criteria to allow the import process to select the
appropriate record for each control valve as we import it. This is done by
entering the following selection criteria in the Select field.
SourceName=.Name
Here we are using a code “.dataitem” where dataitem is the name of a
data item in the parent data object. The code tells the import process to
substitute the value of that data item in the search string. Here the
dataitem is set to Name so that the import process will substitute the
name of the control valve it has read and use that to find the appropriate
record in the FlowData table.

11 Printing, Importing
and Exporting 202
14 Still with the SourceData object selected move to the Field Details tab
and define the following data items.

Data Item Database Field


SourceName SourceName
MassFlow MassFlow
RelievingPressure Pressure
InletTemperatureSpec InletTemp
AllowableBackPressure MABP

15 Next click on the Composition subsection entry beneath the SourceData


subsection under the ControlValves. On the Select tab check the
Import checkbox and the Data is contained in parent checkbox. This
latter checkbox indicates to the Import Wizard that the composition data
for each source is in the same record as parent SourceData record.
16 On the Field Details tab for the Composition subsection make the
following entry.

Data Item Database Field


Fraction Frac+%Composition

The entry in the Database Field column is a code that tells the Import
Wizard that this is a repeating data item and tells it how to build the field
name. In this case the base field name is “Frac” to which we add the
index number of the component. The “%Composition” part of the entry
specifies that we want to work through our component list one by one.
As an aside, if the composition entries were defined by name e.g.
FracMethane, FracEthane etc. we would use the code
“Frac+?Composition” to substitute each component name in turn
instead of component index numbers.
17 The remaining entries are similar. Select OrificePlates and make the
following entries:
Source tab
Select Table = Nodes
Select entry = NodeType=’RO’
Field Details tab

Data Item Database Field


Name NodeName
UpstreamDiameterRatio Param1

11 Printing, Importing
and Exporting 203
18 Select Pipes and make the following entries:
Source tab
Select Table = Pipes
Select entry = <blank>
Field Details tab

Data Item Database Field


Name Name
UpstreamConnection Inlet
DownstreamConnection Outlet
Length Length
ElevationChange Elevation
NominalDiameter NominalDiameter
FittingLossOffset FittingsLoss

19 Select ReliefValves and its SourceData and Composition subsections


in turn to setup the same entries as for the ControlValves data object,
the only change being that the Select entry should read
NodeType=’PSV’.
20 Select Tees and make the following entries:
Source tab
Select Table = Nodes
Select entry = NodeType=’Manifold’
Field Details tab

Data Item Database Field


Name NodeName

21 Select Tips and make the following entries:


Source tab
Select Table = Nodes
Select entry = NodeType=’Tip’
Field Details tab

Data Item Database Field


Name NodeName
Diameter Param1
FittingLoss Param2

11 Printing, Importing
and Exporting 204
22 At this point our import definition is complete so click Next to move to the
next step of the Import Wizard. On this step select the Save import
definition file then Import Data radio button. Then check the Log
import actions to file checkbox and either accept the default log file
name or specify an alternative name. Finally we are ready to click Finish
to begin the import.
23 The Import Wizard will then display the windows File Browser view to
allow us to specify where we want to save our import definition file. Enter
your preferred location and name and click OK to continue. The import
process itself will then run and then close the Import Wizard on
completion.
At this point we have completed the import process. You can view or print
the log file that you specified in step 20 to confirm that it has imported all
the data objects that you were expecting. A reference log file:
<Your FLARENET directory>\Samples\ImportExport\Sample2.log
is provided for comparison.
24 The final step is to review the data that has been imported. First open the
PFD. You will see that all the data objects are displayed one on top of the
other since the data we imported did not contain any PFD layout
information. While you could manually arrange the objects, it is simpler to
use the PFD - Regenerate option on the View menu to automatically
layout the PFD. After regeneration the system should look something like
Fig 11.29.
Fig 11.29

You should also review the Pipe and Node data for the model through the
summary views.

Note: Notice how the standard FLARENET default values have been
used where the data was not available in the imported database.

11 Printing, Importing
and Exporting 205
This sample may seem rather long. However the setup of the import definition
file is a one off task for each data format we want to import. Should we have
another database with the same layout our saved import definition file will
allow us to import it using the same few steps as Sample 1.

Import of Updated Source Data from


Excel
In this example we are going to use the Import Wizard to update an existing
FLARENET model with new source data from an Excel workbook. The
workbook contains source data for multiple scenarios organized so that there
is one Excel worksheet for each scenario.
The workbook we will be importing is called:
<Your FLARENET Directory>\Samples\ImportExport\Sample3.xls
The layout of data on each worksheet is shown in Fig 11.30:
Fig 11.30

The steps required to import the workbook are:


1 Start up FLARENET and load the model that we are updating:
<Your FLARENET Directory>\Samples\ImportExport\Sample3.fnw.
2 Open the Preferences Editor and ensure that the default composition basis
is set to Mole Fractions.
The Import Wizard is capable of reading composition basis during the
import process but in this case the workbook does not have entries
defining this. Therefore we must set an appropriate default for the data
we are importing.

11 Printing, Importing
and Exporting 206
3 Start the Import Wizard by selecting it from the File menu.
4 In Step 1 either type in the name of the Excel file to be imported:
<Your FLARENET Directory>\Samples\ImportExport\Sample3.xls
or use the Browse button to look for and select this file using the
Windows file browser. Then click the Next button.
5 In Step 2 select the Create a new import definition file radio button
then click the Next button. When the Step 3 view appears you will see
that no data objects have been selected for import i.e. all object names in
the tree view are displayed in normal type. We now need to specify which
objects will be imported
As an alternative you could select the pre-built import definition file for
this sample:
<Your FLARENET Directory>\Samples\ImportExport\Sample3.fni
which contains the results of steps 6 to 19. If you do this it is still worth
reading through these steps to see how the settings in the import
definition file are used to tell the Import Wizard about the Excel workbook
we are importing.
6 Click the Scenarios object in the Object Selector tree view. On the
Source tab, check the Import this type of data checkbox. Next select
the first of the available worksheets in the Select Worksheet dropdown
list. Then select the Data is in Sheets radio button since the data we are
importing is organized as one scenario per sheet. Finally on this tab, enter
Scenario- in the Sheet Tag field.
When we tell the Import Wizard that data is organized in Sheets, it needs
to know how to recognize the worksheets that contain the right type of
data (scenario data in this case). The Import Wizard does this by
assuming that the appropriate sheets have a name that begins with the
text defined in the Sheet Tag entry. Although our workbook only contains
scenario worksheets we still need to enter a tag by which they can be
recognized. In our case they all begin with the tag Scenario-.

Note: Any worksheet can be specified in the Select Worksheet


dropdown when you select the Data is in Sheets option is
selected since the import process will work through all
worksheets with the appropriate tag. You cannot leave this field
blank however.
7 Now click the Field Details tab. On this tab select the Import
checkboxes against the following data items and enter their location as
follows:

Data Item Row, Column Offset (#,#)


Name 3,2
Pressure 5,2
HeaderMach 6,2
HeaderNoise 7,2
TailpipeMach 6,2
TailpipeNoise 7,2

11 Printing, Importing
and Exporting 207
Note: It is possible to read the same data item into more than
one FLARENET data field. Here the Mach number and Noise
values from the worksheet will be imported to both the Header
and Tailpipe limits for each scenario.
8 Now click the SourceData subsection under the Scenario object in the
Object Selector tree view. On the Source tab, check the Import this
type of data checkbox and check the Data is contained in parent
checkbox. This latter entry tells the Import Wizard that the source data is
located on the same worksheet as the base scenario data and as a result
the remaining fields on this tab are automatically set to the parent values
and disabled to prevent them being independently modified.
9 Still on the SourceData subsection, select the Field Details tab. Check
the Import checkboxes for the following data items and make the
following Row, Column entries:

Data Item Row, Column Offset (#,#)


SourceName 9+%SourceData,1
MassFlow 9+%SourceData,2
RelievingPressure 9+%SourceData,3
InletTemperatureSpec 9+%SourceData,4

The entries in the Row, Column column are codes that tell the Import
Wizard that these are repeating data items. Effectively they tell the Import
Wizard how to calculate the row and column offset for each data item. In
this case the %SourceData part of the entry specifies that we want to
work through a list of source data items one by one. The source number is
then added to the fixed row offset to give the correct row for that data
item.
For example when importing the second line of source data, the
%SourceData tag will generate the value 2 which when added to 9 gives
11 - the correct row number for the second line of source data.
10 Next select the Composition subsection beneath SourceData
subsection, still under the Scenario object in the Object Selector tree
view. On the Source tab, check the Import this type of data checkbox
and check the Data is contained in parent checkbox. Again this
indicates that this data lies on the same worksheet as the Scenario data.
11 Still on the Composition subsection, select the Field Details tab. Check
the Import checkbox for the Fraction data item and make the following
Row, Column entry:

Data Item Row, Column Offset (#,#)


Fraction 9+%SourceData,4+%Composition

Again the entries in the Row, Column column are codes that tell the
Import Wizard that these are repeating data items. The 9+%SourceData
part of the code allows the Import Wizard to calculate the correct row

11 Printing, Importing
and Exporting 208
while the 4+%Composition allows it to calculate the correct column for
each component fraction.
12 At this point our import definition is complete so click Next to move to the
next step of the Import Wizard. On this step select the Save import
definition file then import data radio button. Then check the Log
import actions to file checkbox and either accept the default log file
name or specify an alternative name. Finally we are ready to click Finish
to begin the import.
13 The Import Wizard will then display the windows File Browser view to
allow us to specify where we want to save our import definition file. Enter
your preferred location and name and click OK to continue. The import
process itself will then run and then close the import wizard on
completion.
At this point we have completed the import process. You can view or print
the log file that you specified in step 12 to confirm that it has updated the
existing three scenarios and added data for two new scenarios. A
reference log file:
<Your FLARENET directory>\Samples\ImportExport\Sample3.log
is provided if you want to make a comparison.
You will also find an export definition file and format spreadsheet that can
be used to generate Excel spreadsheets in this format:
<Your FLARENET directory>\Samples\ImportExport\Sample3.fne
<Your FLARENET directory>\Samples\ImportExport\Sample3Format.xls

Export to Access Database For


FLARENET 3.05
In this example we are going to export a complete FLARENET model to an
Access database using a structure for the Access database that would allow it
to be imported by FLARENET version 3.05. To do this we will use a predefined
export definition file that is shipped with FLARENET.
1 Start up FLARENET and load the FLARENET model that you want to
export. In our case let’s use the file from the previous case:
<Your FLARENET directory>\Samples\ImportExport\sample3.fnw
2 Start the Export Wizard by selecting it from the File menu.
3 In the Export Wizard Step 1 either type in the name of the Access file you
want to create or use the Browse button to define this file using the
Windows file browser.
4 Once the file name has been entered ensure that the Create new Access
files as radio button is set to Version 3.0 since FLARENET 3.05 cannot
read Access 4.0 files. If the database name you entered in the previous
step is an existing file then check the Clear all existing data before
export checkbox to ensure that our database will contain only the data
for this model.
Finally click the Next button.

11 Printing, Importing
and Exporting 209
5 In Export Wizard Step 2 select the Use the following export definition
file radio button then click the Browse button. Use the File Browser view
to select the file:
<Your FLARENET directory>\Formats\Access305.fne
When you have selected this definition file click the Next button to
continue.
6 In Export Wizard Step 3 you will see that most of the data objects listed in
the tree view to the left of the screen are displayed in bold type indicating
that export of these data objects is selected. Some objects namely BIPs,
Scenarios and Solver Options are not displayed in bold indicated that
these objects will not be exported. This is because the fixed format Access
import facility in FLARENET version 3.05 is not capable of importing this
type of data.
You do not need to, but you can select objects in the Object Selector tree
view and click the Field Details tab to see which data items have been
selected for export. Again those items that have not been selected have
been omitted because they cannot be imported by FLARENET version
3.05.
When you are finished browsing click the Next button to continue.
7 In Export Wizard Step 4 select the second radio button, Export data
without saving definition file. Finally click Finish.
8 You will see the Export Progress view report progress as the data
objects are written though it will probably update too quickly to read.
When the export process is finished the view closes and you are returned
to the main FLARENET environment.

You may be interested to know that there is also an import definition file
called Access305.fni in the <Your FLARENET directory>\Formats
directory which allows the Import Wizard to import Access databases
generated by FLARENET version 3.05.

Export Pipe Data Table to Excel


In this example we are going to generate a list of the piping that makes up
our flare network in an Excel worksheet. In addition to the basic pipe
information we are going to add the operating conditions for a selected
scenario to the table.
1 Start up FLARENET and load the FLARENET model that you want to
export. In this sample let’s use the file we’ve used before:
<Your FLARENET directory>\Samples\ImportExport\sample3.fnw
2 Open the Calculation Options view and go to the Scenarios tab to check
that the Calculate option is set to Current Scenario. Then close this
view and select Power Fail to be the current scenario using the Scenario
Selector and Rating as the calculation mode using the Calculation
Mode Selector. Finally click the Go button to run the rating calculations.

11 Printing, Importing
and Exporting 210
The Export Wizard will export the same scenarios that are selected for
calculation so this step selects the correct scenario for export as well as
ensuring that the results are ready for export.
3 Start the Export Wizard using the option from the File menu.
4 In the Export Wizard step 1 specify the name of the Excel workbook we
want to output our results to. In this case lets use:
<Your FLARENET directory>\Samples\ImportExport\Sample5.xls

Note: You can either type in this name or specify it through the
file browser.
5 When you have specified the file name click the Next button to continue.
6 In the Export Wizard step 2, select the option Create a new export
definition file and then click the Next button to continue.
As an alternative you could select the pre-built export definition file for
this sample:
<Your FLARENET Directory>\Samples\ImportExport\Sample5.fne
which contains the results of steps 6 to 10. If you do this it is still worth
reading through these steps to see how the settings in the export
definition file are used to tell the Export Wizard how we want to write data
to the Excel data file we are creating.
7 In the Export Wizard step 3 you will see that the default settings for a new
export definition file do not select any data objects for export i.e. all
object names in the tree view are displayed in normal type. We now need
to specify which objects will be exported.
Select the Pipes object in the Object Selector tree view. In the Target
tab check the Export this type of data checkbox and enter PipeData in
the Worksheet Name field. Finally select the Data is in Rows radio
button and enter the values 5 in the Start at Row field and 1 in the
Rows per Item field.
These entries tell the Export Wizard that we want to write the pipe data to
a worksheet called PipeData. The data will be written with each pipe
taking 1 row per pipe, starting at row 5.
8 Click the Field Details tab. Check the Export checkbox against the
following data items and enter the following column offsets.

Data Item Column or Row, Column Offset (#,#)


Name 2
Length 4
ElevationChange 5
InternalDiameter 9
NominalDiameter 7
WallThickness 10
PipeSchedule 8
InsulationType 20
InsulationThickness 21
InsulationConductivity 22

11 Printing, Importing
and Exporting 211
It is worth a word of explanation here to explain why we have asked the
Export Wizard to write the pipe name in column 2 of our table rather than
column 1. This is because we are going to output results data into the
same set of rows as the pipe data so as to include operating conditions.
Since the export process checks for the next free export area for each
data object by looking at cell offset 1,1 of the target area, it would not
output data in the same row if it found the pipe name already there. By
writing the name to column 2 we ensure that the same set of rows will be
reused by the results output.
9 Select PFSummary in the Object Selector tree view. Select the Export
checkbox and enter PFSummary in the Worksheet Name field on the
Target tab.
We are not going to export any data items associated with the
PFSummary data object itself but we must select this parent data object in
order to be able to export data from its subsections.
10 Select the EndResults subsection beneath PFSummary in the Object
Selector. In the Target tab select the Export checkbox, enter PipeData
in the Worksheet Name field, select the Data is in Rows radio button
and set the Start at Row and Rows per Item fields to 5 and 1
respectively. Ensure that the Data is contained in parent checkbox is
cleared.
11 Click the Field Details tab. Check the Export checkbox against the
following data items and enter the following column offsets.

Data Item Column or Row, Column Offset (#,#)


UpstreamPressure 12
UpstreamTemperature 13
UpstreamVelocity 14
DownstreamPressure 16
DownstreamTemperature 17
DownstreamVelocity 18

When you have finished entering this data click the Next button to
continue.
12 Select the first radio button, Save definition file then perform data
export and click Finish. A standard file browser view will appear asking
you to specify a location and name for your export definition file. Enter
suitable values and click the OK button. The export process will then run.
13 You will see the Export Progress view report progress as the data
objects are written. When the export process is finished the view closes
and you are returned to the main FLARENET environment.
14 You can now use Excel to open the Excel workbook you have created.
There will be an empty sheet called PFSummary that you can delete. The
pipe data table we want will be on the PipeData worksheet. All you have
to do now is delete the empty column 1, add some column headings and
the pipe data table is ready for your report.

11 Printing, Importing
and Exporting 212
<Your FLARENET Directory>\Samples\ImportExport\Sample5Final.xls
shows our exported worksheet after adding headings.

Merge Cases Through Export/Import


Wizards
In this example we will use the Export Wizard to merge two FLARENET
models. This could be done equally well using export to an Access database,
an Excel spreadsheet or a XML file. For the sake of variety though, we will use
XML files in this case.
1 Open FLARENET and load the first of the files we want to merge:
<Your FLARENET directory>\Samples\ImportExport\Sample6a.fnw
2 Open the Calculation Options edit view, go to the Scenarios tab and
ensure that the Calculate option is set to All Scenarios. The Export
Wizard will only export those scenarios that are selected for calculation.
3 Start the Export Wizard from the File menu
4 In Step 1 of the Export Wizard, enter the name of the file to export as:
<Your FLARENET directory>\Samples\ImportExport\Sample6.xml
or use the Browse button to open the file browser before selecting this
directory, the XML file type and entering the file name.
If you are repeating this example and the file Sample6.xml already exists
then select the checkbox Clear all existing data before export.
When you’ve done this click the Next button.
5 In Step 2 of the Export Wizard select the Use the default export
definition file radio button and click Next.
6 In Step 3 of the Export Wizard select PFSummary in the Object Selector
tree view. In the Target tab clear the checkbox Export this type of data
since we are not interested in exporting results in this case.
Click Next to continue.
7 In Export Wizard Step 4 select the Export data without saving
definition file radio button since we do not want to overwrite the default
definition file. Then click Finish. The export process will run and return
you to the main FLARENET environment.
8 Open the file:
<Your FLARENET directory>\Samples\ImportExport\Sample6b.fnw
using the Open option from the File menu.
Again check that the All Scenarios option is set in the Scenarios tab of
the Calculation Options edit view.
9 Start the Export Wizard from the File menu.
10 In the Export Wizard Step 1, use the Browse button to select the file:
<Your FLARENET directory>\Samples\ImportExport\Sample6.xml

11 Printing, Importing
and Exporting 213
Ensure that the Clear all existing data before export checkbox is
cleared before clicking Next to move to the next stage.
11 In Step 2 of the Export Wizard, select the Use the default export
definition file radio button and click Next.
12 In Step 3 of the Export Wizard select PFSummary in the Object Selector
tree view and clear the Export this type of data checkbox in the Target
tab. Click Next to continue.
13 In the final step of the Export Wizard, select the Export data without
saving definition file radio button and click Finish. Again the export
process will run and return you to the main FLARENET screens.
We now have the data for our merged case in the file:
<Your FLARENET directory>\Samples\ImportExport\Sample6.xml.
14 Import this file using the sequence of instructions given in the Default XML
Import section.
To summaries these they are:
− Create a new case
− Start Import Wizard
− In step 1 Specify file
<Your FLARENET directory>\Samples\ImportExport\Sample6.xml
− In step 2 select default import definition file
− Make no changes in step 3
− In step 4 select import without saving definition file.
15 You can now use the standard FLARENET views to examine and update
the merged case. Things that you might want to modify in your new case
are:
− Component lists for the two cases have been merged. This generates a
requirement for new Binary Interaction Parameters which will have
been set at default values. Do you need to update them?
− The list of scenarios will include all the scenarios from both cases.
Default flow and other source data will have been generated for
sources that were originally missing. Do you need to update these?
− Any nodes, sources or pipes that were common to both models will
have their data values set to the values taken from the second model.
Are these correct? (21-FT001 is a common node in this example).
− The calculation options will be set to those defined for the second
model. Are these correct?

11 Printing, Importing
and Exporting 214
12 Automation

Overview
Automation, defined in its simplest terms, is the ability to drive one
application from another. For example, the developers of Product A have
decided in their design phase that it would make their product more usable if
they exposed Product A’s objects, thereby making it accessible to automation.
Since Products B, C and D all have the ability to connect to application that
have exposed objects, each can programmatically interact with product A.

The exposure of its objects makes FLARENET a very powerful and useful tool
in the design of hybrid solutions. Since access to an application through
Automation is language-independent, anyone who can write code in Visual
Basic, C++ or Java, to name three languages, can write applications that will
interact with FLARENET. There are a number of applications that can be used
to access FLARENET through Automation, including Microsoft Visual Basic,
Microsoft Excel and Visio. With so many combinations of applications that can
transfer information, the possibilities are numerous and the potential for
innovative solutions is endless.

12 Automation 215
Objects
The key to understanding Automation lies in the concept of objects. An object
is a container that holds a set of related functions and variables. In
Automation terminology, the functions of an object are call methods and the
variables are called properties. Consider the example of a simple car. If it
were an object, a car would have a set of properties such as; make, color,
engine, etc. The car object might also have methods such as; drive, refuel,
etc. By utilizing the properties and methods of the car object it is possible to
define, manipulate and interact with the object.
Fig 12.1

Each property of the car is a variable that has a value associated with it. The
color could be either a string or a hexadecimal number associated with a
specific color. The gas mileage could be a floating-point value. Methods are
nothing more than the functions and subroutines associated with the object.

An object is a container that holds all the attributes associated with it. An
object could contain other objects that are a logical subset of the main object.
The car object might contain other objects such as engine or tyre. These
objects would have their own set of independent properties and methods. An
engine would have properties related to the number of valves and the size of
the pistons. The tyres would have properties such as the tread type or model
number.

Object Hierarchy
The path that is followed to get to a specific property may involve several
objects. The path and structure of objects is referred to as the object
hierarchy. In Visual Basic the properties and methods of an object are
accessed by hooking together the appropriate objects through a dot operator
(.) function. Each dot operator in the object hierarchy is a function call. In
many cases it is beneficial to reduce the number of calls by setting
intermediate object variables.

12 Automation 216
For instance, expanding on our previous example involving the car, suppose
there existed an object called Car and you wished to set the value of its
engine size. You could approach the problem in one of two ways.
• Direct specification of object property
Car.Engine.Size = 3
• Indirect specification of object property
Dim Eng1 as Object
Set Eng1 - Car.Engine.Size
Eng1 = 3

If the Engine size is a property that you wish to access quite often in your
code, using the indirect method of specification might be easier as it reduces
the amount of code thereby reducing the possibility of error.

The FLARENET Type Library


In order to do anything with objects it is first necessary to know what objects
are available. When an application is exposed to Automation, a separate file is
usually created that lists all the objects and their respective properties and
methods. This file is called the type library and nearly all programs that
support Automation have one of these files available. With the help of an
Object Browser, such as the one built into Microsoft Excel, you now have a
way to view all the objects, properties, and methods in the application by
examining the type library. For FLARENET, the type library is contained within
the application itself, flarenet.exe.

The FLARENET type library reveals numerous objects that contain many
combine properties and methods. For every object the type library will show
its associated properties and methods. For every property the type library will
show its return type. For every method, the type library will show what types
of arguments are required and what type of value might be returned.

Accessing a specific property or method is accomplished in a hierarchical


fashion by following a chain of exposed objects. The first object in the chain
should be an object from which all other objects can be accessed. This object
will typically be the main application. In FLARENET, the starting object is the
Application object. All other objects are accessible from this starting object.

Object Browser
The type library itself does not exist in a form that is immediately viewable to
you. On order to view the type library, you require the use of an application
commonly referred to as an Object Browser. The Object Browser will interpret
the type library and display the relevant information. Microsoft Excel and
Visual Basic both include a built in Object Browser.

12 Automation 217
Accessing the Object Browser in Excel 97
1 Press <Alt><F11> or select Visual Basic Editor from Macro group in
the Tools menu.
2 Within the Visual Basic Editor, choose References from the Tools menu.
3 Check the box next to FLARENET 3.5. If this is not displayed, use the
Browse button to locate fnet350.exe.
4 Click OK.
5 Choose Object Browser from the View menu or press <F2>.
6 Select FLARENET under Libraries/Workbooks drop down.

Example: Navigating through the type library


This example shows how to navigate through the type library in order to
determine the object hierarchy necessary to access a particular property. The
desired property is the mass flow of a relief valve called “PSV 1” in the
currently active scenario.

The first step is to start with the starting object that in the case of FLARENET
is always the Application object.
Fig 12.2

Selecting the Application object in the browser reveals all of its related
properties and methods. Examination of the list of properties does not reveal
a relief valve object so access to a particular relief valve must be through
another object. The properties that are links to other objects can be
determined by looking at the type shown when a property is selected. If the
type is not String, Boolean, Variant, Double, Integer or Long then it is most
likely an object. The object type shown will be found somewhere in the object
list and the next step is to determine the object hierarchy.

12 Automation 218
With prior experience in FLARENET, the ReliefValves object is a logical
choice.
Fig 12.3

The ReliefValves object is shown to be of type IReliefValve. This object is a


simple object that is a collection of other objects with some properties and
methods for navigation through the collection.
Fig 12.4

The Item property is shown to return an indexed object of type


IReliefValve, The argument named “What” is of type Variant which is the
default argument type for an argument unless otherwise specified. All
collection objects within FLARENET allow access to an individual member of
the collection either by index number (like an array) or directly by name.
Named arguments are case insensitive so “PSV 1” is the same as “psv 1”.
Either approach is equally valid.

12 Automation 219
Examining the IReliefValve object type shows a property called
PropertyByName, which is type Variant.
Fig 12.5

This property is a read/write property that is used to access all data for a
relief valve.
The first argument is a case insensitive string that describes the variable that
we wish to access. In this case this string would have the valve “MassFlow”. A
full list of property names for each type of object is given at the end of this
chapter
The second argument is a Variant to that describes the scenarios for which
the mass flow will apply. As with the ReliefValves collection object, either an
index number or the name may be used to define the scenario. This argument
is optional as indicated by the square brackets, and if it is not specified then
the currently active scenario will be used.
The resulting syntax to access the desired property is:
ReliefValves.Item(“PSV1”).PropertyByName(“MassFlow”)

Automation Syntax
Declaring Objects
An object in Visual Basic is another type of variable and should be declared.
Objects can be declared using the generic type identifier object. The preferred
method however uses the type library reference to declare the object
variables by an explicit object name.
Early Binding:
Dim | Public | Private Objectvar as ObjectName as specified in the type
library

12 Automation 220
Late Binding:
Dim | Public | Private objectvar as Object
Once a reference to a type library has been established, the actual name of
the object as it appears in the type library can be used. This is called early
binding. It offers some advantages over late binding, including speed and
access to Microsoft’s IntelliSense functionality when using Visual Basic or
VBA.

Example: Object Declaration


Early Binding:
Public fnApp as Object
Public thisPsv as Object
Late Binding:
Public fnApp as Flarenet.IApplication
Public thisPsv as Flarenet.IReliefValve

The Set Keyword


Syntax:
Set objectvar = object.[object...].object | Nothing
Connections or references to object variables are made by using the Set
keyword.
Example: Set
Assuming fnApp is set to the Application Object
Dim thisPsv as Flarenet.IReliefValve
Set thisPsv - fnApp.ReliefValves.item(1)

CreateObject, GetObject
Syntax for creating an instance of an application:
CreateObject (class)
GetObject ([pathname] [,class])
Where class is the starting object as specified in the type library.
In order to begin communication between the client and server applications,
an initial link to the server application must be established. In FLARENET this
is accomplished through the starting object Application.
The CreateObject function will start a new instance of the main application.
CreateObject is used in FLARENET with the Flarenet.Application class as
defined in the type library. This connects to the main application interface of
FLARENET.
Example: CreateObject
Dim FnApp As Object

12 Automation 221
Set FnApp = CreateObject (“Flarenet.Application”)
The following example uses early binding in the object declaration to create
an instance of FLARENET and then load a specified model.
Example: CreateObject
Dim FnApp As Flarenet.Application
Set FnApp = CreateObject (“Flarenet.Application”)
FnApp.OpenModel “c:\flarenet\samples\ole\olesample.fnw”
The GetObject function will connect to an instance of the server application
that is already running. If an instance of the application is not already running
then a new instance will be started.

Object Properties, Methods and Hierarchy


Syntax for creating and accessing properties:
Set objectvar = object.[object.object...] .object
Variable = object.[object.object...] .object.property
Syntax for accessing methods:
Function Method
returnvalue = object.method ([argument1, argument2, ...])
Subroutine method
object.method argument1, argument2, ...
The sequence of objects is set through a special dot function. Properties and
methods for an object are also accesses through the dot function. It is
preferable to keep the sequences of objects to a minimum since each dot
function is a call to a link between the client and the server application.
The object hierarchy is an important and fundamental concept for utilizing
automation. A particular property can only be accessed by following a specific
chain of objects. The chain always begins with the Application object and
ends with the object containing the desired property.
The methods of objects are accessed in the same fashion as properties by
utilizing the dot function. A method for a particular object is nothing more
than a function or subroutine whose behavior is related to the object in some
fashion.
Typically the methods of an object will require arguments to be passed when
the method is called. The type library will provide information about which
arguments are necessary to call a particular method. A function will return a
value.
Note: Subroutines in Visual Basic do not require parentheses
around the argument list.

12 Automation 222
Examples: Accessing FLARENET Object Properties
Dim FnApp As Flarenet .Application
Dim SepDiam as Double
Set FnApp = CreateObject (“Flarenet.Application”)
FnApp.OpenModel “c:\flarenet\samples\ole\olesample.fnw”
SepDiam - FnApp.VerticalSeparators.Item[1].PropertyByName
(“Diameter”)
This example starts up FLARENET and opens a specific case. The diameter of
a specific vertical separator is then obtained. The diameter is obtained
through a connection of the Application and VerticalSeparators objects.
Dim FnApp As Flarenet.Application
Dim Seps as Flarenet.IVerticalSeparators
Dim Sep as Flarenet.IVerticalSeparator
Dim SepDiam as Double
Set FnApp = CreateObject (“Flarenet.Application”)
FnApp.OpenModel “c:\flarenet\samples\ole\olesample.fnw”
Set Seps = FnApp.VerticalSeparators
Set Sep = Seps.Item[I]
SepDiam = Sep.PropertyByName (“Diameter”)
This example also gets the diameter of a specific vertical separator, but
creates all the intermediate objects so that when the diameter value is
actually requested the chain of objects only contains one object.

Collection Objects
Syntax: Properties of a Collection Object:
Item(Index)Accesses a particular member of the collection by name or
number
CountReturns the number of objects in the collection
Syntax: Enumeration of Objects:
For Each element In group
[statements]
[Exit For]
[statements]
Next [element]
A collection object is an object that contains a set of other objects. This is
similar to an array of objects. The difference between an array of objects and
a collection object is that a collection object is that a collection object contains
a set of properties and methods for manipulating the objects in the collection.
The Count property returns the number of items in the collection and the

12 Automation 223
Item property takes an index value or name as the argument and returns a
reference to the object within the collection.
A special type of For loop is available for enumerating through the objects
within the collection. The For Each loop provides a means for enumerating
through the collection without explicitly specifying how many items are in the
collection. This helps avoid having to make additional function call to the
Count and Item properties of the collection object in order to perform the
same type of loop.

Examples: Accessing Collection Objects


Dim myPsvs as Flarenet.ReliefValves
Dim name as String
Dim i As Integer
Set myPsvs = myApp.ReliefValves
For i = 1 To myPsvs.Count
name = myPsvs.Item(i).PropertyByName(“Name”)
MsgBox name
Next i
This example connects to a collection of relief valves by setting the myPsvs
object. A For loop is created that uses the Count and item properties of a
collection in order to display a message box that display the name of each
relief valve in turn. The items in the collection are indexed beginning at 1. The
application object is assumed to have been already set to myApp.
Dim myPsvs as Flarenet.ReliefValve
Dim myPsvs as Flarenet.ReliefValves
Dim name as String
Set myPsvs = myApp.ReliefValves
For Each myPsvs in myPsvs
name = myPsv.PropertyByName(“Name”)
MsgBox name
Next
This example is identical to the first example except that a For Each loop is
used instead of the standard For loop in order to enumerate through the
ReliefValves collection.

Variants
Syntax: Using variant values:
Dim myvariant as Variant
myvariant = [object.property]
To determine the upper and lower bound of the variant:
UBound(arrayname[,dimension])

12 Automation 224
LBound(arrayname[,dimension])
A property can return a variety of variable type. Values such as Temperature
or Pressure are returned as Doubles or 32-bit floating point values. The Name
property returns a String value. Visual Basic provides an additional variable
called Variant. A Variant is a variable that can take on the form of any type of
variable including, Integer, Long, Double, String, Array, and Objects.

If the property of an object returns an array whose size can vary depending
upon the case, then a Variant is used to access that value. For example, the
Composition property of a ControlValve returns an array of Doubles sized to
the number of components in the model.
In Visual Basic, if a variable is not explicitly declared then it is implicitly a
Variant. Variants have considerably more storage associated with their use so
for a large application it is good practice to limit the number of Variants being
used. It is also just good programming practice to explicitly declare variables
whenever possible.

Example: Using Variants in FLARENET


Dim myPsvs as Flarenet.ReliefValve
Dim molefracs as Variant
Dim i As Integer
Set myPsv = myApp.ReliefValves.Item(1)
molefracs = myPsv.PropertyByName (“Composition”)
For i = LBound(molefracs) To Ubound (molefracs)
Debug.Print molefracs(i)
Next i
This example shows how to get the mole fractions of a relief valve for the
current scenario. The values are sent to the Visual Basic Immediate window.
The application object is assumed to have been already set to myApp.

Unknown Values
There are a number of occasions where a variable may be unknown such as
all the calculated values prior to the calculation or the flange size of a control
valve. In all cases this is represented by the value fntUnknownValue.

Example: Using Unknown Values in FLARENET


Dim myValve as Flarenet.ControlValves
Dim myValves as Flarenet.ControlValve
Dim flange as Double
Dim name as String
Set myValves = myApp.ControlValves
For Each myValve in myValves

12 Automation 225
flange = myValve.PropertyByName (“FlangeDiameter”)
if flange - fntUnknown Then
name = myValve.PropertyByName(“Name”)
MsgBox name
EndIf
Next i
This example loops through all the control valves and displays the name of
any whose flange diameter is unknown. The application object is assumed to
have been already set to myApp.

FLARENET Object Reference


The following subsections summaries the methods and properties available in
each of the objects available within FLARENET. These are ordered purely
alphabetically.
For each object the attributes comprises the type (or class) of object followed
by the access characteristics which may be read only or read/write. In
general, data will have the read/write attribute and calculated values will
have the read only attribute.
Each method is shown with the method name including any arguments, a
description of the method and a description of the arguments.
Each property is shown with the property name including any arguments, a
description of the property, the property attributes and a description of the
arguments. Optional arguments are shown in square brackets [].
Many of the objects support a PropertyByName property. In such cases a
further table gives the valid property names which are case insensitive as well
as the property attributes and the units of measure where appropriate. The
property names will generally match the field descriptions on the
corresponding views but they never contain any space characters.

Application
Description : Application object
Attributes : IApplication, read only

Methods
Name Description Arguments
OpenModel(fn As String) Open a FLARENET model fn = Model filename
SaveModel(fn as String) Save a FLARENET model fn = Model filename

12 Automation 226
Properties
Name Description Attributes Arguments
Bleeds Collection of flow bleed IBleeds, read only
node objects
Components Collection of component IComponents, read only
objects
Connectors Collection of connector IConnectors, read only
objects
ControlValves Collection of control valve IControlValves, read only
objects
HorizontalSeparators Collection of horizontal IHorizontalSeparators,
separator objects read only
Nodes Collection of node objects INodes, read only
Pipes Collection of pipe objects IPipes, read only
ReliefValves Collection of relief valve IReliefValves, read only
objects
Scenarios Collection of scenario IScenarios, read only
objects
Solver Solver object ISolver, read only
Tees Collection of tee objects ITees, read only
Tips Collection of flare tip ITips, read only
objects
VerticalSeparators Collection of vertical IVerticalSeparators, read
separator objects only
Visible Set visibility of the Boolean, read/write
application window

Bleed
Description : Flow bleed node object
Attributes : IBleed, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on bleed
fntNodeEnd, pip as IPipe, pip = Pipe to connect to
pipeconidx as fntPipeEnd
pipeconidx = Connection on pipe
Disconnect(conidx as Disconnect from a pipe conidx = Connection on bleed
fntNodeEnd)

Properties
Name Description Attributes Arguments
PropertyByName(wh as Property value for a Variant, read/write wh = Property name
String) named property
PropertyNames Variant array of all the Variant, read only
property names

12 Automation 227
Named Properties For PropertyByName()
Name Units Attributes
Ignored fntYesNo, read/write
Location String, read/write
Name String, read/write
OfftakeMaximum kg/hr Double, read/write
OfftakeMinimum kg/hr Double, read/write
OfftakeMutliplier Double, read/write
OfftakeOffset kg/hr Double, read/write
PressureDrop bar Double, read/write

Bleeds
Description : Collection of flow bleed node objects
Attributes : IBleed, read only

Methods
Name Description Arguments
Add (Optional nm as Variant, Add a new bleed nm = Name. If omitted a new name is
Optional x as Single, Optional automatically generated
y as Single x = X coordinate on PFD (Twips)
y = Y coordinate on PFD (Twips)
Delete (wh as Variant) Delete a bleed wh = Index as Name (String) or Number
(Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item (wh as Indexed item in the collection IBleed, read only Wh = Index as Name (String)
Variant) or Number (Integer/Long)

Component
Description : Component object
Attributes : IComponent, read only

Methods
Name Description Arguments
Clear Clear all component data
EstimateUnknown Estimate all unknown component data

12 Automation 228
Properties
Name Description Attributes Arguments
IsValid Validate component data Boolean, read only
is complete
PropertyByName(wh Property value for a Variant, read/write wh = Property name
as String) named property
PropertyNames Variant array of all the Variant, read only
property names

Named Properties For PropertyByName()


Name Units Attributes
AcentricFactor Double, read/write
AcentricFactorSrk Double, read/write
CharacteristicVolume m3/kgmole Double, read/write
CriticalPressure bar abs Double, read/write
CriticalTemperature K Double, read/write
CriticalVolume m3/kgmole Double, read/write
EnthalpyCoefficients kJ/kgmole Double(1 To 6), read/write
kJ/kgmole/K
kJ/kgmole/K2
kJ/kgmole/K3
kJ/kgmole/K4
kJ/kgmole/K5
EntropyCoefficient Double, read/write
Id Integer, read/write
MolecularWeight Double, read/write
Name String, read/write
NormalBoilingPoint K Double, read/write
StandardDensity kg/m3 Double, read/write
Type fntCompType, read/write
WatsonK Double, read/write
ViscosityCoefficient Double(1 To 2), read/write

12 Automation 229
Components
Description : Collection of component objects
Attributes : IComponents, read only

Methods
Name Description Arguments
AddLibrary(wh as Variant) Add a library component wh = Component identifier as either
name (String) or ID (Integer/Long)
AddHypothetical(wh as Add a named hypothetical wh = Name for new component
String) component
Delet(wh as Variant) Delete a component wh = Index as component as either
Name (String) or Number
(Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(What as Indexed item in the IComponent, read What = Index as Name (String)
Variant) collection only Or Number (Integer/Long)

Connector
Description : Connector node object
Attributes : IConnector, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on connector
fntNodeEnd, pip as IPipe, pip = Pipe to connect to
pipeconidx as fntPipeEnd)
pipeconidx = Connection on pipe
Disconnect(conidx as Disconnect from a pipe conidx = Connection on connector
fntNodeEnd)

Properties
Name Description Attributes Arguments
PropertyByName(wh Property value for a Variant, read/write wh = Property name
as String) named property
PropertyNames Variant array of all the Variant, read only
property names

12 Automation 230
Named Properties For PropertyByName()
Name Units Attributes
Angle radians Double, read/write
Ignored fntYesNo, read/write
Length m Double, read/write
Location String, read/write
Name String, read/write

Connectors
Description : Collection of connector node objects
Attributes : IConnectors, read only

Methods
Name Description Arguments
Add (Optional nm as Add a new connector nm = Name. If omitted a new name is
Variant, Optional x as automatically generated
Single, Optional y as Single x = X coordinate on PFD (Twips)
y = Y coordinate in PFD (Twips)
Delete (wh as Variant) Delete a Connector wh = Index as Name (String) or
Number (Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(What as Indexed item in the collection IConnector, read What = Index as Name
Variant) only (String) Or Number
(Integer/Long)

ControlValve
Description : Control valve node object
Attributes : IControlValve, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on control valve
fntNodeEnd, pip as IPipe, pip = Pipe to connect to
pipeconidx as fntPipeEnd)
pipeconidx = Connection on pipe
Disconnect(conidx as Disconnect from a pipe conidx = Connection on control valve
fntNodeEnd)

12 Automation 231
Properties
Name Description Attributes Arguments
PropertyByName(wh Property value for a Variant, read/write wh = Property name
as String, named property sc = Scenario Index as Name
[sc as Variant]) (String) or Number
(Integer/Long)
PropertyNames Variant array of all Variant, read only
the property names

Named Properties For PropertyByName()


Name Units Attributes
Composition fractions Double (1 To ?), read/write
CompositionBasis fntCompBasis, read/write
Energy kJ/hr Double, read only
Enthalpy kJ/kgmole Double, read only
Entropy kJ/kgmole/K Double, read only
FlangeDiameter mm Double, read/write
FluidType fntCompType, read/write
Ignored fntYesNo, read/write
Location String, read/write
LockMabp fntYesNo, read/write
Mabp bar abs Double, read only
MassFlow kg/hr Double, read/write
MolecularWeight Double, read/write
Name String, read/write
OutletSonicVelocity m/s Double, read only
OutletTemperature C Double, read only
OutletTemperatureSpecification C Double, read only
OutleVelocity m/s Double, read only
ReliefPressure bar abs Double, read only
StaticBackPressure bar abs Double, read only
StaticOutletPressure bar abs Double, read only
StaticInletPipePressureDrop bar Double, read only
Temperature C Double, read only
TemperatureSepcification fntTempSpec, read/write
TotalBackPressure bar abs Double, read only
TotalOutletPressure bar abs Double, read only
TotalInletPipePressureDrop bar Double, read only
VapourFraction molar fraction Double, read only

12 Automation 232
ControlValves
Description : Collection of control valve node objects
Attributes : IControlValves

Methods
Name Description Arguments
Add (Optional nm as Variant, Add a new control nm = Name. If omitted a new name is
Optional x as Single, Optional valve automatically generated
y as Single) x = X coordinate on PFD (Twips)
y = Y coordinate on PFD (Twips)
Delete(wh as Variant) Delete a control wh = Index as Name (String) or Number
valve (Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(wh as Indexed item in the IControlValve, read wh = Index as Name (String) or
Variant) collection only Number (Integer/Long)

HorizontalSeparator
Description : Horizontal separator node object
Attributes : IHorizontalSeparator, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on horizontal
fntNodeEnd, pip as IPipe, separator
pipeconidx as fntPipeEnd) pip = Pipe to connect to
pipeconidx = Connection on pipe
Disconnect(conidx as Disconnect from a conidx = Connection on horizontal
fntNodeEnd) pipe separator

Properties
Name Description Attributes Arguments
PropertyByName(wh Property value for a named Variant, wh = Property name
as String) property read/write
PropertyNames Variant array of all the property Variant, read only
names

12 Automation 233
Named Properties For PropertyByName()
Name Units Attributes
Diameter mm Double, read/write
Ignored fntYesNo, read/write
LiquidLevel mm Double, read/write
Location String, read/write
Name String, read/write

HorizontalSeparators
Description : Collection of horizontal separator node objects
Attributes : IHorizontalSeparators, read only

Method
Name Description Arguments
Add (Optional nm as Add a new horizontal nm = Name. If omitted a new name is
Variant, Optional x as separator automatically generated
Single, Optional y as x = X coordinate on PFD (Twips)
Single)
y = Y coordinate on PFD (Twips)
Delete(wh as Variant) Delete a horizontal wh = Index as Name (String) or Number
separator (Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in Integer, read only
the collection
Item(What as Indexed item in the IHorizontalSeparat What = Index as Name (String) Or
Variant) collection or, read only Number (Integer/Long)

Nodes
Description : Collection of all node objects
Attributes : INodes, read only

Properties
Name Description Attributes Arguments
Count Number of items in the collection Integer, read only

12 Automation 234
OrificePlate
Description : Orifice plate node object
Attributes : IOrificePlate, read only

Method
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on orifice plate
fntNodeEnd, pip as IPipe, pip = Pipe to connect to
pipeconidx as fntPipeEnd)
pipeconidx = Connection on pipe
Disconnect(conidx as Disconnect from a conidx = Connection on orifice plate
fntNodeEnd) pipe

Properties
Name Description Attributes Arguments
PropertyByName(w Property value for a Variant, read/write wh = Property name
h as String) named property
PropertyNames Variant array of all the Variant, read only
property names

Named Properties For PropertyByName()


Name Units Attributes
Diameter mm Double, read/write
DratioIn Double, read/write
DratioOut Double, read/write
Ignored fntYesNo, read/write
Location String, read/write
Name String, read/write

OrificePlates
Description : Collection of orifice plate node objects
Attributes : IOrificePlates, read only

Methods
Name Description Arguments
Add (Optional nm as Variant, Ass a new orifice nm = Name. If omitted a new name is
Optional x as Single, Optional plate automatically generated
y as Single) x = X coordinate on PFD (Twips)
y = Y coordinate on PFD (Twips)
Delete(wh as Variant) Delete an orifice wh = Index as Name (String) or Number
plate (Integer/Long)

12 Automation 235
Properties
Name Description Attributes Arguments
Count Number of items in the collection Integer, read only
Item(What Indexed item in the collection IOrificePlate, read only What = Index as Name
as Variant) (String) Or Number
(Integer/Long)

Pipe
Description : Pipe object
Attributes : IPipe, read only

Methods
Name Description Arguments
Connect(conidx as fntPipeEnd, Connect to a node conidx = Connection on pipe
nod as Object, nodeconidx as nod = Node to connect to
fntNodeEnd)
nodeconidx = Connection on
Disconnect(conidx as fntPipeEnd) Disconnect from a node conidx = Connection on

Properties
Name Description Attributes Arguments
PropertyByName(wh as Property value Variant, read wh = Property name
String, for a named /write sc = Scenario Index as Name
[sc as Variant], [ph as property (String) or Number
Variant], (Integer/Long)
[en as Variant]) ph = Phase Index
(fntFluidPhase)
en = Pipe end (fntPipeEnd)
PropertyNames Variant array of Variant, read
all the property only
names

Named Properties For PropertyByName()


Name Units Attributes
AccelarationPressuredrop bar Double, read only
AmbientTemperature C Double, read only
CanSize fntYesNo, read/write
MoleFractions Double(1 To ?), read only
Density kg/m3 Double, read only
Duty kJ/hr Double, read only
ElevationChange m Double, read/write
ElevationPressureDrop bar Double, read only
Energy kJ/hr Double, read only
Enthalpy kJ/kgmole Double, read only
Entropy kJ/kgmole/K Double, read only
continued

12 Automation 236
Name Units Attributes
EquivalentLength m Double, read only
ExternalDuty W Double, read/write
ExternalHeatTransferCoefficient W/m2/K Double, read only
FittingsLossConstant Double, read only
FittingsLossMultiplier Double, read only
FittingsPressureDrop bar Double, read only
FlowRegime fntFlowRegime, read only
FrictionFactor Double, read only
FrictionPressureDrop bar Double, read only
HeatCapacity kJ/kgmole/K Double, read only
HeatTransfer kJ/hr Double, read only
Ignored fntYesNo, read/write
InsulationName String, read/write
InsulationThickness mm Double, read/ write
InsulationThermalConductivity W/m/K Double, read/write
InternalDiameter mm Double, read/write
Length m Double, read/write
LengthMultiplier Double, read/write
Location String, read/write
MachNumber Double, read only
MassFlow kg/hr Double, read/write
Material fntPipeMaterial, read/write
MolecularWeight Double, read only
MolarFlow kgmole/hr Double, read only
Name String, read/write
Noise dB Double, read only
NominalDiameter String, read/write
OutletTemperatureSpecification C Double, read/write
OverallHeatTransferCoefficient W/m2/K Double, read only
UsePipeClass fntYesNo, read/write
PressureDrop bar Double, read only
RatedMassFlow kg/hr Double, read only
ReynoldsNumber Double, read only
RhoV2 kg/m/s2 Double, read only
Roughness mm Double, read/write
StaticPressure bar abs Double, read only
Schedule String, read/write
SurfaceTension dynes/cm Double, read only
TailPipe fntYesNo, read/write
Temperature C Double, read only
ThermalConductivity W/m/K Double, read only
TotalPressure bar abs Double, read only
VapourFraction molar fraction Double, read only
Velocity m/s Double, read only
Viscosity cP Double, read only
WallThermalConductivity W/m/K Double, read/write
continued

12 Automation 237
Name Units Attributes
WallTemperature C Double, read only
WallThickness mm Double, read/write
WindSpeed m/s Double, read/write
Zfactor Double, read only

Pipes
Description : Collection of pipe
Attributes : IPipes

Methods
Name Description Arguments
Add (Optional nm as Variant, Add a new pipe nm = Name. If omitted a new name is
Optional x as Single, Optional automatically generated
y as Single) x = X coordinate on PFD (Twips)
y = Y coordinate on PFD (Twips)
Delete(wh as Variant) Delete a pipe wh = Index as Name (String) or Number
(Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(wh as Indexed item in the collection IPipe, read only wh = Index as Name
Variant) (String)
or Number (Integer/Long)

ReliefValve
Description : Relief valve node object
Attributes : IReliefValve, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on relief valve
fntNodeEnd, pip as IPipe, pip = Pipe to connect to
pipeconidx as fntPipeEnd)
pipeconidx = Connection on pipe
Disconnect(conidx as Disconnect from a conidx = Connection on relief valve
fntNodeEnd) pipe

12 Automation 238
Properties
Name Description Attributes Arguments
PropertyByName(w Property value for a Variant, read/write wh = Property name
h as String, named property sc = Scenario Index as
[sc as Variant]) Name (String) or Number
(Integer/Long)
PropertyNames Variant array of all the Variant, read only
property names

Named Properties For PropertyByName()


Name Units Attributes
Composition fractions Double (1 To ?), read/write
CompositionBasis fntCompBasis, read/write
Contingency fntContingency, read/write
Energy kJ/hr Double, read only
Enthalpy kJ/kgmole Double, read only
Entropy kJ/kgmole/K Double, read only
FlangeDiameter mm Double, read/write
FluidType fntCompType, read/write
HemCd Double, read/write
HemLiqCd Double. Read/write
Ignored fntYesNo, read/write
Kb Double, read/write
Location String, read/write
LockMabp fntYesNo, read/write
LockReliefPressure fntYesNo, read/write
LockRatedMassFlow fntYesNo, read/write
Mabp bar abs Double, read only
MassFlow kg/hr Double, read/write
Mawp bar abs Double, read/write
MechanicalPressure bar abs Double, read/write
MolecularWeight Double, read/write
Name String, read/write
Orifice String, read/write
RatedMassFlow kg/hr Double, read/write
OutletSonicVelocity m/s Double, read only
OutletTemperature C Double, read only
OutletTemperatureSpecification C Double, read only
OutleVelocity m/s Double, read only
ReliefPressure bar abs Double, read only
SizingBackPressure Bar abs Double, read/write
StaticBackPressure bar abs Double, read only
StaticOutletPressure bar abs Double, read only
StaticInletPipePressureDrop bar Double, read only
Temperature C Double, read only
TemperatureSepcification fntTempSpec, read/write
continued

12 Automation 239
Name Units Attributes
TotalBackPressure bar abs Double, read only
TotalOutletPressure bar abs Double, read only
TotalInletPipePressureDrop bar Double, read only
ValveArea mm2 Double, read/write
ValveCount Integer, read/write
ValveType fntPsvType, read/write
VapourFraction molar fraction Double, read only

ReliefValves
Description : Collection of relief valve node objects
Attributes : IReleifValves

Methods
Name Description Arguments
Add (Optional nm as Variant, Add a new relief valve nm = Name. If omitted a new name
Optional x as Single, Optional is automatically generated
y as Single) x = X coordinate on PFD (Twips)
y = Y coordinated on PFD (Twips)
Delete(wh as Variant) Delete a relief valve wh = Index as Name (String) or
Number (Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(wh as Indexed item in the IReliefValve, read wh = Index as Name
Variant) collection only (String) or Number
(Integer/Long)

Scenario
Description : Scenario object
Attributes : IScenario, read only

Properties
Name Description Attributes Arguments
PropertyByName(w Property value for a Variant, read/write wh = Property name
h as String) named property
PropertyNames Variant array of all the Variant, read only
property names

12 Automation 240
Named Properties For PropertyByName()
Name Units Attributes
AtmosphericPressure bar abs Double, read/write
Calculate fntYesNo, read/write
HeaderLiquidVelocityLimit m/s Double, read/write
HeaderMachLimit Double, read/write
HeaderNoiseLimit dB Double, read/write
HeaderRhoV2Limit kg/m/s2 Double, read/write
HeaderVapourVelocityLimit m/s Double, read/write
Name String, read/write
TailpipeLiquidVelocityLimit m/s Double, read/write
TailpipeMachLimit Double, read/write
TailpipeNoiseLimit dB Double, read/write
TailpipeRhoV2Limit kg/m/s2 Double, read/write
TailpipeVapourVelocityLimit m/s Double, read/write

Scenarios
Description : Collection of scenario objects
Attributes : IScenarios, read only

Methods
Name Description Arguments
Add(nm As String, Add a new scenario nm = New scenario name
[cl as Integer]) cl = Index of scenario to copy data from for
initialization
Delete(wh as Delete a scenario wh = Index as Name (String) or Number
Variant) (Integer/Long)

Properties
Name Description Attributes Arguments
Active Get active scenario IScenario, read only
Active Set active scenario wh = Index as Name
(String) or Number
(Integer/Long)
Count Number of items in the Integer, read only
collection
Item(wh as Indexed item in the IScenario, read only wh = Index as Name
Variant) collection (String) or Number
(Integer/Long)

12 Automation 241
Solver
Description : Solver object
Attributes : ISolver, read only

Methods
Name Description Arguments
Halt Stop calculations
Start Start calculations

Properties
Name Description Attributes Arguments
IsActive Get calculation status Boolean, read only
PropertyByName(wh Property value for a Variant, read/write wh = Property name
as String) named property
PropertyNames Variant array of all the Variant, read only
property names

Named Properties For PropertyByName()


Name Units Attributes
AmbientTemperature C Double, read/write
AtmosphericPressure bar abs Double, read/write
CalculationMode fntCalcMode, read/write
CheckChokedFlow fntYesNo, read/write
Elements Integer, read/write
EnableHeatTransfer fntYesNo, read/write
EnthalpyMethod fntEnthMethod, read/write
InitialPressure bar abs Double, read/write
KineticEnergyBasis fntKeBasis, read/write
LengthMultiplier Double, read/write
LoopIteration Integer, read only
LoopIterationLimit Integer, read/write
LoopTolerance % Double, read/write
PressureDropMethod fntPresDropMethod(0 to 2),
read/write
PropertyIteration Integer, read only
PropertyIterationLimit Integer, read/write
PropertyTolerance % Double, read/write
ScenarioMode fntScenarioMode,
read/write
UnitOperationTolerance % Double, read/write
UseKineticEnergy fntYesNo, read/write
UseRatedFlow fntYesNo, read/write
VleMethod fntVleMethod, read/write
WindSpeed Double, read/write

12 Automation 242
Tee
Description : Tee node object
Attributes : ITee, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection to tee
fntNodeEnd, pip as IPipe, pip = Pipe to connect to
pipeconidx as fntPipeEnd)
pipeconidx = Connection on
pipe
Disconnect(conidx as Disconnect from a pipe conidx - Connection on tee
fntNodeEnd)

Properties
Name Description Attributes Arguments
PropertyByName(wh Property value for a Variant, read/write wh = Property name
as String) named property
PropertyNames Variant array of all the Variant, read only
property names

Named Properties For PropertyByName()


Name Units Attributes
Angle fntTeeAngle, read/write
Body fntTeeEnd, read/write
Ignored fntYesNo, read/write
Location String, read/write
Name String, read/write

Tees
Description : Collection of tee node objects
Attributes : ITees, read only

Method
Name Description Arguments
Add (Optional nm as Variant, Add a new tee nm = Name. If omitted a new
Optional x as Single, Optional name is automatically
y as Single) generated
x = X coordinate on PFD
(Twips)
y = Y coordinate on PFD
(Twips)
Delete(wh as Variant) Delete a tee wh = Index as Name (String)
or Number (Integer/Long)

12 Automation 243
Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(wh as Indexed item in the IConnector, read wh = Index as Name
Variant) collection only (String) Or Number
(Integer/Long)

Tip
Description : Flare tip node object
Attributes : ITip, read only

Methods
Name Description Arguments
AddCurve() Add a pressure drop
curve
AddCurvePoint(wh Append a point to a wh = Index of curve
as Integer) pressure drop curve
DeleteCurve(wh as Delete a pressure drop wh = Index of curve
Integer) curve
DeleteCurvePoint( wh = Index of curve
wh as Integer, id id = Index of point
as Integer)

Properties
Name Description Attributes Arguments
CurveMolwt(wh as Molecular weight of Double, read/write wh = Curve index
Integer) indexed pressure drop
curve
CurvePointMassFlo Mass flow of point on a Double, read/write wh = Index of curve
w(Wh as Integer, pressure drop curve id = Index of point
id as Integer) (kg/hr)
CurvePointPressure Pressure drop of point on Double, read/write wh = Index of curve
Drop(Wh as a pressure drop curve id = Index of point
Integer, id as (bar)
Integer)
PropertyByName(w Property value for a Variant, read/write wh = Property name
h as String) named property
PropertyNames Variant array of all the Variant, read only
property names

12 Automation 244
Named Properties For PropertyByName()
Name Units Attributes
Diameter mm Double, read/write
Ignored fntYesNo, read/write
K Double, read/write
Kbasis fntKbasis, read/write
Location String, read/write
Name String, read/write
Reference Temperature Double, read/write
UseCurves fntYesNo, read/write

Tips
Description : Collection of flare tip node objects
Attributes : ITip, read only

Methods
Name Description Arguments
Add (Optional nm as Variant, Add a new tip nm = Name. If omitted a new
Optional x as Single, Optional name is automatically
y as Single) generated
x = X coordinate on PFD
(Twips)
y = Y coordinate on PFD
(Twips)
Delete(wh as Variant) Delete a tip wh = Index as Name (String)
or Number (Integer/Long)

Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(What as Indexed item in the IConnector, read What = Index as Name
Variant) collection only (String) Or
Number
(Integer/Long)

12 Automation 245
VerticalSeparator
Description : Vertical separator node object
Attributes : IVerticalSeparator, read only

Methods
Name Description Arguments
Connect(conidx as Connect to a pipe conidx = Connection on
fntNodeEnd, pip as IPipe, vertical separator
pipeconidx as fntPipeEnd) pip = Pipe to connect to
pipeconidx = Connection on
pipe
Disconnect(conidx as Disconnect from a pipe conidx - Connection on
fntNodeEnd) vertical separator

Properties
Name Description Attributes Arguments
PropertyByName(w Property value for a Variant, read/write wh = Property name
h as String) named property
PropertyNames Variant array of all the Variant, read only
property names

Named Properties For PropertyByName()


Name Units Attributes
Diameter mm Double, read/write
Ignored Boolean, read/write
Location String, read/write
Name String, read/write

VerticalSeparators
Description : Collection of vertical separator node objects
Attributes : IVerticalSeparators, read only

Methods
Name Description Arguments
Add (Optional nm as Variant, Add a new vertical separator nm = Name. If omitted a new
Optional x as Single, Optional name is automatically
y as Single) generated
x = X coordinate on PFD
(Twips)
y = Y coordinate on PFD
(Twips)
Delete(wh as Variant) Delete a vertical separator wh = Index as Name (String)
or Number (Integer/Long)

12 Automation 246
Properties
Name Description Attributes Arguments
Count Number of items in the Integer, read only
collection
Item(What as Indexed item in the IHorizontalSeparator What = Index as Name
Variant) collection , read only (String) Or Number
(Integer/Long)

Example – Automation In
Visual Basic
This example will show how that FLARENET can be used as an automation
This complete server by a program that analyses a FLARENET model to search for the
example has also maximum and minimum values of a user defined named property within all
been pre-built and
is located in the the pipes.
Flarenet\Sampl
es\Ole\Vb\Bou
Note: Although Visual Basic 6 is recommended for this example,
nds directory you may create the Automation application in the Visual Basic editor
provided in Microsoft Excel 97® and Microsoft Word 97®.

1 Open a new project in Visual Basic 6® and from the New tab of the New
Project property view select the Standard EXE icon and press the Open
button. Your screen should appear similar to Figure 16.6.
Fig 12.6

2 By default you should have a form associated with the project. Begin, by
giving the form a name. In the Name field of the Properties Window
give the form the name:frmBounds.
3 In the Caption field type: FLARENET Model Pipe Property Bounds. This
caption should now appear in the title bar of the form.
4 Before adding objects to the forn, resize the view to accommodate the
different objects that will be required.. In the Width filed found in the

12 Automation 247
Properties Window change the width of the form to 4500 or to any
value such that the from is sufficiently wide to fully display the caption.
5 From the Tool Box select the Text Box button and create a text box on
the forma as shown in Figure 16.7.
Fig 12.7

6 Ensure that the text box is the active control. This can be done in one of
two ways:
− Select the text box on the form so that the object guides appear
around the object.
− From the drop down list found at the top of the properties windows
select the name of the text box you have just created.
7 In the Properties windows, set the name of the text box as
ebModelName in the Name field. If you wish, you may also change the
default text that appears inside the edit box by entering a new name in
the Text field.
8 You may add a label to the form. i.e. to identify the object from others, by
selecting the Label tool and drawing the label on the form just above the
text box you have just created.
9 Ensuring that the label control is active using one of the methods
suggested in step 6, go to the Properties Window and change the text
in the Caption field to Model Name.

12 Automation 248
Fig 12.8

10 Add the following objects to the form using the previously described
methods.
Fig 12.9

11 Only two more objects are required on the form. Select the Command
Button control from the tool bar and add two buttons to the form as
shown in Figure 12.10

12 Automation 249
Fig 12.10

12 You are now ready to begin defining the events behind the form and
objects. You may enter the code environment using a number of methods:
− Click the View Code button.
− Select the Code option from the View menu.
− Double click the frmBounds form.
Fig 12.11

The Private Sub


Form_Load()
method definition will
only be visible if you
enter the code
environment by
double clicking the
form.

13 Begin by declaring the following variables under the Option Explicit


Declaration.

12 Automation 250
Fig 12.12

14 Add a reference to the FLARENET type library to allow access to


predefined constants by selecting References from the Project menu.
Fig 12.13

15 The first subroutine should already be declared. The Form_Load


subroutine is the first subroutine called once the program is run. It is
usually used to initialize the variables and objects used by the program.
Enter the following code into the Form_Load subroutine.
Code Explanation
Private Sub Form_Load() Signifies the start of the form load subroutine. You do
not have to add as it should already be there
ebModelName.Text = "" Clears all the text fields

ebPropertyName.Text = ""
ebMinValue.Text = ""
ebMaxValue.Text = ""
End Sub Signifies the end of the initialization subroutine. This
line does not need to be added.

12 Automation 251
16 The next section of code to be added is what will occur when the name of
the model is changed in the ebModelName box.
Code Explanation
Private Sub ebModelName_Validate(Cancel Signifies the start of the subroutine.
As Boolean)
ModelName = ebModelName.Text Copies the entered name for the model to
the String Variable ModelName
End Sub Signifies the end of the subroutine.

17 The next section of code to be added is what will occur when the desired
property is changed in the ebPropertyName box.
Code Explanation
Private Sub Signifies the start of the subroutine.
ebPropertyName_Validate(Cancel As
Boolean)
PropertyName = ebPropertyName.Text Copies the entered name for the property to
the String Variable PropertyName
End Sub Signifies the end of the subroutine.

18 The final two routines define the actions of the two buttons: btnUpdate
and btnExit.
Code Explanation
Private Sub btnUpdate_Click() Signifies the start of the subroutine.
Dim MaxVal As Double Declare work variables

Dim MinVal As Double


Dim Pipe As FLARENET.IPipe
Dim WorkVal As Double
On Error Resume Next Prevents an error from being raised if for
example an invalid name for the
property is selected
If Trim$(ModelName) = "" Then If a model name is defined then opens
the model defined by the String variable
Set FnApp = GetObject(, ModelName otherwise connects to the
"FLARENET.Application") currently running instance of FLARENET.
Else
Set FnApp =
CreateObject("FLARENET.Application")
FnApp.OpenModel ModelName
End If
If Not FnApp Is Nothing Then Ensure successful connection to the
Application object
MaxVal = -10000000000# Initializes the maximum and minimum
values to values outside the range of
MinVal = 10000000000# possible values.
For Each Pipe In FnApp.Pipes Loop through all the pipes in the model

WorkVal = Get the property named and stores in


Pipe.PropertyByName(PropertyName) the String variable PropertyName
continued

12 Automation 252
Code Explanation
If WorkVal <> fntUnknownValue Then Check for an unknown value. Do not
consider the value further if it is
unknown.
If WorkVal > MaxVal Then MaxVal = Update maximum value
WorkVal
If WorkVal < MinVal Then MinVal = Update minimum value
WorkVal
End If End of loop and value update

Next
ebMinValue.Text = Update the displayed values in the
Format$(MinVal, "0.000e+00") ebMinValue and ebMaxValue Text boxes.

ebMaxValue.Text =
Format$(MaxVal, "0.000e+00")
Set FnApp = Nothing Disconnect the Application object

End If
End Sub Signifies the end of the subroutine.

Code Explanation
Private Sub btnExit_Click() Signifies the start of the subroutine.
Set FnApp = Nothing Releases the connection to FLARENET

Unload Me Unload the form and end the program

End
End Sub Signifies the end of the subroutine.

19 You are now ready to compile and run the program. Before you begin,
please ensure that you have a copy of FLARENET on the computer.
20 To compile the program do one of the following:
− Click the Start button...
− Select Start from the Run menu.
− Press <F5> from the keyboard.
Visual Basic will inform you of any errors that occur during compile time.

12 Automation 253
A Theoretical Basis

Pressure Drop
Pipe Pressure Drop Method
Vapor Phase Pressure Drop Methods
Pressure drop can be calculated either from the theoretically derived equation
for isothermal flow of a compressible fluid in a horizontal pipe2:
2

  In  +
(
 G   P1  M P2 − P1
2 2
) 2
 L  G 
+ 2 f f    = 0
 a   P2  2 RT  φ  a 
A.1
where :
G = Mass flow
a = Cross sectional area of pipe
P1 = Upstream pressure
P2 = Downstream pressure
R = Universal gas constant
f f = Fanning friction factor
φ = Internal diameter
L = Equivalent length
T = Temperature
M = Molecular weight

A Theoretical Basis 254


Or from the theoretically derived equation for adiabatic flow of a compressible
fluid in a horizontal pipe2:

 L   γ - 1 P1  a    V1   γ + 1  V 
2 2

Af f   =  +   1 −   − In 2 
 φ   2γ V1  G    V2   γ  V1 
A.2
where :
G = Mass flow
a = Cross sectional area of pipe
P1 = Upstream pressure
R = Universal gas constant
V1 = Upstream specific volume
V2 = Downstream specific volume
f f = Fanning friction factor
φ = Internal diameter
L = Equivalent length
γ = Ratio of specific heats
The friction factor is calculated using an equation appropriate for the flow
regime. These equations correlate the friction factor to the pipe diameter,
Reynolds number and roughness of the pipe4:
Turbulent Flow (Re > 4000)
The friction factor may be calculated from either the Round equation:

1  Re 
= 3.61 log  
ff (
 0.135 Reφ + 6.5
e
)

A.3
where :
f f = Fanning friction factor
Re = Reynolds number
φ = Internal diameter
e = Absolute pipe roughness

A Theoretical Basis 255


Or from the Chen21 equation:

 e / φ 5.0452  (e / φ ) 
1.1098 0.8981
1  7.149  
= −4 log  − log + 
ff  3 . 7065 Re  2 . 8257  Re  
 
A.4
where :
f f = Fanning friction factor
Re = Reynolds number
φ = Internal diameter
e = Absolute pipe roughness
Transition Flow (2100 ≤ Re ≤ 4000)

1  e  5.02  e  5.02  e 13.0 


= −4.0 log  − log   − log − 
ff  3.7φ  Re   3 . 7φ  Re  3 . 7φ Re 
A.5
where :
f f = Fanning friction factor
Re = Reynolds number
φ = Internal diameter
e = Absolute pipe roughness
Laminar Flow (Re < 2100)
16
ff =
Re
A.6
where :
f f = Fanning friction factor
Re = Reynolds number
The Moody friction factor is related to the Fanning friction factor by:
fm = 4 • f f
A.7
where :
f f = Fanning friction factor
f m = Moody friction factor

A Theoretical Basis 256


2-Phase Pressure Drop
Beggs and Brill
Although the Beggs The Beggs and Brill9 method is based on work done with an air-water mixture
and Brill method was at many different conditions, and is applicable for inclined flow. In the Beggs
not intended for use
with vertical pipes, it
and Brill correlation, the flow regime is determined using the Froude number
is nevertheless and inlet liquid content. The flow map used is based on horizontal flow and
commonly used for has four regimes: segregated, intermittent, distributed and transition. Once
this purpose, and is the flow regime has been determined, the liquid hold-up for a horizontal pipe
therefore included as
an option for vertical
is calculated, using the correlation applicable to that regime. A factor is
pressure drop applied to this hold-up to account for pipe inclination. From the hold-up, a
methods. two-phase friction factor is calculated and the pressure gradient determined.
Fig A.1

The boundaries between regions are defined in terms of two constants and
the Froude number10:

L1 = exp(− 4.62 − 3.757 x − 0.481x 2 − 0.0207 x 3 )


A.8

L2 = exp(1.061 − 4.602 x − 1.609 x 2 − 0.0179 x 3 + 0.000625 x 5 )


A.9
where :
x = In(λ )
λ = Input liquid content = qliquid / (qliquid + q gas )
q = In situ volumetric flowrate

A Theoretical Basis 257


According to Beggs and Brill:
1 If the Froude number is less than L1, the flow pattern is segregated.
2 If the Froude number is greater than both L1 and L2, the flow pattern is
distributed.
3 If the Froude number is greater than L1 and smaller than L2 the flow
pattern is intermittent.

Dukler Method
The Dukler10 method breaks the pressure drop into three components -
Friction, Elevation and Acceleration. The total pressure drop is the sum of the
pressure drop due to these components:
∆PTotal = ∆PF + ∆PE + ∆PA
A.10
where :
∆PTotal = Total change in pressure
∆PF = Change in pressure due to friction
∆PE = Change in pressure due to elevation
∆PA = Change in pressure due to acceleration
The pressure drop due to friction is:
2
2 f LV m ρ m
∆PF = TP
144 g c D
A.11

where :
f TP = Two − phase friction factor (determined empirically )
L = Equivalent length of the pipeline ( ft )
Vm = Velocity of the two − phase mixture in pipeline assuming equal
velocity ( ft / s )
ρ m = Density of two − phase mixture (lb / ft 3 )
g c = Gravitational constant (32.2lbm − ft / lbf − s 2 )
D = Inside diameter of pipe ( ft )

A Theoretical Basis 258


The pressure drop due to elevation is as follows:

Eh ρ L ∑ H
∆PE =
144
A.12
where :
E h = Liquid head factor (determined empirically )
ρ L = Liquid density
∑ H = Sum of elevation changes
The pressure drop due to acceleration is usually very small in oil/gas
distribution systems, but becomes significant in flare systems:

 ρ g QGPL
2
ρ Q2   ρ Q2 2  
∆PA =
1
  + L LPL  −  g GPL + ρ L QLPL  cos θ 
144 g c A 2  1 − RL RL  
 DS  1 − RL RL 
US

A.13
where :
A = Cross − sectional area
ρ g = Gas density
QGPL = Volume of gas flowing at pipeline temperature and pressure ( ft 3 / hr )
Q LPL = Volume of liquid flowing at pipeline temperature and pressure ( ft 3 / hr )
R L = Liquid holdup in pipeline as a percentage of pipeline capacity
θ = Angle of the pipe bend

Orkiszewski Method
The Orkiszewski11,12 method assumes there are four different flow regimes
existing in vertical two-phase flow - bubble, slug, annular-slug transition and
annular-mist.
The bubble flow regime consists mainly of liquid with a small amount of a
free-gas phase. The gas phase consists of small, randomly distributed gas
bubbles with varying diameters. The gas phase has little effect on the
pressure gradient (with the exception of its density).
In the slug flow regime, the gas phase is most pronounced. The gas bubbles
coalesce and form stable bubbles of approximately the same size and shape.
The gas bubbles are separated by slugs of a continuous liquid phase. There is
a film of liquid around the gas bubbles. The gas bubbles move faster than the
liquid phase. At high flow velocities, the liquid can become entrained in the
gas bubbles. The gas and liquid phases may have significant effects on the
pressure gradient.
Transition flow is the regime where the change from a continuous liquid phase
to a continuous gas phase occurs. In this regime, the gas phase becomes
more dominant, with a significant amount of liquid becoming entrained in the

A Theoretical Basis 259


gas phase. The liquid slug between the gas bubbles virtually disappears in the
transition regime.
In the annular-mist regime, the gas phase is continuous and is the controlling
phase. The bulk of the liquid is entrained and carried in the gas phase.
Orkiszewski defined bubble flow, slug flow, mist flow and gas velocity
numbers which are used to determine the appropriate flow regime.
If the ratio of superficial gas velocity to the non-slip velocity is less than the
bubble flow number, then bubble flow exists, for which the pressure drop is:
2
 VsL 
 
 RL 
∆P = f tp ρ L
2gc D
A.14
where :
∆P = Pressure drop (lb / ft 2 per foot of length)
f tp = Two − phase friction factor
ρ L = Liquid density (lb / ft 3 )
VsL = Superficial liquid velocity ( ft / s )
R L = Dimensionless factor dependent on non − slip velocity
g c = Gravitational constant (32.2 lbm − ft / lbf − s 2 )
D = Hydraulic diameter ( ft )
If the ratio of superficial gas velocity to the non-slip velocity is greater than
the bubble flow number, and the gas velocity number is smaller than the slug
flow number, then slug flow exists. The pressure drop in this case is:

 f tp ρ LVns2   VsL + Vr  
∆P =   
  + Γ 
 2g c D  Vns + Vr
    
A.15
where :
Vns = Non − slip velocity
Vr = Bubble rise velocity
Γ = Constant

A Theoretical Basis 260


The pressure drop calculation for mist flow is as follows:

(V )
sg
2

∆P = f tp ρ g
2gc D
A.16
where :
V sg = Superficial gas velocity ( ft / s )
ρ g = Gas density (lb / ft 3 )
The pressure drop for transition flow is:
∆P = ∆Ps + (1 − x )∆Pm
A.17
where :
∆Ps = Pressure drop for slug flow
∆Pm = Pressure drop for mixed flow
x = Weighting factor , dependent on mist flow, slug flow, and gas velocity numbers

The pressure drop calculated by the previous equations, are for a one-foot
length of pipe. These are converted to total pressure drop by:
ρ∆PL
∆Ptotal =
  Qtotal G f 
144 1 −  
   4637 PA 2 
p 
A.18
where :
ρ = Density of the flowing regime (lb / ft 3 )
Qtotal = Mass rate of combined liquid / gas (lb / s )
G f = Gas flow rate ( ft 3 / s )
A p = Cross − sectional area of pipe ( ft 2 )
p = Average pressure in segment ( psia )
∆P = Unit pressure drop (as calculated above)
L = Length of line segment ( ft )

A Theoretical Basis 261


Fittings Pressure Change Methods
The correlations used for the calculation of the pressure change across a
fitting are expressed using either the change in static pressure or the change
in total pressure. Static pressure and total pressure are related by the
relationship:

ρv 2
Pt = Ps +
2
A.19
In this equation and all subsequent equations, the subscript t refers to total
pressure and the subscript s refers to the static pressure.

Enlargers/Contractions
The pressure change across an enlargement or contraction may be calculated
using either incompressible or compressible methods. For two phase systems
a correction factor that takes into account the effect of slip between the
phases may be applied.
Figure A.2 and A.3 define the configurations for enlargements and
contractions. In these figures the subscript 1 always refers to the fitting inlet
and subscript 2 always refers to the fitting outlet.
Fig A.2

Fig A.3

A Theoretical Basis 262


Incompressible Single Phase Flow
The total pressure change across the fitting is given by:

ρ1v12
∆Pt = K1 +
2
A.20
where :
∆p = Total pressure change
K = Fittings loss coefficient
ρ = Mass density
v = Velocity
Sudden and Gradual Enlargement
For an enlarger the fittings loss coefficient is calculated from the ratio of the
smaller diameter to the larger diameter, β .

d1
β=
d2
A.21
26
The fitting loss coefficients are defined by Crane
If θ < 45°

θ
K1 = 2.6 sin   1 − β 2 ( )
2

 2
A.22
Otherwise

(
K1 = 1 − β 2 )
2

A.23
Sudden and Gradual Contraction
For a contraction the fittings loss coefficient is calculated from ratio of the
smaller area to the larger area, σ .
2
d 
σ =  2 
 d1 
A.24

A Theoretical Basis 263


The fittings loss coefficients are defined by HTFS27

K t = −19.2211σ 2 + 8.54038σ 2.5 + 14.24265σ 1.5 − 4.5385σ


+ 0.39543σ 0.5 + 0.57806
A.25
K t Cc
K1 =
σ2
A.26
The contraction coefficient, is defined by
If θ = 180 ° (Abrupt contraction)

1
Cc =
1 + 0.41(1 - σ )
A.27
Otherwise

(
Cc = 0.0179le −9.6240θ' + 0.03614(θ' (1 + θ')) )
4.79028 0.25

A.28
where :
θ' = θ/180 o

Incompressible Two Phase Flow


Sudden and Gradual Enlargement
The static pressure change across the fitting is given by HTFS27

 1  2
 K1 − 1 + 2 m& 1
σ 
∆Ps =  φ LO
2

2ρ l
A.29

x g2 ρ l (1 − x g )
2

φ LO
2
= +
εg ρg 1- ε g
A.30
where :
m = Mass flux
ρ = Phase mass density
ε = Phase void fraction
x = Phase mass fraction

A Theoretical Basis 264


Sudden and Gradual Contraction
The static pressure change across the fitting is given by HTFS27

∆Ps =
(K t )
+ 1 − σ 2 m& 22 2
φ LO
2ρ l
A.31

φ LO = φ L2 (1 − x g )
2 2

A.32
C 1
φ L2 = 1 + + 2
X X
A.33
0.5
 1 − xg  ρ g 
X =  
 x  ρ
 g  l 
A.34
0.5 0.5
ρ   ρg 
C = l  +  
ρ 
 g   ρl 
A.35
where :
m = Mass flux
ρ = Phase mass density
ε = Phase void fraction
x = Phase mass fraction

Compressible Single Phase Flow


Sudden and Gradual Enlargement
The static pressure change across the fitting is given by HTFS27

m& 12  ρ1 
∆Ps =  − 1
ρ1σ  ρ 2 σ 
A.36
where :
m = Mass flux
ρ = Phase mass density

A Theoretical Basis 265


Sudden and Gradual Contraction
The static pressure change across the fitting is calculated using the two-phase
method given in Compressible Two Phase Flow below. The single-phase
properties are used in place of the two-phase properties.

Compressible Two Phase Flow


Sudden and Gradual Enlargement
The static pressure change across the fitting is given by HTFS27

m& 12  vE 2 
∆Ps =  − v E1 
σ  σ 
A.37
where :
vE = Equivalent specific volume given by

  
  

vE = (x g v g + u R (1 − x g )vl ) x g +
(1 − xg )  (u R − 1) 
2

1 + 
u R   v g  0.5 
 
   v  − 1
   l 
A.38
0.5
v 
u R =  H 
 vl 
A.39
vH = x g v g + (1 − x g )vl
A.40
where :
m = Mass flux
ρ = Phase mass density
x = Phase mass fraction
Sudden and Gradual Contraction
The pressure loss comprises two components. These are the contraction of
the fluid as is passed from the inlet to the vena contracta plus the expansion
of the fluid as it passes from the vena contracta to the outlet. In the following
equations the subscript t refers to the condition at the vena contracta.

A Theoretical Basis 266


For the flow from the inlet to the vena conracta, the pressure change is
modeled in accordance with HTFS27 by:

m& 12 vE1   vEt  1 


2
ζ vE
∫ 1 v E1
dζ = 1 −  
2 P1   vE1  (Cc σ )2 

 
A.41
P
ζ=
P1
A.42
For the flow from the vena contracta to the outlet the pressure change is
modeled used the methods for Sudden and Gradual Expansion given above.

Tees
Tees can be modeled either by using a flow independent loss coefficient for
each flow path or by using variable loss coefficients that are a function of the
volumetric flow and area for each flow path as well as the branch angle. The
following numbering scheme is used to reference the flow paths.
Fig A.4

Constant Loss Coefficients


The following static pressure loss coefficients values are suggested by the
API23:

θ K 13 K 23 K 12 K 31 K 32 K 21
<90o 0.76 0.50 1.37 0.76 0.50 1.37
90o 1.37 0.38 1.37 1.37 0.38 1.37

The selection of the coefficient value is dependant on the angle and the
direction of flow through the tee.
• For flow into the run, the loss coefficient for tee is:

θ K 13 K 12
90o 0.38 1.37
<>90o 0.50 1.37

A Theoretical Basis 267


• For flow into the branch, the loss coefficient for tee is:

θ K 21 K 23
90o 1.37 1.37
<>90o 1.37 0.76

• For flow into the tail, the loss coefficient for tee is:

θ K 31 K 23
90o 0.38 1.37
<>90o 0.50 0.76

where : Reference numbers 1,2 and 3 are assigned as shown in Figure A.4
The static pressure change across the fitting is given by:

ρv 2
∆Ps = K
2
A.43
Variable Loss Coefficients
The loss coefficients are a function of the branch angle, branch area to total
flow area ratio and branch volumetric flow to total volumetric flow ratio.
These values have been graphically represented by Miller25. Using these
charts the static pressure changes are calculated from:
• Combing Flow
 ρ1v12   ρ v2 
 + P1  −  3 3 + P3 
 2   2 
K13 =  3
ρ 3v3
2
A.44
 ρ1v22   ρ 3v32 

 + P2
 −  + P3 
 2   2 
K 23 =  3
ρ 3v3
2
A.45

A Theoretical Basis 268


• Dividing Flow
 ρ 3v32   ρ1v12 
 + P3  −  + P1 
 2   2 
K 31 =  3
ρ 3v3
2
A.46
 ρ 3v32   ρ v2 
 + P3  −  2 2 + P2 
 2   2 
K 32 =  3
ρ 3v3
2
A.47
A typical chart for K 23 in combining flow is shown.

Fig A.5

Orifice Plates
Orifice plates can be modeled either as a sudden contraction from the inlet
pipe size to the orifice diameter followed by a sudden expansion from the
orifice diameter to the outlet pipe size or by using the HTFS equation for a
thin orifice plate.

∆Ps =
2.825
β4
(
1− β2 )
1.5082β 0.08956 m& 12
2ρ1
A.48
See Incompressible Single Phase Flow on Page 263 for a definition of the
symbols.

A Theoretical Basis 269


Vertical Separators
The Pressure change across the separator comprises the following
components:
• Expansion of the multiphase inlet from the inlet diameter, d1, to the body
diameter dbody.
• Contraction of vapor phase outlet from the body diameter, dbody, to the
outlet diameter, d2
Friction losses are ignored.
Fig A.6

Horizontal Separators
The Pressure change across the separator comprises the following
components calculated using the methods described in Incompressible Single
Phase Flow on Page 263:
• Expansion of the multiphase inlet from the inlet diameter, d1, to the vapor
space characterized by equivalent diameter of the vapor area.
• Contraction of vapor phase outlet from the vapor space characterized by
the equivalent diameter of the vapor area, to the outlet diameter, d2

A Theoretical Basis 270


Friction losses are ignored.
Fig A.7

Vapor-Liquid Equilibrium
Compressible Gas
The PVT relationship is expressed as:
PV = ZRT
A.49
where :
P = Pressure
V = Volume
Z = Compressibility factor
R = Gas constant
T = Temperature
The compressibility factor Z is a function of reduced temperature and
pressure. The overall critical temperature and pressure are determined using
applicable mixing rules.

Vapor Pressure
The following equations are used for estimating the vapor pressure, given the
component critical properties3:

(
Inp * r = Inp * r )( ) + ω(Inp )( )
0 *
r
1

A.50

A Theoretical Basis 271


(Inp )( ) = 5.92714 − 6.09648
*
r
0

T
− 1.28862InT r + 0.169347Tr6
r

A.51

(Inp )( ) = 15.2518 − 16.T6875 − 13.4721InT


*
r
1
r + 0.43577Tr6
r

A.52
where :
pr* = Reduced vapour pressure ( p * / pc )
p * = Vapour pressure ( psi abs )
pc = Critical pressure ( psi abs )
ω = Acentric factor
Tr = Reduced temperature (T / Tc )
T = Temperature ( oR)
Tc = Critical temperature ( oR)
This equation is restricted to reduced temperatures greater than 0.30, and
should not be used below the freezing point. Its use was intended for
hydrocarbons, but it generally works well with water.

Soave Redlich Kwong


It was noted by Wilson (1965, 1966) that the main drawback of the Redlich-
Kwong equation of state was its inability of accurately reproducing the vapor
pressures of pure component constituents of a given mixture. He proposed a
modification to the RK equation of state using the acentricity as a correlating
parameter, but this approach was widely ignored until 1972, when Soave
(1972) proposed a modification of the SRK equation of this form:
RT a(T , Tc , ω )
P= −
V − b V (V + b )
A.53
The a term was fitted in such a way as to reproduce the vapor pressure of
hydrocarbons using the acentric factor as a correlating parameter. This led to
the following development:
RT ac α
P= −
V − b V (V + b )
A.54

R 2Tc2
ac = Ω a (Ω a the same as RK )
Pc
A.55

A Theoretical Basis 272


(
α = 1 + S 1 − Tr0.5 )
A.56

S = 0.480 + 1.574ω - 0.176ω 2


A.57
The reduced form is:
3Tr 3.8473α
Pr = −
Vr − 0.2559 Vr (Vr + 0.2599 )
A.58
The SRK equation of state can represent with good accuracy the behavior of
hydrocarbon systems for separation operations, and since it is readily
converted into computer code, its usage has been extensive in the last twenty
years. Other derived thermodynamic properties, like enthalpies and entropies,
are reasonably accurate for engineering work, and the SRK equation enjoys
wide acceptance in the engineering community today.

Peng Robinson
Peng and Robinson (1976) noted that although the SRK was an improvement
over the RK equation for VLE calculations, the densities for the liquid phase
were still in considerable disagreement with experimental values due to a
universal critical compressibility factor of 0.3333, which was still too high.
They proposed a modification to the RK equation which reduced the critical
compressibility to about 0.307, and which would also represent the VLE of
natural gas systems accurately. This improved equation is represented by:
RT ac α
P= −
V − b V (V + b ) + b(V − b )
A.59
2 2
RT
ac = 0.45724 c
Pc
A.60
RTc
b = 0.07780
Pc
A.61
They used the same functional dependency for the α term as Soave:

(
α = 1 + S 1 − Tr0.5 )
A.62

S = 0.37464 + 1.5422ω - 0.26992ω 2


A.63

A Theoretical Basis 273


3.2573Tr 4.8514α
Pr = − 2
Vr − 0.2534 Vr + 0.5068Vr − 0.0642
A.64
The accuracy of the SRK and PR equations of state are roughly the same
(except for density calculations).

Physical Properties
Vapor Density
Vapor density is calculated using the compressibility factor calculated from
the Berthalot equation5. This equation correlates the compressibility factor to
the pseudo reduced pressure and pseudo reduced temperature.

 P  6.0 
Z = 1.0 + 0.0703 r 1.0 − 2 
 Tr  Tr 
A.65
PM
ρ=
ZRT
A.66

Liquid Density
Saturated liquid volumes are obtained using a corresponding states equation
developed by R. W. Hankinson and G. H. Thompson14 which explicitly relates
the liquid volume of a pure component to its reduced temperature and a
second parameter termed the characteristic volume. This method has been
adopted as an API standard. The pure compound parameters needed in the
corresponding states liquid density (COSTALD) calculations are taken from
the original tables published by Hankinson and Thompson, and the API data
book for components contained in FLARENET's library. The parameters for
hypothetical components are based on the API gravity and the generalized Lu
equation. Although the COSTALD method was developed for saturated liquid
densities, it can be applied to sub-cooled liquid densities, i.e., at pressures
greater than the vapor pressure, using the Chueh and Prausnitz correction
factor for compressed fluids. The COSTALD model was modified to improve its
accuracy to predict the density for all systems whose pseudo-reduced
temperature is below 1.0. Above this temperature, the equation of state
compressibility factor is used to calculate the liquid density.

A Theoretical Basis 274


Vapor Viscosity
Vapor viscosity is calculated from the Golubev3 method. These equations
correlate the vapor viscosity to molecular weight, temperature and the
pseudo critical properties.
Tr > 1.0

3.5M 0.5 Pc0.667Tr( 0.71+ 0.29 / Tr )


µ=
10000.0Tc0.167
A.67
Tr ≤ 1.0

3.5M 0.5 Pc0.667Tr( 0.965)


µ=
10000.0Tc0.167
A.68

Liquid Viscosity
FLARENET will automatically select the model best suited for predicting the
phase viscosities of the system under study. The model selected will be from
one of the three available in FLARENET: a modification of the NBS method
(Ely and Hanley), Twu's model, and a modification of the Letsou-Stiel
correlation. FLARENET will select the appropriate model using the following
criteria:

Chemical System Liquid Phase Methodology


Lt Hydrocarbons (NBP < 155 F) Mod Ely & Hanley
Hvy Hydrocarbons (NBP > 155 F) Twu
Non-Ideal Chemicals Mod Letsou-Stiel

All the models are based on corresponding states principles and have been
modified for more reliable application. These models were selected since they
were found from internal validation to yield the most reliable results for the
chemical systems shown. Viscosity predictions for light hydrocarbon liquid
phases and vapor phases were found to be handled more reliably by an in-
house modification of the original Ely and Hanley model, heavier hydrocarbon
liquids were more effectively handled by Twu's model, and chemical systems
were more accurately handled by an in-house modification of the original
Letsou-Stiel model.
A complete description of the original corresponding states (NBS) model used
for viscosity predictions is presented by Ely and Hanley in their NBS
publication16. The original model has been modified to eliminate the iterative
procedure for calculating the system shape factors. The generalized Leech-
Leland shape factor models have been replaced by component specific
models. FLARENET constructs a PVT map for each component and regresses

A Theoretical Basis 275


the shape factor constants such that the PVT map can be reproduced using
the reference fluid.
Note: The PVT map is constructed using the COSTALD for the liquid
region. The shape factor constants for all the library components
have already been regressed and are stored with the pure
component properties.
Pseudo component shape factor constants are regressed when the physical
properties are supplied. Kinematic or dynamic viscosity versus temperature
curves may be supplied to replace FLARENET's internal pure component
viscosity correlations. FLARENET uses the viscosity curves, whether supplied
or internally calculated, with the physical properties to generate a PVT map
and regress the shape factor constants. Pure component data is not required,
but if it is available it will increase the accuracy of the calculation.
The general model employs methane as a reference fluid and is applicable to
the entire range of non-polar fluid mixtures in the hydrocarbon industry.
Accuracy for highly aromatic or naphthenic oil will be increased by supplying
viscosity curves when available, since the pure component property
generators were developed for average crude oils. The model also handles
water and acid gases as well as quantum gases.
Although the modified NBS model handles these systems very well, the Twu
method was found to do a better job of predicting the viscosities of heavier
hydrocarbon liquids. The Twu model18 is also based on corresponding states
principles, but has implemented a viscosity correlation for n-alkanes as its
reference fluid instead of methane. A complete description of this model is
given in the paper18 titled "Internally Consistent Correlation for Predicting
Liquid Viscosities of Petroleum Fractions".
For chemical systems the modified NBS model of Ely and Hanley is used for
predicting vapor phase viscosities, whereas a modified form of the Letsou-
Stiel model15 is used for predicting the liquid viscosities. This method is also
based on corresponding states principles and was found to perform
satisfactorily for the components tested.
The parameters supplied for all FLARENET pure library components have been
fit to match existing viscosity data over a broad operating range. Although
this will yield good viscosity predictions as an average over the entire range,
improved accuracy over a more narrow operating range can be achieved by
supplying viscosity curves for any given component. This may be achieved
either by modifying an existing library component through FLARENET's
component librarian or by entering the desired component as a hypothetical
and supplying its viscosity curve.

A Theoretical Basis 276


Liquid Phase Mixing Rules for Viscosity
The estimates of the apparent liquid phase viscosity of immiscible
Hydrocarbon Liquid - Aqueous mixtures are calculated using the following
"mixing rules":
• If the volume fraction of the hydrocarbon phase is greater than or equal to
0.33, the following equation is used19:

µ eff = µ oil e 3.6(1−voil )


A.69
where :
µ eff = Apparent viscosity
µ oil = Viscosity of Hydrocarbon phase
voil = Volume fraction Hydrocarbon phase
• If the volume fraction of the hydrocarbon phase is less than 0.33, the
following equation is used20:

  µ oil + 0.4µ H 2O 
µ eff = 1 + 2.5voil  µ H O
  µ + µ  2
 oil H 2O 
A.70
where :
µ eff = Apparent viscosity
µ oil = Viscosity of Hydrocarbon phase
µ H 2O = Viscosity of Aqueous phase
voil = Volume fraction Hydrocarbon phase
The remaining properties of the pseudo phase are calculated as follows:

mweff = ∑ xi mwi (molecular weight )


A.71

ρ eff = 1 / (∑ ( xi / pi )) (mixture density )


A.72

Cpeff = ∑ xi Cpi (misture specific heat )


A.73

A Theoretical Basis 277


Thermal Conductivity
As in viscosity predictions, a number of different models and component
specific correlations are implemented for prediction of liquid and vapor phase
thermal conductivities. The text by Reid, Prausnitz and Polings15 was used as
a general guideline in determining which model was best suited for each class
of components. For hydrocarbon systems the corresponding states method
proposed by Ely and Hanley16 is generally used. The method requires
molecular weight, acentric factor and ideal heat capacity for each component.
These parameters are tabulated for all library components and may either be
input or calculated for hypothetical components. It is recommended that all of
these parameters be supplied for non-hydrocarbon hypotheticals to ensure
reliable thermal conductivity coefficients and enthalpy departures.
The modifications to the method are identical to those for the viscosity
calculations. Shape factors calculated in the viscosity routines are used
directly in the thermal conductivity equations. The accuracy of the method
will depend on the consistency of the original PVT map.
The Sato-Reidel method15 is used for liquid phase thermal conductivity
predictions of glycols and acids, the Latini et al. Method15 is used for esters,
alcohols and light hydrocarbons in the range of C3 - C7, and the Missenard
and Reidel method15 is used for the remaining components.
For vapor phase thermal conductivity predictions, the Misic and Thodos, and
Chung et al. 15 methods are used. The effect of higher pressure on thermal
conductivities is taken into account by the Chung et al. method.
As in viscosity, the thermal conductivity for two liquid phases is approximated
by using empirical mixing rules for generating a single pseudo liquid phase
property.

Enthalpy
Ideal Gas
The ideal gas enthalpy is calculated from the following equation:

H ideal = Ai + BiT + CiT 2 + DiT 3 + EiT 4


A.74
where :
H = Ideal enthalpy
T = Temperature
A, B, C , D, E = Ideal gas heat capacity terms

A Theoretical Basis 278


Lee-Kesler
The Lee-Kesler enthalpy method corrects the ideal gas enthalpy for
temperature and pressure.

H = H ideal + H dep
A.75

ω  H dep  
s r s
 H dep   H dep   H dep 
  =   + r   −   
 RTc   RTc  ω  RTc   RTc  
A.76

  2b k   3b k   3c k  
k  b2k −  3  +  24  c2k −  23  
 H dep    Tr   Tt −  Tr  + d 2 + 3E 
k
  = −Tr Z k − 1.0 − 
 RTc   TrVr 2TrVr2 5TrVr5 
 
 
A.77

 γ k  Vr2 
k
γ
ck  k
E = 34 k β + 1.0 −  β + 1 + 2 e 
k

2Tr γ   Vr  

A.78
where :
Tc = Critical temperature
H = Specific enthalpy
ω = Acentric factor
r = Reference fluid
s = Simple fluid
H ideal = Ideal enthalpy
b, c, d , β, γ = Lee − Kesler terms
H dep = Ideal gas departure enthalpy

A Theoretical Basis 279


Equations of State
The Enthalpy and Entropy calculations are performed rigorously using the
following exact thermodynamic relations:

1   ∂P  
V
H − H ID
RT
= Z −1+ ∫ T   − P dV
RT ∞   ∂T V 
A.79

S − S oID P
V
 1  ∂P  1
= InZ − In o + ∫    − dV
R P ∞  R  ∂T V V 
A.80
For the Peng Robinson Equation of State, we have:

H − H ID
= Z − 1 − 1.5
1 
a − T In
( )
da   V + 2 0.5 + 1 b 

RT 2 bRT 
 ( )
dt   V + 2 0.5 − 1 b 
A.81

S − S oID P
= In(Z − B ) − In o + 1.5  In 
(
A  Tda   Z + 20.5 + 1 B  )
R P (
2 B  adT   Z − 20.5 − 1 B  )
A.82
where :

a = ∑∑ xi x j (ai a j ) (1 − kij )
N N
0.5

i =1 j =1

A.83
For the SRK Equation of State:

H − H ID 1  da   b
= Z −1− a − T dt  In1 + V 
RT bRT    
A.84

S − S oID P A  Tda   B 
= In(Z − B ) − In o +  In1 + 
R P B  adT   Z 
A.85

A Theoretical Basis 280


A and B term definitions are provided below:

Term Peng-Robinson Soave-Redlich-Kwong

bi RTci RTci
0.077796 0.08664
Pci Pci
ai aci α i aci α i
aci
0.457235
(RTci )2 0.42748
(RTci )2
Pci Pci
αi (
1 + mi 1 − Tri0.5 ) (
1 + mi 1 − Tri0.5 )
mi 0.37646 + 1.54226ωi − 0.26992ωi2 0.48 + 1.57ωi − 0.176ωi2

where :

a = ∑∑ xi x j (ai a j ) (1 − kij )
N N
0.5

i =1 j =1

A.86
and
N
b = ∑ xi bi
i =1

A.87
ID = Ideal gas
o
= Reference state
R = Ideal gas constant
H = Enthalpy
S = Entropy

A Theoretical Basis 281


Noise
The sound pressure level at a given distance from the pipe is calculated from
the following equations. In these equations the noise producing mechanism is
assumed to be solely due to the pressure drop due to friction.

 ∆P  πφ 
2
Wm = 1.36  
 L  4 
A.88

 1013 ηWm L 
SPLr = 10 log 2
 − 1
 4 πr 
A.89
where :
L = Equivalent length
SPL = Sound pressure level
r = Distance from pipe
φ = Internal diameter pressure
η = Acoustic efficiency
∆P = Change in pressure

A Theoretical Basis 282


The acoustical efficiency is calculated from the following graph.
Fig A.8

10 - 3

10 - 4

10-5

10 - 6
Acoustical Efficiency

10 - 7

10 - 8
pt = 1 0.0

10 - 9
pt = 1.0

10 - 10
pt = 0. 1

10 - 11
0.0 0.2 0 .4 0.6 0. 8 1.0
Mach Number

2
 P  T 
pt =  1  2 
 P2  T1 
A.90
The transmission loss due to the pipe wall is calculated from:

 0.5mv 
t = 17.0  − 36.0
 φ 
A.91

A Theoretical Basis 283


B File Format

Import/Export Details
This section provides further details of the import and export capabilities of
FLARENET.

Process Descriptions
Import Wizard
The purpose of this section of the documentation is to describe step by step
the operation of the import wizard.

End of Step 1
At this stage the import process verifies that the specified import file exists
and opens it. If an Excel file is being imported this step starts Excel as a
background process then asks it to load the file. The import wizard is then
configured for the appropriate file type.
Any errors are reported.

End of Step 2
At this stage the import process opens the specified import definition file or
the default or new import definition file as specified in Preferences as
appropriate. A check is made that the import definition file type matches the
file type specified in step 1. The version of the import definition file is then
checked and data object and data item elements are added to update to the
current FLARENET version if required.
The next step is to process the file to build the object selector tree view for
Step 3. Any problems in reading the import definition file are reported.

Step 3
During this step, the Import Wizard extracts Source tab data and Field
Details for each data item as different data objects are selected. Whenever a
new data object is selected the data on the Source tab is validated and any
problems are reported.

B File Format 284


End of Step 4
The first action taken is to save the import definition file if required,
prompting for the file name to be used. The import process proper then
begins. In detail the steps are:
1 Clear current results
2 Open log file if required
3 Read components one by one. For each component check to see if it
already exists in the current FLARENET case. If not add component to list.
For database components use information from database, otherwise use
the data values from file.
4 Read binary interaction parameter data.
5 Read data for pipes, connector nodes and source nodes one object type at
a time, updating the progress view as appropriate.
6 As each instance of a particular object type is read check if it already
exists. If so use the data read to update it otherwise create a new
instance of the appropriate object type.
7 Make connections between pipes and nodes. Processing allows for only
one end of the connection to be read.
8 Read scenario data. Existing scenarios will be updated and new ones
created if required.
9 Read Solver options.
10 Update automatic calculations to reflect new data values.
11 Refresh all views.
12 Close log file and then close Import Data File. Any background copy of
Excel will be closed at this point.
13 Close Import Wizard view and finish.

General Data Object Import Procedure


For each object type that is read the detailed import procedure is as follows:
1 Check to see if import of this object type is required. Quit reading this
type of data object if not.
2 Process the data object definition data from the Import Definition File.
Search for and open the specified source object. Quit if any errors are
encountered.
3 Search the source data object for an instance of the appropriate object
type using the defined select criteria if required. For Access imports this
will be a row in the specified table; for Excel imports this will be a row or
column range in the specified worksheet where cell offset 1,1 is not blank;
for XML imports this will be an item element within the specified group
element.
4 Repeat steps 2 and 3 to open any sub section data objects.
5 Read data items from source one by one.

B File Format 285


6 Update counters for number of instances read and search data source for
next object instance. For an Access imports this will be the next row, for
Excel imports the next row or column range, for XML imports the next
item element. Selection criteria will apply if specified. Quit if the next
instance cannot be found.
7 Repeat steps 5 and 6 until all instances have been read.

Export Process
The purpose of this section of the documentation is to describe step by step
the operation of the export wizard.

End of Step 1
At this stage the export process checks to see if the target export file exists.
If so it opens it otherwise the file is created. If an Excel file is being exported
this step starts Excel as a background process then asks it to load any
existing file. The Export Wizard is then configured for the appropriate file
type.
Any errors are reported.

End of Step 2
At this stage the export process opens the specified export definition file or
the default or new export definition file specified in Preferences as
appropriate. A check is made that the export definition file type matches the
file type specified in step 1. The version of the export definition file is then
checked and data object and data item elements are added to update it to the
current FLARENET version if required.
The next step is to process the file to build the object selector tree view for
Step 3. Any problems in reading the export definition file are reported.

Step 3
During this step, the Export Wizard extracts Target tab data and Field Details
for each data item as different data objects are selected. Whenever a new
data object is selected the data on the Target tab is validated and any
problems are reported.

End of Step 4
The first action taken is to save the export definition file if required,
prompting for the file name to be used. The export process proper then
begins. In detail the steps are:
1 Clear existing data from export file if requested by the user.
2 Write components data
3 Write binary interaction parameter data
4 Write pipe data
5 Write connector node and source node data working through each type of
node in turn
6 Write scenario data for scenarios that are selected for calculation.

B File Format 286


7 Write results data for scenarios that are selected for calculation.
8 Write solver options.
9 Save export file. Any background copy of Excel will be closed at this point.
10 Close Export Wizard view.

General Data Object Export Procedure


For each object type that is written the detailed export procedure is as
follows:
1 Check that export of this data object type is required. Quit if not.
2 Create target data object using information from export definition file. For
Access export this will create a table with the correct fields; for Excel
export a worksheet with the correct name; for XML export a group tag
with the correct name. Quit if any errors are encountered.
3 Create target data objects as required for any data subsections.
4 For each instance of the data object to be written search the output file to
see if this instance already exists. If so select this to be overwritten.
Otherwise create a new instance for the data object in the output file. For
Access export this will be a new row in that target table, for Excel export
the next row or column range where cell offset 1,1 is blank, for XML
export a new item element. Quit if the new target instance cannot be
found.
5 Write the values to the target object instance.
6 Update counters for number of items read and mark target instance as
complete.
7 Repeat steps 4 to 6 for until each instance of this data object has been
written.

B File Format 287


Definition File Formats
The import and export definition files are XML formatted data files that
describe how the various FLARENET data objects and their corresponding data
items should be read from or written to the supported external file formats.
This section of the documentation describes the layout of these files.

Import File Formats


File Header
The top level element of an import definition file must have the tag name
FlarenetImport and contain the following attributes:

Attribute Description
LastModified This is a date string that indicates the date that the file was last updated.
FlarenetVersion This indicates the version of FLARENET that the file is applicable to in the
format N.NN.
FileType This indicates the type of external file import that is described in this
definition file. Valid values are Access, Excel or XML

Data Object Elements


The child elements of the FlarenetImport tag define the various data objects
that may be imported by FLARENET. These parent data object elements may
contain child data object elements that describe data subsections that may be
imported from a different location to the parent data object. For example a
pipe data object has a data subsection defined for the PFD layout information.
A data object element has the following attributes:

Attribute Description
ObjectName This defines the source of the data object in the external file. Its usage depends
on the type of external file as follows:
Access – The entry defines a database table
Excel – The entry defines a worksheet
XML – The entry defines the tag name of a group element
Import This indicates whether this object type is to be imported. Valid values are Yes or
No.
Select This defines any selection criteria to be used when selecting instances of data
objects from the external file. Its usage depends on the type of external file but
data substitution codes can be defined in the selection criteria for child data
object elements in all cases.
Access – A valid SQL statement for the database table specified under
ObjectName.
Excel – A statement of the form R#,C#=”criteria” where R#,C# is a cell offset in
the specified worksheet and “criteria” is either a value or a substitution code.
Multiple statements can be entered, separated by the word AND.
XML – A statement of the form “item tag”=”criteria” where “item tag” is a data
item element in the specified group element and “criteria” is either a value or a
substitution code.
continued

B File Format 288


Attribute Description
Contained This indicates whether the data for this object is contained in the same external
data source as the parent object. Valid values are Yes or No. This setting is
always No for a parent data object.
DataBy This entry appears in Excel import definition files only. It defines how the data for
this object is organized. Valid values are Row, Column or Sheet.
StartAt This entry appears in Excel import definition files only. When DataBy is set to
Row or Column it defines the starting row or column for the data. When DataBy is
set to Sheet it defines the tag by which worksheets of the requisite layout can be
identified.
PerItem This entry appears in Excel import definition files only. It defines the number of
rows or columns occupied by a single instance of a data object, including any
spacing, when DataBy is set to Row or Column.
ItemTag This entry appears in XML import definition files only. It defines the element tag
name used to identify each instance of a data object within the group tag name
defined in the ObjectName attribute.

A list of valid Data Object elements names is given in Data Objects List.

Data Item Elements


Each data object element contains data item elements that define the location
of the individual data item in the external data source. A data item element
contains the following attributes:

Attribute Description
Import This indicates whether the item is to be imported. Valid values are Yes or No.
Offset This defines the location of the data value in the external file. Its usage depends
on the type of external file but data substitution codes can be defined for the
offset in all cases – see Data Substitution Codes.
Access – The entry defines a field within the database table for the object.
Excel – The entry defines a cell within the worksheet for the object. The cell is
defined either by a single row or column offset or by a row, column offset.
XML – The entry defines the tag name of an element within the item tag element
for the object.

A list of the data item elements that are recognized for each data object is
given in Data Items List.

Export File Formats


File Header
The top level element of an export definition file must have the tag name
FlarenetExport and contain the following attributes:
Attribute Description
LastModified This is a date string that indicates the date that the file was last updated.
FlarenetVersion This indicates the version of FLARENET that the file is applicable to in the
format N.NN.
FileType This indicates the type of external file export that is described in this definition
file. Valid values are Access, Excel or XML.

B File Format 289


Data Object Elements
The child elements of the FlarenetExport tag define the various data objects
that may be exported by FLARENET. These parent data object elements may
contain child data object elements that describe data subsections that may be
exported to a different location to the parent data object.
A data object element has the following attributes:

Attribute Description
ObjectName This defines the name of the data object that will be created and written to in the
external file. Its usage depends on the type of external file as follows:
Access – The entry defines a database table.
Excel – The entry defines a worksheet,
XML – The entry defines the tag name of a group element.
Export This indicates whether this object type is to be exported. Valid values are Yes or
No.
Contained This indicates whether the data for this object is to be written to the same
external data source as the parent object. Valid values are Yes or No. This setting
is always No for a parent data object.
DataBy This entry appears in Excel export definition files only. It defines how the data for
this object is organized. Valid values are Row, Column or Sheet.
StartAt This entry appears in Excel export definition files only. When DataBy is set to
Row or Column it defines the starting row or column for the data. When DataBy
is set to Sheet it defines the name of the worksheet that will be copied to create
a worksheet for each instance of the data object. This name must begin with a
“%” character.
PerItem This entry appears in Excel export definition files only. It defines the number of
rows or columns occupied by a single instance of a data object, including any
spacing, when DataBy is set to Row or Column
ItemTag This entry appears in XML export definition files only. It defines the element tag
name used to identify each instance of a data object within the group tag name
defined in the ObjectName attribute.

A list of valid Data Object elements names is given in Data Objects List.

B File Format 290


Data Item Elements
Each data object element contains data item elements that define how an
individual data item is to be written to the external data source. A data item
element contains the following attributes:

Attribute Description
Export This indicates whether the item is to be exported. Valid values are Yes or No.
Offset This defines the location where the data value will be written in the external file.
Its usage depends on the type of external file Its usage depends on the type of
external file but data substitution codes can be defined for the offset in all cases –
see Data Substitution Codes.
Access – The entry defines a field within the database table for the object.
Excel – The entry defines a cell within the worksheet for the object. The cell is
defined either by a single row or column offset or by a row, column offset.
XML – The entry defines the tag name of an element within the item tag element
for the object.
Type This appears in Access export definition files only. It defines the data type of the
field to be created for this item. Valid values are Text for text strings, Long for
integer values, Double for floating point values.
Length This appears in Access export definition files only. It defines the length of the field
to be created. For fields of type Text it defines the length of the text string in
characters. For fields of type Long and Double it is set to 0 and will be ignored
though it must be present.

A list of the data item elements that are recognized for each data object is
given in Data Items List.

Data Substitution Codes


As indicated in the above data substitution codes may be defined in the Select
attribute for import data objects and the Offset attribute for item import and
export data items. The details of these codes are as follows:

Select Codes
The code “.itemname” where itemname is the tag name of a data item
element is recognized when processing the Select attribute for import
definition files. The code “.itemname” will be replaced in the selection criteria
by the current value of that item in the parent data object. Therefore it
follows that this code cannot be defined for parent data objects; only child
data objects that describe data subsections. Multiple “.itemname” codes are
allowed in a single select criteria.
For example consider the default import definition file for Access files –
DefAccess.fni. This file is set up to assume that the PFD layout information for
each node is contained in a separate table to the node data. Thus a select
code is needed to identify the appropriate row in this table as each node is
read. Taking a tee as an example node, the relevant lines of the import
definition file are:
1 <Tees ObjectName="Tees" Import="Yes" Select="" Contained="No">

The data in this line specifies the following: The ObjectName attribute says
that the data for tee nodes lies in a database table called Tees. The Import
attribute says tee node data is to be imported. The Select attribute is blank

B File Format 291


which implies that all the entries in the Tees database table will be treated as
tee nodes. The Contained attribute is No since this is a parent data object
element (i.e. directly beneath the FlarenetImport element).
2 <Name Import="Yes" Offset="Name"/> (as found directly below line 1 as
a data item element within the Tees element)

The data in this line specifies how to read the Name data item from the Tees
table. The attribute Import says that the name of the tee is to be imported.
The Offset attributes says that the name of the tee will be found in a field
called Name within the Tees database table.
3 <PFDLayout ObjectName="PFDLayout" Import="Yes"
Select="ItemName=.Name" Contained="No"> (as found within the Tees
element)

The data in this line specifies where to find the PFD layout information for the
tee. The ObjectName attribute says that it will be found in a table called
PFDLayout. The attribute Import says that the layout information should be
imported. The Select attribute includes a substitution code that says that the
data will be found in the row of the table where the field ItemName has the
same value as the name of the tee we are importing. I.e. when we are
importing the tee with the name TeeXYZ the substitution code will evaluate to
TeeXYZ and the PFDLayout table will be searched for the row with the criteria
“ItemName=TeeXYZ”. The Contained attribute states that the data for this
object will be found in a different table (PFDLayout) to that of the parent
object (Tees).
A further example can be taken from the default Excel definition file
DefExcel.fni. C This expects source data for all scenarios to be held on a
dedicated worksheet. The SourceData data object element within the
Scenarios data object element is as follows:
4 <SourceData ObjectName="SourceData" Import="Yes"
Select="1=.Name" Contained="No" DataBy="Row" PerItem="1"
StartAt="1">

This identifies the worksheet as SourceData, and that import of this data is
required. The layout is defined as being in rows (DataBy) with 1 row per
source data object (PerItem) starting at row 1 (StartAt). The Select attribute
says that the data for the current scenario is to be found in rows where
column 1 contains the name of the scenario.

Offset Codes
The following codes are recognized and processed in the Offset attribute in
both import and export definition files.
“%ObjectName”
where ObjectName is the name of a data object element, will be replaced
by a value that iterates as successive instances of that type of object are
read or written for this instance of the parent data object. It is used to
provide a value that iterates through repeated data items e.g. component
data or pipe fitting data. ObjectName may refer to any data object
element that is a parent of the data item. The code is usually used in
conjunction with a + symbol to add the iteration value to some constant
value.

B File Format 292


In an Access or XML import or export definition file the + symbol means
that the iteration value is concatenated with the constant value. E.g.
Frac+%Composition will be expanded to Frac1, Frac2 etc.
In an Excel import or export definition file*, -, and / symbols as well as
the + symbol are recognized to combine the iteration value with a
constant value to calculate a cell address. E.g. 2,2+%Composition will be
expanded to the cell references 2,3 then 2,4 etc. See the CurveMassFlow
data item in the TipCurveData data object in the definition file DefExcel.fni
for a more complicated example.

“#ObjectName”
where ObjectName is the name of a data object element, will be replaced
by the total number of instances of that type of data object that have
been read. ObjectName may refer to any data object element that is a
child of the current data object element. The value returned is usually
combined with some constant value through a + or other symbols as for
the “%ObjectName” code.

“?Composition”
is a special code that is used exactly as it stands. “?Composition” will be
replaced by each component name or offset in turn as successive
component composition data items are read or written It is generally used
in conjunction with a + symbol to each component name or offset to some
constant value.
In an Access or XML import or export definition file ?Composition will
return component names in turn from the master component list e.g.
Frac+?Composition will be evaluated as FracMethane, FracEthane etc.
In an Excel import or export definition ?Composition will return the index
number of a component in the master component list to allow it to be
used to calculate a cell offset.
In both cases the master component list is the union of the components in
the current FLARENET case and the import or export definition files.
Essentially this code allows unambiguous specification of a component
identity when merging of the component lists between a FLARENET case
and an import or export definition file.

B File Format 293


Recognized Objects and Items
Data Objects List
Data object elements for the following data objects and sub-sections are
recognized in import and export definition files.

Element Tag Sub Section Data Description


Object Elements
Components None Component data
BIPs None Binary interaction parameters
Connectors PFDLayout Connector nodes
ControlValves PFDLayout Control valve source nodes
SourceData
FlowBleeds PFDLayout Flow bleed nodes
HorizontalSeparators PFDLayout Horizontal separator nodes
OrificePlates PFDLayout Orifice plate nodes
Pipes PFDLayout Pipes
Fittings
Fittings None Fitting data for pipes
ReliefValves PFDLayout Relief valve source nodes
SourceData
Tees PFDLayout Tee nodes
Tips PFDLayout Flare tip nodes
TipCurves
TipCurves TipCurveData Tip pressure drop curves
TipCurveData None Data points in tip pressure drop curve
VerticalSeparators PFDLayout Vertical separator nodes
Scenarios SourceData PipeEstimates Scenario data
SolverOptions WarningMsgs Calculation option data
WarningMsgs None Warning message flags
PFDLayout None PFD layout information
SourceData Composition Scenario specific source data
Composition None Component composition data
PipeEstimates None Scenario specific flow estimates for tear
streams
PFSummary EndResults Summary results data for each pipe. Export
CompResults definition files only.
StreamProps
PhaseProps
EndResults None End specific results for each pipe. Export
definition files only.
CompResults None Composition results for each pipe. Export
definition files only.
StreamProps None Stream properties at each end of each pipe.
Export definition files only.
PhaseProps None Properties for each phase at each end of each
pipe. Export definition files only.

B File Format 294


Data Items List
The data items that can be read for each data object are as follows:

Components
Attribute Description
ID The component id number, -1 for hypotheticals
Name The component name (30 chars)
Type The component type (8 chars)
MolWt The component molecular weight
StdDensity The component standard density (kg/m3)
NBP The component boiling point (K)
WatsonK The component Watson K value
Pc The component critical pressure (bar a)
Tc The component critical temperature (K)
Vc The component critical volume (m3/kgmole)
Vchar The component characteristic volume (m3/kgmole)
Omega The component acentric factor
Omega The component SRK acentric factor
Ha The enthalpy A coefficient (kJ/kgmole)
Hb The enthalpy B coefficient (kJ/kgmole/K)
Hc The enthalpy C coefficient (kJ/kgmole/K2)
Hd The enthalpy C coefficient (kJ/kgmole/K3)
He The enthalpy C coefficient (kJ/kgmole/K4)
Hf The enthalpy C coefficient (kJ/kgmole/K5)
S The entropy coefficient
ViscA The viscosity A parameter
ViscB The viscosity B parameter

BIPs
Attribute Description
PropPkg The code for the property package:
0 – Vapor pressure
1 – Peng Robinson
2 – Soave Redlich Kwong
3 – Compressible Gas
IPType The code for the interaction parameter type
-1 – None
0 – Kij or Aij
1 – Bij
2 – Cij
Comp1 The name of the first component (30 chars)
Comp2 The name of the second component (30 chars)
Kij12 Value of interaction parameter for comp1 / comp2
Kij21 Value of interaction parameter for comp2 / comp1

B File Format 295


Connectors
Attribute Description
Name The connector name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag 0 = not ignored, 1=ignored
UpstreamConnection The name of the upstream pipe (30 chars)
UpstreamConnectionAt The code for the upstream pipe connection
point
0 = upstream end, 1 = downstream end
DownstreamConnnection The name of the downstream pipe (30 chars)
DownstreamConnnectionAt The code for the downstream pipe connection
point
0 = upstream end, 1 = downstream end
Length Length of the swage (mm)
Theta The internal angle of the swage (radians)
FittingLossMethod Code for the fitting loss method
0 = ignored, 1 = calculated
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 =
Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
IsothermalDPOption Code for enabling isothermal pressure drop
calcs
0 = No, 1 = Yes

ControlValves
Attribute Description
Name The control valve name (30 chars)
Location The location text (30 chars)
DownstreamConnnection The name of the downstream pipe (30 chars)
DownstreamConnnectionAt The code for the downstream pipe connection point
0 = upstream end, 1 = downstream end
FlangeID Internal diameter of flange (mm)
Length The length of the inlet piping (m)
ElevationChange The elevation change of the inlet piping (m)
MaterialCode The code for the inlet pipe material
0 = Carbon Steel, 1 = Stainless steel
Roughness The inlet pipe roughness (mm)
NominalDiameter The inlet pipe nominal diameter (20 char text)
PipeSchedule The inlet pipe schedule (20 char text)
InternalDiameter The inlet pipe diameter (mm)
UsePipeClass Code for enabling pipe class usage
0 = No, 1 = Yes
FittingLossOffset Fittings loss offset for inlet pipe
FittingLossFactor Fittings loss Ft factor for inlet pipe

B File Format 296


FlowBleeds
Attribute Description
Name The flow bleed name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag 0 = not ignored, 1=ignored
UpstreamConnection The name of the upstream pipe (30 chars)
UpstreamConnectionAt The code for the upstream pipe connection point
0 = upstream end, 1 = downstream end
DownstreamConnnection The name of the downstream pipe (30 chars)
DownstreamConnnectionAt The code for the downstream pipe connection point
0 = upstream end, 1 = downstream end
PressureDrop Pressure drop over bleed (bar)
FlowOffset Bleed flow offset (kg/h)
FlowMultiplier Flow bleed multiplier
FlowMinimum Minimum bleed flow (kg/h)
FlowMaximum Maximum bleed flow (kg/h)
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes

HorizontalSeparators
Attribute Description
Name The horizontal separator name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag 0 = not ignored, 1=ignored
PrimaryInlet The name of the primary inlet pipe (30 chars)
PrimaryInletAt The code for the primary inlet pipe connection point
0 = upstream end, 1 = downstream end
SecondaryInlet The name of the secondary inlet pipe (30 chars)
SecondaryInletAt The code for the secondary inlet pipe connection point
0 = upstream end, 1 = downstream end
VapourOutlet The name of the vapor outlet pipe (30 chars)
VapourOutletAt The code for the vapor outlet pipe connection point
0 = upstream end, 1 = downstream end
Diameter The vessel diameter (mm)
LiquidLevel The liquid level (mm)
FittingLossMethod Code for fittings loss calculation
0 = Ignored, 1 = Calculated
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
continued

B File Format 297


Attribute Description
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes
BodyDimension Code for body area usage
0 = Full body area, 1 = Partial body area on flow

OrificePlates
Attribute Description
Name The orifice plate name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag 0 = not ignored, 1=ignored
UpstreamConnection The name of the upstream pipe (30 chars)
UpstreamConnectionAt The code for the upstream pipe connection point
0 = upstream end, 1 = downstream end
DownstreamConnnection The name of the downstream pipe (30 chars)
DownstreamConnnectionAt The code for the downstream pipe connection point
0 = upstream end, 1 = downstream end
OrificeDiameter Diameter of orifice (mm)
UpstreamDiameterRatio Ratio of orifice to upstream diameter
DownstreamDiameterRatio Ratio of orifice to downstream diameter
FittingLossMethod Code for pressure loss method
0 = Ignored, 1 = Thin Plate, 2 = Contraction/Expansion
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition=
CompressibleTransition DP percent of inlet pressure for transition (%)
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes

Pipes
Attribute Description
Name The flow bleed name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag 0 = not ignored, 1=ignored
UpstreamConnection The name of the upstream node (30 chars)
UpstreamConnectionAt The code for the upstream node connection point
0,1,2 depending on upstream node
DownstreamConnnection The name of the downstream node (30 chars)
DownstreamConnnectionAt The code for the downstream pipe connection point
0,1,2 depending on downstream node
TailPipe Code to identify tailpipe
0 = No, 1 = Yes
Length Pipe length (m)
ElevationChange Pipe elevation change (m)
continued

B File Format 298


Attribute Description
MaterialCode Code for pipe material
0 = Carbon steel, 1 = Stainless steel
ThermalCond Pipe material thermal conductivity (W/m/C)
Roughness Pipe absolute roughness (mm)
InternalDiameter Pipe internal diameter (mm)
NominalDiameter Pipe nominal diameter (20 char text)
WallThickness Pipe wall thickness (mm)
PipeSchedule Pipe schedule (20 char text)
UsePipeClass Code for pipe class usage
0 = No, 1 = Yes
Sizeable Code for indicating sizeable pipe
0 = No, 1 = Yes
LengthMultiplier Multiplier for pipe length
FittingLossOffset Fittings loss offset
FittingLossFactor Fittings loss Ft factor
AmbientTemperature Temperature outside pipe (C)
WindSpeed Wind speed (m/s)
HeatTransfer Code to enable heat transfer calcs
0 = No, 1 = Yes
OutletTemperature Temperature leaving pipe (C)
Duty Heat transferred (kJ/h)
InsulationType Insulation description (30 chars)
InsulationThickness Insulation thickness (mm)
InsulationConductivity Insulation thermal conductivity (W/m/C)
VLEMethod Code for VLE method
0 = Default, 1 = Compressible Gas, 2 = Peng Robinson,
3 = Soave Redlich Kwong, 4 = Vapor Pressure
HorizontalPipeMethod Code for DP method for horizontal pipes
0 = Default, 1 = Isothermal gas, 2 – Adiabatic gas, 3 =
Beggs&Brill, 4 = Dukler
InclinedPipeMethod Code for DP method for inclined pipes
0 = Default, 1 = Isothermal gas, 2 – Adiabatic gas, 3 =
Beggs&Brill, 4 = Dukler
VerticalPipeMethod Code for DP method for vertical pipes
0 = Default, 1 = Isothermal gas, 2 – Adiabatic gas, 3 =
Beggs&Brill, 4 = Dukler, 5 = Orkisewski
TwoPhaseElements Number of elements for pipe calculation
FrictionFactorMethod Code for friction factor method
0 = Default, 1 = Round, 2 = Chen
DampingFactor Damping factor
FittingsCount Number of fittings linked to this pipe

B File Format 299


Fittings
Attribute Description
ItemName The name of the fitting (30 chars)
FittingDesc Description of the fitting (50 chars)
FittingKOffset Fitting loss constant
FittingKMultiplier Fitting loss Ft factor

ReliefValves
Attribute Description
Name The relief valve name (30 chars)
Location The location text (30 chars)
DownstreamConnnection The name of the downstream pipe (30 chars)
DownstreamConnnectionAt The code for the downstream pipe connection point
0 = upstream end, 1 = downstream end
FlangeID Internal diameter of flange (mm)
MAWP Maximum allowable working pressure (bar a)
ValveType Type code for valve
0 = Balanced, 1 = Conventional
ValveCount Number of valves
AreaPerValve Area of each valve orifice (mm2)
MechanicalPressure Mechanical pressure limit (bar a)
OrificeType Standard type code for orifice (5 char text)
Length The length of the inlet piping (m)
ElevationChange The elevation change of the inlet piping (m)
MaterialCode The code for the inlet pipe material
0 = Carbon Steel, 1 = Stainless steel
Roughness The inlet pipe roughness (mm)
NominalDiameter The inlet pipe nominal diameter (20 char text)
PipeSchedule The inlet pipe schedule (20 char text)
InternalDiameter The inlet pipe diameter (mm)
UsePipeClass Code for enabling pipe class usage
0 = No, 1 = Yes
FittingLossOffset Fittings loss offset for inlet pipe
FittingLossFactor Fittings loss Ft factor for inlet pipe

B File Format 300


Tees
Attribute Description
Name The tee name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag
0 = not ignored, 1=ignored
UpstreamConnection The name of the upstream pipe (30 chars)
UpstreamConnectionAt The code for the upstream pipe connection point
0 = upstream end, 1 = downstream end
BranchConnection The name of the branch pipe (30 chars)
BranchConnectionAt The code for the branch pipe connection point
0 = upstream end, 1 = downstream end
DownstreamConnection The name of the downstream pipe (30 chars)
DownstreamConnectionAt The code for the downstream pipe connection point
0 = upstream end, 1 = downstream end
AngleIndex Code for branch angle
0 = 30 deg, 1 = 45 deg, 2 = 60 deg, 3 = 90 deg
FittingLossMethod Code for fittings loss calculation
0 = Ignored, 1 = Simple, 2 = Miller
BodyType Code for body type
0 = Run, 1 = Tail, 2 = Branch, 3 = Auto
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes
BodyDimension Code for body area usage
0 = Full body area, 1 = Partial body area on flow
ConnectorIfIncomplete Code to use connector calc
0 = No, 1 = Yes

B File Format 301


Tips
Attribute Description
Name The tip name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag
0 = not ignored, 1=ignored
UpstreamConnection The name of the upstream pipe (30 chars)
UpstreamConnectionAt The code for the upstream pipe connection point
0 = upstream end, 1 = downstream end
Diameter Diameter of flare (mm)
FittingLoss Fittings loss coefficient
FittingLossBasis Code for fittings loss basis
0 = Total pressure, 1 = static pressure
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes
UseCurves Code for curve usage
0 = No, 1 = Yes
ReferenceTemperature Reference temperature for curve data (C)
NumCurves Number of pressure drop curves

TipCurves
Attribute Description
TipName The name of the top (30 chars)
CurveMolWt The reference molecular weight for the curve
CurveNumPoints The number of points in the curve

TipCurveData
Attribute Description
CurveMolWt The mole weight of the curve
CurveDataPointNo The number of the curve data point
CurveMassFlow The mass flow for the curve data point (kg/h)
CurvePressureDrop The pressure drop for the curve data point (bar)

B File Format 302


VerticalSeparators
Attribute Description
Name The vertical separator name (30 chars)
Location The location text (30 chars)
Ignored The ignored flag
0 = not ignored, 1=ignored
PrimaryInlet The name of the primary inlet pipe (30 chars)
PrimaryInletAt The code for the primary inlet pipe connection point
0 = upstream end, 1 = downstream end
VapourOutlet The name of the vapor outlet pipe (30 chars)
VapourOutletAt The code for the vapor outlet pipe connection point
0 = upstream end, 1 = downstream end
Diameter The vessel diameter (mm)
FittingLossMethod Code for fittings loss calculation
0 = Ignored, 1 = Calculated
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes

Scenarios
Attribute Description
Name The scenario name (30 chars)
Pressure System back pressure (bar a)
HeaderMach Header mach number limit
HeaderVapVel Header vapor velocity limit (m/s)
HeaderLiqVel Header liquid velocity limit (m/s)
HeaderRV2 Header momentum limit (kg/m/s2)
HeaderNoise Header noise limit (dB)
TailPipeMach Tailpipe mach number limit
TailPipeVapVel Tailpipe vapor velocity limit (m/s)
TailPipeLiqVel Tailpipe liquid velocity limit (m/s)
TailPipeRV2 Tailpipe momentum limit (kg/m/s2)
TailPipeNoise Tailpipe noise limit (dB)

B File Format 303


SolverOptions
Attribute Description
Tag Fixed text “Solver Options”
AllScenarios Code to indicate which scenarios are calculated
0 – Current, 1 – All, 2 – Selected
EchoLoops Are loop calcs echoed
0 = No, 1 = Yes
CheckChoke Check for choke flow
0 = No, 1 = Yes
IterationsProperties Number of iterations in inner (properties) loop
PresTolProperties Pressure tolerance in properties loop (%)
MassTol Mass balance tolerance in outer loop (%)
DamperProperties Damping factor for inner (properties) loop
AmbientTemperature External temperature (C)
AtmosphericPressure Atmospheric pressure (bar a)
WindSpeed Wind velocity (m/s)
LengthMultiplier Pipe length multiplication factor
Mode Code for calculation mode
0 = Rating, 1 = Design, 2 = Debottleneck
RatedFlow Use rated flow for tailpipes
0 = No, 1 = Yes
HeatTransfer Enable heat transfer calculations
0 = No, 1 = Yes
Vle Code for VLE method
0 = Compressible gas, 1 = Peng Robinson, 2 = Soave Redlich
Kwong, 3 = Vapor Pressure
Enthalpy Code for enthalpy method
0 = Ideal gas, 1 = PengRobinson, 2 = Soave Redlich Kwong, 3 =
Lee Kesler
Horizontal Code for horizontal pressure drop method
0 = Isothermal gas, 1 = Adiabatic Gas, 2 = Beggs&Brill 3 =
Dukler
Inclined Code for inclined pressure drop method
0 = Isothermal gas, 1 = Adiabatic Gas, 2 = Beggs&Brill 3 =
Dukler
Vertical Code for vertical pressure drop method
0 = Isothermal gas, 1 = Adiabatic Gas, 2 = Beggs&Brill 3 =
Dukler, 4 = Orkisewski
Elements Number of elements for two phase calculations
FrictionFactor Code for friction factor method
0 = Round, 1 = Chen
Choke Code for choke calculation method
0 = Simple, 1 = HEM
MinTemp1 Minimum allowed temperature for carbon steel (C)
MinTemp2 Minimum allowed temperature for stainless steel (C)
MaxTemp1 Maximum allowed temperature for carbon steel (C)
MaxTemp2 Maximum allowed temperature for stainless steel (C)
InitPres Initial pressure for property calculations (bar a)
continued

B File Format 304


Attribute Description
UpdateEstimates Update flow estimates from solution 0 = No, 1 = Yes
PresTolUnitOps Pressure tolerance for unit operation calculations (%)
PresTolLoops Pressure tolerance for loop calculations (%)
IterationsLoops Number of iterations for loop calculations
DamperLoops Damping factor for loop calculations
CalcIgnoredSources Calculate ignored sources as zero flow 0 = No, 1 = Yes
IgnoreSizeChange Ignore valve flange size change in design calcs
0 = No, 1 = Yes
MabpInactive Check MABP for inactive sources
0 = No, 1 = Yes
LoopMethod Select loop convergence method
0=Newton Raphson, 1=Broyden, 2=Force Convergent
LoopAnalyser Select analyzer for looped systems
0 = Convergent, 1 = Simultaneous
UseKineticEnergy Include kinetic energy
0 = No, 1 = Yes
KineticEnergyBasis Code for kinetic energy basis
0 = Inlet Pipe Velocity, 1 = Zero velocity
IgnoreSepKineticEnergy Ignore kinetic energy in separators
0 = No, 1 - Yes

SourceData
Attribute Description
ScenarioName The name of the scenario (30 chars)
SourceName The name of the source (30 chars)
Ignored The ignored flag
0 = not ignored, 1=ignored
MassFlow Mass flow of the source (kg/h)
RatedFlow Rated flow of the source (kg/h)
RelievingPressure Relieving pressure of source (bar a)
TemperatureFlag The code for inlet temperature specification
0 = Actual, 1 = Superheat, 2 = Subcool
InletTemperatureSpec Inlet temperature value (C)
AllowableBackPressure Maximum allowable back pressure (bar a)
OutletTemperature Outlet temperature (C)
VLEMethod Code for VLE method
0 = Model default, 1 = Compressible gas, 2 = Peng Robinson, 3 =
Soave Redlich Kwong, 4 = Vapor Pressure
FittingLossMethod Code for fitting loss calculation
0 = Ignored, 1 = Calculated
TwoPhaseCorrectionOption Code for two phase correction option
0 = No, 1 = Yes
SwageMethod Code for size change calculation method
0 = Compressible, 1 = Incompressible, 2 = Transition
CompressibleTransition DP percent of inlet pressure for transition (%)
continued

B File Format 305


Attribute Description
IsothermalDPOption Code for enabling isothermal pressure drop calcs
0 = No, 1 = Yes
SizingMethod Code for PSV sizing method
0 = API, 1 = HEM
ContingencyFlag Code for sizing contingency
0 = Operating, 1 = Fire
HemCd Cd for HEM sizing method
LockRatedFlow Auto update of rated flow
0 = No, 1 = Yes
LockMABP Auto update of MABP 0 = No, 1 = Yes
LockReliefPressure Auto update of relieving pressure 0 = No, 1 = Yes
FluidType Code for fluid type
0 = HC, 1 = Misc, 2 = Amine, 3 = Alcohol, 4 = Ketone, 5 =
Aldehyde, 6 = Ester, 7 = Carbacid, 8 = Halogen, 9 = Nitrile, 10 =
Phenol, 11 = Ether
MolWt Fluid mole weight
CompositionBasis Code for composition input basis
0 = MolWt, 1 = Mole fraction, 2 = Mass fraction

Composition
Attribute Description
ScenarioName The name of the scenario (30 chars)
SourceName The name of the source (30 chars)
CompositionBasis Code for composition input basis
0 = MolWt, 1 = Mole fraction, 2 = Mass fraction
Fraction Individual component fraction
ScenarioName Name of the scenario (30 chars)
SegmentName Name of the pipe segment (30 chars)
NoTear Selects whether pipe segment can be a tear object in looped
system
0 = No, 1 = Yes
FlowEstimate Estimated flow rate for the pipesegment (kgmole/hr)
MaxStep Maximum change in pipe flow allowed in a single solver iteration
(kgmole/hr)
MaxFlow Maximum flow allowed for this pipe segment (kgmole/hr)
MinFlow Minimum flow allowed for this pipe segment (kgmole/hr)

PFDLayout
Attribute Description
ItemName The name of the PFD item (30 chars)
XPosition The X coordinate of the item
YPosition The Y coordinate of the item
LabelXPosition The X coordinate of the item label
LabelYPosition The X coordinate of the item label
Rotation Code for icon rotation 0 = None, 1 = Rotate 90, 2 = Rotate 180, 3 =
Rotate 270, 4 = Flip X, 5 = Rotate 90 + Flip Y, 6 = Flip Y, 7 = Rotate
90 + Flip X

B File Format 306


PFSummary
Attribute Description
ScenarioName The name of the scenario (30 chars)
SegmentName The name of the pipe segment (30 chars)
MassFlow The mass flow (kg/h)
RatedFlow The rated flow (kg/h)
MoleFlow The mole flow (kgmole/h)
PressureDrop Pressure drop over pipe (bar)
SourcePressure Pressure of attached source node (bar a)
DPFriction Pressure drop due to friction (bar)
DPElevation Pressure drop due to elevation change (bar)
DPAcceleration Pressure drop due to acceleration (bar)
DPFittings Pressure drop due to fittings (bar)
Noise Noise (dB)
FrictionFactor Friction factor
ReynoldsNo Reynolds number
EquivalentLength Equivalent length (m)
Duty Heat transferred (kJ/h)
HTC Overall heat transfer coefficient (W/m2/C)
HTCExternal External heat transfer coefficient (W/m2/C)
HTCInternal Internal heat transfer coefficient (W/m2/C)
WallTemperature Temperature of pipe wall (C)

EndResults
Attribute Description
ScenarioName The name of the scenario (30 chars)
SegmentName The name of the pipe segment (30 chars)
UpstreamPressure Pressure at upstream end of pipe (bar a)
UpstreamTemperature Temperature at upstream end of pipe (C)
UpstreamVelocity Velocity at upstream end of pipe (m/s)
UpstreamMach Mach number at upstream end of pipe
UpstreamRhoV2 Momentum at upstream end of pipe (kg/m/s2)
UpstreamEnergy Energy at upstream end of pipe (kJ/h)
UpstreamFlowRegime Flow regime at upstream end of pipe (20 chars)
DownstreamPressure Pressure at downstream end of pipe (bar a)
DownstreamTemperature Temperature at downstream end of pipe (C)
DownstreamVelocity Velocity at downstream end of pipe (m/s)
DownstreamMach Mach number at downstream end of pipe
DownstreamRhoV2 Momentum at downstream end of pipe (kg/m/s2)
DownstreamEnergy Energy at downstream end of pipe (kJ/h)
DownstreamFlowRegime Flow regime at downstream end of pipe (20 chars)

B File Format 307


CompResults
Attribute Description
ScenarioName The name of the scenario (30 chars)
SegmentName The name of the pipe segment (30 chars)
MolWt The molecular weight of the fluid
Fraction The mole fraction of each component

StreamProps
Attribute Description
ScenarioName The name of the scenario (30 chars)
SegmentName The name of the pipe segment (30 chars)
UpstreamDensity Density at upstream end of pipe (kg/m3)
UpstreamEnthalpy Energy at upstream end of pipe (kJ/kgmole)
UpstreamEntropy Entropy at upstream end of pipe (kJ/kgmole/K)
UpstreamHeatCapacity Heat capacity at upstream end of pipe (kJ/kgmole/K)
UpstreamMolWt Mol Wt at upstream end of pipe
UpstreamSurfaceTension Surface tension at upstream end of pipe (dyne/cm)
UpstreamThermConductivity Thermal cond. at upstream end of pipe (W/m/K)
UpstreamViscosity Viscosity at upstream end of pipe (cP)
UpstreamZFactor Z Factor at upstream end of pipe
DownstreamDensity Density at downstream end of pipe (kg/m3)
DownstreamEnthalpy Energy at downstream end of pipe (kJ/kgmole)
DownstreamEntropy Entropy at downstream end of pipe (kJ/kgmole/K)
DownstreamHeatCapacity Heat capacity at downstream end of pipe (kJ/kgmole/K)
DownstreamMolWt Mol Wt at downstream end of pipe
DownstreamSurfaceTension Surface tension at downstream end of pipe (dyne/cm)
DownstreamThermConductivity Thermal cond. at downstream end of pipe (W/m/K)
DownstreamViscosity Viscosity at downstream end of pipe (cP)
DownstreamZFactor Z Factor at downstream end of pipe

PhaseProps
Attribute Description
ScenarioName The name of the scenario (30 chars)
SegmentName The name of the pipe segment (30 chars)
SegmentEnd End of the pipe segment
Phase Phase description (25 chars)
Density Density of the phase (kg/m3)
Enthalpy Energy of the phase (kJ/kgmole)
Entropy Entropy of the phase (kJ/kgmole/K)
Phase Fraction Fraction of the phase
HeatCapacity Heat capacity of the phase (kJ/kgmole/K)
MolWt Mol Wt of the phase
SurfaceTension Surface tension of the phase (dyne/cm)
ThermConductivity Thermal conductivity of the phase (W/m/K)
Viscosity Viscosity of the phase (cP)
ZFactor Z Factor of the phase

B File Format 308


FMT Files Format
The printouts can be customized to a limited extent using a series of ASCII
text files with the extension “.fmt”. These files may be edited using any ASCII
text editor such as the NOTEPAD application distributed with Microsoft
Windows.
The default “.fmt” files for each printed report are:

Report “.fmt” file


Component Data Comps.fmt
Component Database DbComps.fmt
Compositions MoleFrac.fmt
Fittings Database DbFittings.fmt
Messages Messages.fmt
Node Data Node.fmt
Pipes Data Pipes.fmt
Physical Properties Properties.fmt
Pipe Schedule Database DbSchedules.fmt
Pressure/Flow Summary Summary.fmt
Scenarios Data Scenarios.fmt
Scenarios Summary ScenSum.fmt
Source Data Sources.fmt

By default, these files are located in the FLARENET program directory. You
can change the location and “.fmt“ file for each report on the Reports tab on
the Preferences Editor view.
Fig B.1

B File Format 309


These files confirm to the following format, here shown for part of the
DbSchedules.fmt file.

Variable Description
version 1 File format version. DO NOT CHANGE.
5 Number of variables to display
6 Font Size (Point)
Arial Font Name
schedule,20.0,0 Variable Name,width (mm), repeat flag (0 = All panes, 1 = Once
nominal,20.0,1 only), extend flag (0 = no, 1 = yes), alignment flag (0 = left, 1
= center, 2 = right)
internal,20.0,1
wall,20.0,1
group,20.0,1

The following defines which variable may be printed with each report:

DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt

Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt

ambient Ambient x
Temperature
angle Angle To
Horizontal
backpres Back Pressure x
basis Composition x
Basis
calcloss Autocalculated
Fittings Loss
Equation
calculations Node Run, x
Branch and Tail
Segment
class Pipe Class x
comps Mole Fractions x x
connections x
count Number Of
Items
damp Damping Factor
density Standard Liquid x x
Density
densitydown Downstream x
Density
continued

B File Format 310


DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt
Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt
densityup Upstream x
Density
desc Description x
dsn Downstream x
Node
duty Heat Loss x
elevation Elevation x
Change
energy Energy x
energydown Downstream x
Energy Flow
energyup Upstream x
Energy Flow
enthalpy Enthalpy x
enthalpydown Downstream x
Enthalpy
enthalpyup Upstream x
Enthalpy
entropy Entropy x
entropydown Downstream x
Entropy
entropyup Upstream x
Entropy
equivlength Equivalent
Length
factor Rated Flow
factor
fitloss Fittings Loss
Equation
fittingsa Fitting Loss A x
fittingsb Fitting Loss B x
fittingsuse x
flange Flange Diameter x
flow Mass flow
fractiondown Downstream x
Phase Fraction
fractionup Upstream Phase x
Fraction
frictionfractor Friction Factor x
group Item Group x
headmach Header Mach x
No.
continued

B File Format 311


DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt
Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt
headvelvap Header Vapor x
Velocity
headvelliq Header Liquid x
Velocity
headrhov2 Header Rho V2 x
headnoise Header Noise x
heatcapdown Downstream x
Heat Capacity
heatcapup Upstream Heat x
Capacity
hia Enthalpy A x x
Coefficient
hib Enthalpy B x x
Coefficient
hic Enthalpy C x x
Coefficient
hid Enthalpy D x x
Coefficient
hie Enthalpy E x x
Coefficient
hif Enthalpy F x x
Coefficient
htc Heat Transfer
Coefficient
htcoverall Overall HTC x
htcexternal External HTC x
htcinternal Internal HTC x
id Item ID x
ignored Item Ignored x x
insname Insulation x
Description
insthick Insulation x
Thickness
insconductivity Insulation x
Conductivity
internal Internal x x
Diameter
length Segment Length x
lmultiply Length Multiplier x
location Segment x
Location
machdown Downstream x
Mach Number
continued

B File Format 312


DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt
Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt
machup Upstream Mach x
Number
massflow Mass Flow x x
material Material Of x
Construction
methoddampi Damping Factor x
ng
methoddp Pressure Drop
Method
methodelemen Twp Phase x
ts Elements
methodfriction Friction Factor x
methodfitlos Fittings Loss x
Method
methodhordp Horizontal 2 x
Phase Pressure
Drop Method
methodincdp Inclined x
Pressure Drop
methodverdp Vertical 2 Phase x
Pressure Drop
Method
methodvle VLE method x x
molarflow Molar Flow x
moleflow Source Molar
Flow
molwt Molecular x x x x
Weight
molwtdown Downstream x
Molecular
Weight
molwtup Upstream x
Molecular
Weight
msg Text Message
multiply Fittings x
Equation
Multiplier
name Item Name x x x x x x x x x x
nbp Normal Boiling x x
Point
node Node x x
noise Noise x
continued

B File Format 313


DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt
Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt
nominal Nominal Pipe x x
Diameter
number Index Number x
offmaximum Maximum Flow
Offtake
offminimum Minimum Flow
Offtake
offmultiply Offtake Flow
Multiplier
offrate Offtake Flow
Offset
offset Fittings x
Equation Offset
omega Acentric Factor x x
omegasrk SRK Acentric x x
Factor
pc Critical Pressure x x
phase Phase Label x
plant Source Plant
Location
pressource Static Source x
Back Pressure
presallow Allowable Back x
Pressure
presdown Downstream x
Static Pressure
presdrop Pressure Drop x
presdropfrictio Static Pipe x
n Friction Loss
presdropaccel Static Pipe x
eration Acceleration
Loss
presdropelevat Static Pipe x
ion Elevation Loss
presdropfitting Static Pipe x
s Fittings Loss
presin Inlet Pressure x
presup Upstream Static x
Pressure
property Property x
Description
ratedflow Rated Mass Flow x
refer Literature x
Reference
continued

B File Format 314


DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt
Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt
regime Flow Regime x
resize Resizable Flag x
reynolds Reynolds x
Number
rhov2up Upstream Rho x
V2
rhov2down Downstream x
Rho V2
roughness Wall roughness x
scenario Scenario Name x
schedule Pipe Schedule x x
seg1 Node Run x
Segment
seg2 Node Branch x
Segment
seg3 Node Tail x
Segment
separate Separator Flag
si Entropy x
Coefficient
source Source Name
status Ignored Status
Flag
surftendn Downstream x
Surface Tension
surftenup Upstream x
Surface Tension
tailmach Tailpipe Mach x
No.
tailnoise Tailpipe Noise x
tailpipe Tailpipe Flag x
tailrhov2 Tailpipe Rho V2 x
tailvelliq Tailpipe Liquid x
Velocity
tailvelvap Tailpipe Vapor x
Velocity
tc Critical x x
Temperature
temp Temperature
tempcalc Inlet x
Temperature
Calculations
continued

B File Format 315


DbSchedules.fmt

Summary.fmt
Variable

Properties.fmt
DbFittings.fmt

Scenarios.fmt
MoleFracs.fmt

Messages.fmt

ScenSum.fmt
DbComps.fmt
Variable Name
Description

Sources.fmt
Comps.fmt

Nodes.fmt

Pipes.fmt
tempdown Downstream x
Temperature
tempout Outlet x x
Temperature
tempspec Inlet x
Temperature
Specification
tempup Upstream x
Temperature
thermconddn Downstream x
Thermal
Conductivity
thermcondup Upstream x
Thermal
Conductivity
type Item Type x x x x
usn Upstream Node x
vapourfrac Source Vapor x
Fraction
vc Critical volume x x
vchar Characteristic x x
Volume
veldn Downstream x
Velocity
velup Upstream x
Velocity
visca Viscosity A x x
Coefficient
viscb Viscosity B x x
Coefficient
viscdown Downstream x
Viscosity
viscup Upstream x
Viscosity
volume Pipe volume
wall Wall Thickness x x
watson Watson x x
Characterisation
Parameter
wind Wind Velocity x
zfactordown Downstream x
Compressibility
Factor
zfactorup Upstream x
Compressibility
Factor

B File Format 316


C References

1 “GPSA Engineering Data Book”.


2 “chemical Engineering Volume 1”, 2nd Edition, J. M Coulson and J. F.
Richardson, Pergamon Press.
3 “Viscosity of Gases And Mixtures”, I. F. Golubev, National Technical
Information Services, TT7050022, 1959.
4 "Chemical Process Computations 1, Chemical Engineering-Data
Processing", Raman, Raghu, Elsevier Applied Science Publishers Ltd, 1985.
5 "Journal Of Physics", 3 ,263 , D. J. Berthalot.
6 "Technical Data Book-Petroleum Refining", American Petroleum Institute,
1977.
7 Ely, J.F. and Hanley, H.J.M., "A Computer Program for the Prediction of
Viscosity and Thermal Conductivity in Hydrocarbon Mixtures", NBS
Technical Note 1039 (1983).
8 Hankinson, R.W., and Thompson, G.H., AIChE J., 25, 653 (1979).
9 Beggs, H.D., and Brill, J.P., "A Study of Two-Phase Flow in Inclined Pipes",
J. Petrol. Technol., p. 607, May (1973).
10 Gas Conditioning and Processing, Volume 3, Robert N. Maddox and Larry
L. Lilly, 1982 by Campbell Petroleum Series (second edition, 1990).
11 Orkiszewski, J., Journal of Petroleum Technology, B29-B38, June, 1967.
12 Gas Conditioning and Processing, Volume 3, Robert N. Maddox and Larry
L. Lilly, 1982 by Campbell Petroleum Series (second edition, 1990).
13 API Technical Data Book - Volume 1 , 1983, American Petroleum Institute.
14 Hankinson, R.W. and Thompson, G.H., A.I.Ch.E. Journal, 25, No. 4, p.653
(1979).
15 Reid, R.C., Prausnitz, J.M., Poling, B.E., "The Properties of Gases
&Liquids", McGraw-Hill, Inc., 1987.
16 Ely, J.F. and Hanly, H.J.M., "A Computer Program for the Prediction of
Viscosity and Thermal Conductivity in Hydrocarbon Mixtures", NBS
Technical Note 1039.
17 Pausnitz, J.M., Lichtenthaler, R.N., Azevedo, E.G., "Molecular
Thermodynamics of Fluid Phase Equilibria", 2nd. Ed., McGraw-Hill, Inc.
1986.
18 Twu, C.H., IEC. Proc Des & Dev, 24, p. 1287 (1985).

C References 317
19 Woelfin, W., "Viscosity of Crude-Oil Emulsions", presented at the spring
meeting, Pacific Coast District, Division of Production, Los Angeles, Calif.,
Mar. 10, 1942.
20 Gambill, W.R., Chem Eng., March 9, 1959.
21 Chen, N.H., "An Explicit Equation for Friction Factor in Pipe", Ind. Eng.
Chem. Fund., 18, 296, 1979.
22 API Recommended Practice 520, “Sizing, Selection, and Installation of
Pressure - Relieving Devices in Refineries”, Part I, 6th. Ed., American
Petroleum Institute, March, 1993
23 API Recommended Practice 521, “Guide for Pressure-Relieving and
Depressuring Systems”, 3rd. Ed., American Petroleum Institute, November,
1990
24 Leung, J.C., "Easily Size Relief Devices and Piping for Two-Phase Flow",
Chem. Eng. Prog., p. 28, December, 1996.
25 “Miller, D.M., "Internal Flow Systems", 2nd. Ed., BHR Group Limited, 1990.
26 “Flow of Fluids Through Valves, Fittings and Pipe” Crane Technical Paper
410M. 1988.
27 “PIPE 3, Single and Two-Phase Pressure Drop Calculations in Pipeline
Systems”, HTFS Design Report 38, 1996.

C References 318
D Glossary of Terms

Adiabatic Flow
Adiabatic flow is the constant enthalpy flow of a fluid in a pipe.

Choked Flow
The velocity of a fluid in a pipe of constant cross sectional area cannot exceed
the sonic velocity of the fluid. If the flow of fluid in a pipe is great enough that
the sonic velocity is reached, then a pressure discontinuity is seen at the exit
end of the pipe.

Critical Pressure
The critical pressure is the pressure at which the vapor density and liquid
density of a substance may be the same.

Critical Temperature
The critical temperature is the temperature at which the vapor density and
liquid density of a substance may be the same.

Dongle
See Security Device.

Equivalent Length
The equivalent length of a pipe is the straight length of pipe which would
create the same pressure drop as the actual pipe length plus losses due to
bends and fittings.

D Glossary of Terms 319


Isothermal Flow
Isothermal flow is the constant temperature flow of a fluid in a pipe. In
general when the pressure of a gas reduces, there is a small change in
temperature. This assumption leads to a small error in the calculated pressure
profile. In practice for pipes of length at least 1000 diameters, this difference
does not exceed 5% and in fact never exceeds 20%.

MABP
The Maximum Allowable Back Pressure on a relief device is the maximum
pressure that can exist at the outlet of the device without affecting the
capacity of the device.
In general the MABP for a conventional pressure relief valve should not
exceed 10% of the set pressure at 10% overpressure.
In general the MABP for a balanced pressure relief valve should not exceed
40% of the set pressure at 10% overpressure.

Mach Number
Mach number is the ratio of the fluid velocity to the sonic velocity in the fluid.

Node
Nodes define the connection points between pipes, and pipes with sources.
Each node must have a unique name.

Reduced Pressure
Reduced pressure is the ratio of the absolute pressure to the critical pressure
of the fluid.

Reduced Temperature
Reduced temperature is the ratio of the absolute temperature to the critical
temperature of the fluid.

D Glossary of Terms 320


Scenario
A scenario represents a set of flow and compositional data for all sources in
the system. It may also represent a particular set of limiting operating
conditions.

Schedule
The schedule of a pipe defines a standard thickness for a given nominal pipe
size. In general, flare and vent systems are constructed from schedule 40 or
80 pipe.

Security Device
The hardware device that is connected to the parallel port of the computer.

Source
A source refers to a fluid entering the piping network regardless of the type of
pipe fitting from which it enters. the fluid is defined in terms of its
composition, mass flowrate, pressure and temperature.

Static Pressure
The pressure acting equally in all directions at a point in the fluid.
Physical properties are calculated at the static pressure condition.

Tailpipe
The section of pipe between the discharge flange of the source valve and the
main collection header is generally referred to as a tailpipe.

Total Pressure
The sum of the static and velocity pressures.

D Glossary of Terms 321


Velocity Pressure
ρU 2
Given by , also called the kinematic pressure.
2

D Glossary of Terms 322


General Information

This section provides Copyright details and lists any other documentation
related to this release.

Copyright
Version Number: 2004

November 2004
Copyright  1981 - 2004 Aspen Technology, Inc. All rights reserved.

FLARENET™, Aspen Custom Modeler®, ACOL™, ACX™, APLE™, Aspen


Adsim™, Aspen Aerotran™, Aspen CatRef®, Aspen Chromatography®, Aspen
Decision Analyzer™, Aspen Dynamics®, Aspen Enterprise Engineering™,
Aspen FCC®, Aspen Hetran™, Aspen Hydrocracker®, Aspen Hydrotreater™,
Aspen Icarus Process Evaluator™, Aspen Icarus Project Manager™, Aspen
Kbase™, Aspen Plus®, Aspen Plus® HTRI®, Aspen OLI™, Aspen OnLine®,
Aspen PEP Process Library™, Aspen Plus BatchFrac™, Aspen Plus Optimizer™,
Aspen Plus RateFrac™, Aspen Plus SPYRO®, Aspen Plus TSWEET®, Aspen
Split™, Aspen WebModels™, Aspen Pinch®, Aspen Properties™, Aspen SEM™,
Aspen Teams™, Aspen Utilities™, Aspen Water™, Aspen Zyqad™,
COMThermo®, COMThermo TRC Database™, DISTIL™, DISTIL Complex
Columns Module™, FIHR™, FRAN™, HX-Net®, HX-Net Assisted Design
Module™, Hyprotech Server™, HYSYS®, HYSYS Optimizer™, ACM Model
Export™, HYSYS Amines™, HYSYS Crude Module™, HYSYS Data Rec™,
HYSYS DMC+ Link™, HYSYS Dynamics™, HYSYS Electrolytes™, HYSYS
Lumper™, HYSYS Neural Net™, HYSYS Olga Transient™, HYSYS OLGAS 3-
Phase™, HYSYS OLGAS™, HYSYS PIPESIM Link™, HYSYS Pipesim Net™,
HYSYS PIPESYS™, HYSYS RTO™, HYSYS Sizing™, HYSYS Synetix Reactor
Models™, HYSYS Tacite™, HYSYS Upstream™, HYSYS for Ammonia Plants™,
MUSE™, PIPE™, Polymers Plus®, Process Manuals™, Process Tools™, ProFES
2P Tran™, ProFES 2P Wax™, ProFES 3P Tran™, ProFES Tranflo™, STX™,
TASC-Thermal™, TASC-Mechanical™, the aspen leaf logo and Enterprise
Optimization are trademarks or registered trademarks of Aspen Technology,
Inc., Cambridge, MA.
All other brand and product names are trademarks or registered trademarks
of their respective companies.

General Information 323


This document is intended as a guide to using AspenTech's software. This
documentation contains AspenTech proprietary and confidential information
and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license agreement. Users are
solely responsible for the proper use of the software and the application of the
results obtained.
Although AspenTech has tested the software and reviewed the
documentation, the sole warranty for the software may be found in the
applicable license agreement between AspenTech and the user. ASPENTECH
MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR
IMPLIED, WITH RESPECT TO THIS DOCUMENTATION, ITS QUALITY,
PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
PURPOSE.

Corporate
Aspen Technology, Inc.
Ten Canal Park
Cambridge, MA 02141-2201
USA
Phone: (1) (617) 949-1000
Toll Free: (1) (888) 996-7001
Fax: (1) (617) 949-1030
URL: http://www.aspentech.com/

Related Documentation
Title Content
FLARENET Getting Started Guide Tutorials covering the basic use of FLARENET

General Information 324


Technical Support

Online Technical Support


Center
AspenTech customers with a valid license and software maintenance
agreement can register to access the Online Technical Support Center at:
http://support.aspentech.com
You use the Online Technical Support Center to:
• Access current product documentation.
• Search for technical tips, solutions, and frequently asked questions
(FAQs).
• Search for and download application examples.
• Search for and download service packs and product updates.
• Submit and track technical issues.
• Search for and review known limitations.
• Send suggestions.
Registered users can also subscribe to our Technical Support
e-Bulletins. These e-Bulletins proactively alert you to important technical
support information such as:
• Technical advisories.
• Product updates.
• Service Pack announcements.
• Product release announcements.

Technical Support 325


Phone and E-mail
Customer support is also available by phone, fax, and e-mail for customers
who have a current support contract for their product(s). Toll-free charges are
listed where available; otherwise local and international rates apply.
For the most up-to-date phone listings, please see the Online Technical
Support Center at:
http://support.aspentech.com

Support Centers Operating Hours


North America 8:00 – 20:00 Eastern time
South America 9:00 – 17:00 Local time
Europe 8:30 – 18:00 Central European time
Asia and Pacific Region 9:00 – 17:30 Local time

Technical Support 326


Index

Comma Separated Values 169


A Component
Acentric Factor 272, 278 list 32
Adiabatic Flow selecting 32
definition 319 matching name string 32
Automation 215 selection filter 33
sorting 38
B swapping 38

Berthalot Equation 274 type 32

Toolbar 14 Component Editor View


estimating unknown properties 37
C Component Manager View 31

Calculation Options Editor 99 Components 31

General tab 99 Control Valve 80

Methods tab 103 Control Valve Editor

Warnings tab 106 Connections tab 80, 88

Calculation Problems group 107 COSTALD Calculations 274

Sizing Status group 107 Creating and Saving Cases 27

Calculations 99 Critical Pressure

Case definition 319

opening an existing 29 Critical Temperature

saving a 30 definition 319

Case Description View 27 CSV

Changing Column Order 17 See Comma Separated Values 169

Chen Equation 256


D
Choked Flow
definition 319 Darcy Friction Factor 256

Column Order Data

changing 17 sources 126

Column Width viewing 124

changing 16 Database Editor

Index 327
component 122 H
fittings 121
Horizontal Separator Editor
pipe schedule 119
Connections tab 68
Database Features
Hysim 168
adding/deleting data 118
selection filter 117 I
Dongle
Import Wizard
See Security Device 319
Importing Source Data 182

E Step 1 174
Step 3 177
Equation
Step 4 181
Berthalot 274
Using 174
Chen 256
Import/Export Examples 198
Round 255
Importing
SRK 272
ASCII text files 183
Equivalent Length
from HYSIM 182
definition 319
HYSYS source data 187
Export Wizard 189
Importing HYSYS Source Data 187
Export Data Layouts 189
Interface 10
Step 1 190
Terminology 11
Step 2 191
Tool Bar 14
Step 3 192
Isothermal Flow
Step 4 196
definition 320
Using 189

M
F
MABP
Flare Tip Editor
definition 320
Calculations tab 96, 97
Mach Number
Flow
definition 320
laminar 256
Moody Friction Factor 255
mist 261
Multiple Editing 59
transition 256, 259, 261
turbulent 255 N
Flow Bleed Editor
Network
Connections tab 66
rating an existing 112
FMT Files 170
Node
Froude Number 257
definition 320
Node Manager 61

Index 328
Node Types Golubev method 275
flare tip 95 Physical Prperties
flow bleed 65 enthalpy 278
sources 80 Equations of State 280
tee 74 ideal gas 278
vertical separator 77 Pipe
Nodes 61 multiple editing 59
Noise 282 Pipe Network 48
acoustical efficiency 283 Pipe Tools
pipe class editor 60
O Preferences Editor
Orifice Plate Editor General tab 18
Connections tab 71 Import tab 24, 25
Reports tab 22
P Pressure Drop 254

Password Printing 169

setting the 119 location-specific 172

PFD 157 Printing, Importing and Exporting 168

changing view options 167 PVT Relationship 271

connecting objects 164


R
icons 158
installing objects 163 Reduced Pressure
manipulating the 164 definition 320
moving objects 165 Reduced Temperature
object inspection 159 definition 320
printing 166 Refresh Source Temperatures 94
regenerate 165 Results
saving 166 messages 127
selecting objects 164 physical properties 132
method one 164 viewing 124
method two 165 Round Equation 255
toolbar 159
S
unselecting objects 165
view 159 Scenario
Physical Properties 274 definition 321
mixing rules 277 Scenario Editor
thermal conductivity 278 General tab 43
vapour density 274 Sources tab 45
vapour viscosity 275 Scenario Management 41

Index 329
Scenario Manager View 42 Soave Redlich Kwong 272
Scenario Tools 47 vapour pressure 271
Scenarios Vertical Separator Editor
adding single source 47 Connections tab 77
adding/editing 43 Viewing Data and Results 124
General tab 43
Sources tab 45
Schedule
definition 321
Security Device
definition 321
Source
definition 321, 322
Source Tools 94
adding single source scenarios 95
updating downstream temperatures 94
Source Types
control valve 80
SRK Equation 272
SRK Equation of State 280
Status Bar 15

Tab Separated Values 169


Terminology 11
Tool Bar 14
TSV
See Tab Separated Values 169
Two-Phase Pressure Drop 257
Beggs and Brill 257
Dukler method 258
Orkiszewski method 259

Vaour Phase Pressure Drop


methods 254
Vapour-Liquid Equilibrium 271
compressible gas 271
Peng Robinson 273

Index 330

Potrebbero piacerti anche