Beruflich Dokumente
Kultur Dokumente
2006.5
Reference Manual
Version Number: 2006.5
Month: October
Copyright (c) 2007 by Aspen Technology, Inc. All rights reserved.
Aspen Accounting.21™, Aspen ACOL™, Aspen Adsim®, Aspen Advisor™, Aspen Aerotran®, Aspen Alarm & Event™, Aspen APLE™,
Aspen Apollo™, Aspen AssetBuilder Optimizer™, Aspen AssetBuilder Planner™, Aspen AssetBuilder Site Optimizer™, Aspen
AssetBuilder™, Aspen Batch Plus®, Aspen Batch.21™, Aspen Batch.21™CBT, Aspen BatchCAD™, Aspen BatchSep™, Aspen Blend
Model Library™, Aspen Blend™, Aspen Calc™ CBT, Aspen Capable-to-Promise®, Aspen CatRef®, Aspen Chromatography®, Aspen
Cim-IO Interfaces™, Aspen Cim-IO Monitor™, Aspen Cim-IO™ for @AGlance, Aspen Cim-IO™ for ABB 1190, Aspen Cim-IO™ for
Bailey SemAPI, Aspen Cim-IO™ for DDE, Aspen Cim-IO™ for Eurotherm Gauge via CDP, Aspen Cim-IO™ for Fisher-Rosemount
Chip, Aspen Cim-IO™ for Fisher-Rosemount RNI, Aspen Cim-IO™ for Foxboro FOXAPI, Aspen Cim-IO™ for G2, Aspen Cim-IO™ for
GE FANUC via HCT, Aspen Cim-IO™ for Hitachi Ex Series, Aspen Cim-IO™ for Honeywell TDC 3000 via HTL/access, Aspen Cim-IO™
for Intellution Fix, Aspen Cim-IO™ for Measurex MCN, Aspen Cim-IO™ for Measurex ODX, Aspen Cim-IO™ for Moore Apacs via Nim
(RNI), Aspen Cim-IO™ for PI, Aspen Cim-IO™ for RSLinx, Aspen Cim-IO™ for SetCim/InfoPlus-X/InfoPlus.21, Aspen Cim-IO™ for
Toshiba Tosdic, Aspen Cim-IO™ for ULMA 3D, Aspen Cim-IO™ for Westinghouse, Aspen Cim-IO™ for WonderWare InTouch™,
Aspen Cim-IO™ for Yokogawa ACG10S, Aspen Cim-IO™ for Yokogawa EW3, Aspen Collaborative Forecasting™, Aspen
Compliance.21™, Aspen COMThermo TRC Database™, Aspen COMThermo®, Aspen Crude Trading & Marketing™, Aspen Custom
Modeler®, Aspen Decision Analyzer™, Aspen Demand Manager™, Aspen DISTIL™, Aspen Distribution Scheduler™, Aspen
DMCplus®, Aspen DMCplus® CBT, Aspen DMCplus® Composite, Aspen DPO™, Aspen Dynamics®, Aspen eBRS™, Aspen ERP
Connect®, Aspen FCC®, Aspen FIHR™, Aspen FLARENET™, Aspen Fleet Operations Management™, Aspen FRAN™, Aspen Fuel Gas
Optimizer™, Aspen Grade-IT™, Aspen Harwell Subroutine Library™, Aspen Hetran®, Aspen HTFS Research Network™, Aspen HX-
Net Operations™, Aspen HX-Net®, Aspen Hydrocracker®, Aspen Hydrotreater™, Aspen HYSYS Amines™, Aspen HYSYS Crude™,
Aspen HYSYS Data Rec™, Aspen HYSYS Dynamics™, Aspen HYSYS Johnson Matthey Reactor Models™, Aspen HYSYS OLGAS 3-
Phase™, Aspen HYSYS OLGAS™, Aspen HYSYS OLI Interface™, Aspen HYSYS Optimizer™, Aspen HYSYS Tacite™, Aspen HYSYS
Upstream Dynamics™, Aspen HYSYS Upstream™, Aspen HYSYS®, Aspen Icarus Process Evaluator®, Aspen Icarus Project
Manager®, Aspen InfoPlus.21®, Aspen Inventory Management & Operations Scheduling™, Aspen Inventory Planner™, Aspen
IQmodel Powertools™, Aspen IQ™, Aspen Kbase®, Aspen Lab.21, Aspen MBO™, Aspen MPIMS™, Aspen Multivariate Server™,
Aspen MUSE™, Aspen OnLine®, Aspen Operations Manager - Event Management™, Aspen Operations Manager - Integration
Infrastructure™, Aspen Operations Manager - Integration Infrastructure™ Aspen Advisor, Aspen Operations Manager - Integration
Infrastructure™ Aspen Orion, Aspen Operations Manager - Integration Infrastructure™ Aspen PIMS, Aspen Operations Manager -
Integration Infrastructure™ Aspen Utilities, Aspen Operations Manager - Integration Infrastructure™ Base, Aspen Operations
Manager - Integration Infrastructure™ COM, Aspen Operations Manager - Integration Infrastructure™ Files, Aspen Operations
Manager - Integration Infrastructure™ IP.21, Aspen Operations Manager - Integration Infrastructure™ IP.21/SAP-PPPI, Aspen
Operations Manager - Integration Infrastructure™ OPC, Aspen Operations Manager - Integration Infrastructure™ Relational
Databases, Aspen Operations Manager - Integration Infrastructure™ SAP R3, Aspen Operations Manager - Integration
Infrastructure™ System Monitoring, Aspen Operations Manager - Performance Scorecarding™, Aspen Operations Manager - Role
Based Visualization™ MS SharePoint, Aspen Operations Manager - Role Based Visualization™ TIBCO, Aspen Operations Tracking™,
Aspen Order Credit Management™, Aspen Orion Planning™, Aspen Orion XT™, Aspen PEP Process Library™, Aspen PIMS
Distributed Processing™, Aspen PIMS Enterprise Edition™, Aspen PIMS Global Optimization™, Aspen PIMS Mixed Integer
Programming™, Aspen PIMS Simulator Interface™, Aspen PIMS Solution Ranging™, Aspen PIMS Submodel Calculator™, Aspen
PIMS XNLP Optimizer™, Aspen PIMS™, Aspen PIPE™, Aspen Plant Planner & Scheduler™, Aspen Plant Scheduler Lite™, Aspen Plant
Scheduler™, Aspen Polymers Plus®, Aspen Plus OLI Interface™, Aspen Plus Optimizer™, Aspen Plus®, Aspen Plus® CBT, Aspen
PPIMS™, Aspen Process Explorer™ CBT, Aspen Process Manual™ Applied Rheology, Aspen Process Manual™ Bulk Solids Handling,
Aspen Process Manual™ Crystallization, Aspen Process Manual™ Drying, Aspen Process Manual™ Gas Cleaning, Aspen Process
Manual™ Internet Mode, Aspen Process Manual™ Intranet Mode, Aspen Process Manual™ Mini-Manuals, Aspen Process Manual™
Slurry Handling, Aspen Process Manual™ Solid Liquid Separation, Aspen Process Manual™ Solvent Extraction, Aspen Process
Manual™ Waste Water Treatment, Aspen Process Order™, Aspen Process Recipe®, Aspen Process Tools™, Aspen Production
Control Web Server™, Aspen ProFES® 2P Wax, Aspen ProFES® Tranflo, Aspen Profile.21™, Aspen Properties®, Aspen Pumper
Log™, Aspen Q Server™, Aspen Quality Management™, Aspen RefSYS CatCracker™, Aspen RefSYS™, Aspen Report Writer™, Aspen
Retail Automated Stock Replenishment™, Aspen Retail Resource Scheduling Optimization™, Aspen Richardson Rbooks™, Aspen
Richardson WinRace Database™, Aspen RTO Watch™, Aspen SCM™, Aspen SmartStep Advanced™, Aspen SmartStep™, Aspen
Specialty Products Automated Stock Replenishment™, Aspen Specialty Products Resource Scheduling Optimization™, Aspen Split™,
Aspen SULSIM®, Aspen Supply Chain Analytics™, Aspen Supply Chain Connect™, Aspen Supply Planner™, Aspen Tank
Management™, Aspen TASC™, Aspen Teams®, Aspen TICP™, Aspen Transition Manager™, Aspen Utilities™, Aspen Voice
Fulfillment Management™, Aspen Watch™, Aspen Water™, Aspen Web Fulfillment Management™, Aspen XPIMS™, Aspen Zyqad
Development™, Aspen Zyqad™, SLM™, SLM Commute™, SLM Config Wizard™, the Aspen leaf logo, and Plantelligence 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.
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.
2 Interface ..............................................................................................................2
Overview ...................................................................................................... 2
Terminology .................................................................................................. 3
Menu Bar ...................................................................................................... 5
Toolbar......................................................................................................... 6
Status Bar..................................................................................................... 7
Editing Data Views ......................................................................................... 8
Changing Column Width ........................................................................ 8
Changing Column Order ........................................................................ 9
Setting Preferences .......................................................................................10
General Tab........................................................................................10
Defaults Tab .......................................................................................12
Databases Tab ....................................................................................13
Reports Tab........................................................................................14
PFD Tab .............................................................................................15
Formatting Tab ...................................................................................16
Import/Export Tab...............................................................................17
Windows Menu .............................................................................................17
Help Menu....................................................................................................18
4 Components .......................................................................................................23
Overview .....................................................................................................23
Selecting Components ...................................................................................24
Component Types ...............................................................................24
Component List...................................................................................24
Matching the Name String ....................................................................25
Removing Selected Components............................................................25
Adding/Editing Components............................................................................26
Add Hypothetical Component/Edit Component View .................................26
Identification Tab ................................................................................26
1 Introduction 1
Editing Database Components...............................................................30
Estimating Unknown Properties .............................................................30
Organizing the Component List .......................................................................31
Sorting the Component List ..................................................................31
Move Single Component .......................................................................31
Swapping two components ...................................................................31
Changing the Components....................................................................31
Combining Components .......................................................................31
Binary Interaction Parameters.........................................................................32
5 Scenarios ...........................................................................................................34
Overview .....................................................................................................34
Scenario Manager .........................................................................................35
Adding/Editing Scenarios................................................................................36
General Tab........................................................................................36
Constraints Tab...................................................................................37
Sources Tab .......................................................................................38
Estimates Tab.....................................................................................38
Scenario Tools ..............................................................................................40
Adding Single Source Scenarios.............................................................40
6 Pipe Network......................................................................................................41
Overview .....................................................................................................41
Pipe Manager................................................................................................41
Ignoring/Restoring Pipes ................................................................................42
Connections Tab .................................................................................44
Dimensions Tab ..................................................................................45
Fittings Tab ........................................................................................47
Heat Transfer Tab ...............................................................................48
Methods Tab.......................................................................................50
Summary Tab .....................................................................................53
Multiple Editing ...................................................................................53
Pipe Class Editor .................................................................................54
7 Nodes .................................................................................................................55
Overview .....................................................................................................55
Node Manager ..............................................................................................55
Ignoring/Restoring Nodes...............................................................................56
Connection Nodes .........................................................................................57
Connector ..........................................................................................57
Flow Bleed .........................................................................................60
Horizontal Separator............................................................................62
Orifice Plate........................................................................................66
Tee ...................................................................................................70
Vertical Separator ...............................................................................74
Boundary Nodes ...........................................................................................78
Control Valve......................................................................................78
Relief Valve ........................................................................................87
Source Tools.......................................................................................94
Flare Tip ............................................................................................95
3 Interface
8 Calculations......................................................................................................100
Calculation Options .....................................................................................100
General Tab......................................................................................100
Scenarios Tab ...................................................................................103
Methods Tab.....................................................................................104
Warnings Tab ...................................................................................109
Initialization Tab ............................................................................... 113
Check Model .....................................................................................114
Starting the Calculations ..............................................................................115
Efficient Modeling Techniques ....................................................................... 116
Data Entry ....................................................................................... 117
Calculation Speed.............................................................................. 117
Sizing Calculations ............................................................................ 119
9 Databases ........................................................................................................120
Overview ................................................................................................... 120
Database Features ...................................................................................... 121
Selection Filter.................................................................................. 121
Maneuvering Through the Table .......................................................... 122
Printing............................................................................................122
Adding/Deleting Data......................................................................... 122
Setting The Password .................................................................................. 123
Pipe Schedule Database Editor ...................................................................... 123
Fittings Database Editor ............................................................................... 125
Component Database Editor ......................................................................... 126
Importing Component Data ................................................................ 126
1 Introduction 3
Titles Tab .........................................................................................152
Legend Tab ...................................................................................... 154
ChartArea Tab ..................................................................................156
Plot Area Tab .................................................................................... 158
ChartLabel Tab .................................................................................160
View3D tab ...................................................................................... 162
Markers Tab ..................................................................................... 163
Trace Window............................................................................................. 164
11 PFD ................................................................................................................165
Overview ................................................................................................... 165
Object Inspection ........................................................................................ 167
PFD Toolbar ............................................................................................... 167
PFD Toolbar Icons ............................................................................. 168
Print Options .................................................................................... 170
Stream Label Options ........................................................................ 171
Viewports Option............................................................................... 171
Installing Objects ........................................................................................ 172
Connecting Objects ..................................................................................... 173
Manipulating the PFD ................................................................................... 173
Selecting PFD Objects ........................................................................ 173
Unselecting Objects ........................................................................... 174
Moving Objects .................................................................................174
Locating Objects on the PFD ............................................................... 174
Regenerate PFD ................................................................................ 175
Printing and Saving the PFD Image................................................................ 175
Changing the PFD View Options..................................................................... 176
3 Interface
13 Automation ....................................................................................................226
Overview ................................................................................................... 226
Objects......................................................................................................227
Object Hierarchy ............................................................................... 227
The FLARENET Type Library ................................................................ 228
Object Browser ................................................................................. 228
Automation Syntax ............................................................................ 231
FLARENET Object Reference .........................................................................237
Application .......................................................................................237
Bleed............................................................................................... 238
Bleeds ............................................................................................. 239
Component ...................................................................................... 239
Components ..................................................................................... 241
Connector ........................................................................................241
Connectors....................................................................................... 242
ControlValve..................................................................................... 242
ControlValves ................................................................................... 244
HorizontalSeparator........................................................................... 244
HorizontalSeparators ......................................................................... 245
Nodes..............................................................................................245
OrificePlate....................................................................................... 246
OrificePlates ..................................................................................... 246
Pipe ................................................................................................247
Pipes ............................................................................................... 250
ReliefValve ....................................................................................... 251
ReliefValves...................................................................................... 253
Scenario ..........................................................................................254
Scenarios ......................................................................................... 255
Solver ............................................................................................. 256
Tee ................................................................................................. 257
Tees ................................................................................................257
Tip ..................................................................................................258
Tips................................................................................................. 260
VerticalSeparator .............................................................................. 261
VerticalSeparators ............................................................................. 261
Example – Automation In Visual Basic............................................................ 262
A Theoretical Basis.............................................................................................269
Pressure Drop............................................................................................. 269
Pipe Pressure Drop Method ................................................................. 269
Fittings Pressure Change Methods........................................................ 278
Vapor-Liquid Equilibrium .............................................................................. 288
Compressible Gas.............................................................................. 288
Vapor Pressure ................................................................................. 288
Soave Redlich Kwong......................................................................... 289
Peng Robinson .................................................................................. 290
Physical Properties ...................................................................................... 291
Vapor Density ...................................................................................291
Liquid Density................................................................................... 291
Vapor Viscosity ................................................................................. 292
Liquid Viscosity ................................................................................. 292
Thermal Conductivity .........................................................................295
1 Introduction 5
Enthalpy .......................................................................................... 295
Noise ........................................................................................................299
C References ......................................................................................................346
Index ..................................................................................................................352
3 Interface
1 Introduction
Audience
This guide is intended for process and process systems engineers.
Related Documentation
Title Content
Technical Support
AspenTech customers with a valid license and software maintenance
agreement can register to access the online AspenTech Support Center at:
http://support.aspentech.com
This Web support site allows you to:
3 Interface
• Access current product documentation
• Search for tech 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
• Send suggestions
• Report product defects
• Review lists of known deficiencies and defects
Registered users can also subscribe to our Technical Support e-Bulletins.
These e-Bulletins are used to alert users to important technical support
information such as:
• Technical advisories
• Product updates and releases
Customer support is also available by phone, fax, and email. The most up-to-
date contact information is available at the AspenTech Support Center at
http://support.aspentech.com.
1 Introduction 3
2 Interface
Overview
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.
3 Interface
Terminology
The following view of the FLARENET screen shows most of the interface
components that you will encounter.
Fig 1.1
2 Interface
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).
Throughout this
manual whenever Checkbox Data items or settings that have an On/Off status are indicated
any reference is by checkboxes. Selecting the checkbox will turn it on, selecting
made to clicking on it again will turn it off.
a button, icon, or
Data View A window that contains a non-editable view of the model data
menu item, unless
otherwise specified
and/or the calculation results.
it refers to the left view A modal window which allows you to enter the model data. You
mouse button. cannot access any other element in the model until this form
has been closed.
Drop-Down List A drop-down list is indicated by a down arrow next to a field. If
you click on this arrow, a list of available options for that field
will be displayed.
A modal view is Input Field Data items that are alphanumeric in nature are entered into an
characterized by a input field. In general, the data that is entered in a field is
single border and checked for validity before you can continue.
the absence of the
minimize/maximize
Menu Bar The Menu Bar displays all of the program functions, which can
icons in the upper be accessed by clicking on the appropriate menu item. This is
right corner of the described in more detail later in the chapter.
view. A non-modal Modal/Non-Modal When a view is modal, you cannot access any other element in
view has a double View the simulation until you close it. Non-modal views do not restrict
border, and has the
you in this manner. You can leave a non-modal view open and
minimize/maximize
icons. interact with any other view or menu item.
Scenario Selector This drop-down list shows 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.
Calculation Mode This drop-down list shows the current calculation mode
Selector selected. 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.
3 Interface
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.
2 Interface
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
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.
3 Interface
There are also two drop-down lists in the toolbar:
Name Description
Calculation Mode This drop-down list selects and displays the current calculation
Selector 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 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
2 Interface
The status bar displays the current status of the model. There are two general
regions in the status bar:
The calculation time can be reduced by hiding the status bar, which is
particularly useful for large cases.
• The first region displays the program status - If Edit is displayed, you can
make changes to your model. After calculations, this field will display
Done.
• The second region displays important information during calculations, such
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.
2. Click and hold down the primary mouse button, then drag the separator
line to the new position.
3. The column width set here remains in effect for the duration of the current
session and is saved when you exit FLARENET.
3 Interface
Changing Column Order
1. 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
2. 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
3. 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.
2 Interface
Fig 1.7
4. 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.
1. 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
3 Interface
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 Select this checkbox to display properties that are
Properties Used By velocity dependant based upon the velocities derived
Pressure Drop from rated flow rather than from the nominal flow.
Calculation
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
Uncalculated Pipes have not 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.
2 Interface
Defaults Tab
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.
Fig 1.9
CS = Carbon Steel
SS = Stainless Steel
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.
Pipe Material This is the default material to be used in new pipes. The two
materials 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.
3 Interface
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.
2 Interface
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.
3 Interface
PFD Tab
Fig 1.12
Option Description
Use Wire Frame When selected, pipe and node icons in the PFD are drawn as
Icons 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.
2 Interface
Formatting Tab
Fig 1.13
Option Description
Data Formatting
Group
Display Using Activate this check box to display all results to a number of
Significant Figures significant 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.
3 Interface
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
2 Interface
Open All Open all the windows, which can be accessed through the View
menu bar
Close All Close all windows.
Help Menu
The options under the Help menu are:
Option Description
Fig 1.15
3 Interface
3 Creating and Saving Cases
3 Interface
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.
1 To open an existing case, do one of the following:
o Select Open from the File menu.
o Use the hot key combination alt f o.
o Click the Open Case icon on the toolbar.
2 The File Open view appears.
Fig 2.3
5 Clear the Filename field, type in the file name you want to give to the
case in and click on the OK button.
Note: You do not have to include the .fnw extension. FLARENET will add it on
automatically.
You will be asked to confirm that you want to overwrite if an existing file is
named.
3 Interface
4 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:
4 Components 23
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.
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 < > or < > arrow keys move the highlight up one
component, and the < > or < > arrow keys move the highlight down
one component.
• PageUp/PageDown - Use these keyboard keys to advance an entire
page forward or backward.
3 Interface
• 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.
You can highlight multiple components to add to the Selected list using the
normal windows shift-click and ctrl-click options in the Database 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.
Note: You can select multiple components by using the SHIFT or CTRL keys as
you select components.
To add a component, you must first highlight it (by moving through the list
until that component is highlighted), then transfer it by double-clicking on it
or clicking the Add button.
As you are typing into the Selection Filter cell, the component list is
updated, matching what you have presently typed. You may not have to enter
the complete name or formula before it appears in the component list.
Filter Result
4 Components 25
2 Click either the Delete button on the Component Manager view, or press
the delete key.
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.
Identification Tab
The minimum data requirements for creating a component are specified here:
Fig 3.2
Component Types:
Hydrocarbon
Miscellaneous
Amine
Alcohol
Ketone
3 Interface
Aldehyde
Ester
Carboxylic Acid
Halogen
Nitrile
Phenol
Ether
4 Components 27
Critical Tab
Critical properties are specified here.
Fig 3.3
3 Interface
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
4 Components 29
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
3 Interface
Organizing the Component List
The Selected Components list can be organized in the following different
ways.
Combining Components
Multiple components can be combined and represented by a single component
to reduce the number of components in the model.
4 Components 31
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
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.
3 Interface
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.
4 Components 33
5 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.
3 Interface
Scenario Manager
Scenarios can also be selected by selecting the scenario in the Scenario
selector on the tool bar.
Scenarios are managed via the Scenario Manager view. This view has buttons
that allow you to add, edit or delete scenarios as well as to select the current
scenario for which scenario specific data is displayed. All cases have at least
one scenario.
1. 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
5 Scenarios 35
Adding/Editing Scenarios
FLARENET has no pre-programmed limits on the number of scenarios which
can be defined within a single case.
To add a scenario, click the Add button on the Scenario Manager view. If
there is already a scenario present in the Scenario list, clicking the Add
button will show a Clone Scenario Form view. You can select an existing
scenario from the list to be used to initialize the flows, compositions,
pressures and temperatures of all the sources in the new scenario.
The Next button allows you to continue adding scenarios without returning to
the Scenario Manager.
To edit a scenario, highlight it, and then click the Edit button. For adding and
editing a scenario, the views are similar except for the Next button on the
Scenario Editor view for adding a scenario.
General Tab
You may provide the following information on the General tab:
Fig 4.2
Data Description
3 Interface
Constraints Tab
This 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. You may provide different design information (Mach
Number, Noise at 1 m, Vapor Velocity, Liquid Velocity) for the Headers and
Tailpipes. Any field may be left empty, in which case they will be ignored.
Data Description
Mach The maximum allowable Mach number for all pipe segments. Calculated
Number values that exceed this number will be highlighted in the results.
Vapor The maximum allowable vapor velocity. Calculated velocities that exceed
Velocity this value will be indicated in the results.
Liquid The maximum allowable liquid velocity. Calculated velocities that exceed
Velocity this value will be indicated in the results.
Rho V2 It is the density times the velocity square. This value is normally used as
a limiting factor to prevent erosion.
Noise The maximum allowable sound pressure level at a distance of 1 meter for
all pipe segments. This is an average value over the length of the pipe.
Calculated 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.
5 Scenarios 37
Sources Tab
If a source is ignored, the MABP constraint is ignored by sizing calculations.
When you select the Sources tab, you will see a view similar to the one
shown in Figure 4.4. All sources are displayed on this tab.
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.
3 Interface
If the structural analyzer does find that the pipe may be a valid tear location
then this value is ignored.
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
5 Scenarios 39
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.
3 Interface
6 Pipe Network
Overview
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
6 Pipe Network 41
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.
Ignoring/Restoring Pipes
When you ignore a single pipe, all upstream pipes are automatically ignored.
You can ignore single or multiple pipes within the model. When you ignore a
single pipe, all upstream nodes are automatically ignored. This enables you to
do what if type calculations, where part of the network can be excluded from
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
3 Interface
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.
6 Pipe Network 43
Connections Tab
The name of the pipe segment and connectivity information is specified here.
Fig 5.3
3 Interface
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
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.
Schedule Numbers:
Carbon Steel:
10, 20, 30, 40, 60, 80, 100, 120, 140, 160, STD, XS, XXS
6 Pipe Network 45
Stainless Steel:
5S, 10S, 40S, 80S
Material The pipe material, either Carbon Steel or Stainless Steel.
Roughness The surface roughness of the pipe segment. 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.
Thermal The thermal conductivity of the pipe wall. This is used by the
Conductivity heat transfer calculations when these are enabled.
Nominal The nominal pipe diameter used to describe the pipe size. For
Diameter pipes with 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
Number 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 The pipe diameter used for the pressure drop calculations.
Diameter
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,
Sizeable drop- the Sizeable option should be set to Yes. You might set the
down list Sizeable option to 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.
3 Interface
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
Length The length of the pipe is multiplied by this value to determine the
Multiplier 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.
6 Pipe Network 47
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.
3 Interface
The following fields are available on this tab:
6 Pipe Network 49
Methods Tab
Calculation methods are specified here.
Fig 5.7
When you are VLE Method The options for the Vapor-Liquid Equilibrium calculations are as
sizing a flare follows (see Appendix A - Theoretical Basis for more details):
system, the initial Compressible Gas - Real Gas relationship
pipe diameters may
affect the solution Peng Robinson - Peng Robinson Equation of State
when there is a Soave Redlich Kwong - Soave Redlich Kwong Equation of State
liquid phase and
Vapor Pressure - Vapor Pressure method as described in API Technical
the liquid knockout
drum is modeled. Data Book Volume 113.
You should initially Model Default - If this is selected, the Default method for the VLE
size a network method (as defined on the Calculation Options Editor view) will be
using vapor phase used.
methods.
Pressure Drop Group
Horizontal The Horizontal/Inclined methods apply only when you have selected
and Inclined Two-Phase pressure drop. The options are:
Pipes 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.
3 Interface
continued
Input Field Description
6 Pipe Network 51
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
Elements specified 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.
Input Field Description
Friction The Friction Factor Method applies only when you have entered a
Factor value for friction factor. The options are:
Method 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
Factor left blank, the value in the Calculation Options Editor view is used.
3 Interface
Summary Tab
The results of the calculation are displayed.
Fig 5.8
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.
6 Pipe Network 53
Fig 5.9
Note: If you have selected Use Pipe Class When Sizing in the Run Options
view, these are the schedules which will be used.
3 Interface
7 Nodes
Overview
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
1. To access the Node Manager, select Nodes from the Build menu.
Fig 6.1
7 Nodes 55
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
When you ignore a single node, all upstream nodes are automatically ignored.
You can ignore single or multiple nodes within the model. When you ignore a
single node, all upstream nodes are automatically ignored. This enables you
to do what if type calculations, where part of the network can be excluded
from the calculation without the need for deletion and reinstallation of the
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
3 Interface
To restore a node that has previously been ignored:
1 Open the node editor view of the node that you want to restore.
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 alphanumeric name. This feature is useful for large
flowsheets, because you can provide a different “location” name to different
sections to make it more comprehensible.
7 Nodes 57
Field Description
Calculations Tab
Calculation methods are specified here.
Fig 6.4
Field Description
3 Interface
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
Correction phase 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.
Field Description
7 Nodes 59
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.
Connections Tab
The name of the flow bleed and connectivity information is specified here.
Fig 6.6
3 Interface
The following fields are available on this tab:
Field Description
Calculations Tab
Calculation methods are specified here.
Fig 6.7
7 Nodes 61
The following fields are available on this tab:
Field Description
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.
3 Interface
Connections Tab
The name of the horizontal separator and connectivity information is specified
here.
Fig 6.9
7 Nodes 63
Calculations Tab
Calculation methods are specified here.
Fig 6.10
3 Interface
Two Phase If this option is set to Yes then the pressure loss coefficient in two
Correction phase 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
Transition pressure at which compressible flow pressure drop calculations
should be used. It applies only when the Transition method is
selected.
Body If this option is set to Full Body Area the calculation for the
Dimension 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.
7 Nodes 65
Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.11
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
3 Interface
The following fields are available on this tab:
Field Description
7 Nodes 67
Calculations Tab
Calculation methods are specified here.
Fig 6.13
Diameter The diameter of the orifice hole. Valid values are between 0 and 1000
mm.
Upstream This is the ratio of the throat diameter to the Upstream pipe diameter.
Diameter
Ratio
Downstream This is the ratio of the throat diameter to the Downstream pipe
Diameter diameter.
Ratio
Methods
Group
Fittings Loss The Fitting Loss drop-down list have the following three options
Method available:
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
Pressure change calculations in the orifice plate will not update during iterative
Drop calculations for pressure loss i.e. a PT flash will be used to update the
3 Interface
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.
Field Description
7 Nodes 69
Summary Tab
Fig 6.14
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
3 Interface
The following fields are available on this tab:
You only need to provide 2 of 3 connections to be able to solve the tee. This
allows for solution(s) to partially built networks.
Field Description
7 Nodes 71
Calculations Tab
Calculation methods are specified here.
Fig 6.16
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.
3 Interface
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.
7 Nodes 73
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
3 Interface
The location can have an alphanumeric name. This feature is useful for large
flowsheets, because you can provide a different “location” name to different
sections to make it more comprehensible.
The following fields are available on this tab:
Field Description
Calculations Tab
Calculation methods are specified here.
Fig 6.18
Field Description
7 Nodes 75
Isothermal If this option is set to Yes, the inlet temperatures used for the size
Pressure Drop change 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.
Field Description
3 Interface
Summary Tab
The result of the calculations at each of the pipe connections is displayed.
Fig 6.19
7 Nodes 77
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
3 Interface
The following fields are available on this tab:
The location can have an alphanumeric name. This feature is useful for large
flowsheets, because you can provide a different “location” name to different
sections to make it more comprehensible.
Field Description
Name The alphanumeric description of the Control Valve (e.g. - FCV 1).
Location You may want to specify the location of the Control Valve in the plant.
Outlet Either type in the name of the pipe segment or select from the drop-
down list.
At You can specify where the pipe segment is to be attached to the Control
Valve.
Ignore Select the ignore checkbox to ignore this control valve in the
calculations. Clear the checkbox to re-enable it.
Conditions Tab
Fluid conditions are specified here.
Fig 6.21
Field Description
7 Nodes 79
Inlet Temp The temperature specification of the source on the upstream side of
Spec. the relief valve. Valid values are between -250oC and 1500oC.
You can select the fluid condition from the drop-down list on the left
side. The available option are:
Actual - it uses the given inlet temperature as the actual fluid
temperature.
Subcool - If this option is selected, enter the amount of subcooling.
Superheat - If this option is selected, enter the amount of superheat.
Allowable The Allowed Back Pressure is the pressure that is allowed to exist at
Back the outlet of a pressure relief device as a result of the pressure in the
Pressure discharge system. It is the sum of the superimposed and built-up
back pressure. Clicking the Set button calculates the Allowable Back
Pressure as a function of the Inlet Pressure. Checking the Auto
checkbox will automatically calculate the
Field Description
Composition Tab
The fluid composition is specified here.
Fig 6.22
3 Interface
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
Fractions can only 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.
Clone This button allows the copying of compositional data from another
Composition releif valve in the same scenario
From
Normalise Normalises the composition such that the sum of the component
fractions is 1.
7 Nodes 81
Methods Tab
Calculation methods are specified here.
Fig 6.23
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
Pressure Drop change 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.
3 Interface
Two Phase If this option is set to Yes then the pressure loss coefficient in two
Correction phase 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
Transition pressure at which compressible flow pressure drop calculations
should be used. It applies only when the Transition method is
selected.
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.
7 Nodes 83
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
3 Interface
Use Pipe Select this checkbox to restrict the sizes of the inlet piping selected by
Class FLARENET to those defined by the Pipe Class tool.
Fittings
Groups
Loss Enter the A and B parameters for the following fittings “K” factor
Coefficient equation in 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
7 Nodes 85
Select the scenarios to which the data should be copied by activating the
corresponding check box in the Copy column.
This technique for copying source data may also be applied to relief valves.
The Clone From button may be used to copy source data for other controls
valves in the same scenario. When this button is pressed you will see a view
similar to the following:
Fig 6.27
Select the control valve from which the data should be copied or using the esc
key to cancel.
This technique for cloning source data may also be applied to relief valves.
3 Interface
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.
Connections Tab
The name of the relief valve and connectivity information is specified here.
Fig 6.28
The location can have an alphanumeric name. This feature is useful for large
flowsheets, because you can provide a different “location” name to different
sections to make it more comprehensible.
Field Description
Name The alphanumeric description of the Control Valve (e.g. - FCV 1).
Location You may want to specify the location of the Control Valve in the plant.
Outlet Either type in the name of the pipe segment or select from the drop-
down list.
At You can specify where the pipe segment is to be attached to the Control
Valve.
Ignore Select the ignore checkbox to ignore this control valve in the
calculations. Clear the checkbox to re-enable it.
7 Nodes 87
Conditions Tab
Fluid conditions are specified here.
Fig 6.29
Field Description
Inlet The pressure of the source on the upstream side of the valve. Valid
Pressure values are between 0.01 and 600 bar.
3 Interface
to 600 bar.
Outlet This is the temperature of the source at the flange on the downstream
Temperature side of 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.
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.30
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
7 Nodes 89
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
Fractions only 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.
Clone This button allows the copying of compositional data from another releif
Composition valve in the same scenario
From
Normalise Normalises the composition such that the sum of the component
fractions is 1.
Methods Tab
Calculation methods are specified here.
Fig 6.31
3 Interface
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
Pressure Drop change 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.
Fields Description
7 Nodes 91
the transition value.
Compressible This entry defines the pressure drop as a percentage of the inlet
Transition pressure at which compressible flow pressure drop calculations
should be used. It applies only when the Transition method is
selected.
Sizing Group
Sizing Method The four sizing method options available are:
API (1976) – American Petroleum Institute method in the 1976
edition of RP 520 pt 1. No account is made of liquid flashing as it
passes through the relief valve, thus this method is not
recommended for either two phase or flashing fluids.
API (1993) – American Petroleum Institute method in the 1993
edition of RP 520 pt 1. Liquid flashing is handled by a simplified
approach in which the fluid is flashed to the outlet pressure. The
relative quantities of each phase at the outlet condition are then
used at the inlet of the valve to determine the two phase capacity
API(2000) – American Petroleum Institute method in the 1993
edition of RP 520 pt 1. This method is often referred to as the Diers
or Leung method. This is the recommended method for all two
phase fluids.
HEM – Homogeneous Equilibrium method.
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.
Energy
Balance
Group
Isentropic Select Yes to use an isentropic flash between the inlet and outlet
Flash otherwise an isenthalpic flash will be done
Isentropic Fractional isentropic efficency for the isentropic flash
Efficiency
Estimated
Properties at
Header
Conditions
Group
Vapor The initial estimates for the flow profile in looped systems are
Fraction 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. Specify the estimated vapor molecular weight for the vapor fraction
Wt. given above.
If this value is not specified then it is assumed to be the same as
that of the total fluid.
3 Interface
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.32
7 Nodes 93
Diameter
Fields Description
Use Pipe Select this checkbox to restrict the sizes of the inlet piping selected by
Class FLARENET to those defined by the Pipe Class tool.
Fittings
Groups
Loss Enter the A and B parameters for the following fittings “K” factor
Coefficient equation in 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.33
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.
3 Interface
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.
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.34
7 Nodes 95
The location can have an alphanumeric name. This feature is useful for large
flowsheets, because you can provide a different “location” name to different
sections to make it more comprehensible.
The following fields are available on this tab:
Field Description
Calculations Tab
Calculation methods are specified here.
Fig 6.35
Field Description
3 Interface
Coefficient drop through the flare tip.
Fittings Loss Select whether the supplied Fittings Loss Coefficient will calculate
Coefficient Basis the 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
Pressure Drop size 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
Correction two phase 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.
Field Description
7 Nodes 97
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.36
Ref. Temp. Enter the reference temperature to which the pressure drop
curves correspond. All curves must be for the same reference
temperature.
Pressure If checked then the static pressure correction takes into account
Correction 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.
Drop Points may 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
Extrapolation supplied molecular weight curves is performed if necessary,
otherwise the bounding molecular weight curve is used.
Flow If this field is checked then extrapolation beyond the range of
Extrapolation supplied mass flow rates is performed if necessary, otherwise the
bounding mass flow is used.
3 Interface
Summary Tab
The result of the calculation is displayed.
Fig 6.37
7 Nodes 99
8 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
3 Interface
The following fields are available on this tab:
Field Description
External
Conditions Group
Atmospheric Specify the atmospheric pressure. The default values are
Pressure 1.01325 bar 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
Transfer the surroundings are performed for those pipe segments that
have Heat Transfer with Atmosphere enabled.
External If checked, heat transfer calculations between pipe segments and
Radiative HTC the 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
Energy each node is included in the energy balance. Specifically:
v2
If checked the energy balance equation is H0 = H + , which
2
is 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.
8 Calculations 101
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.
Field Description
3 Interface
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.
8 Calculations 103
Methods Tab
Global calculation methods are specified here.
Fig 7.3
3 Interface
Input Field Description
Properties
Group
VLE Method The options for the Vapor-Liquid Equilibrium calculations are as
(Overall) follows:
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
Method enthalpies are 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.
8 Calculations 105
Input Field Description
VLE Method The VLE method that will be used for the estimation of the
(Source temperature at the downstream flange for source nodes. The options
Outlet are the same as for the Overall VLE Method.
Temperature
Estimation)
Enthalpy The enthalpy method that will be used for the estimation of the
Method temperature at the downstream flange for source nodes. The options
(Source are the same as for the 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
Pipes 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 - 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 The options are:
Pipes 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
3 Interface
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.
8 Calculations 107
Input Field Description
3 Interface
Warnings Tab
You can set the level of detail of the warnings by checking the appropriate
checkboxes. By default, they are all checked.
There are three groups available on the Warnings tab:
• Design Problems.
• Calculation Problems.
• Sizing Status.
Fig 7.4
8 Calculations 109
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.
Solver Tab
Solver control parameters are specified here.
Fig 7.5
3 Interface
The following fields are available on this tab:
Field Description
Tolerances Group
Properties This is the tolerance for the maximum difference between the
Pressure 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
Pressure iterating to 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 This is the tolerance for the maximum error in the mass balance
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
8 Calculations 111
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 This option selects the analyzer used by FLARENET to detect and
Analyzer initialize looped systems. The options are:
Field Description
The Simultaneous Structural Analyzer should always be used for new models.
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.
Simultaneous - this generates a simplified linear model of the
flare system and solves it to identify a set of tear stream. It will
use the flow estimates supplied by the user but will repeat its
calculation ignoring 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 When checked, it will generate additional messages giving details
History of intermediate calculations. This should be left unchecked unless
you have convergence problems.
Preserve When checked, failure of calculations will not erase the results
Unconverged after the final iteration. This can be useful for the diagnosis of
Results for difficult problems.
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.
3 Interface
Initialization Tab
Global parameters that can enhance convergence speed and reliability are
specified here:
Fig 7.6
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 This specifies a global length multiplier to be applied to all the
Multiplier 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.
8 Calculations 113
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
3 Interface
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
8 Calculations 115
Fig 7.9
To abort calculations, click the Stop Calculations icon, which takes the place
of the Start Calculations icon during calculations.
3 Interface
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
11 Repeat steps #8 through #10 for all scenarios
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
8 Calculations 117
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
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
3 Interface
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.
8 Calculations 119
9 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.
3 Interface
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:
As you navigate through the table, you will see that the standard database
records are shown in black. User-defined records, which may be edited, are
shown in blue.
Filter Application Result
*0 Pipe Schedule 10, 20, 30, 40, 60, 80, 100, 120, 140,
160
1?0 Pipe Schedule 100, 120, 140, 160
1* Pipe Schedule 10, 100, 120, 140, 160
*90* Fittings All 90 degree bends and elbows
*Entrance* Fittings All Pipe Entrance fittings
*thane Components Methane, Ethane
M* Components Methane, Mcyclopentane, etc.
9 Databases 121
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.
3 Interface
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 new one.
9 Databases 123
Fig 8.3
2. If you have already set your password, you will need to enter the
password before accessing the databases.
3. 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 are 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.
3 Interface
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.
9 Databases 125
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
3 Interface
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).
9 Databases 127
10 Viewing Data and Results
Overview
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.
3 Interface
Fig 9.1
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
3 Interface
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 from the Scenario Manager.
You can edit an individual source by double clicking on any cell in the
appropriate row. See Boundary Nodes for more information on editing
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.
Messages
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.
3 Interface
Problems Tab
Any violations of the design constraints are shown on this tab.
The following design constraints will be checked for violations:
Mach Number
Velocity
pv2
Noise
Back Pressure
Temperature
Slug Flow
Ice Formation
Fig 9.6
Sizing Tab
This tab displays the sequence of line size changes during sizing calculations.
Fig 9.9
3 Interface
Loops tab
This tab displays the solution history for looped network calculations.
Fig 9.10
Pressure/Flow Summary
After running the case, you can view the Pressure/Flow Summary by selecting
Results-Pressure/Flow Summary from the View menu.
Fig 9.11
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.
3 Interface
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.
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 properties are displayed (Upstream and Downstream):
Density
Enthalpy
Entropy
Phase Fraction
Heat Capacity
Molecular Weight
Surface Tension
Thermal Conductivity
Viscosity
Z Factor
Alternatively, you can use the key combination alt v r r.
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)
Double clicking again, inside the view, will contract the view to its original
state.
3 Interface
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
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.
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 Switch display from graph to table.
Type
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.
3 Interface
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:
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).
You can select a source from the drop-down menu at the top of the view.
Three icons are also available:
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.
3 Interface
Graph Control
The number of Pipe Segments, Nodes, Sources, Components and Scenarios is
displayed, as well as the name and path of the current file.
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.
Fig 9.18
You can open the 2D Chart Control Properties view by object inspecting any
spot on an active plot.
3 Interface
Interior Background Color The colored square button labeled “...” provides
RGB 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.
Background Color Select the color name from the drop-down list.
Name
Inner Option Description
Tab
3 Interface
Inner Tab Option Description
ChartGroup Tab
This tab allows you to customize ChartGroups attributes, such as the chart
type and the data itself.
Fig 9.21
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.
3 Interface
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.
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.
Internet
Binding
3 Interface
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 to add a ChartStyle after the selected Style in the list.
Click the Remove button to remove the selected ChartStyle from the list.
Fig 9.22
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.
Titles Tab
You can customize the header and footer on the following inner tabs of the
Title tab.
Fig 9.23
3 Interface
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 Enter the RGB value for the specified background
Color RGB color. Valid values are between #000000 and #ffffff.
Background List the name of the specified background color. To
Color Name choose a new color by its name, click the down
arrow or type the name of the color.
Foreground Enter the RGB value for the specified foreground
Color RGB color. Valid values are between #000000 and #ffffff.
Foreground List the name of the specified foreground color. To
Color 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.
3 Interface
Inner Option Description
Tab
3 Interface
Inner Tab Option Description
3 Interface
Inner Tab Option Description
3 Interface
continued
Inner Tab Option Description
Interior Background Color Enter the RGB value for the specified
RGB background color. Valid values are between
#000000 and #ffffff.
Background Color List the name of the specified background
Name color. To 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
RGB foreground color. Valid values are between
#000000 and #ffffff.
Foreground Color List the name of the specified foreground
Name color. To 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.
3 Interface
Markers Tab
The Markers tab allows you to add and customize markers on the chart using
the following inner tabs:
Fig 9.29
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.
3 Interface
11 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.
11 PFD 165
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
3 Interface
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.
11 PFD 167
PFD Toolbar Icons
The PFD toolbar icons are arranged as follows:
Fig 10.2
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.
3 Interface
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
11 PFD 169
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
3 Interface
Molar Flow
Noise
Nominal Diameter
Pressure
Rho V2
Temperature
Vapor Fraction (Molar)
Velocity
Velocity (Liq)
Velocity (Vap)
Pressure / Mass Flow option
Pressure / Temperature
Pressure / Mach No.
Length / Nom. Diam
MABP Approach.
The display field on the right side of the property drop-down list displays the
default units for the chosen property.
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.
11 PFD 171
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.
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
3 Interface
If the Edit Objects on Add checkbox is activated in the Preferences editor,
the Object editor view will be open for each new object which is added to the
PFD.
The procedure for installing operations via the Toolbox is as follows:
1 Click the desired object in the PFD Toolbox. You will see the icon being
depressed.
2 Click in the specific area in the PFD where you want to place the object
icon. The object then appears in 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.
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.
11 PFD 173
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.
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
If the grid is on, all objects which are moved will "snap to" the grid. Their
movement will be constrained to the grid spacing.
You can move objects individually, or as a group.
1 Select the item or items you want to move.
2 Position the mouse pointer on one of the objects and press the left mouse
button.
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.
3 Interface
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.
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.
11 PFD 175
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:
Toggle Grid When the Grid toolbar icon is selected, a grid is superimposed
Display icon upon the 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
PFD Objects icon its 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
Direct/Orthogonal connecting lines.
Connections
3 Interface
12 Printing, Importing
and Exporting
Overview
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.
12 Printing, Importing
and Exporting 177
• 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.
3 Interface
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.
12 Printing, Importing
and Exporting 179
Fig 11.2
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:
3 Interface
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
12 Printing, Importing
and Exporting 181
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
3 Interface
Printer Setup
The Print Setup Options vary for different printers.
To edit the printer setup, select Printer Setup from the File menu or press
the alt f r key combination. This is used to select the default/ specific printer,
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.
12 Printing, Importing
and Exporting 183
• 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.
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.
3 Interface
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.
Figure 11.7
12 Printing, Importing
and Exporting 185
The file selected must be one of the following types:
Once the file name has been entered click the Next button to move to the
next step.
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.
3 Interface
• 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.
• 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.
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
12 Printing, Importing
and Exporting 187
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
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 This checkbox allows you to define whether this type of data object
type of data should 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
contained in the import process will expect to find all the data for this subsection
parent in the same 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.
Field Description
Import this This checkbox allows you to define whether this type of data object
type of data should 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
contained in the import process will expect to find all the data for this subsection
parent in the same 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
3 Interface
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
Worksheet the data 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.
12 Printing, Importing
and Exporting 189
continued
Field Description
Data in Rows, These radio buttons allow you to specify whether the spreadsheet
Columns, data for 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
type of data should 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
contained in the import process will expect to find all the data for this subsection in
parent the same group 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
Tag that 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.
3 Interface
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 This column lists the individual data items that may be imported for this
Item 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.
12 Printing, Importing
and Exporting 191
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.
When you have finished updating the import definition, click the Next button
to move to the final step of the Import Wizard.
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
Import actions will be recorded in the Trace window if the checkbox was
checked before starting the Import Wizard.
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 do not want to save changes to the definition file
before running the import process.
Save import definition file without importing data. Select this
3 Interface
option if you want to save the definition file without running the
import process.
Log Import Select this checkbox if you want to record the details of the
Actions to File import 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.
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.
12 Printing, Importing
and Exporting 193
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.
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,
3 Interface
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
Data file and 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.
12 Printing, Importing
and Exporting 195
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.
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.
3 Interface
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.
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
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).
12 Printing, Importing
and Exporting 197
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.
3 Interface
Fig 11.21
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.
12 Printing, Importing
and Exporting 199
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.
3 Interface
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
12 Printing, Importing
and Exporting 201
The file selected must be one of the following types:
File Type Extension Description
Selecting the Clear all... option will clear ALL data even if it did not originate
from a previous FLARENET export. The clearing of data will not take place
until the export process runs.
The remaining fields on this form are as follows:
Entry Description
Clear all existing data Select this checkbox if you want to clear the target file of all
before export existing data before exporting the new values from
FLARENET.
Create new Access These radio buttons allow you to specify whether a new
files as Access 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.
3 Interface
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.
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.
12 Printing, Importing
and Exporting 203
• Target tab.
• 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
of data object 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
contained in then the export process will write all the data for this subsection to
parent 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.
Field Description
Export this This checkbox allows you to define whether data for this type of
type of data object 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
3 Interface
contained in the export process will write all the data for this subsection in the
parent same 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.
Field Description
Worksheet This entry allows you to specify the worksheet that will contain the
name data for 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
Columns, data for 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 This checkbox allows you to define whether this type of data object
type 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
contained in the export process will write all the data for this subsection in the
parent same group 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.
12 Printing, Importing
and Exporting 205
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.
3 Interface
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.
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.
12 Printing, Importing
and Exporting 207
The fields on this view are:
Entry Description
Select Export This set of radio buttons allows you to select whether the export
Options definition 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.
3 Interface
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.
12 Printing, Importing
and Exporting 209
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.
3 Interface
It contains the following 4 tables:
Components Table
Pipes Table
Nodes Table
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
12 Printing, Importing
and Exporting 211
FlowData Table
Source Pres- Inlet MABP Mass Frac Frac Frac Frac Frac Frac
Name sure Temp Flow 1 2 3 4 5 6
3 Interface
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.
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.
14 Still with the SourceData object selected move to the Field Details tab
and define the following data items.
12 Printing, Importing
and Exporting 213
SourceName SourceName
MassFlow MassFlow
RelievingPressure Pressure
InletTemperatureSpec InletTemp
AllowableBackPressure MABP
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
Name NodeName
UpstreamDiameterRatio Param1
3 Interface
18 Select Pipes and make the following entries:
Source tab
Select Table = Pipes
Select entry = <blank>
Field Details tab
Name Name
UpstreamConnection Inlet
DownstreamConnection Outlet
Length Length
ElevationChange Elevation
NominalDiameter NominalDiameter
FittingLossOffset FittingsLoss
Name NodeName
Name NodeName
Diameter Param1
FittingLoss Param2
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
12 Printing, Importing
and Exporting 215
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.
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.
3 Interface
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
12 Printing, Importing
and Exporting 217
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:
Name 3,2
Pressure 5,2
HeaderMach 6,2
HeaderNoise 7,2
TailpipeMach 6,2
TailpipeNoise 7,2
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
3 Interface
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:
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:
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
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
12 Printing, Importing
and Exporting 219
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
3 Interface
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.
12 Printing, Importing
and Exporting 221
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.
Name 2
Length 4
ElevationChange 5
InternalDiameter 9
NominalDiameter 7
WallThickness 10
PipeSchedule 8
InsulationType 20
InsulationThickness 21
InsulationConductivity 22
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
3 Interface
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.
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.
<Your FLARENET Directory>\Samples\ImportExport\Sample5Final.xls
shows our exported worksheet after adding headings.
12 Printing, Importing
and Exporting 223
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
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:
o Create a new case
o Start Import Wizard
o In step 1 Specify file
<Your FLARENET directory>\Samples\ImportExport\Sample6.xml
o In step 2 select default import definition file
o Make no changes in step 3
o In step 4 select import without saving definition file.
3 Interface
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:
o 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?
o 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?
o 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).
o The calculation options will be set to those defined for the second
model. Are these correct?
12 Printing, Importing
and Exporting 225
13 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.
3 Interface
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.
13 Automation 227
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 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.
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.
3 Interface
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.
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.
With prior experience in FLARENET, the ReliefValves object is a logical
choice.
13 Automation 229
Fig 12.3
3 Interface
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
13 Automation 231
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.
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
3 Interface
Dim FnApp As Object
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.
13 Automation 233
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
3 Interface
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
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.
Variants
Syntax: Using variant values:
Dim myvariant as Variant
13 Automation 235
myvariant = [object.property]
To determine the upper and lower bound of the variant:
UBound(arrayname[,dimension])
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.
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.
3 Interface
Dim name as String
Set myValves = myApp.ControlValves
For Each myValve in myValves
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.
Application
Description : Application object
Attributes : IApplication, read only
Methods
Name Description Arguments
13 Automation 237
Properties
Name Description Attributes Arguments
Bleed
Description : Flow bleed node object
Attributes : IBleed, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
3 Interface
Named Properties For PropertyByName()
Name Units Attributes
Bleeds
Description : Collection of flow bleed node objects
Attributes : IBleed, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
Component
Description : Component object
Attributes : IComponent, read only
Methods
Name Description Arguments
13 Automation 239
Properties
Name Description Attributes Arguments
3 Interface
Components
Description : Collection of component objects
Attributes : IComponents, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
Connector
Description : Connector node object
Attributes : IConnector, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
13 Automation 241
Named Properties For PropertyByName()
Name Units Attributes
Connectors
Description : Collection of connector node objects
Attributes : IConnectors, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
ControlValve
Description : Control valve node object
Attributes : IControlValve, read only
Methods
Name Description Arguments
3 Interface
Properties
Name Description Attributes Arguments
13 Automation 243
ControlValves
Description : Collection of control valve node objects
Attributes : IControlValves
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
HorizontalSeparator
Description : Horizontal separator node object
Attributes : IHorizontalSeparator, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
3 Interface
Named Properties For PropertyByName()
Name Units Attributes
HorizontalSeparators
Description : Collection of horizontal separator node objects
Attributes : IHorizontalSeparators, read only
Method
Name Description Arguments
Properties
Name Description Attributes Arguments
Nodes
Description : Collection of all node objects
Attributes : INodes, read only
Properties
Name Description Attributes Arguments
13 Automation 245
OrificePlate
Description : Orifice plate node object
Attributes : IOrificePlate, read only
Method
Name Description Arguments
Properties
Name Description Attributes Arguments
OrificePlates
Description : Collection of orifice plate node objects
Attributes : IOrificePlates, read only
Methods
Name Description Arguments
3 Interface
Delete(wh as Variant) Delete an orifice wh = Index as Name (String) or
plate Number (Integer/Long)
Properties
Name Description Attributes Arguments
Pipe
Description : Pipe object
Attributes : IPipe, read only
Methods
Name Description Arguments
AddFitting(FittingName As String, Add a fiitting to FittingName =
Optional Count As Integer = 1) the fittings list Name of fitting
defined in the pipe
fittings database
Count = Number of
fittings of this type
to add
Connect(conidx as fntPipeEnd, Connect to a node conidx =
nod as Object, nodeconidx as Connection on pipe
fntNodeEnd)
nod = Node to
connect to
nodeconidx =
Connection on
DeleteAllFittings() Delete all fittings
from the fittings
list
DeleteFittingByIndex(FittingIndex Delete a fitting FittingIndex =
As Integer) from the fittings Index of fitting in
list the fittings list to
delete
DeleteFittingByName(FittingName Delete a fitting FittingName =
As String, Optional Count As from the fittings Name of fitting
Integer = 1) list defined in the pipe
fittings database
13 Automation 247
Count = Number of
fittings of this type
to delete
Disconnect(conidx as fntPipeEnd) Disconnect from a conidx =
node Connection on
GetFittingCount() As Integer Get number of
fittings in the
fitting list
GetFittingName(FittingIndex As Get name of FittingIndex =
Integer) As String indeded pipe Index of fitting in
fitting the fittings list to
retreive name for
Properties
Name Description Attributes Arguments
3 Interface
continued
Name Units Attributes
13 Automation 249
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
Pipes
Description : Collection of pipe
Attributes : IPipes
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
3 Interface
ReliefValve
Description : Relief valve node object
Attributes : IReliefValve, read only
Methods
Name Description Arguments
13 Automation 251
Properties
Name Description Attributes Arguments
3 Interface
RatedMassFlow kg/hr Double, read/write
ReliefPressure bar abs Double, read only
SizingBackPressure Bar abs Double, read/write
SizingMethod Integer, read/write
StaticOutletPressure bar abs Double, read only
StaticInletPipePressureDrop bar Double, read only
Temperature C Double, read only
TemperatureSpecification fntTempSpec,
read/write
ReliefValves
Description : Collection of relief valve node objects
Attributes : IReleifValves
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
13 Automation 253
Scenario
Description : Scenario object
Attributes : IScenario, read only
Properties
Name Description Attributes Arguments
3 Interface
Named Properties For PropertyByName()
Name Units Attributes
Scenarios
Description : Collection of scenario objects
Attributes : IScenarios, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
13 Automation 255
Solver
Description : Solver object
Attributes : ISolver, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
3 Interface
UnitOperationTolerance % Double, read/write
UseKineticEnergy fntYesNo, read/write
UseRatedFlow fntYesNo, read/write
VleMethod fntVleMethod,
read/write
WindSpeed Double, read/write
Tee
Description : Tee node object
Attributes : ITee, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
Tees
Description : Collection of tee node objects
Attributes : ITees, read only
13 Automation 257
Method
Name Description Arguments
Properties
Name Description Attributes Arguments
Tip
Description : Flare tip node object
Attributes : ITip, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
3 Interface
CurvePointPressu Pressure drop of point Double, read/write wh = Index of curve
reDrop(Wh as on a pressure drop id = Index of point
Integer, id as curve (bar)
Integer)
PropertyByName Property value for a Variant, wh = Property name
(wh as String) named property read/write
PropertyNames Variant array of all the Variant, read only
property names
13 Automation 259
Named Properties For PropertyByName()
Name Units Attributes
Tips
Description : Collection of flare tip node objects
Attributes : ITip, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
3 Interface
VerticalSeparator
Description : Vertical separator node object
Attributes : IVerticalSeparator, read only
Methods
Name Description Arguments
Properties
Name Description Attributes Arguments
VerticalSeparators
Description : Collection of vertical separator node objects
Attributes : IVerticalSeparators, read only
Methods
Name Description Arguments
13 Automation 261
y = Y coordinate on PFD
(Twips)
Delete(wh as Variant) Delete a vertical separator wh = Index as Name
(String) or Number
(Integer/Long)
Properties
Name Description Attributes Arguments
Example – Automation In
Visual Basic
This complete This example will show how that FLARENET can be used as an automation
example has also server by a program that analyses a FLARENET model to search for the
been pre-built and maximum and minimum values of a user defined named property within all
is located in the the pipes.
Flarenet\Samples
\Ole\Vb\Bounds Note: Although Visual Basic 6 is recommended for this example, you may
directory 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 Interface
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
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:
o Select the text box on the form so that the object guides appear
around the object.
o 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.
13 Automation 263
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
3 Interface
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:
o Click the View Code button.
o Select the Code option from the View menu.
o 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 Automation 265
Fig 12.12
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.
3 Interface
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
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
18 The final two routines define the actions of the two buttons: btnUpdate
and btnExit.
Code Explanation
13 Automation 267
minimum values to values outside
MinVal = 10000000000#
the range of possible values.
For Each Pipe In Loop through all the pipes in the
FnApp.Pipes model
Code Explanation
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
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:
o Click the Start button...
o Select Start from the Run menu.
o Press <F5> from the keyboard.
Visual Basic will inform you of any errors that occur during compile time.
3 Interface
A Theoretical Basis
Pressure Drop
Pipe Pressure Drop Method
⎜
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
⎛ 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
3 Interface
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)
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
The boundaries between regions are defined in terms of two constants and
the Froude number10:
3 Interface
where :
x = In(λ )
λ = Input liquid content = qliquid / (qliquid + q gas )
q = In situ volumetric flowrate
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:
3 Interface
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
⎛ f tp ρ LVns2 ⎞ ⎡⎛ VsL + Vr ⎞ ⎤
ΔP = ⎜ ⎟ ⎢⎜ ⎟ + Γ ⎥
⎜ 2g c D ⎟ ⎜ Vns + Vr ⎟
⎝ ⎠ ⎣⎝ ⎠ ⎦
A.15
where :
Vns = Non − slip velocity
Vr = Bubble rise velocity
Γ = Constant
3 Interface
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 p ⎟⎠⎥⎦
2
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 )
ρ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
3 Interface
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
The fitting loss coefficients are defined by Crane26
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 ⎠
3 Interface
The fittings loss coefficients are defined by HTFS27
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
⎛ 1 ⎞ 2
⎜ K1 − 1 + 2 ⎟m 1
σ ⎠
ΔPs = ⎝ φ LO
2
2ρ l
A.29
x g2 ρ l (1 − x g )
2
φ 2
LO = +
εg ρg 1- ε g
A.30
where :
m = Mass flux
ρ = Phase mass density
ε = Phase void fraction
x = Phase mass fraction
Δ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
⎛ρ ⎞ ⎛ρ ⎞
C =⎜ l ⎟ + ⎜⎜ g ⎟⎟
⎜ρ ⎟
⎝ g ⎠ ⎝ ρl ⎠
A.35
where :
m = Mass flux
ρ = Phase mass density
ε = Phase void fraction
x = Phase mass fraction
m 12 ⎛ ρ1 ⎞
ΔPs = ⎜⎜ − 1⎟⎟
ρ1σ ⎝ ρ 2 σ ⎠
A.36
where :
m = Mass flux
ρ = Phase mass density
3 Interface
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.
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.
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
θ 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
3 Interface
•
• 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⎟ − ⎜
⎟ ⎜ 2 + P3 ⎟⎟⎥
⎝ 2 ⎠ ⎝ ⎠⎦
K 23 = ⎣ 3
ρ 3v3
2
A.45
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.
2.825
( ) m 12
0.08956
2 1.5082 β
ΔPs = 1 − β
β4 2ρ1
A.48
See Incompressible Single Phase Flow on Page 263 for a definition of the
symbols.
3 Interface
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
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
3 Interface
(Inp )( ) = 5.92714 − 6.09648
*
r
0
T
− 1.28862InT r + 0.169347Tr6
r
A.51
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.
R 2Tc2
ac = Ω a (Ω a the same as RK )
Pc
(
α = 1 + S 1 − Tr0.5 )
A.56
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
R 2Tc2
ac = 0.45724
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
3 Interface
A.63
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.
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:
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
3 Interface
models. FLARENET constructs a PVT map for each component and regresses
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.
⎡ ⎛ μ 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:
3 Interface
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 = H ideal + H dep
A.75
ω ⎧⎪⎛ H dep ⎞ ⎫⎪
s r s
⎛ H dep ⎞ ⎛ H dep ⎞ ⎛ H dep ⎞
⎜⎜ ⎟⎟ = ⎜⎜ ⎟⎟ + r ⎨⎜⎜ ⎟⎟ − ⎜⎜ ⎟⎟ ⎬
⎝ RTc ⎠ ⎝ RTc ⎠ ω ⎪⎩⎝ RTc ⎠ ⎝ RTc ⎠ ⎪⎭
A.76
⎧ ⎛ 2b3k ⎞ ⎛ 3b4k ⎞ ⎛ 3c k ⎞ ⎫
⎪ b k
− ⎜⎜ ⎟+⎜ ⎟⎟ c2k − ⎜⎜ 23 ⎟⎟ ⎪
Tr ⎟⎠ ⎜⎝ Tt 2
k 2
⎛ H dep ⎞ ⎪ k ⎝ ⎠− ⎝ Tr ⎠ + d 2 + 3E ⎪
k
⎜⎜ ⎟⎟ = −Tr ⎨Z − 1.0 − ⎬
⎝ RTc ⎠ ⎪ TrVr 2TrVr2 5TrVr5 ⎪
⎪ ⎪
⎩ ⎭
A.77
⎧⎪ γ k ⎞ Vr2 ⎫⎪
k
γ
c4k ⎛ k
E= 3 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
3 Interface
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 1 ⎡ da ⎤ ⎛ V + (20.5 + 1)b ⎞
= Z − 1 − 1.5 a − T In⎜ ⎟
RT 2 bRT ⎢⎣ dt ⎥⎦ ⎜⎝ V + (20.5 − 1)b ⎟⎠
A.81
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
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
3 Interface
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⎜ ⎟⎜⎜ ⎟⎟ v
⎝ L ⎠⎝ 4 ⎠
A.88
⎛ 1013 ηWm L ⎞
SPLr = 10 log⎜⎜ 2
⎟⎟ − t
⎝ 4πr ⎠
A.89
where :
L = Equivalent length
SPL = Sound pressure level
r = Distance from pipe
φ = Internal diameter
η = Acoustic efficiency
ΔP = Change in pressure
t = Pipe wall transmission loss
v = Average fluid velocity
10 - 3
10 - 4
1 0-5
10 - 6
Aco us tical Efficien cy
10 - 7
10 - 8
pt = 1 0.0
10 - 9
p t = 1.0
10 - 10
p t = 0. 1
10 - 11
0 .0 0.2 0 .4 0 .6 0. 8 1.0
M ach N um b er
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
where :
m = Pipe wall mass per unit area
φ = Internal diameter
v = Average fluid velocity
3 Interface
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.
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.
3 Interface
4 Repeat steps 2 and 3 to open any sub section data objects.
5 Read data items from source one by one.
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
3 Interface
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.
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
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
A list of valid Data Object elements names is given in Data Objects List.
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.
3 Interface
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.
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.
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.
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
3 Interface
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
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
3 Interface
Recognized Objects and Items
Components
Attribute Description
BIPs
Attribute Description
3 Interface
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
ControlValves
Attribute Description
3 Interface
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
FlowBleeds
Attribute Description
HorizontalSeparators
Attribute Description
OrificePlates
Attribute Description
3 Interface
Pipes
Attribute Description
3 Interface
Fittings
Attribute Description
ReliefValves
Attribute Description
3 Interface
Tips
Attribute Description
TipCurves
Attribute Description
TipCurveData
Attribute Description
Scenarios
Attribute Description
3 Interface
SolverOptions
Attribute Description
3 Interface
continued
Attribute Description
SourceData
Attribute Description
3 Interface
continued
Attribute Description
Composition
Attribute Description
PFDLayout
Attribute Description
PFSummary
Attribute Description
EndResults
Attribute Description
3 Interface
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)
StreamProps
Attribute Description
PhaseProps
Attribute Description
3 Interface
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
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
Variable Description
The following defines which variable may be printed with each report:
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
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 x x
Liquid Density
3 Interface
continued
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
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
enthalpydow Downstream x
n 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 x
Diameter
flow Mass flow
fractiondown Downstream x
Phase Fraction
fractionup Upstream x
Phase Fraction
frictionfracto Friction Factor x
3 Interface
continued
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
Nodes.fmt
Pipes.fmt
headvelvap Header Vapor x
Velocity
headvelliq Header Liquid x
Velocity
headrhov2 Header Rho x
V2
headnoise Header Noise x
heatcapdown Downstream x
Heat Capacity
heatcapup Upstream x
Heat 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
insconductivi Insulation x
ty Conductivity
internal Internal x x
Diameter
length Segment x
Length
3 Interface
continued
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
Nodes.fmt
Pipes.fmt
machup Upstream x
Mach Number
massflow Mass Flow x x
material Material Of x
Construction
methoddamp Damping x
ing Factor
methoddp Pressure Drop
Method
methodelem Twp Phase x
ents Elements
methodfrictio Friction Factor x
n
methodfitlos Fittings Loss x
Method
methodhord Horizontal 2 x
p Phase
Pressure Drop
Method
methodincdp Inclined x
Pressure Drop
methodverd Vertical 2 x
p Phase
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
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
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 x x
Factor
omegasrk SRK Acentric x x
Factor
pc Critical x x
Pressure
phase Phase Label x
plant Source Plant
Location
pressource Static Source x
Back Pressure
presallow Allowable x
Back Pressure
presdown Downstream x
Static
Pressure
presdrop Pressure Drop x
presdropfrict Static Pipe x
ion Friction Loss
presdropacc Static Pipe x
eleration Acceleration
3 Interface
Loss
presdropelev Static Pipe x
ation Elevation Loss
presdropfitti Static Pipe x
ngs Fittings Loss
presin Inlet Pressure x
presup Upstream x
Static
Pressure
property Property x
Description
ratedflow Rated Mass x
Flow
refer Literature x
Reference
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
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 x
roughness
scenario Scenario x
Name
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 x
V2
tailvelliq Tailpipe Liquid x
Velocity
tailvelvap Tailpipe Vapor x
3 Interface
Velocity
tc Critical x x
Temperature
temp Temperature
tempcalc Inlet x
Temperature
Calculations
DbSchedules.fmt
Properties.fmt
DbFittings.fmt
MoleFracs.fmt
Scenarios.fmt
Summary.fmt
Messages.fmt
ScenSum.fmt
DbComps.fmt
Variable Variable
Sources.fmt
Comps.fmt
Name Description
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 x
Node
vapourfrac Source Vapor x
Fraction
vc Critical x x
volume
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
Characterisati
on Parameter
3 Interface
wind Wind Velocity x
zfactordown Downstream x
Compressibilit
y Factor
zfactorup Upstream x
Compressibilit
y Factor
3 Interface
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 347
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.
3 Interface
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.
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.
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.
3 Interface
Velocity Pressure
ρU 2
Given by , also called the kinematic pressure.
2
A
Acentric Factor 248, 252
Adiabatic Flow
definition 288
Automation 194
B
Berthalot Equation 249
Toolbar 11
C
Calculation Options Editor 93
General tab 93
Methods tab 96
Warnings tab 98
Calculation Problems group 99
Sizing Status group 99
Calculations 93
Case
opening an existing 24
saving a 25
Case Description View 21
Changing Column Order 13
Chen Equation 233
Choked Flow
definition 288
Column Order
changing 13
Column Width
changing 13
Comma Separated Values 155
Component
list 26
selecting 26
3 Interface
matching name string 26
selection filter 27
sorting 31
swapping 31
type 26
Component Editor View
estimating unknown properties 30
Component Manager View 26
Components 26
Control Valve 73
Control Valve Editor
Connections tab 73, 80
COSTALD Calculations 249
Creating and Saving Cases 21
Critical Pressure
definition 288
Critical Temperature
definition 288
CSV
See Comma Separated Values 155
D
Darcy Friction Factor 233
Data
sources 115
viewing 113
Database Editor
component 111
fittings 111
pipe schedule 109
Database Features
adding/deleting data 108
selection filter 108
Dongle
Index 353
See Security Device 288
E
Equation
Berthalot 249
Chen 233
Round 232
SRK 248
Equivalent Length
definition 289
Export Wizard 170
Export Data Layouts 170
Step 1 171
Step 2 173
Step 3 174
Step 4 177
Using 170
F
Flare Tip Editor
Calculations tab 89, 91
Flow
laminar 233
mist 238
transition 233, 236, 238
turbulent 232
Flow Bleed Editor
Connections tab 58
FMT Files 156
Froude Number 234
H
Horizontal Separator Editor
Connections tab 60
Hysim 154
I
Import Wizard
Importing Source Data 165
Step 1 158
Step 3 160
Step 4 163
Using 158
Import/Export Examples 179
Importing
ASCII text files 165
from HYSIM 165
HYSYS source data 169
Importing HYSYS Source Data 169
Interface 7
3 Interface
Terminology 8
Tool Bar 11
Isothermal Flow
definition 289
M
MABP
definition 289
Mach Number
definition 289
Moody Friction Factor 232
Multiple Editing 52
N
Network
rating an existing 104
Node
definition 289
Node Manager 53
Node Types
flare tip 88
flow bleed 58
sources 73
tee 66
vertical separator 70
Nodes 53
Noise 255
acoustical efficiency 256
O
Orifice Plate Editor
Connections tab 63
P
Password
setting the 109
PFD 144
changing view options 153
connecting objects 151
icons 145
installing objects 149
manipulating the 151
moving objects 152
object inspection 146
printing 152
regenerate 152
saving 152
selecting objects 151
method one 151
method two 151
Index 355
toolbar 146
unselecting objects 151
view 146
Physical Properties 249
mixing rules 251
thermal conductivity 251
vapour density 249
vapour viscosity 250
Golubev method 250
Physical Prperties
enthalpy 252
Equations of State 253
ideal gas 252
Pipe
multiple editing 52
Pipe Network 41
Pipe Tools
pipe class editor 52
Preferences Editor
General tab 15
Import tab 19
Reports tab 17
Pressure Drop 231
Printing 155
location-specific 157
Printing, Importing and Exporting 153
PVT Relationship 247
R
Reduced Pressure
definition 289
Reduced Temperature
definition 289
Refresh Source Temperatures 88
Results
messages 117
physical properties 121
viewing 113
Round Equation 232
S
Scenario
definition 289
Scenario Editor
General tab 36
Sources tab 38
Scenario Management 33
Scenario Manager View 35
Scenario Tools 40
Scenarios
adding single source 40
3 Interface
adding/editing 36
General tab 36
Sources tab 37
Schedule
definition 289
Security Device
definition 290
Source
definition 290
Source Tools 88
adding single source scenarios 88
updating downstream temperatures 88
Source Types
control valve 73
SRK Equation 248
SRK Equation of State 253
Status Bar 12
T
Tab Separated Values 155
Terminology 8
Tool Bar 11
TSV
See Tab Separated Values 155
Two-Phase Pressure Drop 233
Beggs and Brill 233
Dukler method 235
Orkiszewski method 236
V
Vaour Phase Pressure Drop
methods 231
Vapour-Liquid Equilibrium 247
compressible gas 247
Peng Robinson 249
Soave Redlich Kwong 248
vapour pressure 247
Vertical Separator Editor
Connections tab 70
Viewing Data and Results 113
Index 357