UniSim® Flare Reference Guide R491 Release Notices and Trademarks © Honeywell International Sàrl 2022. All Rights Reserved. While this information is presented in good faith and believed to be accurate, Honeywell disclaims the implied warranties of merchantability and fitness for a particular purpose and makes no express warranties except as may be stated in its written agreement with and for its customer. In no event is Honeywell liable to anyone for any indirect, special or consequential damages. The information and specifications in this document are subject to change without notice. Other brand or product names are trademarks of their respective owners. Honeywell International Sàrl Z.A. La Pièce 16 CH - 1180 Rolle, Switzerland Table of Contents 1 Introduction ......................................................... 1-1 1.1 2 3 4 5 6 Introduction .................................................... 1-2 Interface .............................................................. 2-1 2.1 Overview ........................................................ 2-2 2.2 Terminology .................................................... 2-2 2.3 Menu Bar ........................................................ 2-3 2.4 Toolbar ........................................................... 2-4 2.5 Status Bar....................................................... 2-5 2.6 Editing Data View ............................................. 2-6 2.7 Setting Preferences .......................................... 2-8 2.8 Windows Menu............................................... 2-15 2.9 Help Menu..................................................... 2-16 Creating and Saving Cases ................................... 3-1 3.1 Creating a New Case ........................................ 3-2 3.2 Opening an Existing Case .................................. 3-3 3.3 Saving a Case.................................................. 3-4 Components ......................................................... 4-1 4.1 Overview ........................................................ 4-2 4.2 Selecting Components ...................................... 4-2 4.3 Adding/Editing Components ............................... 4-4 4.4 Binary Interaction Parameters.......................... 4-10 Groups.................................................................. 5-1 5.1 Overview ........................................................ 5-2 5.2 Group Manager ................................................ 5-2 5.3 Adding/Editing Groups ...................................... 5-3 5.4 Associating Sources to Groups ........................... 5-5 Scenarios.............................................................. 6-1 6.1 Overview ........................................................ 6-2 6.2 Scenario Manager............................................. 6-2 6.3 Adding/Editing Scenarios................................... 6-4 6.4 Adding Child Scenarios.................................... 6-10 1 6.5 7 8 9 Scenario Tools ............................................... 6-13 Pipe Network........................................................ 7-1 7.1 Pipe Manager................................................... 7-2 7.2 Ignoring/Restoring Pipes ................................... 7-2 Nodes ................................................................... 8-1 8.1 Node Manager ................................................. 8-2 8.2 Ignoring/Restoring Nodes .................................. 8-3 8.3 Connection Nodes ............................................ 8-4 8.4 Boundary Nodes............................................. 8-29 Calculations.......................................................... 9-1 9.1 Calculations Options ......................................... 9-2 9.2 Efficient Modeling Techniques........................... 9-17 10 Databases........................................................... 10-1 10.1 Overview ...................................................... 10-2 10.2 Database Features ......................................... 10-2 10.3 Setting the Password ...................................... 10-4 10.4 Pipe Schedule Database Editor ......................... 10-5 10.5 Fittings Database Editor .................................. 10-7 10.6 Component Database Editor ............................ 10-8 11 Viewing Data and Results ................................... 11-1 11.1 Overview ...................................................... 11-2 11.2 Components Data........................................... 11-2 11.3 Scenarios Data .............................................. 11-2 11.4 Pipes Data..................................................... 11-3 11.5 Sources Data ................................................. 11-4 11.6 Nodes Data ................................................... 11-4 11.7 Messages ...................................................... 11-5 11.8 Pressure/Flow Summary.................................. 11-8 11.9 Compositions ................................................. 11-8 11.10Physical Properties ......................................... 11-9 11.11Profile..........................................................11-11 11.12Flow Map .....................................................11-12 11.13Scenario Summary ........................................11-13 11.14Sources Summary .........................................11-14 11.15Pipes Summary.............................................11-16 11.16Graph Control ...............................................11-18 11.17Trace Window ...............................................11-29 2 12 PFD..................................................................... 12-1 12.1 Overview ...................................................... 12-2 12.2 Object Inspection ........................................... 12-3 12.3 PFD Toolbar................................................... 12-3 12.4 Installing Objects ........................................... 12-8 12.5 Connecting Objects ........................................ 12-9 12.6 Manipulating the PFD ...................................... 12-9 12.7 Printing and Saving the PFD Image..................12-12 12.8 Changing the PFD View Options.......................12-13 12.9 Copy/Paste objects........................................12-13 13 Printing, Importing and Exporting ...................... 13-1 13.1 Overview ...................................................... 13-2 13.2 Printing......................................................... 13-2 13.3 Import Wizard ............................................... 13-6 13.4 Importing Source Data...................................13-15 13.5 Export Wizard ...............................................13-21 13.6 Export Data Layouts ......................................13-22 13.7 Import/Export Examples ................................13-31 14 Automation......................................................... 14-1 14.1 Overview ...................................................... 14-2 14.2 Objects ......................................................... 14-2 14.3 UniSim Flare Object Reference ........................14-15 14.4 Example – Automation In Visual Basic..............14-41 A Theoretical Basis ..................................................A-1 A.1 Pressure Drop.................................................. A-2 A.2 Vapor-Liquid Equilibrium ................................. A-23 A.3 Physical Properties ......................................... A-27 A.4 Noise............................................................ A-35 B References ...........................................................B-1 C File Format ........................................................... C-1 D C.1 Import/Export Details ....................................... C-2 C.2 FMT Files Format............................................ C-31 Glossary of Terms.................................................D-1 Index.................................................................... E-1 3 Introduction 1-1 1 Introduction 1.1 Introduction .................................................................................. 2 1.1.1 Related Documentation............................................................. 2 1-1 Introduction 1-2 1.1 Introduction The guide provides a detailed description of all the features and functionality within UniSim Flare intended for process and process systems engineers. 1.1.1 Related Documentation Title Content UniSim Flare Getting Started Guide Tutorials covering the basic use of UniSim Flare. 1-2 Interface 2-1 2 Interface 2.1 Overview ....................................................................................... 2 2.2 Terminology .................................................................................. 2 2.3 Menu Bar ....................................................................................... 3 2.4 Toolbar .......................................................................................... 4 2.5 Status Bar...................................................................................... 5 2.6 Editing Data View .......................................................................... 6 2.6.1 Changing Column Width............................................................ 6 2.6.2 Changing Column Order............................................................ 7 2.7 Setting Preferences ....................................................................... 8 2.7.1 General Tab............................................................................. 9 2.7.2 Defaults Tab ...........................................................................10 2.7.3 Databases Tab ........................................................................11 2.7.4 Reports Tab............................................................................12 2.7.5 PFD Tab .................................................................................13 2.7.6 Formatting Tab .......................................................................14 2.7.7 Import/Export Tab...................................................................14 2.8 Windows Menu .............................................................................15 2.9 Help Menu.....................................................................................16 2-1 Interface 2-2 2.1 Overview UniSim Flare is 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 UniSim Flare interface. If you need help with any particular task, the on-line help can give you step-by-step instructions. 2.2 Terminology The terminology used to describe these components throughout this guide is given in the following table. Term Definitions Button Most views contain buttons. They perform a specific action when selected (either by clicking the left mouse button or via the appropriate hot key combination). Icon Icons are like buttons, they perform a specific action when selected (by clicking the left mouse button). Checkbox Data items or settings that have an On/Off status are indicated by checkboxes. Selecting the checkbox will turn it on, selecting it again will turn it off. Data View A window that contains a non-editable view of the model data and/or the calculation results. View A modal window which allows you to enter the model data. You 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. Input Field Data items that are alphanumeric in nature are entered into an input field. In general, the data that is entered in a field is checked for validity before you can continue. Menu Bar The Menu Bar displays all of the program functions, which can be accessed by clicking on the appropriate menu item. This is described in more detail later in the chapter. Modal/Non-Modal View When a view is modal, you cannot access any other element in the simulation until you close it. Non-modal views do not restrict you in this manner. You can leave a non-modal view open and 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 Selector This drop-down list shows the current calculation mode 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. 2-2 Interface 2-3 Term Definitions 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 UniSim Flare 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. 2.3 Menu Bar The menu bar allows access to all the program functions via menus and sub-menus. 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 UniSim Flare 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. 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 process simulator 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). 2-3 Interface 2-4 2.4 Toolbar The Toolbar contains a set of controls which give short-cut access to some of the program functions without the need to navigate through a series of menus and/or sub-menus. Name Icon Description New Case Starts a new case. Open Case Opens a case that has been previously saved to disk. Save Case Saves a case to disk using the current file name. If you want to save the case with a different file name, use the Save As command in the File menu. Print Data and Results Opens a Print view, which allows you to print the entries from the Database, Data and Results groups. You can either print to a printer or to a file. Display Metric Units Displays data and results in Metric units. Display Imperial Units Displays data and results in Imperial units. Display PFD Displays the Process Flow Diagram. Display Pipe Data View Displays the Pipe data view. Display Source Data View Displays the Source data view. Display Node Data View Displays the Node data view. Open Pressure/Flow Summary View Displays the Pressure/Flow Summary view. Open Profile Graphical View Displays the graphical Profile view. Start Calculations Starts the UniSim Flare calculations. Stop Calculations Stops the UniSim Flare calculations. 2-4 Interface 2-5 There are also two drop-down lists in the toolbar: Name Description Calculation Mode Selector This drop-down list selects and displays the current calculation mode. The options are: Rating - It is used to check the existing flare system in a plant. This method calculates the pressure profile for the existing pipe network. Design - It is used to design a new flare system for the plant. During calculation it adjusts the diameters of all pipes until all the design constraints of MABP velocity, etc. have been met. These diameters can be smaller than the initially defined data. Debottleneck - It is used to determine 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. Note: The Toolbar can be hidden by unchecking the Show Toolbar in the Preferences view. 2.5 Status Bar Figure 2.1 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. 2-5 Interface • 2-6 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.6 Editing Data View You can change the position and width of some of the columns in each of the data views such as the Pressure/Flow Summary view. 2.6.1 Changing Column Width 1. To change the width of a column, move the mouse pointer until it is over the vertical column separator line to the right of the column that you want to resize (e.g. Flowrate). The mouse pointer will change to a double-headed arrow. Figure 2.2 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. 2-6 Interface 2-7 2.6.2 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. Figure 2.3 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. Figure 2.4 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-7 Interface 2-8 Figure 2.5 4. The change in column order remains in effect for the duration of the current session and is saved when you exit UniSim Flare. 2.7 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. 2-8 Interface 2-9 2.7.1 General Tab Figure 2.6 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.usf Backup Frequency This field is only accessed if the Timed Backup checkbox is selected. The default value is 10 minutes. Edit Objects On Add On activating this checkbox, the editor view will be displayed as the nodes/pipes are added to the PFD. Units Specify the units set to be used for the simulation. The available unit sets are Metric and British. Work Directory Specify the directory for temporary files, which should be writeable. Auto Flash Source Nodes Activate the Auto Flash Source Nodes checkbox to automatically flash the source fluid when it is edited. Otherwise sources are flashed during the calculation. Display Total Pressure Select this checkbox to display the total pressure, which is a sum of the static pressure and the velocity pressure, instead of the static pressure. Display Velocity Properties Used By Pressure Drop Calculation Select this checkbox to display properties that are velocity dependant based upon the velocities derived from rated flow rather than from the nominal flow. 2-9 Interface 2-10 Options Description 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 Uncalculated Pipes Selecting this option will hide the results for pipes that 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. Save Pipe Results All pipe results will be stored for any successful run. By default this option will be enabled. The user can turn off this option if there are too many scenarios and storing results could make the saved case bulkier. When option is turned off • In a particular scenario if none of the pipes violate any of the constraints (noise, RhoV2, etc.) the pipe results are not stored • If one or more pipes violate user constraints then results of ALL the pipes in the scenario are saved for analysis. 2.7.2 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. Figure 2.7 2-10 Interface 2-11 The options available on this tab are: Options Description Composition Basis Select composition basis for each of the relief sources: Molecular Weight - The molecular weight of the fluid is given. Mole fractions are estimated by UniSim Flare, based upon the list of installed components. Mole/Mass Fractions - A full component-bycomponent composition must be given for the fluid. 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. 2.7.3 Databases Tab The databases for the Components, Pipe Schedules and Pipe Fittings can be specified here. Figure 2.8 2-11 Interface 2-12 If the Save Database Directories With Model checkbox is checked then these locations are stored with the model. This is useful if the databases have been modified for use with specific models. 2.7.4 Reports Tab You can specify the directories in which to save the report definition for each of the entries in the Report list. Figure 2.9 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. 2-12 Interface 2-13 2.7.5 PFD Tab Figure 2.10 The options available on this tab are: Option Description Use Wire Frame Icons When selected, pipe and node icons in the PFD are drawn as wireframe outlines rather than shaded pictures. Selecting this option can speed the drawing of the PFD for large models. After clicking the OK button, the window will update the icon from "non-wireframe" to wireframe" in the PFD. 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 UniSim Flare to scale the PFD when importing models created in earlier versions of UniSim Flare. 2-13 Interface 2-14 2.7.6 Formatting Tab Figure 2.11 The options available on this tab are: Option Description Data Formatting Group Display Using Significant Figures Activate this check box to display all results to a number of 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. 2.7.7 Import/Export Tab You can specify the name and location of the Import and Export definition files to be used when transferring information between UniSim Flare and Access, Excel or XML files. Entries allow specification of the default definition files and the base definition files to be used for 2-14 Interface 2-15 creating new customized import export definition files. Figure 2.12 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. 2.8 Windows Menu This is a general Windows application function. The options are: Option Description Cascade Cascade all currently-open windows. Tile Horizontally Tile all currently-open windows horizontally. Tile Vertically Tile all currently-open windows vertically. Arrange Icons Organize icons at the bottom of the screen. Open All Open all the windows, which can be accessed through the View menu bar Close All Close all windows. 2-15 Interface 2-16 2.9 Help Menu The options under the Help menu are: Option Description Contents Displays the UniSim Flare Help contents. Using Help Displays the UniSim Flare Help contents. Support Opens the Honeywell web page. About Honeywell UniSim Flare... Displays UniSim Flare software version. 2-16 Creating and Saving Cases 3-1 3 Creating and Saving Cases 3.1 Creating a New Case...................................................................... 2 3.2 Opening an Existing Case............................................................... 3 3.3 Saving a Case ................................................................................ 4 3-1 Creating and Saving Cases 3-2 3.1 Creating a New Case When you start UniSim Flare, a new case is automatically created. When you start UniSim Flare, the Desktop area will be blank. Before you can work, you must either create a new case, or retrieve a saved case. 1. To start a new case, do one of the following: • Select New from the File menu in the menu bar. • Use the hot key combination alt f n. • Click on the New Case icon in the toolbar. The Case Description view will be displayed. Figure 3.1 Enter appropriate data into the User Name, Job Code, Project, and Description fields and then click the OK button. Note: The case description can be modified later by selecting Description from the File menu. 3-2 Creating and Saving Cases 3-3 2. After you enter the case description information, the Component Manager view appears as shown in the figure below: Figure 3.2 3. Select the desired components as described in Components and click OK. You can now set up the simulation. 3.2 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: • Select Open from the File menu. • Use the hot key combination alt f o. • Click the Open Case icon on the toolbar. 2. The File Open view appears. 3. Select the file to be opened by doing one of the following: • Type the filename (including exact directory path if necessary) into the Filename field and click the OK button. • Search the directory using the Look in drop-down menu and upon finding the file, click once on the file name to highlight it and then click the OK button. • Search the directory using the Look in drop-down menu and upon finding the file, double click the file name. 4. It is also possible to open a recently used file by selecting it from the list at the bottom of the File menu. 3-3 Creating and Saving Cases 3-4 5. Drag and drop an existing case from the explorer view to application. A second case can be opened by drag and drop after minimizing the PFD view of the case that is already open. A second case cannot be dragged and dropped over the PFD view of an another case. 3.3 Saving a Case Cases may either be saved using the current case name or under a new name. 1. To save a case using the current file name, do one of the following: • Select Save from the File menu. • Use the hot key combination alt f s. • Click on the Save Case icon on the toolbar. 2. To save a case using a new name, do one of the following: • Select Save As from the File menu. • Use the hot key combination alt f a. 3. When you're saving the case for the first time or with a new name, the Save UniSim Flare Model view will appears. 4. Select the file to be saved by directly entering it, or selecting the appropriate file from the list in the view which contains all the files and folders. The Save in drop-down list can be used to change the directory and/or drive. 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.usf extension. UniSim Flare will add it on automatically.Cases prior to release R460 used .ufnw as extension. You will be asked to confirm that you want to overwrite if an existing file is named. 3-4 Components 4-1 4 Components 4.1 Overview ....................................................................................... 2 4.2 Selecting Components ................................................................... 2 4.2.1 Component Types .................................................................... 2 4.2.2 Component List ....................................................................... 3 4.2.3 Matching the Name String ......................................................... 3 4.2.4 Removing Selected Components ................................................ 4 4.3 Adding/Editing Components .......................................................... 4 4.3.1 Add Hypothetical Component/Edit Component View ...................... 5 4.3.2 Identification Tab ..................................................................... 5 4.3.3 Editing Database Components ................................................... 8 4.3.4 Estimating Unknown Properties.................................................. 8 4.3.5 Organizing the Component List .................................................. 9 4.3.6 Move Single Component............................................................ 9 4.3.7 Swapping two components ........................................................ 9 4.3.8 Changing the Components ........................................................ 9 4.3.9 Combining Components ...........................................................10 4.4 Binary Interaction Parameters .....................................................10 4-1 Components 4-2 4.1 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: Figure 4.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. 4.2 Selecting Components 4.2.1 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 4-2 Components 4-3 Invert button, then these two options would be turned off, and the remaining options would be turned on. 4.2.2 Component List Components can be chosen from the Database list, and added to the Selected group, using one of the following methods: • • • • Arrow Keys - use the arrow keys to move the highlight up or down one component. PageUp/PageDown - Use these keyboard keys to advance an entire page forward or backward. Home/End - The <Home> key moves to the start of the list and the <End> key moves to the end of the list. Scroll Bar - With the mouse, use the scroll bar to move up and down through the list. 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 doubleclicking on it or clicking the Add button. 4.2.3 Matching the Name String The interpretation of your input is limited to the Component Types which are checked. Another way to add components is through the Selection Filter feature. The Selection Filter cell accepts keyboard input, and is used to locate the component(s) in the current list that best matches your input. You may use wildcard characters as follows: • • • ? - Represents a single character. * - Represents a group of characters of undefined length. Any filter string has an implied '*' character at the end. 4-3 Components 4-4 Some examples are shown here: 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 methan methanol, methane, etc. *anol methanol, ethanol, propanol, etc. ?-propanol 1-propanol, 2-propanol *ane methane, ethane, propane, i-butane, etc. 4.2.4 Removing Selected Components You can remove any component from the Selected Component list: You can select multiple components using shift-click and ctrl-click options. 1. Highlight the component(s) you want to delete. 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. 4.3 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. 4-4 Components 4-5 4.3.1 Add Hypothetical Component/Edit Component View Upon clicking either the Hypothetical button or the Edit button the Component Editor view opens up. 4.3.2 Identification Tab The minimum data requirements for creating a component are specified here: Figure 4.2 Component Types: • • • • • • • • • • • • Hydrocarbon Miscellaneous Amine Alcohol Ketone Aldehyde Ester Carboxylic Acid Halogen Nitrile Phenol Ether 4-5 Components 4-6 The following fields are available on this tab: Input Field Description Name An alphanumeric name for the component (e.g. - Hypo -1). Up to 15 characters are accepted. Type The type of component (or family) can be selected from the dropdown menu provided. There is a wide selection of families to choose from, which allows better estimation methods to be chosen for that component. ID The ID number is provided automatically for new components and cannot be edited. Mol. Wt. The molecular weight of the component. Valid values are between 2 and 500. NBP The normal boiling point of the component. Std. Density The density of the component as liquid at 1 atm and 60 F. Watson K The Watson characterization factor. Critical Tab Critical properties are specified here. Figure 4.3 The following fields are available on this tab: Input Field Description Critical Pressure The critical pressure of the component. If the component represents more than a single real component, the pseudo critical pressure should be used. Valid values are between 0.01 bar abs and 500 bar abs. Critical Temp. The critical temperature of the component. If the component represents more than a single real component, the pseudo critical temperature should be used. Valid values are between 5 K and 1500 K. Critical Volume The critical volume of the component. If the component represents more than a single real component, the pseudo critical volume should be used. Valid values are between 0.001 m3/kg and 10 m3/kg. 4-6 Components 4-7 Input Field Description Acentric Factor The acentric factor of the component. Valid values are between -1 and 10. Acentric Factor (SRK) The Soave-Redlich-Kwong acentric factor of the component (also called the COSTALD Acentricity). Other Tab Coefficients for the polynomial equations for the prediction of Ideal Gas thermodynamic properties and parameters for the viscosity calculations are specified here: Figure 4.4 The following fields are available on this tab: Input Field Hi _ A, Hi _ B , Hi _C , H i _ D , H i _ E and H i _ F Description The coefficients for the component ideal gas enthalpy versus temperature equation: H i H i _ A H i _ BT H i _ C T 2 H i _ DT 3 H i _ E T 4 H i _ F T 5 Entropy Coef. The coefficient for the component entropy equation. Viscosity A and Viscosity B Viscosity coefficients used in the NBS Method (Ely and Hanley, 1983). Heat of Combustion and Lower Flammability Limit Heat of Combustion and Lower Flammability limit values are used for Flare radiation calculations. For database components the values are made available while for Hypothetical components the user needs to provide data. 4-7 Components 4-8 4.3.3 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. Figure 4.5 In order to update the data for a database component it must first be changed to a hypothetical component. At the very minimum, you need to specify the Molecular Weight. However, it is a good practice to specify at least two of the following properties: • • • Molecular Weight Normal Boiling Point Standard Density This is done by clicking the Hypothetical button on the Component Editor view. UniSim Flare will convert the displayed database component to a hypothetical as indicated by the adding of a * character to the name and by changing the component ID to -1. The data values can then be updated. 4.3.4 Estimating Unknown Properties If any of the above data is unknown, then click Estimate to fill-in the unknown properties. 4-8 Components 4-9 Supply as many properties as are known, so that the estimation can be as accurate as possible. 4.3.5 Organizing the Component List The Selected Components list can be organized in the following different ways. Sorting the Component List The Sort button allows the whole component list to be sorted by the criteria selected from the following pop up list: Sorting Option Description Name Arranged components alphabetically in descending order. Molecular Weight Components are listed according to increasing molecular weight. Normal Boiling Point (NBP) Select this to arrange components in increasing NBP value. Group Group the components by type. 4.3.6 Move Single Component A single component may be moved up and down the list by clicking on it in the list of selected components and then clicking either the up or down arrow buttons. 4.3.7 Swapping two components In the Component Manager view, select the first component in the Selected Component list by clicking on it. Then select the second component either using the SHIFT key if the two are in sequence or pressing the ctrl key and then clicking on the component. Swap the two components by clicking the Swap button. 4.3.8 Changing the Components You can switch the components in the Selected Component list with the ones in the Database list while maintaining the source mole fractions. 4-9 Components 4-10 In the Component Manager view, select the components in both the Selected Components and the Database lists. Click the Change button to switch the two components. 4.3.9 Combining Components Multiple components can be combined and represented by a single component to reduce the number of components in the model. This is done by selecting the components you want to combine by control-clicking them in the Selected Components list and then clicking the Combine button. A pop-up view will then ask you to select which of these combined components should be used as the target component to combine 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. 4.4 Binary Interaction Parameters Binary Interaction Coefficients, often known as KIJ's are factors that are used in equations of state to better fit the interaction between pairs of components and hence improve the accuracy of VLE calculations. UniSim Flare allows the user to specify binary interaction parameters for the Peng Robinson and Soave Redlich Kwong VLE methods or to estimate them through the Binary Coeffs tab of the Component 4-10 Components 4-11 Manager view as shown here. Figure 4.6 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 estimate the BIP using Estimate button and set BIP to 0 for using Zero HC-HC button. When these buttons are used with multiple selected entries, all the selected BIPs will be impacted. 4-11 Components 4-12 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-12 Groups 5-1 5 Groups 5.1 Overview ....................................................................................... 2 5.2 Group Manager .............................................................................. 2 5.3 Adding/Editing Groups .................................................................. 3 5.4 Associating Sources to Groups....................................................... 5 5-1 Groups 5-2 5.1 Overview Group is a logical grouping of all or few of the relieving sources in a particular Section, Unit or Process of a Plant. Grouping of relieving sources helps in quickly creating multiple derived scenarios from the Base scenario. These derived scenarios are called Child scenarios which includes different combination of Groups and their specified loads. See Section 6 - Scenarios for more information. 5.2 Group Manager Groups are managed via the Group Manager view. This view has buttons that allow you to add, edit or delete Groups. To access Group Manager view, select Groups from the Build menu. Figure 5.1 The following buttons are available in Groups Manager: Button Description Add Allows you to add a new Group. Edit Allows you to edit the selected Group. Delete Allows you to remove the selected Group. Sort Sort the Groups list alphabetically. Up and Down Arrow Move the selected groups up and down the list. 5-2 Groups Button Description Swap Swap the two selected Groups in the list. OK Closes the view. 5-3 5.3 Adding/Editing Groups To add a Group, click the Add button on the Group Manager view and Group Editor page opens up. Group Editor will list all the available Sources in the flowsheet under Unassigned Sources field. Figure 5.2 1. Select the Source from the Unassigned Sources list and click Add button. Selected Source will move to Assigned Sources list. Add button gets highlighted when one or more Sources are selected 5-3 Groups 5-4 from the Unassigned Sources list. 2. To remove a source from the group, select the Source from the Assigned Sources list and click Remove button. Selected Source will move to Unassigned Sources list. Remove button gets highlighted when one or more sources are selected from the Assigned Sources list. Figure 5.3 3. Click OK to close the Group Editor. Added Group can be seen in the Group manager. Figure 5.4 5-4 Groups 5-5 4. If another Group is added, Group Editor will show only those Sources in Unassigned Sources list which are not part of previous Group. Figure 5.5 Note: One source cannot be a part of two Groups. 5.4 Associating Sources to Groups Sources can be associated to Groups in multiple ways. • • • • Group Manager view (See Section 5.3 - Adding/Editing Groups for more details) Source Editor view connection page Source Data view Nodes Data view 5-5 Groups 5-6 From Source Editor view: Figure 5.6 A Source can be mapped to a different Group by selecting appropriate Group from the dropdown. From Sources Data View: Go to View menu in the toolbar and select Data-Sources. Figure 5.7 5-6 Groups 5-7 From Nodes Data View: Go to View menu in the toolbar and select Data-Nodes. Figure 5.8 5-7 Scenarios 6-1 6 Scenarios 6.1 Overview ....................................................................................... 2 6.2 Scenario Manager .......................................................................... 2 6.3 Adding/Editing Scenarios .............................................................. 4 6.3.1 General Tab............................................................................. 5 6.3.2 Constraints Tab........................................................................ 6 6.3.3 Sources Tab ............................................................................ 7 6.3.4 Estimates Tab.......................................................................... 8 6.4 Adding Child Scenarios .................................................................10 6.5 Scenario Tools ..............................................................................13 6.5.1 Adding Single Source Scenarios ................................................13 6-1 Scenarios 6-2 6.1 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: If the association of relief valve to the groups is modified, then previously generated child scenarios become void. To see the impacts of modification, User has to regenerate the child scenarios from Multiple Scenario configurator. • • • • Plantwide power failure. Plantwide cooling medium or instrument air failure. Localized control valve failure. Localized fire or Depressurization. The scenario management features within UniSim Flare allow you to simultaneously design and rate the header system for all of the possible relief scenarios. Rating or Designing Flare headers based on worst case out of these typical scenarios could be expensive. Running a combination of scenarios with optimized relieving load shall help in deciding the optimum header design or correctly rate the existing Flare system. These Scenarios, also called Child Scenario, shall be created by first grouping the relieving sources in to different Groups and then using these groups in different combinations along with relieving load specifications. For more information refer to Section 5 - Groups. 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. 6.2 Scenario Manager 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. 6-2 Scenarios 6-3 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. Figure 6.1 The Scenario Manager view displays all Scenarios in the case, and indicates the Current Scenario. Several buttons are available: Button Description Add Adds a new scenario. Edit Edits the highlighted scenario. Delete Removes the selected scenario. There must always be at least one scenario in the case. Sort Arrange the scenario list alphabetically. Up and Down Arrow Move the selected scenario up and down the Scenario list. Swap Swap the two selected scenarios in the list. Current To make a scenario the current one, select the appropriate scenario, and then click on the Current button. Multiple Scenario Configurator Generating multiple Scenarios (Child Scenarios) from Base scenario. Invert Child Scenario Selection Inverts All the Child Scenarios to either checked or Unchecked. OK Closes the Scenario Manager view. 6-3 Scenarios 6-4 1. Child Scenarios are created from the Base Scenarios using Multiple Scenario Configurator button. 2. Edit/Delete/Sort/ Up and Down Arrow/ Swap buttons work only when the checkboxes for Base Scenario or Child Scenarios are selected. 3. When Add button is clicked, Clone Scenario Form page open up. Selecting one of the listed scenario opens up the Scenario Editor page. Figure 6.2 4. If user does not want to add any scenario, press Esc button to go back to Scenario Manager window. 6.3 Adding/Editing Scenarios UniSim Flare 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. 6-4 Scenarios 6-5 Using Scenario Manager, a user can create Base Scenarios as well as Child Scenarios. Base Scenarios are created using Add button. Child Scenarios are created by selecting one of the Base Scenarios and then clicking Multiple Scenario Configurator button. Ensure groups are already created in Group manager. For more details on how to configure Child Scenarios refer to Section 6.4 - Adding Child Scenarios. To edit a scenario, either Base or Child, 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. Note: Source data can be changed only for Base scenarios and corresponding Child scenarios will get updated automatically. 6.3.1 General Tab You may provide the following information on the General tab: Figure 6.3 6-5 Scenarios 6-6 Data Description Name An alphanumeric description of the scenario (e.g. Power Failure). Up to 40 characters are accepted. System Back Pressure The system back pressure at the flare tip exit. This will normally be atmospheric pressure, but can be set to represent system design conditions at the exit point. If left empty, the value on the Calculation Options Editor view will be used. The minimum value is 0.01 bar abs. 6.3.2 Constraints Tab This tab requires the following information for both headers and tailpipes. Figure 6.4 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 Number The maximum allowable Mach number for all pipe segments. Calculated values that exceed this number will be highlighted in the results. Vapor Velocity The maximum allowable vapor velocity. Calculated velocities that exceed this value will be indicated in the results. Liquid Velocity The maximum allowable liquid velocity. Calculated velocities that exceed this value will be indicated in the results. 6-6 Scenarios 6-7 Data Description 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. Base the constraint checking on Phase superficial velocity If checked, the velocity constraint checking is based on the phase superficial velocities. If unchecked, the constraint checking is based on the overall superficial velocity. Perform constraint checking based on 0 Barg properties(Vel ocity/Mach Number/Rho V2) If checked, scenario constraint checking will be performed against the zero gauge pressure velocity properties (Velocity/Mach Number/ Rho V2) in addition to constraint checking against the actual properties at flowing conditions. This checkbox will not be visible if the Calculate Velocity at 0 Barg for pipes option in Calculation Options is unchecked. 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. 6.3.3 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 6-7 Scenarios 6-8 shown in Figure 6.5. All sources are displayed on this tab. Figure 6.5 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. 6.3.4 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 Structural Analyser 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 analyser is used. When the Convergent structural analyser is used, the Molar Flow column recommends a tear location and initial value for the flow at the tear location. If the structural analyser does find that the pipe may be a valid tear location then this value is ignored. When the Simultaneous structural analyser is used, the Molar Flow column is used to seed the analyser. This value will always impact the initialization as long as the structural analysis succeeds but the pipe will 6-8 Scenarios 6-9 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. Figure 6.6 Since the Simultaneous structural analyser generally offers better performance than the Convergent analyser it will rarely be necessary to specify information on the Estimates tab other than for the purpose of improving the speed of convergence of the model. In the event that a model proves problematic to converge, a number of additional columns are available to tune the convergence algorithms. These may be exposed by stretching the view horizontally. Figure 6.7 6-9 Scenarios 6-10 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 3 3 Force Convergent Levenberg-Marquardt Conjugate Gradient Minimization Quasi-Newton Minimization 6.4 Adding Child Scenarios Child Scenarios are created for a base scenario by selecting Groups and specifying Base Load and Alternate Load. This option is intended to help the user to quickly create multiple Child scenarios. 1. In Scenario Manager, Multiple Scenario Configurator button enables configuration of Child scenarios. User needs to select one or more of the Base Scenarios to enable this button. Figure 6.8 6-10 Scenarios 6-11 2. Clicking on Multiple Scenario Configurator button takes user to Scenario creation view. The view is populated with list of Groups as row entries with the Base scenario name in the Column. Figure 6.9 3. Additional number of columns will be populated if more than one Base scenarios are selected in the Scenario Manager and Multiple Scenario Configurator button is clicked. Figure 6.10 4. Select Groups that will be part of Base scenario. See Section 5 for more information on Groups. 5. In a Child scenario, one of the Group will run at Base Load and other Groups will run at Alternate Load. 6. User can change the base load and Alternate Load to be considered for Child scenarios. Default value is 100% and 50% respectively. 6-11 Scenarios 6-12 7. Generate Scenarios button is enabled if there are minimum of 2 groups are selected in the list. 8. Click on Generate Scenario button to generate multiple Child scenarios. Note: Child scenarios can be selected and cloned as Base scenario. 9. If Group checkbox is not selected for specific Base scenario. The sources mapped to this Group will run at 100% of mass flow of Base scenario for all Child scenarios. 10. Scenario naming Convention would be BaseScenarioName_BaseLoad_GroupName_Alternateload. e.g. if Default Scenario (Base scenario) is selected as Base scenario and CDU and VDU are two Groups with Base Load of 100% and Alternate Load of 50%, 2 child scenarios with the names as shown in below figure would be created. They will be shown like Child scenarios of Default Scenario. Figure 6.11 - Base Scenario Name is required for easy identification Group Name indicates what are the sources having Base Load and Alternate Load. - Base Load - & Alternate Load- These are tagged to the naming convention for situations when user wants to experiment and change the base load or Alternate load. - Sources which are not associated to any Group will run with same flow rate as that of the corresponding Base scenario mass flow rate. 11. Enabling Check box for Base scenario will enable all related Child scenarios. This facilitates bulk deletion of child scenarios. 6-12 Scenarios 6-13 12. The Scenario Manager view has checkbox corresponding to each Child scenario to facilitate unselect/select. The checkbox shall help user to Sort/Edit/Swap the scenarios. 13. If Invert child scenario selection is clicked, all the Child scenarios in the scenario list are unselected/selected. If a Base scenario is selected, it is retained. 6.5 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. 6.5.1 Adding Single Source Scenarios Select Add Single Source Scenarios from the Tools menu or use the hot key combination alt t n. This will analyze your model and add a scenario for each source that has a non-zero flow rate defined in at least one scenario. Source data will be copied from the scenario in which it has the highest flow rate. 6-13 Pipe Network 7-1 7 Pipe Network 7.1 Pipe Manager................................................................................. 2 7.2 Ignoring/Restoring Pipes .............................................................. 2 7.2.1 Connections Tab....................................................................... 4 7.2.2 Dimensions Tab ....................................................................... 5 7.2.4 Heat Transfer Tab..................................................................... 8 7.2.5 Methods Tab...........................................................................10 7.2.6 Summary Tab .........................................................................13 7.2.7 Multiple Editing .......................................................................14 7.2.8 Pipe Class Editor .....................................................................15 7-1 Pipe Network 7-2 The pipe network comprises a series of interconnected pipes. These pipes can be added, edited and deleted from the Pipe Manager. 7.1 Pipe Manager To access the Pipe Manager, select Pipes from the Build menu. Figure 7.1 The following buttons are available: Button Description Add Adds a new pipe. This new pipe will be named with a number depending upon the number of pipes already added. Edit Allows you to edit the currently highlighted pipe. Delete Allows you to remove the currently highlighted pipe. Sort Sort the pipes list alphabetically (in descending order) either by name or location. Up and Down Arrow Move the highlighted pipes up and down the list. Swap Swap the two selected pipes in the list. OK Closes the view. 7.2 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 7-2 Pipe Network 7-3 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. Figure 7.2 To restore a pipe that has previously been ignored: 1. Open the pipe editor view of the pipe that you want to restore. 2. On the Connections tab, deactivate the Ignore checkbox. 7-3 Pipe Network 7-4 7.2.1 Connections Tab The name of the pipe segment and connectivity information is specified here. Figure 7.3 The following fields are available on this tab: Input Data Description Name An alphanumeric description of the pipe segment. Location An alphanumeric description of the location within the plant for the segment. This is a useful parameter for grouping pipes together via the Sort command. Upstream Node This is the name of the node upstream of the pipe. The drop-down list allows you to select from a list of existing unconnected nodes in the model. Alternatively the name of a new node can be entered. If this is done you will be asked to specify the type of node through a pop-up list when you move to the next entry. Downstream Node This is the name of the node downstream of the pipe. The dropdown list allows you to select from a list of existing unconnected nodes in the model. Alternatively the name of a new node can be entered. If this is done you will be asked to specify the type of node through a pop-up list when you move to the next entry. Tailpipe This drop-down list allows you to select whether the pipe should be treated as a tailpipe. If set to Yes and the Rated Flow for Tailpipes calculation option is selected in the Calculation Options view, the pressure drop for this pipe will be calculated using the rated flow in place of the relieving flow rate. Ignore This checkbox may be selected to remove the pipe from calculations temporarily. When selected the pipe and all upstream nodes and pipes will be ignored during calculations. 7-4 Pipe Network 7-5 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 STD 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. 7.2.2 Dimensions Tab The physical dimensions and characteristics of the pipe segment are specified here. Figure 7.4 The following fields are available on this tab: Input Data Description Length The physical length of the pipe segment. This length is used in association with the fittings loss coefficients to calculate the equivalent length of the pipe. If you have equivalent length data for your network, enter this data here as the sum of the actual length plus the equivalent length of the fittings and enter zero for the fittings loss coefficients. Elevation Change A positive elevation indicates that the outlet is higher than the inlet. 7-5 Pipe Network 7-6 Schedule Numbers: Carbon Steel: 10, 20, 30, 40, 60, 80, 100, 120, 140, 160, STD, XS, XXS 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 Conductivity The thermal conductivity of the pipe wall. This is used by the heat transfer calculations when these are enabled. Nominal Diameter The nominal pipe diameter used to describe the pipe size. For pipes with a nominal diameter of 14 inches or more, this will be the same as the outside diameter of the pipe. Schedule Number If a pipe nominal diameter other than "-" is selected, you will be able to select a schedule number 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 schedule number from the pipe databases and you will then have to specify both the internal diameter and wall thickness for the pipe. Internal Diameter The pipe diameter used for the pressure drop calculations. Wall Thickness The thickness of the pipe wall. Valid values are any positive number or zero. Pipe Class and Sizeable dropdown list If you want the pipe segment to be resized by sizing calculations, the Sizeable option should be set to Yes. You might set the 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. 7.2.3 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 7-6 Pipe Network 7-7 the physical length of the pipe segment. Figure 7.5 The following fields are available on this tab: Input Data Description Length Multiplier The length of the pipe is multiplied by this value to determine the equivalent length used for the pressure drop calculation. If left blank then the value on the Calculation Options Editor is used. This option is useful for making an allowance for bends and other fittings if these are not known. Fittings Loss The fittings "K" factor is calculated from the following equation in which Ft is the friction factor for fully developed turbulent flow: K = A + BFt Valid values are any positive number or 0. External HTC This is the outside heat transfer coefficient. 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 7-7 Pipe Network 7-8 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. 7.2.4 Heat Transfer Tab The pipe segment may perform calculations taking into account heat transfer with the external air. Figure 7.6 The following fields are available on this tab: Input Data Description External Conditions Group External Medium Select the external medium. Two options are currently available 1. Air & 2. Sea Water Temperature Enter the temperature of the external air. If this field is left blank then the global value set via the Calculation Options view is used. External Medium Velocity Enter the velocity of the external medium. If this field is left blank then the global value set via the Calculation Options view is used. 7-8 Pipe Network 7-9 Input Data Description Heat Transfer Enabled This drop-down list selects whether heat transfer calculations are to be performed for the pipe. Furthermore, setting only enables heat transfer calculations if the Enable Heat Transfer option is also selected in the Calculation Options view. External Radiative HTC This drop-down list selects whether or not the external Radiative heat transfer coefficient is included within the heat transfer calculations Emissivity Enter the fractional Emissivity to be used for Radiative heat transfer calculations. Multiple Element Calculation This drop-down list selects whether the heat transfer calculation is done using a single element or the same number of elements as the pressure drop calculation. If Yes is selected then the heat transfer calculation uses the same number of elements as the pressure drop calculation. Insulation Group Description A brief description to identify the type of pipe insulation. Thickness Supply the insulation thickness. Thermal Conductivity Enter the insulation thermal conductivity. Heating Group Outlet Temp You can explicitly set an outlet temperature for this segment, or leave it blank. A heater in a flare knockout drum is an example of process equipment that may require a fixed outlet temperature. Valid values are between -260oC and 999 oC. Duty Enter the heating duty and the outlet temperature will be calculated based on the inlet temperature and the defined duty. 7-9 Pipe Network 7-10 7.2.5 Methods Tab Calculation methods are specified on this tab. Figure 7.7 When you are sizing a UniSim Flare system, the initial pipe diameters may affect the solution when there is a liquid phase and the liquid knockout drum is modeled. You should initially size a network using vapor phase methods. The following fields are available on this tab: Input Field Description VLE Method Group VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows (see Appendix A - Theoretical Basis for more details): Compressible Gas - Real Gas relationship Peng Robinson - Peng Robinson Equation of State Soave Redlich Kwong - Soave Redlich Kwong Equation of State Vapor Pressure - Vapor Pressure method as described in API Technical Data Book Volume 113. Model Default - If this is selected, the Default method for the VLE method (as defined on the Calculation Options Editor view) will be used. 7-10 Pipe Network Input Field 7-11 Description Pressure Drop Group Horizontal and Inclined Pipes The options are: Isothermal Gas - This is a compressible gas method that assumes isothermal expansion of the gas as it passes along the pipe. UniSim Flare 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 Section 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 Section 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. 7-11 Pipe Network Input Field Vertical Pipes 7-12 Description The options are: Isothermal Gas - This is a compressible gas method that assumes isothermal expansion of the gas as it passes along the pipe. UniSim Flare uses averaged properties of the fluid over the length of the pipe. The outlet temperature from the pipe is calculated by adiabatic heat balance either with or without heat transfer. Pressure losses due to change in elevation are ignored. Adiabatic Gas - This is a compressible gas method that assumes adiabatic expansion of the gas as it passes along the pipe. As with the Isothermal Gas method, pressure losses due to changes in elevation are ignored. Beggs & Brill - Although the Beggs and Brill method was not originally intended for use with vertical pipes, it is nevertheless commonly used for this purpose, and is therefore included as an option for vertical pressure drop methods. For more details, see Section A - Theoretical Basis. Dukler - Although the Dukler method is not generally applicable to vertical pipes, it is included here to allow comparison with the other methods. Orkiszewski - This is a pressure drop correlation for vertical, two-phase flow for four different flow regimes bubble, slug, annular-slug transition and annular mist. For more details, see Section A - Theoretical Basis. Lockhart Martinelli - Lockhart Martinelli correlations models the two phase pressure drop in terms of a single phase pressure drop multiplied by a correction factor. Acceleration changes are not included. Beggs and Brill (No Acc.) - The Beggs and Brill methods without the acceleration term. Beggs and Brill (Homog.) - The Beggs and Brill methods with a homogeneous acceleration term. Model Default - If this is selected, the Default method for the Vertical method (as defined on the Calculation Options Editor view) will be used. Two Phase Elements For two-phase calculations, the pipe segment is divided into a 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 nonlinearity 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. Friction Factor Method The Friction Factor Method applies only when you have entered a value for friction factor. The options are: Round - This method has been maintained primarily for historical purposes in order for older UniSim Flare 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 Downflow Head Recover The Elevation Pressure change may be ignored for downflow (negative elevation change). 7-12 Pipe Network Input Field 7-13 Description Solver Group Damping Factor The damping factor used in the iterative solution procedure. If this is left blank, the value in the Calculation Options Editor view is used. 7.2.6 Summary Tab The results of the calculation are displayed. Figure 7.8 Acoustic induced vibration quantified as Sound power level is displayed at pipe ends. The parameters are intended to be deployed as a basic screening mechanism to access acoustic fatigue in pipelines. The screening is in accordance with API 521 Sixth Edition Section 5.5.12. The sound power level at the pipe ends are calculated based on sound power level generated at the source (control and relief valve), pressure reducing device in the pipe line (orifice) and attenuation of sound along the length of the pipe. The calculated values that are higher than 155dB are compared against the allowable sound power level based on Carucci/Mueller design curves. In design mode of operation, calculations attempt to increase thickness and pipe diameter iteratively till calculated sound power level is less than the design curve limits. It is to be noted that this should be considered as a guideline and not as a design tool to mitigate Acoustic 7-13 Pipe Network 7-14 fatigue Refer to Section 8.3.5 - Tee for acoustic fatigue reporting in Tee connections. 7.2.7 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 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. Figure 7.9 7-14 Pipe Network 7-15 7.2.8 Pipe Class Editor The Pipe Class Editor allows you to edit the allowable schedules for each nominal diameter, for both Carbon Steel and Stainless Steel, during sizing calculations. It also allows you to restrict the range of pipe sizes that may be selected by UniSim Flare during design calculations. To access the Pipe Class Editor, select Pipe Class from the Tools menu. Figure 7.10 Note: If you have selected Use Pipe Class When Sizing in the Run Options view, these are the schedules which will be used. 7-15 Nodes 8-1 8 Nodes 8.1 Node Manager................................................................................ 2 8.2 Ignoring/Restoring Nodes............................................................. 3 8.3 Connection Nodes .......................................................................... 4 8.3.1 Connector ............................................................................... 4 8.3.2 Flow Bleed .............................................................................. 7 8.3.3 Horizontal Separator................................................................10 8.3.4 Orifice Plate ...........................................................................15 8.3.5 Tee .......................................................................................19 8.3.6 Vertical Separator ...................................................................24 8.4 Boundary Nodes ...........................................................................29 8.4.1 Control Valve..........................................................................29 8.4.2 Relief Valve ............................................................................38 8.4.3 Source Tools...........................................................................48 8.4.4 Flare Tip ................................................................................48 8-1 Nodes 8-2 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. 8.1 Node Manager 1. To access the Node Manager, select Nodes from the Build menu. Figure 8.1 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 Down Arrow Move the highlighted nodes up and down the list. Swap Swap the two selected nodes in the Node list. OK Closes the view. 8-2 Nodes 8-3 8.2 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. Figure 8.2 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. 8-3 Nodes 8-4 8.3 Connection Nodes The following types of connection nodes are available in UniSim Flare. A connection node is one that links two or more pipe segments. • • • • • • Connector Flow Bleed Horizontal Separator Orifice Plate Tee Vertical Separator. 8.3.1 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. Figure 8.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. 8-4 Nodes 8-5 The following fields are available on this tab: Field Description Name The alphanumeric description of the node (e.g. - HP Connect 1). Location You may want to specify the location of the node in the plant. Upstream/ Downstream Either type in the name of the pipe segment or select from the dropdown list. At You can specify the end of the pipe segment attached to the connector. Ignore Select the ignore checkbox to ignore this connector in the calculations. Clear the checkbox to re-enable it. Calculations Tab Calculation methods are specified here. Figure 8.4 The following fields are available on this tab: Field Description Theta Specify the connector expansion angle. If not defined, it will be calculated to the length. Length Enter the connector length. If not defined, it will be calculated from theta. Fitting Loss Method The available options are: Equal Static Pressure – Pressure drop calculation is ignored and static pressure is balanced. Calculated – Pressure drop is calculated in accordance with the Swage method. 8-5 Nodes 8-6 Field Description Isothermal Pressure Drop If this option is set to Yes, the inlet temperatures used for the size change calculations in the connector will not update during iterative calculations for pressure loss i.e. a PT flash will be used to update the inlet properties. If the option is set to No then a more rigorous PH flash will be used to update the inlet properties. The connector will do one size change calculation between the inlet and outlet diameters selecting expansion or contraction as appropriate. Setting this option to Yes can speed up calculations in some cases at cost of a minor loss of accuracy. Swage Group Two Phase Correction Swage Method If this option is set to Yes then the pressure loss coefficient in 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. 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 Balance Total Pressure - Static pressure is calculated for the flow with Total pressure same across the swage. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. Summary Tab The result of the calculations at each of the pipe connections is 8-6 Nodes 8-7 displayed. Figure 8.5 8.3.2 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 8-7 Nodes 8-8 here. Figure 8.6 The following fields are available on this tab: Field Description Name The alphanumeric description of the Flow Bleed (e.g. - HP Connect XX). Location You may want to specify the location of the Flow Bleed in the plant. Upstream/ Downstream Either type in the name of the pipe segment or select from the dropdown list. At You can specify the end of the pipe segment attached to the Flow Bleed. Ignore Select the ignore checkbox to ignore this flow bleed in the calculations. Clear the checkbox to re-enable it. 8-8 Nodes 8-9 Calculations Tab Calculation methods are specified here. Figure 8.7 The following fields are available on this tab: Field Description Offtake Multiplier Specify the Offtake multiplier. The default value is 0. Offtake Offset Specify the Offset for the Offtake to compensate for the changes in the inlet flow. Offtake Minimum Specify the minimum value for the Offtake. Offtake Maximum Specify the maximum value for the Offtake. Pressure Drop Enter the pressure drop across the Flow Bleed. Summary Tab The result of the calculations at each of the pipe connections is 8-9 Nodes 8-10 displayed. Figure 8.8 8.3.3 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 UniSim Flare, the Horizontal Separator has one primary inlet, one secondary inlet/ outlet, and one vapor outlet stream. Horizontal Knock out drum sizing procedure (Section 5.4.2.1 (API STD 521)): The final result of the sizing procedure is the length of the knockout drum. This is a function of the flow rate upstream of the drum, conditions (P, T and vapor fraction) in the drum, physical properties of the fluid, average droplet size in the flashing fluid as well as the diameter and liquid level in the drum. Droplet size, diameter and liquid level are user inputs. Connections Tab The name of the horizontal separator and connectivity information is 8-10 Nodes 8-11 specified here. Figure 8.9 You only need to provide 2 of 3 connections to be able to solve the separator. This allows for solution(s) to partially built networks. The following fields are available on this tab: Field Description Name The alphanumeric description of the Horizontal Separator (e.g. - HP KO Drum). Location You may want to specify the location of the Horizontal Separator in the plant. 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. Primary Inlet/ Secondary Inlet/Vapor Outlet Either type in the name of the pipe segment or select from the drop-down list. At You can specify the end of the pipe segment attached to the horizontal separator. Ignore Select the ignore checkbox to ignore this horizontal separator in the calculations. Clear the checkbox to reenable it. 8-11 Nodes 8-12 Calculations Tab Calculation methods are specified here. Figure 8.10 The following fields are available on this tab: Field Description Diameter The internal diameter of the vessel. Liquid Level The liquid level in the vessel. Pressure drop is calculated based upon the vapor space above the liquid. Methods Group Fittings Loss Method The available options are; Equal Static Pressure – Pressure drop calculation is ignored and static pressure is balanced. Calculated – Ignore Vena Contracta – Pressure drop is calculated in accordance with the Swage method but ignores the loss due vena contracta. Calculated – Pressure drop is calculated in accordance with the Swage method including the loss due vena contracta. Isothermal Pressure Drop If this option is set to Yes, the inlet temperatures used for the size 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 horizontal separator does three size change calculations, one between each stream connection and the vessel body. Normally these will be expansion calculations for the primary and secondary inlets and a contraction calculation for the vapor outlet but they will automatically change if flows are reversed. Setting this option to Yes can speed up calculations in some cases at cost of a minor loss of accuracy. 8-12 Nodes Field 8-13 Description Size Change Group Two Phase Correction Method If this option is set to Yes then the pressure loss coefficient in 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. 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. Balance Total Pressure - Static pressure is calculated for the flow with Total pressure same across the swage. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. Body Dimension If this option is set to Full Body Area the calculation for the primary inlet/vessel and secondary inlet/vessel size change will use the whole vessel area. If the Partial Body Area on Flow option is selected the vessel area is reduced in proportion to the appropriate flow i.e. if the secondary inlet volumetric flow is 20% of the total volumetric flow in the tee then 20% of the body area will be used in the size change calculation. The use of the Partial Body Area on Flow option has the effect of increasing the pressure loss calculated by simple fixed K factors. Composition Tab If the inlet feed flashes in the separator and as a result of the flash, the mixture is converted into liquid fully and the vapor outlet will have no flow. This can cause instability in the pressure solution of the whole network. To avoid this UniSim Flare creates an arbitrary vapor phase with very small vapor fraction for the vapor outlet (<0.001%). You can 8-13 Nodes 8-14 specify the composition of the vapor phase here. Figure 8.11 Design Tab Figure 8.12 Input Data Description Min. Drop Diameter Enter the diameter of the minimum drop size to be removed. Drain Volume Enter the drain volume. Maximum Holdup time Enter maximum holdup time before the horizontal separator will be drained. 8-14 Nodes 8-15 Input Data Description Output Data Description Design Length Minimum Length of the horizontal separator required to satisfy design conditions. Settling Velocity Settling velocity of the minimum drop size to be removed. Summary Tab The result of the calculations at each of the pipe connections is displayed. Figure 8.13 8.3.4 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. 8-15 Nodes 8-16 Connections Tab The name of the orifice plate and connectivity information is specified here. Figure 8.14 The following fields are available on this tab: Field Description Name The alphanumeric description of the Orifice Plate (e.g. - HP OP). Location You may want to specify the location of the Orifice Plate in the plant. Upstream/Downstream Either type in the name of the pipe segment or select from the drop-down list. At You can specify the end of the pipe segment attached to the Orifice Plate. Ignore Select the ignore checkbox to ignore this orifice in the calculations. Clear the checkbox to re-enable it. 8-16 Nodes 8-17 Calculations Tab Calculation methods are specified here. Figure 8.15 You only need to provide 1 of 3 sizing parameters. For Example, if you entered the Diameter then UniSim Flare will calculate the Upstream Diameter Ratio and the Downstream Diameter Ratio. The following fields are available on this tab: Field Description Diameter The diameter of the orifice hole. Valid values are between 0 and 1000 mm. Upstream Diameter Ratio This is the ratio of the throat diameter to the Upstream pipe diameter. Downstream Diameter Ratio This is the ratio of the throat diameter to the Downstream pipe diameter. Methods Group Fittings Loss Method The Fitting Loss drop-down list have the following three options 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. 8-17 Nodes 8-18 Field Description Isothermal Pressure Drop If this option is set to Yes, the inlet temperatures used for the size change calculations in the orifice plate will not update during iterative calculations for pressure loss i.e. a PT flash will be used to update the inlet properties. If the option is set to No then a more rigorous PH flash will be used to update the inlet properties. The orifice plate will do one contraction calculation and one expansion calculation if the Fittings Loss method is set to Contraction/Expansion. Setting this option to Yes can speed up calculations in some cases at cost of a minor loss of accuracy. Size Change Group Two Phase Correction Method If this option is set to Yes then the pressure loss coefficient in two 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. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. 8-18 Nodes 8-19 Summary Tab Figure 8.16 The result of the calculations at each of the pipe connections is displayed. 8.3.5 Tee The connector is used to model the connection of two pipes. The diameters of each pipe may be different. 8-19 Nodes 8-20 Connections Tab The name of the tee and connectivity information is specified here. Figure 8.17 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 Name The alphanumeric description of the node (e.g. HP Tee 1). Location You may want to specify the location of the node in the plant. 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. Upstream/Downstream/Branch Either type in the name of the pipe segment or select from the drop-down list. At You can specify the end of the pipe segment attached with the tee. Ignore Select the ignore checkbox to ignore this tee in the calculations. Clear the checkbox to re-enable it. 8-20 Nodes 8-21 Calculations Tab Calculation methods are specified here. Figure 8.18 The following fields are available on this tab: Field Description Theta Specify the angle of the branch to the inlet of the tee. Body Specify the diameter of the body of the tee. Allowable choices are: Run - the diameter will be that of the inlet pipe. Tail - the diameter will be that of the outlet pipe. Branch - the diameter will be that of the branch pipe. Auto - UniSim Flare will set the body diameter to be larger of the inlet and branch pipe diameters. 8-21 Nodes Field 8-22 Description Methods Group Fittings Loss Method The available options are: 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. Equal Static Pressure - Pressure drop calculation is ignored and static pressure is balanced. Simple - UniSim Flare 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. Equal Total Pressure - Pressure drop calculation is ignored and total pressure is balanced. Gardel– This method calculates the K factor using the analytical equations of Gardel. Miller Chart Extrapoltion None – No extrapolation is used. If the data falls outside the Miller chart, a fixed value of K (K=8.0) is used. Area Ratio Squared – This method uses a K factor which is extrapolated using Miller Curves, assuming that the K factors are functions of the flow and area ratio squared, of the branch to the total flow as well as the branch angle. Gardel – Uses the Gardel method to calculate K factor if the K factor is out of bounds in miller chart Connector If Incomplete If this option is set to Yes, UniSim Flare will treat the Tee as a straight connector, ignoring the effect of the branch on pressure drop. The tee will do three size change calculations between; inlet/ body, branch/body and body/outlet selecting expansion or contraction calculations as appropriate. Setting this option to Yes can speed up calculations in some cases at cost of a minor loss of accuracy. Isothermal Pressure Drop If this option is set to Yes, the inlet temperatures used for the size change calculations in the tee will not update during iterative calculations for pressure loss i.e. a PT flash will be used to update the inlet properties. If the option is set to No then a more rigorous PH flash will be used to update the inlet properties. Swage Group Two Phase Correction If this option is set to Yes then the pressure loss coefficient in 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. 8-22 Nodes Field Method 8-23 Description 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. Balance Total Pressure - Static pressure is calculated for the flow with Total pressure same across the swage. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. Body Dimension If this option is set to Full Body Area the calculation for the inlet/body and branch/body size change will use the whole body area. If the Partial Body Area on Flow option is selected the body area is reduced in proportion to the appropriate flow i.e. if the branch volumetric flow is 20% of the total volumetric flow in the tee then 20% of the body area will be used in the size change calculation. This option is ignored if the fittings loss method is set to Miller. The use of the Partial Body Area on Flow option has the effect of increasing the pressure loss calculated by simple fixed K factors bringing the results closer to those calculated by the ore accurate Miller K factors. 8-23 Nodes 8-24 Summary Tab The result of the calculations at each of the pipe connections is displayed. Figure 8.19 In accordance with Energy Institute guideline, screening for acoustic induced vibration is reported as ‘Likelihood of Failure’ (LOF). UniSim Flare reports LOF at Tee unit operation. The calculations do not account for Weldolet type Tee and connected pipes of Duplex stainless types. With either of these types, the likelihood of failure is expected to be higher. 8.3.6 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 UniSim Flare, the Vertical Separator has only one inlet and one vapor outlet stream. Vertical Knock out drum sizing procedure (Section 5.4.2.1 API STD 521): The final result of the sizing procedure is the diameter of the knockout drum. This is a function of the flow rate upstream of the drum, conditions (P, T and vapor fraction) in the drum and physical properties of the fluid. 8-24 Nodes 8-25 Connections Tab The name of the vertical separator and connectivity information is specified here. Figure 8.20 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 Name The alphanumeric description of the Vertical Separator (e.g. - HP KO Drum). Location You may want to specify the location of the Vertical Separator in the plant. Inlet/Vapor Outlet Either type in the name of the pipe segment or select from the dropdown list. At You can specify the end of the pipe segment attached to the Vertical Separator. Ignore Select the ignore checkbox to ignore this vertical separator in the calculations. Clear the checkbox to re-enable it. 8-25 Nodes 8-26 Calculations Tab Calculation methods are specified here. Figure 8.21 The following fields are available on this tab: Field Description Diameter The internal diameter of the vessel. Methods Group Fittings Loss Method The available options are; Equal Static Pressure – Pressure drop calculation is ignored and static pressure is balanced. Calculated – Ignore Vena Contracta – Pressure drop is calculated in accordance with the Swage method but ignores the loss due vena contracta. Calculated – Pressure drop is calculated in accordance with the Swage method including the loss due vena contracta. Isothermal Pressure Drop If this option is set to Yes, the inlet temperatures used for the size 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. Setting this option to Yes can speed up calculations in some cases at cost of a minor loss of accuracy. Size Change Group Two Phase Correction If this option is set to Yes then the pressure loss coefficient in 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. 8-26 Nodes Field Method 8-27 Description 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 correlation. Balance Total Pressure - Static pressure is calculated for the flow with Total pressure same across the swage. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. Composition Tab If the inlet feed flashes in the separator and as a result of the flash, the mixture is converted into liquid fully and the vapor outlet will have no flow. This can cause instability in the pressure solution of the whole network. To avoid this UniSim Flare creates an arbitrary vapor phase with very small vapor fraction for the vapor outlet (<0.001%). You can specify the composition of the vapor phase here. Figure 8.22 8-27 Nodes 8-28 Design Tab Figure 8.23 Input Data Description Min. Drop Diameter Enter the diameter of the minimum drop size to be removed. Output Data Description Design Diameter Minimum Diameter of the horizontal separator required to satisfy design conditions. Settling Velocity Settling velocity of the minimum drop size to be removed. 8-28 Nodes 8-29 Summary Tab The result of the calculations at each of the pipe connections is displayed. Figure 8.24 8.4 Boundary Nodes The following types of boundary nodes are available in UniSim Flare. 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. 8.4.1 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. 8-29 Nodes 8-30 Connections Tab The name of the control valve and connectivity information is specified here. Figure 8.25 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 dropdown 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. 8-30 Nodes 8-31 Conditions Tab Fluid conditions are specified here. Figure 8.26 The following fields are available on this tab: It is recommended that a value for Outlet Temperature which corresponds to an isenthalpic flash from the upstream conditions down to the Allowable Back Pressure. This will give the highest probable entry temperature into the system which will in turn give the highest velocities. Field Description Inlet Pressure The pressure of the source on the upstream side of the valve. Valid values are between 0.01 and 600 bar. Inlet Temp Spec. The temperature specification of the source on the upstream side of 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 Back Pressure The Allowed Back Pressure is the pressure that is allowed to exist at the outlet of a pressure relief device as a result of the pressure in the discharge system. It is the sum of the superimposed and builtup 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 Allowable Back Pressure whenever the Inlet Pressure changes. Valid values are between 0.01 to 600 bar. 8-31 Nodes 8-32 Field Description Outlet Temperature This is the temperature of the source at the flange on the downstream 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. Mass Flow This is the mass flow of the source. Valid values are between 0 and 100,000,000 kg/hr. Flange Diameter This is the diameter of the flange at the valve discharge. 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. Figure 8.27 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. 8-32 Nodes 8-33 Field Description 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 Fractions This is the fluid composition in either mole or mass fractions. You 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 Composition From This button allows the copying of compositional data from another control valve in the same scenario. Normalise Normalises the composition such that the sum of the component fractions is 1. Methods Tab Calculation methods are specified here. Figure 8.28 8-33 Nodes 8-34 The following fields are available on this tab: Field Description VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows (see Section 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 Method The available options are; 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 Pressure Drop If this option is set to Yes, the inlet temperatures used for the size 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. Two Phase Correction Method If this option is set to Yes then the pressure loss coefficient in two 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. 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. Balance Total Pressure - Static pressure is calculated for the flow with Total pressure same across the swage. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. 8-34 Nodes Field 8-35 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 8.28). Specification of an estimate of vapor fraction of the fluid at the knockout drum can considerably enhance the automatically generated flow profile. If this value is not specified then it is assumed to be all vapor. Vapor Mol. Wt. Specify the estimated vapor molecular weight for the vapor fraction given above. If this value is not specified then it is assumed to be the same as that of the total fluid. Inlet Piping Tab Details of the piping between the protected equipment and the inlet to the relief valve are specified here. This data is used to calculate the pressure drop in the inlet piping. The diameter of the inlet piping is also used to calculate the inlet velocity of the source fluid when the Include Kinetic Energy option is selected in the Calculation Options view. Figure 8.29 The available fields are: Field Description Length The length of the inlet piping. Elevation Change The change in elevation of the inlet piping. This cannot be greater than the length of the piping. Properties Group Material The material of the inlet pipe either Carbon Steel or Stainless Steel. 8-35 Nodes 8-36 Field Description Roughness The surface roughness of the inlet pipe. Whenever a material is selected, the absolute roughness is initialized to the default value for the material as defined on the Preferences view. Valid values are between 0.00001 inches and 0.1 inches. Diameter Nominal Diameter The nominal pipe diameter used to describe the inlet pipe size. For 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 nominal diameter other than "-" is selected, you will be able to select a schedule number 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 schedule number from the pipe databases and you will then have to specify both the internal diameter and wall thickness for the pipe. Internal Diameter The pipe diameter used for the pressure drop calculations. Use Pipe Class Select this checkbox to restrict the sizes of the inlet piping selected by UniSim Flare to those defined by the Pipe Class tool. Fittings Groups Loss Coefficient Enter the A and B parameters for the following fittings “K” factor 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. Figure 8.30 8-36 Nodes 8-37 Copy Source Data The Copy To button may be used to copy source data to other scenarios. When this button is pressed you will see a view similar to the following: Figure 8.31 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: Figure 8.32 8-37 Nodes 8-38 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. 8.4.2 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 buildups in a system. Connections Tab The name of the relief valve and connectivity information is specified here. Figure 8.33 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 dropdown list. 8-38 Nodes 8-39 Field Description 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. Figure 8.34 The following fields are available on this tab: It is recommended that a value for Outlet Temperature which corresponds to an isenthalpic flash from the upstream conditions down to the Allowable Back Pressure. This will give the highest probable entry temperature into the system which will in turn give the highest 8-39 Nodes 8-40 velocities. Field Description MWAP The Maximum Allowable Working Pressure (MAWP) is the maximum gauge pressure permissible in a vessel at its operating temperature. It is normally equal to the relief valve set pressure unless you have a low pressure vessel. Contingency In general there are two types of process upset conditions: Fire - The relieving pressure is 121% of MAWP.. Operating - The relieving pressure is 110% of MAWP unless you have a multiple valve assembly in which case it is 116% of MAWP. Some of the operating upset examples are cooling failure, power failure and instrument air failure. Relieving Pressure The Relieving Pressure is equal to the valve set pressure plus the overpressure. You can either enter the value or have it calculated using the MAWP and the Contingency by pressing the Set button. If you entered a value less than the MAWP, a warning message will be generated. Valid values are between 0.01 and 1000 bar. Selection of the Auto check box will automatically calculate the relieving pressure from the MAWP and contingency whenever these values change. Inlet Temp Spec. The temperature specification of the source on the upstream side of the relief valve. Valid values are between –250°C and 1500°C. You can select the fluid condition from the drop down box on the right hand side of this field. 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. MABP The Allowed Back Pressure is the pressure that is allowed to exist at the outlet of a pressure relief device as a result of the pressure in the discharge system. It is the sum of the superimposed and builtup back pressure. Clicking the Set button calculates the Allowable Back Pressure as a function of the valve type and MAWP. If the Auto check box is selected then the allowed back pressure is automatically updated whenever the valve type or MAWP is changed. Valid values are between 0.01 to 600 bar. Outlet Temperature This is the temperature of the source on the downstream 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 by isenthalpic flash from the upstream pressure and temperature. Valid values are between –250°C and 1500°C. If the Set button is pressed 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 expansion to the defined MABP. Mass Flow The nominal mass flow of the source. Valid values are between 0 and 100,000,000 kg/hr. This is generally be the flowrate generated by the upset condition. 8-40 Nodes 8-41 Field Description Rated Flow It is the rated mass flow of the source. Valid values are between 0 and 100,000,000 kg/hr. This is generally the flowrate that the relief valve is capable of passing. Clicking the Set button calculates the rated flow from the MAWP, valve type, orifice area, valve count, upstream pressure, upstream temperature and sizing method. If the Auto check box is selected, the rated flow will be automatically updated after any change in these values. Rated Flow Parameters K(Cp/Cp-R) K : Ideal Gas Ratio of Specific Heats Compressiblity Z Compressiblity Factor for the deviation of the actual gas from a perfect gas evaluated at inlet conditions (Z= PV/MRT) Valve Design Flange Diameter The diameter of the valve discharge flange. Number of Valves Specify the number of valves for the source. Valid values are between 1 and 10. Orifice Area Per Valve The orifice area per valve may be set by selecting the orifice size code from the drop down list. The corresponding orifice area will then be displayed. If the size code is set to the blank entry then the orifice area per valve may be entered manually. Valid values are between 0 and 100,000,000 mm2. Valve Type The flange diameter may be left unknown in which case it will be assumed to be the same as the outlet pipe. The choices are: Balanced - A spring loaded pressure relief valve that incorporates a means for minimizing the effect of back pressure on the performance characteristics. Conventional - A spring loaded pressure relief valve whose performance characteristics are directly affected by changes in the back pressure on the valve. Mech. BP Limit his is the maximum mechanical backpressure that can be applied to the valve. Rated Flow API 520 Several improvements were done in the rated flow calculation of pressure relief valves. • • For liquid relief rated flow calculation the procedure described in section 3.8 & 3.9 for API 520 -2000 / section 4.5 & 4.6 for API 520 -1976 was implemented. For steam relief rated flow calculation the procedure described in section 3.7 for API 520 -2000 / section 4.4 for API 520 1976 was implemented. In the previous version these procedures were not implemented and the procedures described in section 3.6 for API 520 -2000 / section 4.3 were used for API 520 - 1976, which are applicable for compressible gas/vapor (other than steam). 8-41 Nodes • • • 8-42 For two-phase relief rated flow calculation for sub-cooled liquid flashing inside the relief valve, UniSimFlare uses a regression formula (for critical pressure ratio calculation) from the data of figure D-3, API 520 RP (2000). The regression formula holds only in a limited region. To extend the range of applicability the equation that was used to generate the original plot was implemented. (Ref:http://committees.api.org/ standards/tech/docs/520ati.xls.) Methods of API 520 (1976) & API 520 (1993) do not apply for two-phase flow. UniSim Flare gives a warning when these methods are selected for conditions where 2 phase flows exist. Composition Tab The fluid composition is specified here. Figure 8.35 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. 8-42 Nodes 8-43 Field Description 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 Fractions This is the fluid composition in either mole or mass fractions. You 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 Composition From This button allows the copying of compositional data from another relief valve in the same scenario. Normalise Normalises the composition such that the sum of the component fractions is 1. Methods Tab Calculation methods are specified here. Figure 8.36 8-43 Nodes 8-44 The following fields are available on this tab: Field Description VLE Method The options for the Vapor-Liquid Equilibrium calculations are as follows (see Section 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 Method The available options are; 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 Pressure Drop If this option is set to Yes, the inlet temperatures used for the size 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. Two Phase Correction Method If this option is set to Yes then the pressure loss coefficient in two 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. 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. Balance Total Pressure - Static pressure is calculated for the flow with Total pressure same across the swage. 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 Transition This entry defines the pressure drop as a percentage of the inlet pressure at which compressible flow pressure drop calculations should be used. It applies only when the Transition method is selected. 8-44 Nodes Field 8-45 Description 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 2000 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. Rupture Disc present with valve Combination correction factor used to estimate relief valve rated flow is updated when check box is enabled. Energy Balance Group Isentropic Flash Select Yes to use an isentropic flash between the inlet and outlet otherwise an isenthalpic flash will be done Isentropic Efficiency Fractional isentropic efficency for the isentropic flash 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 8.36). Specification of an estimate of vapor fraction of the fluid at the knockout drum can considerably enhance the automatically generated flow profile. If this value is not specified then it is assumed to be all vapor. Vapor Mol. Wt. Specify the estimated vapor molecular weight for the vapor fraction given above. If this value is not specified then it is assumed to be the same as that of the total fluid. Inlet Piping Tab Details of the piping between the protected equipment and the inlet to the relief valve are specified here. This data is used to calculate the pressure drop in the inlet piping to ensure that it does not exceed the recommended limit of 3% of the inlet pressure. The diameter of the 8-45 Nodes 8-46 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. Figure 8.37 The available fields are: Field Description Routing Length The length of the inlet piping. Elevation Change The change in elevation of the inlet piping. This cannot be greater than the length of the piping. Properties Material The material of the inlet pipe either Carbon Steel or Stainless Steel. Roughness The surface roughness of the inlet pipe. Whenever a material is selected, the absolute roughness is initialized to the default value for the material as defined on the Preferences view. Valid values are between 0.00001 inches and 0.1 inches. Diameter Nominal Diameter The nominal pipe diameter used to describe the inlet pipe size. For pipes with a nominal diameter of 14 inches or more, this will be the same as the outside diameter of the pipe. 8-46 Nodes 8-47 Field Description Schedule If a pipe nominal diameter other than "-" is selected, you will be able to select a schedule number 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 schedule number from the pipe databases and you will then have to specify both the internal diameter and wall thickness for the pipe. Internal Diameter The pipe diameter used for the pressure drop calculations. Use Pipe Class Select this checkbox to restrict the sizes of the inlet piping selected by UniSim Flare to those defined by the Pipe Class tool. Fittings Loss Coefficient Enter the A and B parameters for the following fittings “K” factor 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. Figure 8.38 8-47 Nodes 8-48 8.4.3 Source Tools The initial sizing of a flare system is time consuming both in terms of time taken to build the model and the computation time. Using an Ideal Gas method can speed up the calculation during the initial sizing estimation. Speed is an important issue during sizing calculations especially for a complex multiple scenario case. Typically, the back pressure should be used for calculations. Rigorous rating calculation for all scenarios can be done by the Peng Robinson enthalpy method or any other enthalpy methods with pressure dependency and provides the down stream temperature. Updating Downstream Temperatures The downstream temperatures are only used to define the system entry temperature when ideal gas enthalpies are used. After several cycles of rating and sizing calculations, the original values for each source may no longer be valid. These values may be updated to reflect the results of the last calculation using an equation of state enthalpy method as follows. Select Refresh Source Temperatures from the Tools menu. Adding Single Source Scenarios The thorough evaluation of a flare network will require the evaluation of many scenarios. In most systems, there will be the possibility of each relief valve lifting on its own. In the case of a petrochemical complex, this could have several hundred relief valves and the task of setting up the scenarios for each relief valve would be time consuming and error prone. Once all the major scenarios have been defined, select Add Single Source Scenarios from the Tools menu. Click Yes to allow UniSim Flare to analyze the existing scenarios to determine the greatest flow rate for each relief valve and create a scenario using this data. 8.4.4 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. 8-48 Nodes 8-49 Connections Tab The name of the flare tip and connectivity information is specified here. Figure 8.39 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 Name The alphanumeric description of the node (e.g. - HP Flare Tip). Location You may want to specify the location of the node in the plant. Inlet Either type in the name of the pipe segment or select from the dropdown list. At You can specify the end of the pipe segment attached to the flare tip. Ignore Select the ignore checkbox to ignore this flare tip in the calculations. Clear the checkbox to re-enable it. 8-49 Nodes 8-50 Calculations Tab Calculation methods are specified here. Figure 8.40 The following fields are available on this tab: Field Description Dimensions Diameter You can specify a diameter for the tip. If this value is not specified then the diameter of the connected pipe is used. Stack Ht You can specify the height of the stack that will be used for flare radiation estimation. In RATING mode if the value of the stack height is not specified the elevation of the connected pipe will be used assuming the connected pipe to be modeled as stack. In DESIGN mode the stack height is calculated parameter based on the user defined entries in Flame radiation section of the Calculations tab. Methods Use Curves Select this checkbox if you are supplying pressure drop curves to calculate the pressure drop of the flare tip. Data for these curves is entered on the Curves tab. Fittings Loss Coefficient The fitting loss coefficient will be used to calculate the pressure drop through the flare tip. 8-50 Nodes 8-51 Field Description Fittings Loss Coefficient Basis Select whether the supplied Fittings Loss Coefficient will calculate the Total Pressure loss including velocity pressure loss or Static Pressure loss only. Flame Radiation Fraction of Heat Radiated The factor accounts for the fact that not all heat released in the flame can be transferred by radiation. Reference object Distance Reference object refers to the equipment/personnel/area where you want to estimate the level of radiation. Enter the distance between the object and the flare stack at grade level. Allowable Radiation Limit Enter the acceptable level of radiation as per local norms or standards. It refers to the radiation at the reference object. In RATING mode, the radiation at the reference object is estimated and is compared with the Allowable Radiation limit. In DESIGN mode, Allowable Radiation limit value and reference object distance are taken as the basis to calculate the stack height. Flare radiation calculation follows the API standard 52129. The approach to calculate radiation is based on Brzustowski and Sommer Method. The approach considers the flame to be single radiant epicenter. The method estimates the location of the flame epicenter for flare gas flow, components and flare tip exit velocity. The epicenter is influenced by external parameters like wind velocity and Relative Humidity which are taken into consideration. The minimum distance from the epicenter to the reference object is estimated by the Hajek and Ludwig empirical D = FQ ------nK (8.1) where: D = Minimum distance from the epicenter of the flame to reference object, m = Fraction of radiation heat transmitted through atmosphere F = Fraction of heat radiated Q = Heat release, KW K = Heat radiation, KW/m2 8-51 Nodes 8-52 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. Figure 8.41 The following fields are available on this tab: Field Description Ref. Temp. Enter the reference temperature to which the pressure drop curves correspond. All curves must be for the same reference temperature. Pressure Correction If checked then the static pressure correction takes into account density differences due to both the calculated inlet pressure and calculated outlet 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. Drop These pairs of data define points in the pressure drop curve. Points may be added and removed from the curve by using the Add and Delete buttons. Pressure drops for flows between those in the table are calculated using linear interpolation. 8-52 Nodes 8-53 Field Description Mol. Wt. Extrapolation If this field is checked then extrapolation beyond the range of supplied molecular weight curves is performed if necessary, otherwise the bounding molecular weight curve is used. Flow Extrapolation If this field is checked then extrapolation beyond the range of supplied mass flow rates is performed if necessary, otherwise the bounding mass flow is used. Summary Tab The result of the calculation is displayed. Figure 8.42 In DESIGN mode, Radiation at reference object would be same as Allowable Radiation limit defined on Connections page. 8-53 Calculations 9-1 9 Calculations 9.1 Calculations Options ...................................................................... 2 9.1.1 General Tab............................................................................. 2 9.1.2 Scenarios Tab .......................................................................... 4 9.1.3 Methods Tab............................................................................ 6 9.1.4 Warnings Tab........................................................................... 9 9.1.5 Initialization Tab .....................................................................14 9.1.6 Check Model...........................................................................15 9.1.7 Starting the Calculations ..........................................................16 9.2 Efficient Modeling Techniques ......................................................17 9.2.1 Data Entry .............................................................................18 9.2.2 Calculation Speed ...................................................................19 9.2.3 Sizing Calculations ..................................................................20 9.2.4 Convergence Failure ................................................................21 9-1 Calculations 9-2 9.1 Calculations 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. 9.1.1 General Tab Global calculation parameters and calculation options are specified here. Figure 9.1 The following fields are available on this tab: Field Description External Conditions Group Atmospheric Pressure Specify the atmospheric pressure. The default values are 1.01325 bar abs or 14.696 psia. Ambient Temperature Ambient temperature values are restricted between -200 degC to 2000 degC. Wind Velocity The average wind velocity. Enable Heat Transfer If checked, heat transfer calculations between pipe segments and the surroundings are performed for those pipe segments that have Heat Transfer with Atmosphere enabled. 9-2 Calculations Field 9-3 Description Relative Humidity Specify the average Relative Humidity External Radiative HTC If checked, heat transfer calculations between pipe segments and 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 Energy If checked the kinetic energy of the fluids entering and leaving each node is included in the energy balance. Specifically: v 2 If checked the energy balance equation is H 0 = H + --- , which 2 is constant across each node. If not checked the energy balance is H 0 = H , which is constant across each node. Where: H0 = stagnation enthalpy H = fluid enthalpy v = fluid velocity Inlet Velocity This entry selects the velocity to be used to determine the kinetic energy of the fluids entering the flare system when required. The choices are: Inlet Pipe Velocity - The inlet pipe diameter defined for each relief valve and control valve is used to determine the inlet velocity. Zero Velocity - The velocity of the fluid at the inlet to each relief valve and control valve is 0.0. Mode Group Calculation Mode This drop-down list selects and displays the current calculation mode. The options are: Rating - It is used to check the existing flare system in a plant. This method calculates the pressure profile for the existing pipe network. Design - It is used to design a new flare system for the plant. During calculation it adjusts the diameters of all pipes until all the design constraints of MABP, velocity, etc, have been met. These diameters can be smaller than the initially defined data. Debottleneck - It is used to determine sections of the flare system that must be increased in size due to either the uprating of the existing plant and hence flare loading, or the tie-in of new plant. It can only increase existing pipe sizes, not reduce them. The calculation mode can also be set using the selector on the main toolbar. Calculate Ignored Sources with Zero If checked this causes sources that have been ignored to be treated as if they have a zero flow. This will result in the back pressure being calculated and limit checked against the source MABP even if the source has been ignored. Use MABP for Inactive Sources When Sizing If checked this causes the back pressure for inactive sources to be calculated and then used to trigger pipe size changes during design calculations. Otherwise these sources will be ignored when determining required pipe sizes. An inactive source is one that is ignored or has a zero flow. Ignore Source to Pipe Pressure Loss in Design Mode If checked this causes the pressure loss resulting from the size change between flange diameter of control or relief valves and the outlet pipe to be ignored during design calculations. Selecting this option will speed up calculations and reduce instability in cases where the flange diameter has been set to an unrealistically small value. 9-3 Calculations 9-4 Field Description Choked Flow Check If left unchecked, velocities will not be limited to the sonic condition. This is useful in sizing calculations since the mach number limitations will still be met by the time the final solution is reached. Calculation speed is greater at the risk of numerical instability and convergence failure. Rated Flow for Tailpipes If checked, the rated flow will be used in the pressure drop calc calculations for the tailpipes (as opposed to the actual flowrates). The API guide for the Pressure-Relieving and Depressuring Systems recommends that tailpipes be sized based on the rated capacity. Rated Flow For Nodes Attached To Tailpipes If checked, the rated flow will be used in the pressure drop calc calculations for the nodes attached to tailpipes (as opposed to the actual flowrates Rated Flow For Inlet Pipes If checked, the pressure loss in the inlet piping to relief valves will be based upon the rated flow for the valve rather than the nominal flow. Warn At A warning will be issued if the non recoverable pressure loss in the inlet piping to a relief valve exceeds this percentage of the maximum allowable working pressure (set pressure). Calculate Velocity at 0 Barg for pipes If checked, extra velocity based results (Velocity/Mach Number/ Rho V2), calculated at zero gauge pressure, are reported for each pipe. Include AIV Constraints in Design Mode By default in design and debottlenecking modes, pipes are sized for constraints defined in Scenario editor. Enable this option to additionally include any acoustic induced velocity constraints (determined in adherence to API guidelines) in sizing pipes. 9.1.2 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 9-4 Calculations 9-5 Current Scenario, All Scenarios and Selected Scenarios. Figure 9.2 If Invert Child Scenario Selection is clicked, all the Child scenarios in the scenario list are unselected/selected. If a Base scenario is selected, it is retained. 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 UniSim Flare 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 Section 4.2 - Selecting Components. 9-5 Calculations 9-6 9.1.3 Methods Tab Global calculation methods are specified here. Figure 9.3 The following fields are available on this tab: Refer to Appendix A - Theoretical Basis for more details. 9-6 Calculations Input Field 9-7 Description Properties Group VLE Method (Overall) The options for the Vapor-Liquid Equilibrium calculations are as follows: 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 Method (Overall) The following calculation method for the determination of fluid enthalpies are available: 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. VLE Method (Source Outlet Temperature Estimation) The VLE method that will be used for the estimation of the temperature at the downstream flange for source nodes. The options are the same as for the Overall VLE Method. (Note: These methods do not affect any calculation. They are used to estimate the actual temperature of the inlet fluid in case a user has entered the temperature as superheat/subcooled.) Enthalpy Method (Source Outlet Temperature Estimation) The enthalpy method that will be used for the estimation of the temperature at the downstream flange for source nodes. The options are the same as for the Overall enthalpy Method. 9-7 Calculations Input Field 9-8 Description Pressure Drop Group Horizontal and Inclined Pipes The options are: Isothermal Gas - This is a compressible gas method that assumes isothermal expansion of the gas as it passes along the pipe. UniSim Flare 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 Section 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 Section A - Theoretical Basis. Lockhart Martinelli – Lockhart Martinelli correlations models the two phase pressure drop in terms of a single phase pressure drop multiplied by a correction factor. Acceleration changes are not included. Beggs and Brill (No Acc.) – The Beggs and Brill methods without the acceleration term. Beggs and Brill (Homog.) – The Beggs and Brill methods with a homogeneous acceleration term. Model Default - If this is selected, the Default method for the Horizontal/Inclined method (as defined on the Calculation Options Editor view) will be used. Vertical Pipes The options are: Isothermal Gas - This is a compressible gas method that assumes isothermal expansion of the gas as it passes along the pipe. UniSim Flare uses averaged properties of the fluid over the length of the pipe. The outlet temperature from the pipe is calculated by adiabatic heat balance either with or without heat transfer. Pressure losses due to change in elevation are ignored. Adiabatic Gas - This is a compressible gas method that assumes adiabatic expansion of the gas as it passes along the pipe. As with the Isothermal Gas method, pressure losses due to changes in elevation are ignored. Beggs & Brill - Although the Beggs and Brill method was not originally intended for use with vertical pipes, it is nevertheless commonly used for this purpose, and is therefore included as an option for vertical pressure drop methods. For more details, see Appendix A - Theoretical Basis. Dukler - Although the Dukler method is not generally applicable to vertical pipes, it is included here to allow comparison with the other methods. 9-8 Calculations Input Field 9-9 Description Orkiszewski - This is a pressure drop correlation for vertical, twophase flow for four different flow regimes - bubble, slug, annularslug transition and annular mist. For more details, see Appendix A Theoretical Basis. Lockhart Martinelli – Lockhart Martinelli correlations models the two phase pressure drop in terms of a single phase pressure drop multiplied by a correction factor. Acceleration changes are not included. Beggs and Brill (No Acc.) – The Beggs and Brill methods without the acceleration term. Beggs and Brill (Homog.) – The Beggs and Brill methods with a homogeneous acceleration term. Model Default - If this is selected, the Default method for the Vertical method (as defined on the Calculation Options Editor view) will be used. Two Phase Elements For two-phase calculations, the pipe segment is divided into a 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 which reflects the required accuracy. Friction Factor Method The Friction Factor Method applies only when you have entered a value for friction factor. The options are: Round - This method has been maintained primarily for historical purposes in order for older UniSim Flare 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. 9.1.4 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. 9-9 Calculations 9-10 Figure 9.4 Design Problems Group The following options can be selected in this group: • • • • • • • • • • • Mach Number Velocity Rho V2 Noise Back Pressure Choked Flow Slug Flow Temperature Carbon Steel Min./Max Temp Carbon Steel Min./Max Temp. Acoustic Induced Vibration Calculation Problems Group The Calculation Problems group contains the following checkboxes: • • • Physical properties Failure Heat Balance Failure Choke Pressure Failure 9-10 Calculations • • 9-11 Pressure Drop Failure Liquid With Vapor Only Method. Sizing Status Group The checkboxes available in this group are: • • • Initialization Size Change Limited Reached. Solver Tab Solver control parameters are specified here. Figure 9.5 The following fields are available on this tab: Field Description Tolerances Group Properties Pressure This is the tolerance for the maximum difference between the pressure used to calculate physical properties and the calculated inlet and outlet pressures across the network. It should be tighter (i.e. smaller) than the Unit Operations pressure tolerance and the Loop pressure tolerance. 9-11 Calculations 9-12 Field Description Unit Operations Pressure This is the tolerance for the difference in pressure drop when 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 Balance This is the tolerance for the maximum error in the mass balance over a node where streams converge or diverge in looped system calculations. Valid values are between 0.00001% and 10%; the default is 0.01%. Iteration Limits Group Properties This is the maximum number of iterations allowed for converging the inner properties pressure loop of a looped flare system, or for overall convergence of a convergent flare system. The default of 25 should be adequate for most cases. Loop This is the maximum number of iterations allowed for overall convergence of a looped flare system. The default is 500. Damping Factors Group Properties This is the damping factor applied to the pressure step when solving the inner properties pressure loop. Values less than 1.0 may be specified to prevent oscillation in the properties pressure loop to improve convergence. Loop This is the damping factor applied to the steps taken when solving the outer pressure / flow loop when solving looped systems. Values less than 1.0 may be specified to prevent oscillations in the pressure / flow loop to improve convergence. Loop Solver The following methods are available: Newton-Raphson - provides the best combination of solution speed vs convergence success. Broyden - provides a faster solution than Newton-Raphson since the Jacobian matrix computation is required less frequently, but requires better initial guesses. Force Convergent - this option may be used if you are modeling a convergent flare system with two flare tips. This type of system is commonly found on offshore production facilities. Use of the Newton-Raphson solver with the Simultaneous structural analyzer may be faster for these systems. Conjugate Gradient Minimization, Quasi-Newton Minimization provide a very robust but slow solution method. These methods can be useful if many Recycle warnings appear in the Trace number. One Step - performs a single iteration using user estimates for the molar flows. Structural Analyzer This option selects the analyzer used by UniSim Flare to detect and initialize looped systems. The options are: The Simultaneous Structural Analyzer should always be used for new models. 9-12 Calculations Field 9-13 Description Convergent - this uses a heuristic forwards and backwards algorithm to detect loops in the flare system and identify which pipes to use as tears. It allows the user to control the initialization of the loop solver by specifying the set of pipes that may be used as tears and flow estimates through the Estimates tab of the Scenario Edit view. 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 UniSim Flare cases or when the user wishes to force a particular set of pipes to be used as tears and/ or flow estimates. Echo Error History When checked, it will generate additional messages giving details of intermediate calculations. This should be left unchecked unless you have convergence problems. Preserve Unconverged Results for Looped Calculations When checked, failure of calculations will not erase the results after the final iteration. This can be useful for the diagnosis of difficult problems. 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. 9-13 Calculations 9-14 9.1.5 Initialization Tab Global parameters that can enhance convergence speed and reliability are specified here: Figure 9.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 Multiplier This specifies a global length multiplier to be applied to all the pipes in the system. It is useful in the early stages of flare system design to allow for bends and other fittings losses that will not be known until later. This global value is overridden by Length Multipliers defined for individual pipes. Design Mode Initialization This drop-down list provides the following options: Multiphase - UniSim Flare will assume that two phase flow is possible in the flare system when determining the initial pipe sizes in Design mode. Vapor - UniSim Flare 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. 9-14 Calculations 9-15 9.1.6 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. Figure 9.7 The major checks carried out are: • • • • Ignored Pipes and Connector Nodes. A check is made for pipes and connector nodes that have the ignored option selected to remove them from the calculations. Since an ignored pipe or connector node will cause all upstream sources, pipes and nodes to be excluded from in calculations it is important that the user be aware of them. Source nodes are commonly ignored so they are not included in this check. Zero Length Pipes. A check is made for pipes with a length of 0.0. While it is legitimate to set a pipe length to 0.0 to temporarily eliminate its pressure loss in a model, it is more likely that this indicates an oversight on the part of the user or an incomplete data import. Zero Diameter Pipes. A check is made for pipes with a diameter of 0.0. A pipe diameter of 0.0 is likely to cause a calculation failure in all or part of the model and is a problem that should be corrected by the user. Incomplete Connectivity. A check is made that all nodes and pipes are completely connected without any dangling connections. While UniSim Flare may be able to solve the incomplete network, it is likely that any missing connections are a result of them being overlooked by the user or left unspecified during data import from an external file. 9-15 Calculations • 9-16 Damaged Connectivity. A check is made that all nodes and pipes have specified connection points. Omission of these may result in a model that will not solve correctly. This problem is more likely to arise from an incomplete data import than normal interactive use of the program. The Memory Button displays a view that shows memory usage and instance counts for the components that comprise the model. This can be useful for diagnosing performance related issues. Figure 9.8 9.1.7 Starting the Calculations The following words before the object on the status bar show the type of calculation being performed: B = Mass and Energy Calculations P = Pressure Drop Calculations To start the calculations, select Calculate from the Calculations menu. Alternatively, you could select the Start Calculations icon on the toolbar. The status of the rating calculations is shown on the status bar. In the following screenshot, the second display field on the status bar shows that the node mass and energy balance calculations have been performed for Tee 8. The third display field shows firstly the inner properties loop iteration number, then the maximum pressure error for that iteration and finally the name of the pipe segment responsible for the error. The fourth display field shows firstly the number of iterations taken by the loop solver and then the error in the objective function being solved 9-16 Calculations 9-17 by the loop solver. Figure 9.9 To abort calculations, click the Stop Calculations icon, which takes the place of the Start Calculations icon during calculations. Note: Due to speed considerations, it is recommended that sizing calculations be performed subject to the constraints: • • • Compressible Gas VLE Ideal Gas Enthalpy Method No Heat Transfer Calculations 9.2 Efficient Modeling Techniques Efficient modeling of a flare network requires some forethought in order to meet the primary objectives which are in general: 1. Definition of the design constraints for the flare system. These will usually be defined by company standards or by local health and safety regulations. If unavailable, standard texts such as API STD 9-17 Calculations 9-18 521 can be used to select preliminary acceptable values. 2. Efficient acquisition of the data for the piping configuration and layout. 3. Definition of the scenarios or contingencies which should be evaluated. Grass roots design will require analysis of a far wider range of scenarios to those required by the simple expansion of a flare system to incorporate a new relief valve. 4. Rapid construction of the computer model of the flare system. 5. Fast and efficient calculation of the computer model of the flare system. Objectives 1 to 3 can only be achieved by the use of engineering skill and judgment. Once complete, the efficient use of UniSim Flare can lead to a satisfactory project conclusion. 9.2.1 Data Entry UniSim Flare 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. 9-18 Calculations 9-19 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. 9.2.2 Calculation Speed Calculation time will often be only a small percentage of the time taken to construct the computer model. However, on low specification personal computers, a sizing calculation for a complex multiple scenario model could take several hours, if not days, if care is not taken in the selection of the thermodynamic models or in the definition of the component slate. When considering the desired accuracy for the calculations, due consideration must be given to the fact that you are modeling a system that will rarely if ever come close to a steady state condition, with a steady state modeling tool. Component Slate As a rule of thumb you can assume that the calculation time is proportional to the square of the number of components. This is especially true when the VLE is calculated by an equation of state instead of treating the fluids as a simple compressible gas. Flare systems generally operate at conditions in which heavy components such as hexane or heavier will stay in the liquid phase throughout the system. You should therefore endeavor to characterize the heavy ends of petroleum fluids by as few components as possible. The properties that you use for the characterization should be optimized to: • • Ensure the component stays in the liquid phase Match the liquid phase density. 9-19 Calculations 9-20 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 UniSim Flare 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 and this method. If acceptable agreement between the results is achieved then it may be reasonably assumed that the extrapolation is valid. 9.2.3 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. 9-20 Calculations • 9-21 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: d W 300 PM (9.1) where: 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. 9.2.4 Convergence Failure One common problem is oscillations between two pressure values during iterative inner loop calculations that manifest in nonconvergence. This behavior is observed in loops with multiphase for pipes configured to solve with empirical two phase pressure drop calculation methods like Dukler and/or Beggs & Brills. For a typical configuration like the one below that demonstrates oscillations in pressure convergence, ignore the elevation change or use the Isothermal vapour pressure method for Pipe2 instead of the 9-21 Calculations 9-22 empirical 2 phase correlation methods. Figure 9.10 9-22 Databases 10-1 10 Databases 10.1 Overview ..................................................................................... 2 10.2 Database Features ....................................................................... 2 10.2.1 Selection Filter....................................................................... 2 10.2.2 Maneuvering Through the Table................................................ 3 10.2.3 Printing................................................................................. 4 10.2.4 Adding/Deleting Data.............................................................. 4 10.3 Setting the Password................................................................... 4 10.4 Pipe Schedule Database Editor .................................................... 5 10.5 Fittings Database Editor .............................................................. 7 10.6 Component Database Editor ........................................................ 8 10.6.1 Importing Component Data ..................................................... 8 10-1 Databases 10-2 10.1 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 UniSim Flare directory. Note: You may add and edit your own data to the databases. However, you cannot edit or delete any of the original data. The databases may be password protected by a single password common to each. If the password has been disabled, or an incorrect access password has been entered, the databases may be reviewed in read-only mode. You must have defined an access password before any database can be edited. Note: Original data is always read-only. 10.2 Database Features 10.2.1 Selection Filter The Selection Filter may be used to restrict the data which is shown. You may use the following wildcard characters: • • • % - Represents a groups of characters _ - Represents a single character 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 10-2 Databases 10-3 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. 10.2.2 Maneuvering Through the Table Click the table to select a record, and then navigate through the table using the navigator and scroll bar controls. Figure 10.1 10-3 Databases 10-4 10.2.3 Printing Click the Print All button to print the pipe schedule, fittings or component data, depending on which editor you are currently using. UniSim Flare prints formatted output using the default printer settings. 10.2.4 Adding/Deleting Data You must have administrative privileges to perform this function. Execute the application with Run As Administrator command to add or delete data. When the Add button is clicked, the cursor will move to the last record on the table and insert a new record that contains dummy data. You should override this data with your actual data. Note: User-defined data is shown in blue. 1. When you add items, they will then become immediately available to the simulation. 2. Click the Delete button to delete the current record. Note: You can only delete your own data. 3. Click OK to close the Database Editor view. 10.3 Setting the Password To set or modify the password: 10-4 Databases 10-5 1. Select Set Password from the Database menu on the menu bar. The Password Editor view will now be displayed. Figure 10.2 If you have already set your password, you first need to enter the existing password before supplying the new one. Once you enter the correct password, the checkbox Do not ask for Password every time becomes active. The default is to ask for a password everytime. 2. Enter your existing password in the Old Password field. Note: If you are setting the password for the first time there is no Old Password field click the Do not ask for Password every time check box. 3. Enter your new password in both the New Password and Confirm New Password field. Ensure that the password is more 4 characters long and does not include Space. 4. Select the Do not ask for Password every time checkbox if you don't want to be asked for the password every time. 5. Click OK, or Cancel to abort the procedure. 10.4 Pipe Schedule Database Editor The Pipe Schedule Database Editor allows you to view the pipe schedule data for all pipes in the database, and to add and edit user-defined entries. 1. To use the Pipe Schedule Database Editor, select Pipe Schedule from the Database menu. After you enter the password, the Pipe Schedule Database Editor view will be displayed, as shown in 10-5 Databases 10-6 Figure 10.3. Figure 10.3 2. If you have already set your password, you will need to enter the password before accessing the databases. The database can be modified by either adding or deleting the entries using the Add or Delete button, respectively. When you modify the database and click OK to leave, a message box will pop up stating that the database has been modified and the user will be allowed to choose whether to ask for password in the next time if you set it. Click the Print All button to print the database to the printer defined in the Printer Setup view. 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. 10-6 Databases 10-7 10.5 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. Figure 10.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 (10.1) For information on the Database view features that are common to the Pipe Schedule, Fittings and Components Databases, see Database Features. 10-7 Databases 10-8 10.6 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. Figure 10.5 The data for each component in the database is tabulated. For information on the Database view features that are common to the Pipe Schedule, Fittings and Components Databases, see Database Features. 10.6.1 Importing Component Data Additional components may be added to the database via an ASCII file whose format is given in Section C - File Format. The component data file can be read into UniSim Flare by clicking the 10-8 Databases 10-9 Import button on the Component Database Editor view. The Import button is unique to the Component Database Editor. This feature allows you to specify the text file on the Select Import File view. Figure 10.6 1. Export the component data into a text file. 2. Import the component data into UniSim Flare, via the component database editor. 10-9 Viewing Data and Results 11-1 11 Viewing Data and Results 11.1 Overview ..................................................................................... 2 11.2 Components Data ........................................................................ 2 11.3 Scenarios Data............................................................................. 2 11.4 Pipes Data ................................................................................... 3 11.5 Sources Data ............................................................................... 4 11.6 Nodes Data .................................................................................. 4 11.7 Messages ..................................................................................... 5 11.7.1 Problems Tab ......................................................................... 5 11.7.2 Data Echo Tab........................................................................ 6 11.7.3 Solver Tab ............................................................................. 6 11.7.4 Sizing Tab ............................................................................. 7 11.7.5 Loops Tab.............................................................................. 7 11.8 Pressure/Flow Summary ............................................................. 8 11.9 Compositions ............................................................................... 8 11.10 Physical Properties .................................................................... 9 11.11 Profile.......................................................................................11 11.12 Flow Map ..................................................................................12 11.13 Scenario Summary....................................................................13 11.14 Sources Summary .....................................................................14 11.15 Pipes Summary.........................................................................16 11.16 Graph Control ...........................................................................18 11.16.1 Control Tab.........................................................................19 11.16.2 Axes Tab ............................................................................20 11.16.3 ChartStyles Tab ...................................................................22 11.16.4 Legend Tab .........................................................................24 11.16.5 ChartArea Tab .....................................................................26 11.16.6 Plot Area Tab ......................................................................27 11.17 Trace Window ...........................................................................29 11-1 Viewing Data and Results 11-2 11.1 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. 11.2 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. Figure 11.1 Hypothetical components can be edited and database components viewed in the Component Editor view, by double clicking on any cell in the appropriate row. For more information on editing the components see Adding/Editing Components. 11.3 Scenarios Data Scenario data for all the scenarios in the case can be viewed by selecting Data-Scenarios from the View menu. Alternatively, you can 11-2 Viewing Data and Results 11-3 use the key combination alt v d s. Figure 11.2 The Scenario Editor can be accessed by double clicking on any cell in the appropriate row. See Adding/Editing Scenarios for more information on editing scenarios. 11.4 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. Figure 11.3 You can edit an individual segment by double clicking on any cell in the appropriate row. See Section 7 - Pipe 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. 11-3 Viewing Data and Results 11-4 11.5 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 o Enter. Figure 11.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 Section 8.4 - 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. 11.6 Nodes Data Properties for all the nodes in the current case can be viewed by selecting Data and then Nodes from the View menu. Alternatively, 11-4 Viewing Data and Results 11-5 you can use the key combination alt v d o o Enter. Figure 11.5 You can edit an individual node by double-clicking on any cell in the appropriate row. For information on editing nodes see Section 8.1 Node Manager. The messages that are displayed depend on the Message options you have selected (see Section 9.1.4 - Warnings Tab). 11.7 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. 11.7.1 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. Acoustic Induced Vibration 11-5 Viewing Data and Results 11-6 Figure 11.6 11.7.2 Data Echo Tab The Data Echo tab shows the options chosen for the calculation. Figure 11.7 11.7.3 Solver Tab This tab displays any complications encountered by the solver. Figure 11.8 11-6 Viewing Data and Results 11-7 11.7.4 Sizing Tab This tab displays the sequence of line size changes during sizing calculations. Figure 11.9 11.7.5 Loops Tab This tab displays the solution history for looped network calculations. Figure 11.10 The following variables are shown: • Mass Flowrate • Molar Flowrate • Rated Flowrate • Static Pressure Drop • Noise • Static Source Back Pressure • Upstream (US) Static Pressure • US Temperature • US Velocity • US Mach No. • US Rho V2 • US Energy • Downstream (DS) Static Pressure 11-7 Viewing Data and Results 11-8 • DS Temperature • DS Velocity • DS Mach No. • DS Rho V2 • DS Energy • Flow Regime • Static Pipe Acceleration Loss • Static Pipe Elevation Loss • Static Pipe Fittings Loss • Friction Factor • Reynolds Number • Duty • Overall HTC • External HTC • Internal HTC • Equivalent Length • Physical Length 11.8 Pressure/Flow Summary After running the case, you can view the Pressure/Flow Summary by selecting Results-Pressure/Flow Summary from the View menu. Figure 11.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. 11.9 Compositions After running the case, you can view the Compositions for each pipe segment by selecting Results-Compositions from the View menu. 11-8 Viewing Data and Results 11-9 You can also use the alt v r c key combination to access the view. Figure 11.12 The Compositions view may not be available if Save Phase Properties is not active on the General tab of the Preferences Editor view. 11.10 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 11-9 Viewing Data and Results 11-10 Alternatively, you can use the key combination alt v r r. Figure 11.13 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 clicking on the '+ Show All Phases' button. Each line expands to display properties for the various phases. Click on '- Show Overall Phase' button to revert back to the original state. Figure 11.14 F = Fluid (Overall) V = Vapor Phase L = Liquid Phase W = Water Phase M = Mixed (Water & Liquid) 11-10 Viewing Data and Results 11-11 11.11 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 p Enter. Figure 11.15 The following properties profiles are available: Pressure Temperature Mass Flow Molar Flow Mach No. Noise Rho V2 You can select the property type from the drop-down list. The Profile displays the profile from the selected Source (which may be chosen from the drop-down list at the top of the view) to the flare. Five icons are available: Name Icon Description Print Print the graph using the current printer settings. The output also includes important information such as the name of the file, the scenario, and the model statistics. Preview Print Summary Previews a summary of what the print out will look like. 11-11 Viewing Data and Results Name Icon 11-12 Description Save Save the graph to a windows metafile .wmf. You will be prompted for the file name and path. Copy Copy the graph to the Windows clipboard. It can then be pasted in other applicable Windows applications (such as your word processor). Toggle View Type Switch display from graph to table. The plot can be modified by the 2D Chart Control Properties which is available on right clicking the mouse in the plot area. See Graph Control for more information on 2D Chart Control Properties view. 11.12 Flow Map The flow map available in UniSim Flare 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. Figure 11.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. 11-12 Viewing Data and Results 11-13 The upstream and downstream conditions are marked with a red dot and a label on the flow map. Unless the pipe segment has a single phase flow with a large pressure drop, both upstream and downstream pipe conditions will generally be close to each other. Four icons are available: Name Icon Description Print Print the graph using the current printer settings. The output also includes important information such as the name of the file, the scenario, and the model statistics. Preview Print Summary Previews a summary of what the print out will look like. 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). 11.13 Scenario Summary After running the case, you can view the Scenario Summary by selecting Results-Scenario Summary from the View menu. Figure 11.17 You can select a source from the drop-down menu at the top of the view. 11-13 Viewing Data and Results 11-14 Icons are also available: Name Icon Description Print Print the results using the current printer settings. The output also includes important information such as the name of the file, scenario, and the model statistics. Preview Print Summary Previews a summary of what the print out will look like. Save Save the results to an ASCII text file .txt. You will be prompted for the file name and path. Refresh Updates the scenario summary table for any changes Export to Excel Exports the Scenario data to Excel format 11.14 Sources Summary After running multiple Base and Child Scenarios, you can view the Sources Summary by selecting Results-Sources Summary from the View menu. 1. Sources Summary View lists all the Scenarios which has been run. Sources, its associated Group and associated Scenario appear in the table. Parameter values for each Source and its associated Scenario is given in different columns. Figure 11.18 2. All the Column headings are provided with Filtering and Sorting option. 3. Non applicable fields will be blank. 4. The recommended valve type will be populated based on the Pressure ratio guideline Valve Type Pressure Ratio - ratio of Back pressure to Set Pressure Conventional <0.1 Balanced 0.1 to 0.5 11-14 Viewing Data and Results Valve Type 11-15 Pressure Ratio - ratio of Back pressure to Set Pressure Pilot Operated 0.501 to 0.7 Too High >0.7 5. When View All Sources button is selected, data for all sources in every scenario is available. 6. When Deviating Sources button is selected only sources where the calculated parameters deviating from the defined constraints or guidelines are available. Figure 11.19 - Same source associated with different scenario can appear multiple times in the table. - Specific parameter values which deviate from the specified constraints / guideline values are highlighted in red color. 7. When Worst case for each Source button is selected, for each source the worst scenario (excluding the Base scenario) is reported for the selected parameter. - The basis of the worst case can be changed from the drop down on the Sources Summary page. While Back Pressure is the default parameter user can switch to Flange Velocity, Flange MachNo and Flange RhoV2. Figure 11.20 11-15 Viewing Data and Results 11-16 8. The Sources Summary view does not dynamically update the table for any changes to parameters based on execution of one or more scenarios. Close and reopen the view or click on Refresh Icon to fetch updated values. 9. Click on the Export To Excel icon to export the current visible table in excel format. 11.15 Pipes Summary After running multiple Base and Child Scenarios, you can view the Pipes Summary by selecting Results-Pipes Summary from the View menu. 1. Pipes Summary View lists all the Scenarios which has been run. Pipes and its associated Scenario appear in the table. Parameter values for each Pipe and its associated Scenario is given in different columns. Figure 11.21 2. All the Column headings are provided with Filtering and Sorting option. 3. Non applicable fields will be blank, if any. 4. When View All Pipes button is selected, data for all Pipes in every scenario is available. 11-16 Viewing Data and Results 11-17 5. When Deviating pipes button is selected only Pipes where the calculated parameters deviating from the defined constraints or guidelines are available. Figure 11.22 - Same Pipe associated with different scenarios can appear multiple times in the table. - Specific parameter values which deviate from the specified constraints / guideline values are highlighted in red color. 6. When Worst case for each Pipe button is selected, for each pipe the worst scenario (excluding the base scenario) is calculated for the selected parameter. - The basis of the worst case can be changed from the drop down on the Pipes Summary page. While MachNumber is the default parameter user can switch to Velocity, RhoV2 and Noise. Figure 11.23 7. The Pipes Summary view does not dynamically update the table for any changes to parameters based on execution of one or more scenarios. Close and reopen the view or click on Refresh Icon to fetch updated values. 8. Click the Export To Excel icon to export the current visible table in excel format. 11-17 Viewing Data and Results 11-18 11.16 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. Each individual plot in UniSim Flare can be customized using the Chart Control tool. To access the Chart Control tool right click on the Profile display as shown in Figure 11.24. You can modify many of the plot characteristics, which are categorized into the seven tabs of the 2D Chart Control Properties view: Control, Axes, ChartStyles, Legend, ChartArea, PlotArea and Alarm Zones. Figure 11.24 Figure 11.25 Open the 2D Chart Control Properties view by object inspecting (right click) any spot on an active plot. 11-18 Viewing Data and Results 11-19 11.16.1 Control Tab The Control tab is used to specify the background border, background and foreground colors and background image. Figure 11.26 The inner tabs available on the Control tab are outline in the table below. • • • • You can specify the color in three ways: Enter the hexadecimal number in the RGB box. Select the color from the Name drop-down list. Click on the color button and select the desired color from the Windows Color view by either double clicking on the color or clicking once and then clicking the OK button. The color button displays the current color Inner Tab Option Description General IsBatched When checked, changes to the chart are not displayed on the screen. IsDoubleBuffered When checked, changes to the chart are buffered so the screen is updates as smoothly as possible. Load/Save buttons Click the Load button to load a new chart description file. You can save the current chart to a chart description file, using the Save button. Border Type Select the border type drawn around the area from the drop-down list. Width Enter the boarder type width in pixels. Valid values are between 0 and 20 pixels. 11-19 Viewing Data and Results 11-20 Inner Tab Option Description Interior Background Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the background color for the graph. The color of the button shows the current selection. Background Color Name Select the color name from the drop-down list. Foreground Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the background color for the graph. The color of the button shows the current selection. Foreground Color Name Select the Color name from the drop-down list. File Specifies the background image file either by entering the file path or by clicking the extension button and then selecting the appropriate file from the File Open view. Layout Select the way you want the image to be displayed in the background. IsEmbedded When checked, the image is embedded into the chart. When unchecked, the chart looks for the image in the specified location. Reset button Click this button to return the chart element background to its default. Image When the Name drop-down list displays: Automatic. The background is transparent. Undefined. There is no matching color name for the specified color. 11.16.2 Axes Tab The Axes tab allows you to customize the plot area, using the following 11-20 Viewing Data and Results 11-21 inner tabs: Figure 11.27 Inner Tab Option Description General IsShowing Displays or hides the selected axis. IsLogarithmic When checked, the selected axis will be interpreted logarithmically (log base 10) instead of linearly. IsReversed If checked, the selected axis will be displayed in reverse direction. Is100Percent When checked, each series in a Stacking Bar chart is scaled to represent 100 percent, and each value within the series is a given percentage of the total. Annotation Method Specifies how the axis is annotated. Click the button on the right to specify additional information for this annotation method. Annotation Place Specifies where to place the annotation. If this option is disabled, it does not apply to the selected axis. Origin Place Specifies where to place the origin. If this option is disabled, it does not apply to the selected axis. Annotation Rotation Rotates annotation text at the angle you specify. Numerical Method You can specify whether to round axis numbering. Y Multiplier Creates values for a second Y-axis (Y2) by multiplying Y-axis numbering by this value. This option is only enabled for the Y2-axis. Y Constant Add this value to Y2-axis numbering generated by Y Multiplier. This option is only enabled for Y2-axis. Annotation 11-21 Viewing Data and Results 11-22 Inner Tab Option Description Scale Data Maximum Specify the highest possible data value for the selected axis. Data Minimum Specify the lowest data value for the selected axis. Maximum Specify the maximum axis value. Title Grid AxisStyle & GridStyle Minimum Specify the minimum axis value. Origin Specify the origin of the selected axis. Text Enter the title text for the selected axis. Title Rotation Rotates title text at the angle you specify. The xaxis title text cannot be rotated. IsStyleDefault When checked, the GridStyle returns to the default. If this option is disabled, it does not apply to the selected axis. Spacing Specifies the grid increment. If this option is disabled, it does not apply to the selected axis. Pattern List the available line patterns. Width Specify the width of the line, in pixels. Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the selected axis and its label. The color of the button shows the current selection. Color name List the name of the specified line color. To choose a new color by its name, click the down arrow or type the name of the color here. When displaying Undefined, there is no matching color name for the specified color. Font Polar/Radar 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. Origin Base Specify where on the y-axis the x-axis is located. Annotation Angle Specify the angle from the origin where the axis is annotated. 11.16.3 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 11-22 Viewing Data and Results 11-23 list. Figure 11.28 Inner Tab Option Description FillStyle Pattern This drop-down list lists the available fill patterns. Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the selected fill. The color of the button shows the current selection. Color Name Lists the name of the specified fill color. To choose a new color by its name, click the down arrow or type the name of the color here. When displaying Undefined, there is no matching color name for the specified color. LineStyle Pattern Lists the available line patterns. Width Specifies the width of the line, in pixels. Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the selected line. The color of the button shows the current selection. Color Name Lists the name of the specified fill color. To choose a new color by its name, click the down arrow or type the name of the color. When displaying Undefined, there is no matching color name for the specified color. 11-23 Viewing Data and Results 11-24 Inner Tab Option Description SymbolStyle Shape Lists the available symbol shapes. Size Specifies the size of the symbol. Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the selected symbol. The color of the button shows the current selection. Color Name Lists the name of the specified symbol color. To choose a new color by its name, click the down arrow or type the name of the color here. When displaying Undefined, there is no matching color name for the specified color. 11.16.4 Legend Tab The Legend tab allows you to customize the legend on the following inner tabs: Figure 11.29 Inner Tab Option Description General Anchor Specifies where the legend is positioned, relative to the ChartArea. You can fine-tune the positioning with the Location inner tab. Orientation Specifies the layout of items in the Legend. IsShowing Displays the label, if Series-labels have been defined. 11-24 Viewing Data and Results 11-25 Inner Tab Option Description 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. Type Specifies the type of border drawn around the area. If this option is disabled, you cannot change the border type. Border Interior Font Image Width Specifies the width of the border in pixels. Background Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the legend background. The color of the button shows the current selection. Background Color Name List the name of the specified background color. To choose a new color by its name, click the down arrow or type the name of the color. Foreground Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the legend label text. The color of the button shows the current selection. Foreground Color Name List the name of the specified foreground color. To choose a new color by its name, click the down arrow or type the name of the color. 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. 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. 11-25 Viewing Data and Results 11-26 11.16.5 ChartArea Tab The ChartArea tab allows you to customize the chart area in detail. Figure 11.30 Inner Tab Option Description General IsHorizontal Reverses the orientation of X- and Y-axis, making the chart appear horizontal. IsShowingOutlines When checked the chart outlines each series. AngleUnit For Polar, Radar and Filled Radar charts, specifies the angle of measurement. 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. 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. Location Border 11-26 Viewing Data and Results 11-27 Inner Tab Option Description Interior Background Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the chart area background. The color of the button shows the current selection. Background Color Name List the name of the specified background color. To choose a new color by its name, click the down arrow or type the name of the color. Foreground Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the chart axes. This selection will be overridden by any axis setting (see Axes Tab). The color of the button shows the current selection. Foreground Color Name List the name of the specified foreground color. To choose a new color by its name, click the down arrow or type the name of the color. 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. Image 11.16.6 Plot Area Tab The plot area can be customized on the PlotArea tab using the following inner tabs: Figure 11.31 11-27 Viewing Data and Results 11-28 Inner Tab Option General IsBoxed Draws a box around the plot area. Top Specifies the distance from the top of the chart area to the axis. Positive values allow space for axis labels; negative values let you “zoom in” on a chart. Bottom Specifies the distance from the bottom of the chart area to the axis. Positive values allow space for axis labels; negative values let you “zoom in” on a chart. Left Specifies the distance from the left side of the chart area to the axis. Positive values allow space for axis labels; negative values let you “zoom in” on a chart. Right Specifies the distance from the right side of the chart area to the axis. Positive values allow space for axis labels; negative values let you “zoom in” on a chart. Background Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the plot area background. The color of the button shows the current selection. Background Color Name List the name of the specified background color. To choose a new color by its name, click the down arrow or type the name of the color. Foreground Color RGB The colored square button labeled “...” provides access to the standard Windows color picker dialogue view to allow selection of the color used for the plot area foreground. The color of the button shows the current selection. Foreground Color Name List the name of the specified foreground color. To choose a new color by its name, click the down arrow or type the name of the color. File Specifies the file name and path of the image you want to load into the chart element. The button labeled “...” allows you to use the standard Windows file browser to search for and select the file. Layout Select the way you want the image to be displayed in the background. IsEmbedded When checked, the image is embedded into the chart. When unchecked, the chart looks for the image in the specified location. Reset button Click this button to return the chart element background to its default. Interior Image Description 11.16.7 Alarm Zones Tab The Alarm Zones tab allows you to add some customized alarm zones in the profile graph. 11-28 Viewing Data and Results 11-29 Inner Tab Option Description General Name Alarm zone name. UpperExtent Upper bound of the zone. LowerExtent Lower bound of the zone. Colors Pattern Pattern of the zone. IsShowing Determine the alarm zone is displayed or not. Background Color RGB RGB value for background. Name Name of the background color. Foreground Color RBG RGB value of the foreground. Name Name of the foreground color. Add Add a new alarm zone. Remove Remove the existing alarm zone. Figure 11.32 11.17 Trace Window The Trace window is opened using the Trace option from the View menu. When open, it is used by UniSim Flare 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. 11-29 PFD 12-1 12 PFD 12.1 Overview ..................................................................................... 2 12.2 Object Inspection ........................................................................ 3 12.3 PFD Toolbar ................................................................................. 3 12.3.1 PFD Toolbar Icons................................................................... 4 12.3.2 Print Options ......................................................................... 6 12.3.3 Stream Label Options ............................................................. 6 12.3.4 Viewports Option.................................................................... 7 12.4 Installing Objects ........................................................................ 8 12.5 Connecting Objects...................................................................... 9 12.6 Manipulating the PFD................................................................... 9 12.6.1 Selecting PFD Objects ............................................................. 9 12.6.2 Unselecting Objects ...............................................................10 12.6.3 Moving Objects .....................................................................10 12.6.4 Locating Objects on the PFD ...................................................11 12.6.5 Regenerate PFD ....................................................................11 12.7 Printing and Saving the PFD Image ............................................12 12.8 Changing the PFD View Options..................................................13 12.9 Copy/Paste objects.....................................................................13 12-1 PFD 12-2 12.1 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 UniSim 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. 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 12-2 PFD Object 12-3 Icon Orifice Plate Flow Bleed To open the PFD select PFD-Open from the View menu. A separate view with its own toolbar is opened. Figure 12.1 12.2 Object Inspection One of the key features of the UniSim Flare 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. For ease of identification, tail pipes are differentiated from the header pipes in PFD view. 12.3 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. 12-3 PFD 12-4 12.3.1 PFD Toolbar Icons The PFD toolbar icons are arranged as follows: Figure 12.2 The ctrl SHIFT S hot key snaps the objects to the grid. While in the snap mode, the Status bar displays the word Snap. Name Icon Description Print PFD Print the PFD to the Printer. Preview Print PFD Previews a summary of what the print out will look like. Save Image as Windows Metafile Save the PFD to file. It is saved in .emf format (Enhanced Metafile). Copy Image to Clipboard Copies the PFD to the clipboard, allowing you to paste it into other applications. Toggle Grid Display Toggle the grid on and off. When the grid is on, this icon will be faded. Coarser Grid This icon increases grid spacing. All objects you move or add "snap to" the current grid spacing. Finer Grid This icon decreases grid spacing. All objects you move or add "snap to" the current grid spacing. Toggle Snap To Grid On/Off Toggles the snap to grid option on and off. When the snap to grid is on all pipe segments and nodes will be snapped to the closest grids. Zoom Percentage Default value is 100%. User can edit and set the PFD zoom to desired value. The zoom percentage is calculated when exercising the ‘Zoom In’ and ‘Fit to Extends’ options. . Zoom In Click the toolbar button and select the objects in PFD to zoom in. Click again on the toolbar icon to move back to normal selection mode. Fit to Extends Click the toolbar button to get a complete view of the PFD. Drag Mode Click on the toolbar button to enable drag mode. Use mouse instead of scroll bar to navigate across the PFD. Click again on the icon to move back to normal selection mode. Rotate Selected PFD Objects Rotate the selected pipe segments and nodes. 12-4 PFD Name Icon 12-5 Description Toggle Direct/ Orthogonal connections Toggle between bent and straight connections. All current connections (and any connections you subsequently make) will conform to the connection method you have selected. Toggle Connect/ Arrange Mode Toggle between Arrange and Connect modes. Arrange mode allows you to move icons and labels. Connect mode allows you to graphically connect compatible objects. The status bar on the PFD shows which mode is activated. Add Annotation The Add Annotation icon allows you to add blocks of text or notes to the PFD. Clicking it displays the Annotation Editor view shown below as Figure 12.3. Toggle Palette Display This icon toggles the Toolbox view. Drop down Options Drop down menu for options. Once the option is chosen the second box will populate with appropriate units. Figure 12.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. 12-5 PFD 12-6 Item Description 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. 12.3.2 Print Options You can specify the area of the PFD that you desire to print by selecting the following options available on the PFD toolbar. Option Description Print Visible Print part of the PFD visible on the screen. Print All Print the whole PFD. Print Selected Print only the selected part of the PFD. You can highlight the part of the PFD by clicking once on the PFD and than dragging the section of PFD. The PFD is printed without the page header and footer to allow compilation of a multiple tiled image. The following properties are available: Energy Flow Length Mach Number Mass Flow Molecular Weight 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 Mass flow rate / rated flow Stagnation energy Mass flow used. All Tiled Splits the whole PFD into four parts and prints in four page. 12.3.3 Stream Label Options By default, each object on the PFD has a label that displays its name. You can change all object name labels so that the current value of a key variable is shown in the place of each object name. You can choose between the type of labels for the pipe segments and 12-6 PFD 12-7 nodes by selecting the property drop-down list on the PFD toolbar. Figure 12.4 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. 12.3.4 Viewports Option You have the option to change the PFD viewports. By default, a single PFD viewport is defined as Overall. You can specify a different setting for each viewport including percent zoom and stream labels. Add a New Viewport New viewports can be added to the PFD by right clicking the toolbar 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. 12-7 PFD 12-8 Delete an Existing Viewport You can delete an existing viewport from the PFD by right clicking the PFD view toolbar and selecting the Delete Viewport from the menu. Print Viewport Visible viewports can be printed to a selected printer by right clicking on the PFD view toolbar and choosing the Print Window from the menu. 12.4 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. Figure 12.5 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. 12-8 PFD 12-9 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. 4. Alternatively, double click on a PFD location (empty space), click on the toolbox icon to position at a desired PFD position. To delete an object, select the object you want to delete, and then press the delete key. 12.5 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. 12.6 Manipulating the PFD Note: UniSim Flare allows you to select single objects as well as multiple objects, but in order to select an object, you must be in Arrange mode. There are a number of features built into the PFD interface to modify its appearance. The manipulations apply to all objects that are installed in the PFD. 12.6.1 Selecting PFD Objects To select a single object, position the mouse pointer on top of the object, and then click once with the left mouse button. The selected object will have eight small boxes outlining its border. These small 12-9 PFD 12-10 boxes are used to size an object. Note: The text must be selected separately; that is, when you select an object, the corresponding text is not also automatically selected. There are two methods you can use to select multiple objects: Method One 1. If the objects are all contained within the same area, the quickest and easiest way is to marquee select that group. Press the left mouse button (outside the group), and drag the mouse so that a box appears. 2. Continue dragging until this box contains all the objects that you want selected. 3. When you release the mouse button, each object will have its own rectangular box surrounding it, indicating it has been selected. 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. 12.6.2 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. 12.6.3 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. 12-10 PFD 12-11 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. 12.6.4 Locating Objects on the PFD You can locate individual objects on the PFD by pressing the ctrl f hot keys, which displays the Locate Object view. You can select individual objects from the list by clicking on them using the primary mouse key. The object will be highlighted on the PFD. Alternately, key in the name of the object in the Object Name Filter text box. Choose from the filtered list or the search will navigate to the object on PFD if an exact match is found. To stop searching use Esc keys. Figure 12.6 12.6.5 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 12-11 PFD 12-12 manner. It is not recommended to regenerate well laid out PFDs. 12.7 Printing and Saving the PFD Image The first three toolbar icons are used to transfer the PFD to the printer, Windows Metafile and to memory. To print the PFD using the current Print Setup, click the Print PFD icon. For more information on the Print Setup, see Printer Setup. To save the PFD in .emf format (Enhanced Metafile), click the Save PFD icon. You will be prompted to enter a file name: Figure 12.7 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. 12-12 PFD 12-13 12.8 Changing the PFD View Options When in the PFD view, UniSim Flare allows you to select several view options, namely, Grid, Rotate, and Connection. All of these options are available via toolbar. The following is a description of each icon: Toolbar Object Description Toggle Grid Display icon When the Grid toolbar icon is selected, a grid is superimposed 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 PFD Objects icon You can select to rotate or mirror (flip) the selected object about 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 Direct/ Orthogonal Connections These icons allow you to toggle between direct and orthogonal connecting lines. 12.9 Copy/Paste objects To duplicate a section of the flowsheet, UniSim Flare allows to select respective unit operations objects on the PFD node. The selected 12-13 PFD 12-14 objects are highlighted as in Fig 12.8 Figure 12.8 Right click the mouse (or use the respective shortcut keys shown in the following table) to pop up options to Copy/Paste/Undo Paste or use the respective short cut keys. Option Description Copy (ctrl + c) Copies the selected PFD objects Paste (ctrl + v) Enabled when objects are copied Allows user to paste the copied object at desired location enabled by a mouse click on PFD. Unique name (copiedobjectname_copy) is created for the pasted objects. Undo Paste (ctrl + z) Enabled when objects are pasted to PFD. Reverts any paste operation to PFD. Note: UniSim Flare allows you to select single objects as well as multiple objects, but in order to select an object, you must be in Arrange mode. 12-14 Printing, Importing and Exporting 13-1 13 Printing, Importing and Exporting 13.1 Overview ..................................................................................... 2 13.2 Printing........................................................................................ 2 13.2.1 FMT Files............................................................................... 4 13.2.2 Location-Specific Printing ........................................................ 5 13.2.3 Printer Setup ......................................................................... 5 13.3 Import Wizard ............................................................................. 6 13.3.1 Import Data Layouts............................................................... 6 13.3.2 Using the Import Wizard ......................................................... 7 13.4 Importing Source Data ...............................................................15 13.4.1 ASCII Text Files ....................................................................15 13.4.2 Importing UniSim Design Source Data......................................18 13.5 Export Wizard .............................................................................21 13.6 Export Data Layouts ...................................................................22 13.6.1 Using the Export Wizard.........................................................22 13.7 Import/Export Examples ............................................................31 13.7.1 Default XML Import ...............................................................32 13.7.2 Import of Updated Source Data from Excel ...............................40 13.7.3 Export to Access Database for UniSim Flare ..............................44 13.7.4 Export Pipe Data Table to Excel ...............................................45 13.7.5 Merge Cases Through Export/Import Wizards............................48 13-1 Printing, Importing and Exporting 13-2 13.1 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 UniSim Flare can also be used to export data and results in a number of industry standard formats. • • • • The following data may be exported from UniSim Flare: All data and results may be printed on any Windows-compatible printer. All data and results may be saved as either ASCII text, Commaseparated text, or Tab-separated text. The Export Wizard allows selected data and results to be exported to Access database files, Excel spreadsheet files or XML data files. The following data may be imported into UniSim Flare: • • Source data from the UniSim Design and HYSYS process simulators. This data is transferred via an ASCII file. Consequently, it should be possible to import source data from any external source provided it conforms to this file format. The Import Wizard allows selected data to be imported from Access databases, Excel spreadsheets or XML data files. 13.2 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. Figure 13.1 13-2 Printing, Importing and Exporting 13-3 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. Note: Pipes Summary and Sources Summary option prints the Deviating Pipes and Deviating Sources data only. 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. PDF - Saves the data in PDF format If you checked the Print To File checkbox, the Print To File view will be displayed when you click Print. Figure 13.2 Select or directly enter the file, then click Save. If you did not check the Print To File checkbox, the results will immediately be printed to your default printer when you click Print on the Print view. 13-3 Printing, Importing and Exporting 13-4 13.2.1 FMT Files The printouts can be customized to a limited extent using a series of ASCII text files with the extension ".fmt". These files may be edited using any ASCII text editor such as the NOTEPAD application distributed with Microsoft Windows. The default ".fmt" files for each printed report are: Report .fmt File Component Database DbComps.fmt Pipe Fittings Database DbFittings.fmt Pipe Schedules Database DbSchedules.fmt Components Comps.fmt Scenarios Scenarios.fmt Pipes Pipes.fmt Source Sources.fmt Nodes Nodes.fmt Messages Messages.fmt Pressure/Flow Summary Summary.fmt Compositions MoleFracs.fmt Physical Properties Properties.fmt Scenario Summary ScenSum.fmt By default, these files are located in the UniSim Flare program directory. You can change the location and ".fmt" file for each report via the Reports tab on the Preferences Editor view. Figure 13.3 13-4 Printing, Importing and Exporting 13-5 These files conform to the format shown in Section C - File Format. 13.2.2 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: Figure 13.4 13.2.3 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 13-5 Printing, Importing and Exporting 13-6 Setup commands in other Windows applications. Figure 13.5 13.3 Import Wizard The Import Wizard is a general data import utility that allows UniSim Flare 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 UniSim Flare model or just a set of updated source flow rates. Customized import definitions can be created and saved for later use. 13.3.1 Import Data Layouts The Import Wizard is capable importing data from a fairly wide range of data layouts within a particular data file type. The general rules for successful importing of data are: • • Import data must be grouped by data type e.g. data for all pipes must appear in one Access database table, on one Excel spreadsheet page or in within a single XML group element. Import data for a given type must be defined in a consistent layout e.g. in an Excel spreadsheet all the pipe data could be specified in 3 rows per pipe spaced one row apart. 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 Section C.2 - FMT Files Format. 13-6 Printing, Importing and Exporting 13-7 13.3.2 Using the Import Wizard You start the Import Wizard by selecting the Import Wizard option from the File menu. This may be done either immediately after starting UniSim Flare in order to import the data to create a UniSim Flare model from an external data source or after loading a UniSim Flare case to extend and modify it with data from the external source. Once started the Import Wizard presents you with a 4 step dialogue to allow you to specify the data you want to import. Three buttons are common to each step: • • • Next – moves the Import Wizard to the next stage. If the data on the current step is incomplete the Next button may be disabled i.e. grayed out. Clicking Next can also generate validation messages that prevent you moving to the next step. If this happens you will need to fix the problem described before continuing. Prev – move the Import Wizard back to the previous stage. You can use this option to go back and change your mind about the type of file you want to import or change the definition settings. Cancel – this button abandons the import process, closes the Import Wizard and returns you to the standard UniSim Flare environment. Import Wizard - Step 1 Figure 13.6 The view for the first step of the Import Wizard is shown in Figure 13.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 13-7 Printing, Importing and Exporting 13-8 Figure 13.7. Figure 13.7 If you get an error when opening the database file, first convert and save the database file in Access. The file selected must be one of the following types: File Type Extension Description Access .MDB A Microsoft Access database file. Import of data from all versions of Access up to version 4.0 (Access 2000) is supported. You do not need a copy of Access on the PC that is running UniSim Flare in order to use this option. Excel .XLS A Microsoft Excel spreadsheet file. Import of data from Excel up to 2003 is supported. The PC that is running UniSim Flare must have an installed copy of Excel. XML .XML An XML data file. XML data files that comply with the XML 1.0 reference document from W3C are supported. Once the file name has been entered click the Next button to move to the next step. 13-8 Printing, Importing and Exporting 13-9 Import Wizard – Step 2 Figure 13.8 Step 2 of the Import Wizard view is shown in Figure 13.8. This view asks you to define the import definition file that will be used to control this import. Three options are provided: • • • Use the default import definition file. This option selects the default import definition file that has been defined through the Preferences view, Import/Export tab. Create a new import 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 the following import definition 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. 13-9 Printing, Importing and Exporting 13-10 Import Wizard - Step 3 Figure 13.9 Step 3 of the Import Wizard is shown in Figure 13.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 UniSim Flare model. Selecting a data object in the tree by either clicking on it or using the up or down arrow keys displays the import definition settings for that object on the Source and Field Details tab. Some data objects have subsections for which import options may be defined separately from the parent data object. These are indicated in the tree by a 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. 13-10 Printing, Importing and Exporting 13-11 Source Tab The precise layout of the Source tab will vary with the type of data file that is being imported. If an Access database file is being imported the following fields will be displayed: Field Description Import this type of data This checkbox allows you to define whether this type of data object should be imported. If not selected then all objects of this type will be ignored during the import. Data is contained in parent This checkbox is only enabled for data subsections. If selected then the import process will expect to find all the data for this subsection 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. If an Excel spreadsheet file is being imported the following fields will be displayed: Field Description Import this type of data This checkbox allows you to define whether this type of data object should be imported. If not selected then all objects of this type will be ignored during the import. Data is contained in parent This checkbox is only enabled for data subsections. If selected then the import process will expect to find all the data for this subsection 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 the subsection data fields. E.g. All pipes and nodes allow PFDLayout data to be held on a separate worksheet. Select Worksheet This drop-down list allows you to select the worksheet that contains 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. 13-11 Printing, Importing and Exporting 13-12 Field Description Data in Rows, Columns, Sheets These radio buttons allow you to specify whether the spreadsheet data for this item is organized by Row, Column or Sheet. 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 type of data This checkbox allows you to define whether this type of data object should be imported. If not selected then all objects of this type will be ignored during the import. Data is contained in parent This checkbox is only enabled for data subsections. If selected then the import process will expect to find all the data for this subsection in 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 Tag This drop-down list allows you to select the XML group tag or element 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. 13-12 Printing, Importing and Exporting 13-13 Field Details Tab Figure 13.10 The Field Details tab provides a table that allows you to specify which data fields are to be imported and where they can be found in the import data source. The columns of the table are: Column Description Data Item This column lists the individual data items that may be imported for this object. The items in this column cannot be changed. Import This column of checkboxes allows you to select which data items are imported. Check the checkbox to import an item, clear it to ignore the data item. The Import All and Clear All buttons at the bottom of the table allow you to set or clear all of the Import checkboxes with a single click. The letter number format (A1 etc) is not supported. Location The actual heading of this column and its contents will depend on the type of data file being imported. Access Files. The column will be headed Database Field and allows you to specify the database field name that corresponds to the data item. The drop-down list contains a list of the default field names from the definition file or you can type in the name if it is not in the list. Excel Files. The column will be headed Row/Column Offset. It allows you to specify the Row/Column offset of the data item in the spreadsheet in the format R#,C#. i.e. the row and column number separated by a comma. If the data is contained in a single Row then just the column number can be specified or if the data is contained in a single Column the row number alone can be supplied. XML Files. The column will be headed ItemTag and allows you to specify the element tag that corresponds to the data item. The dropdown 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. 13-13 Printing, Importing and Exporting 13-14 When you have finished updating the import definition, click the Next button to move to the final step of the Import Wizard. Import Wizard - Step 4 Figure 13.11 The final step of the Import Wizard is shown in Figure 13.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 Options This set of radio buttons allows you to select whether the import 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 option if you want to save the definition file without running the import process. Log Import Actions to File Select this checkbox if you want to record the details of the 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. 13-14 Printing, Importing and Exporting 13-15 Import Process If you have asked to save the import definition file, UniSim Flare 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. 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 UniSim Flare views. During the import process UniSim Flare reads each data object in turn from the import data source and checks its name. If the object already exists in the UniSim Flare 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. 13.4 Importing Source Data In addition to the Import Wizard features, UniSim Flare allows you to import source data from a specially formatted text file. Utilities are provided to export data in this format from the UniSim Design process simulator. UniSim Flare also allows you to import data directly from the UniSim Design process simulator. 13.4.1 ASCII Text Files To access the ASCII text files containing the source data, select Import Sources from the File menu and then select Text File Sources from the Import submenu. 13-15 Printing, Importing and Exporting 13-16 The Text Import of Source Data view will be displayed: Figure 13.12 The following objects are available on this view: Object Description File Specify the file from which the source data will be imported. Clicking the Browse button opens the Text File For Source Data view. Select the text file from this view and click the OK button. Click the Open button to load the source data file in UniSim Flare. 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 UniSim Design file and the UniSim Flare case. The 'Use Native Components' selection does not copy the same components from the UniSim Design file to the UniSim Flare case, whereas 'Use UniSim Design Components' copies all the component data from the UniSim Design file to the UniSim Flare case. Stream List all the streams available to be imported in UniSim Flare. Source Select the source to which the source data will be imported. Scenarios List all the scenarios available in the UniSim Flare case. You can select the scenarios to which the data will be copied. 13-16 Printing, Importing and Exporting 13-17 Example 1: Importing From UniSim Design Two steps are necessary in order to import source data from UniSim Design though an ASCII text file. 1. Export the source data from UniSim Design. A program must be executed externally to UniSim Design in order to convert the source data to the proper format. 2. Import the source data into UniSim Flare, using the File Import feature. In order to import the UniSim Design 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. Figure 13.13 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 UniSim Flare model that corresponds to each UniSim Design stream. Specify the P/T Location and the Component Data from the drop-down list. 13-17 Printing, Importing and Exporting 13-18 13.4.2 Importing UniSim Design Source Data The Source data can also be imported directly from UniSim Design. To access the UniSim Design files containing the source data, select Import Sources from the File menu and then select UniSim Design Sources from the submenu. The UniSim Design Import of Source Data view will be displayed: Note: You must have a copy of UniSim Design installed on the PC on which you are running UniSim Flare to use this option. Figure 13.14 The following objects are available on this view: Object Descrption File Specify the UniSim Design file from which the source data will be imported. Clicking the Browse button opens the UniSim Design File For Source Data view. Select the UniSim Design file from this view and click the OK button. Click the Open button to load the source data file in UniSim Flare. 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. 13-18 Printing, Importing and Exporting 13-19 Object Descrption Component Data Specify the action to be taken if similar components exist in the UniSim Design file and the UniSim Flare case. 'Use Native Components' selection does not copy the same components from the UniSim Design file to the UniSim Flare case, whereas the 'Use UniSim Design Components' copies all the component data from the UniSim Design file to the UniSim Flare case. Stream List all the streams available in UniSim Design file which can be imported in UniSim Flare. Source Select the source to which the source data will be imported. Scenarios List all the scenarios available in the UniSim Flare case. You can select the scenarios to which the data will be copied. 13.4.3 Importing from PRS Prerequisite Refer Scenario Summary in Section 4 of PRS Getting started Guide for details on exporting relief device data in Excel format. Ensure that PRDTagName for the relief device matches the excel sheet tab name. Importing data Source data can be imported directly from Excel generated by UniSim PRS. To access the PRS excel files containing the source data, select Import Sources from the File menu and then select PRS Sources from the submenu. Import Source data from PRS view appears as below. Figure 13.15 13-19 Printing, Importing and Exporting 13-20 Click the Browse button and locate the PRS generated excel file. Click Open button to read the data. Figure 13.16 Mapping the PRS data to a relief device in USF and linking scenario specific data for these devices is achieved in 2 steps. The table in Import Source Data from PRS displays the configuration information for relief device and provides option to map the USF relief device. Note that the configuration information for the relief device is based on the worst case run from the PRS i.e. the values for the configuration are read from the Scenario Summary tab of PRS sheet. 1. Relief Valve Mapping: When importing to an existing USF case, USF Source column lists the various relief valves in the flowsheets. For each relief device that needs data to be imported, choose a USF relief valve from drop down. While importing to a new relief device in USF case, provide unique name(s) for the device(s) to be imported. Tail pipe along with new relief valve will be created by default e.g. relief valve created with name “RV001”, Tail pipe with name “RV001_Tailpipe” will be created by default. If the relieving device is configured with inlet pipe in PRS, the corresponding data is imported within the inlet piping module of the source in USF. If the relieving device is configured with tail pipe in PRS, import utility 13-20 Printing, Importing and Exporting 13-21 transfers data to pipe that is attached to source if the pipe is configured as Tail Pipe. If no Tail Pipe exists in USF, warning message “Pipe connected to valve is not a tail pipe, Tail pipe data is not imported” is displayed in trace window. Note: USF supports only one segment for pipe whereas PRS supports multiple pipe segment. When importing pipes with multiple segment, USF will import last segment data for Inlet pipe and first segment data for tail pipe. 2. Scenario Mapping Double click each relief valve will open Import scenarios specific data window. The table in Import Scenario specific Data lists the various scenarios in the PRS excel file for this source. The information is read from the respective relief device tab of the PRS sheet. Column USF scenario Name provides a list of the USF scenarios to map each PRS scenario. Figure 13.17 13.5 Export Wizard The Export Wizard is a general data export utility that allows UniSim Flare 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 UniSim Flare 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 UniSim Flare cases. Customized export definitions can be created and saved for later use. 13-21 Printing, Importing and Exporting 13-22 13.6 Export Data Layouts The Export Wizard is capable of creating output of a fairly wide range of data layouts within a particular data file type. The general limits when exporting data are: • • Export data will be grouped by data type e.g. data for all pipes will appear in one Access database table, on one Excel spreadsheet page or in within a single XML group element. Export data for a given type will be output in a regular layout e.g. in an Excel spreadsheet all the pipe data could be output as 3 rows per pipe spaced one row apart. Samples of the type of data layouts that can be generated and the corresponding definition file formats are given in Import/Export Examples. Detailed descriptions of the definition file structure are given in Section C.2 - FMT Files Format. 13.6.1 Using the Export Wizard The Export Wizard exports data from the UniSim Flare model that is currently loaded. You start the Export Wizard by selecting the Export Wizard option from the File menu. Once started the Export Wizard presents you with a 4 step dialogue to allow you to specify the data you want to export. Three buttons are common to each step: • • • Next - moves the Export Wizard to the next stage. If the data on the current step is incomplete the Next button may be disabled i.e. grayed out. Clicking Next can also generate validation messages that prevent you moving to the next step. If this happens you will need to fix the problem described before continuing. Prev - move the Export Wizard back to the previous stage. You can use this button to go back and change your mind about the type of file you want to export to or change the definition settings. Cancel - this button abandons the export process, closes the Export Wizard and returns you to the standard UniSim Flare environment. 13-22 Printing, Importing and Exporting 13-23 Export Wizard - Step 1 Figure 13.18 The view for the first step of the Export Wizard is shown in Figure 13.18. 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 Figure 13.19. Figure 13.19 13-23 Printing, Importing and Exporting 13-24 The file selected must be one of the following types: File Type Extension Description Access .MDB A Microsoft Access database file. Export of data to either Access version 3.0 (Access 97) or Access version 4.0 (Access 2000) is supported. You do not need a copy of Access on the PC that is running UniSim Flare in order to use this option. Excel .XLS A Microsoft Excel spreadsheet file. The export of data will be made to the version of Excel that is installed on the PC that is running UniSim Flare. XML .XML An XML data file. XML data files that comply with the XML 1.0 reference document from W3C are generated. Selecting the Clear all... option will clear ALL data even if it did not originate from a previous UniSim Flare 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 before export Select this checkbox if you want to clear the target file of all existing data before exporting the new values from UniSim Flare. Create new Access files as These radio buttons allow you to specify whether a new 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. 13-24 Printing, Importing and Exporting 13-25 Export Wizard - Step 2 Figure 13.20 Step 2 of the Export Wizard view is shown in Figure 13.20. This view asks you to define the export definition file that will be used to control this export. Three options are provided • • • Use the default export definition file. This option selects the default export definition file that has been defined through the Preferences view, Import/Export tab. Create a 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 the following export definition 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. 13-25 Printing, Importing and Exporting 13-26 Export Wizard - Step 3 Figure 13.21 Step 3 of the Export Wizard is shown in Figure 13.21. This view allows you to update the export definition to define precisely which data items and data fields are to be exported. The view is divided into four elements: • • • • Object selector Target tab 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 UniSim Flare 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. 13-26 Printing, Importing and Exporting 13-27 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 of data This checkbox allows you to define whether data for this type of object should be exported. If not selected then all objects of this type will be ignored during the export. Data is contained in parent This checkbox is only enabled for data subsections. If selected then the export process will write all the data for this subsection to the same database table as the parent object and the remaining fields on the form will be disabled. Clearing this checkbox allows you specify a different database table for the subsection data fields. E.g. All pipes and nodes allow PFDLayout data to be output to a separate table. Table Name This entry allows you to define the database table that will contain the data for this object type. The table will be created if it does not already exist in the database. If an Excel spreadsheet file is being exported the following fields will be displayed: Field Description Export this type of data This checkbox allows you to define whether data for this type of object should be exported. If not selected then all objects of this type will be ignored during the export. Data is contained in parent This checkbox is only enabled for data subsections. If selected then the export process will write all the data for this subsection 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 the subsection data fields. E.g. All pipes and nodes allow PFDLayout data to be written to a separate worksheet. Worksheet name This entry allows you to specify the worksheet that will contain the 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, Columns, Sheets These radio buttons allow you to specify whether the spreadsheet data for this item is output by Row, Column or Sheet. 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. 13-27 Printing, Importing and Exporting 13-28 Field Description Per Item This field is visible when the data is output by Row or Column. It defines the number of rows or columns occupied by a single data object. This number should include any blank rows or columns used to space out data. Sheet Tag This field is visible when the data is output by Sheet. It defines the name of a “format” worksheet that should be copied when creating a new worksheet to output data for the selected data object. These “format” worksheets must have a name that begins with a “%” character to allow them to be identified and preserved in the event that the Export Wizard is asked to clear a workbook before output. If an XML data file is being exported the following fields will be displayed: Field Description Export this type of data This checkbox allows you to define whether this type of data object should be exported. If not selected then all objects of this type will be ignored during the export. Data is contained in parent This checkbox is only enabled for data subsections. If selected then the export process will write all the data for this subsection in the 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. 13-28 Printing, Importing and Exporting 13-29 Field Details Tab Figure 13.22 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. The letter number format (A1 etc) is not supported. Location The heading of this column and its contents will depend on the type of data file being exported. Access Files. The column will be headed Database Field and allows you to specify the database field name that will hold the data item. Excel Files. The column will be headed Row/Column Offset. It allows you to specify the Row/Column offset of the data item in the spreadsheet in the format R#,C#. i.e. the row and column number separated by a comma. If the data is contained in a single Row then just the column number can be specified or if the data is contained in a single Column the row number alone can be supplied. XML Files. The column will be headed Item Tag and allows you to specify the element tag that corresponds to the data item Force Default Composition Basis Checkbox This checkbox provides a single global setting that tells the Export 13-29 Printing, Importing and Exporting 13-30 Wizard how to write composition data. Selecting this option will write out all compositions using the Composition Basis set in the Default tab of the Preferences Editor. If the option is clear the composition of each source will be written using the basis that it is currently set to. Note: There is a potential trap here. If you clear this checkbox and then omit to export the data item that defines the composition basis the exported file might contain compositions with an inconsistent basis i.e. mixed mole and mass fraction data with no way to distinguish which is which. When you have finished updating the export definition, click the Next button to move to the final step of the Export Wizard. Export Wizard – Step 4 Figure 13.23 The final step of the Export Wizard is shown in Figure 13.23. 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. 13-30 Printing, Importing and Exporting 13-31 The fields on this view are: Entry Description Select Export Options This set of radio buttons allows you to select whether the export 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, UniSim Flare 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. 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 UniSim Flare views. During the export process UniSim Flare 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 UniSim Flare 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. 13.7 Import/Export Examples A number of sample data files and the corresponding import or export 13-31 Printing, Importing and Exporting 13-32 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. 13.7.1 Default XML Import In this example we are going to import a complete UniSim Flare model from an XML data file. The structure of XML data file is the same as the default layout assumed by UniSim Flare. The steps are: 1. Start up UniSim Flare or, if UniSim Flare is already running with a case loaded, click the New Case button on the toolbar and then click the OK button to close both the Case Description and Component Manager views that will appear without entering any information. 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 UniSim Flare 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 UniSim Flare 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 UniSim Flare 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 UniSim Flare environment from where you 13-32 Printing, Importing and Exporting 13-33 can use the various manager views and summary views to inspect the data that has been imported. You might also want to view or print the log file. Note: Only data items are imported and you will need to run the case to view the results. Access Database Import Using Select Criteria In this example we are going to import a flare system model from an Access database file. The structure of the database we are importing is different to the default database structure assumed by UniSim Flare so it will be necessary to create a new customized import definition file. The database to be imported is: <Your UniSim Flare Directory>\Samples\ImportExport\Sample2.mdb. It contains the following 4 tables: 13-33 Printing, Importing and Exporting 13-34 Components Table Component Name Boiling Point Std Density Mole Weight Methane 111.63 299.39 16.043 30.07 Ethane 184.55 355.68 Propane 231.05 506.68 44.097 n-Butane 272.65 583.22 58.124 n-Pentane 309.21 629.73 72.151 n-Hexane 341.88 662.66 86.178 Pipes Table Name Length Elevation Nominal Diameter Fittings Loss TP-123A 15 0 12 inch 0.5 PSV-123A T1 TP-145A 15 0 8 inch 0.5 PSV-145A T1 TP-112B 5 0 12 inch 0.1 BDV-112B RO112B BD-101A 50 0 16 inch 0.1 T1 T2 BD-112B 20 0 12 inch 0.5 RO-112B C1 BD-103A 60 0 24 inch 0.1 T2 C2 BD-104A 200 0 24 inch 0.2 C2 C3 FS-100A 50 50 24 inch 0.3 C3 FT-100 BD-102A 40 0 12 inch 0.1 C1 T2 Inlet Outlet 13-34 Printing, Importing and Exporting 13-35 Nodes Table Node Type Node name Param1 Param2 PSV PSV-123A 0 0 PSV PSV-145A 0 0 BDV BDV-112B 0 0 RO RO-112B 0.85 0 Manifold T1 0 0 Join C1 0 0 Manifold T2 0 0 Join C2 0 0 Join C3 0 0 Tip FT-100 574.65 1 FlowData Table Source Name Press ure Inlet Temp MABP Mass Flow Frac 1 Frac 2 Frac 3 Frac 4 Frac 5 Frac 6 Ignor ed PSV-123A 10 20 4 50000 0.75 0.1 0.06 0.05 0.03 0.01 0 PSV-145A 8 15 3.5 40000 0.05 0.1 0.8 0.05 0 0 0 BDV-112B 5 15 3 30000 0.8 0.2 0 0 0 0 0 Scenario Table Name Default Scenario The steps required to import this database are: 1. Start up UniSim Flare or, if UniSim Flare is already running with a case loaded, click the New Case icon on the toolbar and then click the OK button to close both the Case Description and Component Manager views that will appear without entering any information. 2. Open the Preferences Editor and ensure that the default Composition Basis is set to Mole Fractions. The Import Wizard is capable of reading composition basis during the import process but in this case our database does not have entries defining this. Therefore we must set an appropriate default for the data we are importing. 3. Start the Import Wizard by selecting it from the File menu. 4. In Step 1 either type in the name of the Access file to be imported: <Your UniSim Flare Directory>\Samples\ImportExport\Sample2.mdb or use the Browse button to look for and select this file using the 13-35 Printing, Importing and Exporting 13-36 Windows file browser. Then click the Next button. 5. In Step 2 select the Create a new import definition file radio button then click the Next button. When the Step 3 view appears you will see that no data objects have been selected for import i.e. all object names in the tree view are displayed in normal type. We now need to specify which objects will be imported. As an alternative you could select the pre-built import definition file for this sample: <Your UniSim Flare Directory>\Samples\ImportExport\Sample2.fni which contains the results of steps 6 to 19. If you do this it is still worth reading through these steps to see how the settings in the import definition file are used to tell the Import Wizard about the database we are importing. 6. Click on Components in the Object Selector tree view. On the Source tab select the checkbox Import this type of data and confirm that the Select Table drop-down list is displaying Components. 7. Click on the Field Details tab. 8. On the Field Details tab we need to select the import checkboxes and from the drop downs, specify the database field names as follows: Data Item Database Field Name ComponentName MolWt MoleWeight StdDensity StdDensity NBP BoilingPoint 9. Next click on Connectors in the Object Selector tree view. On the Source tab select the checkbox Import this type of data and then select Nodes as the source table using the Select Table dropdown list. Since the Nodes table we are importing contains data for multiple node types we have to tell this Import Wizard which entries are connectors. This is done by typing selection criteria into the Select entry. In our case the Nodes database has a NodeType field that identifies Connectors as a Join so the select entry we need is: NodeType=’Join’ 10. Now click on the Field Details tab and make the following entry, remembering to select the Import checkbox. Data Item Database Field Name NodeName 13-36 Printing, Importing and Exporting 13-37 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 10. 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. Uncheck the Data is contained in parent checkbox. 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. Data Item Database Field SourceName SourceName Ignored Ignored MassFlow MassFlow RelievingPressure Pressure InletTemperatureSpec InletTemp AllowableBackPressure MABP 15. Next click on the Composition subsection entry beneath the SourceData subsection under the ControlValves. On the Select tab check the Import checkbox and the Data is contained in parent checkbox. This latter checkbox indicates to the Import Wizard that the composition data for each source is in the same record as parent SourceData record. 16. On the Field Details tab for the Composition subsection make the following entry. Data Item Database Field Fraction Frac+%Composition 13-37 Printing, Importing and Exporting 13-38 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. In this case the user must type this field; there is no way to select the field from the dropdown. As an aside, if the composition entries were defined by name e.g. FracMethane, FracEthane etc. we would use the code “Frac+?Composition” to substitute each component name in turn instead of component index numbers. 17. The remaining entries are similar. Select OrificePlates and make the following entries: Source tab Select Table = Nodes Select entry = NodeType=’RO’ Field Details tab Data Item Database Field Name NodeName UpstreamDiameterRatio Param1 18. Select Pipes and make the following entries: Source tab Select Table = Pipes Select entry = <blank> Field Details tab Data Item Database Field Name Name UpstreamConnection Inlet DownstreamConnection Outlet Length Length ElevationChange Elevation NominalDiameter NominalDiameter FittingLossOffset FittingsLoss 19. Select ReliefValves and its SourceData and Composition subsections in turn to setup the same entries as for the ControlValves data object, the only change being that the Select entry should read NodeType=’PSV’. 20. Select Tees and make the following entries: 13-38 Printing, Importing and Exporting 13-39 Source tab Select Table = Nodes Select entry = NodeType=’Manifold’ Field Details tab Data Item Database Field Name NodeName 21. Select Tips and make the following entries: Source tab Select Table = Nodes Select entry = NodeType=’Tip’ Field Details tab Data Item Database Field Name NodeName Diameter Param1 FittingLoss Param2 22. Select Scenarios and make the following entries: Source tab Select Table = Scenarios Select entry = <blank> Field Details tab Data Item Database Field Name Name 23. 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. 24. 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: 13-39 Printing, Importing and Exporting 13-40 <Your UniSim Flare directory>\Samples\ImportExport\Sample2.log is provided for comparison. 25. 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 Figure 13.24. Figure 13.24 You should also review the Pipe and Node data for the model through the summary views. Note: Notice how the standard UniSim Flare 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. 13.7.2 Import of Updated Source Data from Excel In this example we are going to use the Import Wizard to update an existing UniSim Flare model with new source data from an Excel 13-40 Printing, Importing and Exporting 13-41 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 UniSim Flare Directory>\Samples\ImportExport\Sample3.xls The layout of data on each worksheet is shown in Figure 13.25: Figure 13.25 The steps required to import the workbook are: 1. Start up UniSim Flare and load the model that we are updating: <Your UniSim FlareDirectory>\Samples\ImportExport\Sample3.usf. 2. Open the Preferences Editor and ensure that the default composition basis is set to Mole Fractions. The Import Wizard is capable of reading composition basis during the import process but in this case the workbook does not have entries defining this. Therefore we must set an appropriate default for the data we are importing. 3. Start the Import Wizard by selecting it from the File menu. 4. In Step 1 either type in the name of the Excel file to be imported: <Your UniSim Flare Directory>\Samples\ImportExport\Sample3.xls or use the Browse button to look for and select this file using the Windows file browser. Then click the Next button. 5. In Step 2 select the Create a new import definition file radio button then click the Next button. When the Step 3 view appears you will see that no data objects have been selected for import i.e. all object names in the tree view are displayed in normal type. We now need to specify which objects will be imported As an alternative you could select the pre-built import definition file 13-41 Printing, Importing and Exporting 13-42 for this sample: <Your UniSim Flare Directory>\Samples\ImportExport\Sample3.fni which contains the results of steps 6 to 19. If you do this it is still worth reading through these steps to see how the settings in the import definition file are used to tell the Import Wizard about the Excel workbook we are importing. 6. Click the Scenarios object in the Object Selector tree view. On the Source tab, check the Import this type of data checkbox. Next select the first of the available worksheets in the Select Worksheet dropdown list. Then select the Data is in Sheets radio button since the data we are importing is organized as one scenario per sheet. Finally on this tab, enter Scenario- in the Sheet Tag field. When we tell the Import Wizard that data is organized in Sheets, it needs to know how to recognize the worksheets that contain the right type of data (scenario data in this case). The Import Wizard does this by assuming that the appropriate sheets have a name that begins with the text defined in the Sheet Tag entry. Although our workbook only contains scenario worksheets we still need to enter a tag by which they can be recognized. In our case they all begin with the tag Scenario-. Note: Any worksheet can be specified in the Select Worksheet dropdown when you select the Data is in Sheets option is selected since the import process will work through all worksheets with the appropriate tag. You cannot leave this field blank however. 7. Now click the Field Details tab. On this tab select the Import checkboxes against the following data items and enter their location as follows: Data Item Row, Column Offset (#,#) Name 3,2 Pressure 5,2 HeaderMach 6,2 HeaderNoise 7,2 TailpipeMach 6,2 TailpipeNoise 7,2 Note: It is possible to read the same data item into more than one UniSim Flare 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. 13-42 Printing, Importing and Exporting 13-43 8. Now click the SourceData subsection under the Scenario object in the Object Selector tree view. On the Source tab, check the Import this type of data checkbox and check the Data is contained in parent checkbox. This latter entry tells the Import Wizard that the source data is located on the same worksheet as the base scenario data and as a result the remaining fields on this tab are automatically set to the parent values and disabled to prevent them being independently modified. 9. Still on the SourceData subsection, select the Field Details tab. Check the Import checkboxes for the following data items and make the following Row, Column entries: Data Item Row, Column Offset (#,#) SourceName 9+%SourceData,1 MassFlow 9+%SourceData,2 RelievingPressure 9+%SourceData,3 InletTemperatureSpec 9+%SourceData,4 The entries in the Row, Column column are codes that tell the Import Wizard that these are repeating data items. Effectively they tell the Import Wizard how to calculate the row and column offset for each data item. In this case the %SourceData part of the entry specifies that we want to work through a list of source data items one by one. The source number is then added to the fixed row offset to give the correct row for that data item. For example when importing the second line of source data, the %SourceData tag will generate the value 2 which when added to 9 gives 11 - the correct row number for the second line of source data. 10. Next select the Composition subsection beneath SourceData subsection, still under the Scenario object in the Object Selector tree view. On the Source tab, check the Import this type of data checkbox and check the Data is contained in parent checkbox. Again this indicates that this data lies on the same worksheet as the Scenario data. 11. Still on the Composition subsection, select the Field Details tab. Check the Import checkbox for the Fraction data item and make the following Row, Column entry: Data Item Row, Column Offset (#,#) Fraction 9+%SourceData,4+%Composition Again the entries in the Row, Column column are codes that tell the Import Wizard that these are repeating data items. The 9+%SourceData part of the code allows the Import Wizard to calculate the correct row while the 4+%Composition allows it to calculate the correct column for each component fraction. 13-43 Printing, Importing and Exporting 13-44 12. At this point our import definition is complete so click Next to move to the next step of the Import Wizard. On this step select the Save import definition file then import data radio button. Then check the Log import actions to file checkbox and either accept the default log file name or specify an alternative name. Finally we are ready to click Finish to begin the import. 13. The Import Wizard will then display the windows File Browser view to allow us to specify where we want to save our import definition file. Enter your preferred location and name and click OK to continue. The import process itself will then run and then close the import wizard on completion. At this point we have completed the import process. You can view or print the log file that you specified in step 12 to confirm that it has updated the existing three scenarios and added data for two new scenarios. A reference log file: <Your UniSim Flare 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 UniSim Flare directory>\Samples\ImportExport\Sample3.fne <Your UniSim Flare directory>\Samples\ImportExport\Sample3Format.xls 13.7.3 Export to Access Database for UniSim Flare In this example we are going to export a complete UniSim Flare model to an Access database using a structure for the Access database that would allow it to be imported by UniSim Flare. To do this we will use a predefined export definition file that is shipped with UniSim Flare. 1. Start up UniSim Flare and load the UniSim Flare model that you want to export. In our case let’s use the file from the previous case: <Your UniSim Flare directory>\Samples\ImportExport\sample3.usf 2. Start the Export Wizard by selecting it from the File menu. 3. In the Export Wizard Step 1 either type in the name of the Access file you want to create or use the Browse button to define this file using the Windows file browser. 4. Once the file name has been entered, choose the version of DB engine. If the database name you entered in the previous step is an existing file then check the Clear all existing data before export checkbox to ensure that our database will contain only the data for this model. Finally click the Next button. 13-44 Printing, Importing and Exporting 13-45 5. In Export Wizard Step 2 select the Use the following export definition file radio button then click the Browse button. Use the File Browser view to select the file: <Your UniSim Flare directory>\Formats\Access305.fne When you have selected this definition file click the Next button to continue. 6. In Export Wizard Step 3 you will see that most of the data objects listed in the tree view to the left of the screen are displayed in bold type indicating that export of these data objects is selected. Some objects namely BIPs, Scenarios and Solver Options are not displayed in bold indicated that these objects will not be exported. This is because the fixed format Access import facility in UniSim Flare is not capable of importing this type of data. You do not need to, but you can select objects in the Object Selector tree view and click the Field Details tab to see which data items have been selected for export. Again those items that have not been selected have been omitted because they cannot be imported by UniSim Flare. 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 UniSim Flare environment. You may be interested to know that there is also an import definition file called Access305.fni in the <Your UniSim Flare directory>\Formats directory which allows the Import Wizard to import Access databases generated by UniSim Flare. 13.7.4 Export Pipe Data Table to Excel In this example we are going to generate a list of the piping that makes up our flare network in an Excel worksheet. In addition to the basic pipe information we are going to add the operating conditions for a selected scenario to the table. 1. Start up UniSim Flare and load the UniSim Flare model that you want to export. In this sample let’s use the file we’ve used before: <Your UniSim Flare directory>\Samples\ImportExport\sample3.usf 13-45 Printing, Importing and Exporting 13-46 2. Open the Calculation Options view and go to the Scenarios tab to check that the Calculate option is set to Current Scenario. Then close this view and select Power Fail to be the current scenario using the Scenario Selector and Rating as the calculation mode using the Calculation Mode Selector. Finally click the Go button to run the rating calculations. The Export Wizard will export the same scenarios that are selected for calculation so this step selects the correct scenario for export as well as ensuring that the results are ready for export. 3. Start the Export Wizard using the option from the File menu. 4. In the Export Wizard step 1 specify the name of the Excel workbook we want to output our results to. In this case lets use: <Your UniSim Flare directory>\Samples\ImportExport\Sample5.xls Note: You can either type in this name or specify it through the file browser. 5. When you have specified the file name click the Next button to continue. 6. In the Export Wizard step 2, select the option Create a new export definition file and then click the Next button to continue. As an alternative you could select the pre-built export definition file for this sample: <Your UniSim Flare Directory>\Samples\ImportExport\Sample5.fne which contains the results of steps 6 to 10. If you do this it is still worth reading through these steps to see how the settings in the export definition file are used to tell the Export Wizard how we want to write data to the Excel data file we are creating. 7. In the Export Wizard step 3 you will see that the default settings for a new export definition file do not select any data objects for export i.e. all object names in the tree view are displayed in normal type. We now need to specify which objects will be exported. Select the Pipes object in the Object Selector tree view. In the Target tab check the Export this type of data checkbox and enter PipeData in the Worksheet Name field. Finally, select the Data 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. 13-46 Printing, Importing and Exporting 13-47 8. Click the Field Details tab. Check the Export checkbox against the following data items and enter the following column offsets. Data Item Column or Row, Column Offset (#,#) Name 2 Length 4 ElevationChange 5 InternalDiameter 9 NominalDiameter 7 WallThickness 10 PipeSchedule 8 InsulationType 20 InsulationThickness 21 InsulationConductivity 22 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 in Rows radio button and set the Start at Row and Rows per Item fields to 5 and 1 respectively. Ensure that the Data is contained in parent checkbox is cleared. 11. Click the Field Details tab. Check the Export checkbox against the following data items and enter the following column offsets. Data Item Column or Row, Column Offset (#,#) UpstreamPressure 12 UpstreamTemperature 13 UpstreamVelocity 14 DownstreamPressure 16 13-47 Printing, Importing and Exporting 13-48 Data Item Column or Row, Column Offset (#,#) 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 UniSim Flare 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 UniSim Flare Directory>\Samples\ImportExport\Sample5Final.xls shows our exported worksheet after adding headings. 13.7.5 Merge Cases Through Export/Import Wizards In this example we will use the Export Wizard to merge two UniSim Flare models. This could be done equally well using export to an Access database, an Excel spreadsheet or a XML file. For the sake of variety though, we will use XML files in this case. 1. Open UniSim Flare and load the first of the files we want to merge: <Your UniSim Flaredirectory>\Samples\ImportExport\Sample6a.usf 2. Open the Calculation Options edit view, go to the Scenarios tab and ensure that the Calculate option is set to All Scenarios. The Export Wizard will only export those scenarios that are selected for calculation. 3. Start the Export Wizard from the File menu 4. In Step 1 of the Export Wizard, enter the name of the file to export as: <Your UniSim Flare directory>\Samples\ImportExport\Sample6.xml 13-48 Printing, Importing and Exporting 13-49 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 UniSim Flare environment. 8. Open the file: <Your UniSimFlaredirectory>\Samples\ImportExport\Sample6b.usf 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 UniSim Flare 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 UniSim Flare screens. We now have the data for our merged case in the file: <Your UniSim Flare directory>\Samples\ImportExport\Sample6.xml. 14. Import this file using the sequence of instructions given in the Default XML Import section. 13-49 Printing, Importing and Exporting 13-50 To summaries these they are: • Create a new case • Start Import Wizard • In step 1 Specify file <Your UniSim Flare directory>\Samples\ImportExport\Sample6.xml • In step 2 select default import definition file • Make no changes in step 3 • In step 4 select import without saving definition file. 15. You can now use the standard UniSim Flare views to examine and update the merged case. Things that you might want to modify in your new case are: • • • • Component lists for the two cases have been merged. This generates a requirement for new Binary Interaction Parameters which will have been set at default values. Do you need to update them? The list of scenarios will include all the scenarios from both cases. Default flow and other source data will have been generated for sources that were originally missing. Do you need to update these? Any nodes, sources or pipes that were common to both models will have their data values set to the values taken from the second model. Are these correct? (21-FT001 is a common node in this example). The calculation options will be set to those defined for the second model. Are these correct? 13-50 Automation 14-1 14 Automation 14.1 Overview ..................................................................................... 2 14.2 Objects ........................................................................................ 2 14.2.1 Object Hierarchy .................................................................... 3 14.2.2 The UniSim Flare Type Library.................................................. 3 14.2.3 Object Browser ...................................................................... 4 14.2.4 Automation Syntax................................................................. 7 14.3 UniSim Flare Object Reference ...................................................15 14.3.1 Bleed...................................................................................17 14.3.2 Bleeds .................................................................................17 14.3.3 Component ..........................................................................18 14.3.4 Components .........................................................................19 14.3.5 Connector ............................................................................20 14.3.6 Connectors...........................................................................20 14.3.7 ControlValve .........................................................................21 14.3.8 Control Valves ......................................................................23 14.3.9 HorizontalSeparator...............................................................23 14.3.10 HorizontalSeparators............................................................24 14.3.11 Nodes ................................................................................25 14.3.12 OrificePlate .........................................................................25 14.3.13 Pipe...................................................................................27 14.3.14 Pipes .................................................................................30 14.3.15 ReliefValve..........................................................................30 14.3.16 ReliefValves ........................................................................32 14.3.17 Scenario.............................................................................33 14.3.18 Scenarios ...........................................................................34 14.3.19 Solver................................................................................34 14.3.20 Tee....................................................................................35 14.3.21 Tees ..................................................................................36 14.3.22 Tip ....................................................................................37 14.3.23 Tips ...................................................................................38 14.3.24 VerticalSeparator.................................................................39 14.3.25 VerticalSeparators ...............................................................40 14.4 Example – Automation In Visual Basic........................................41 14-1 Automation 14-2 14.1 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 UniSim Flare 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 UniSim Flare. There are a number of applications that can be used to access UniSim Flare 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. 14.2 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. Figure 14.1 Each property of the car is a variable that has a value associated with 14-2 Automation 14-3 it. The color could be either a string or a hexadecimal number associated with a specific color. The gas mileage could be a floatingpoint 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 tire. 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 tires would have properties such as the tread type or model number. 14.2.1 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. 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. 14.2.2 The UniSim Flare Type Library In order to do anything with objects it is first necessary to know what objects are available. When an application is exposed to Automation, a 14-3 Automation 14-4 separate file is usually created that lists all the objects and their respective properties and methods. This file is called the type library and nearly all programs that support Automation have one of these files available. With the help of an Object Browser, such as the one built into Microsoft Excel, you now have a way to view all the objects, properties, and methods in the application by examining the type library. For UniSim Flare, the type library is contained within the application itself, flare.exe. The UniSim Flare type library reveals numerous objects that contain many combine properties and methods. For every object the type library will show its associated properties and methods. For every property the type library will show its return type. For every method, the type library will show what types of arguments are required and what type of value might be returned. Accessing a specific property or method is accomplished in a hierarchical fashion by following a chain of exposed objects. The first object in the chain should be an object from which all other objects can be accessed. This object will typically be the main application. In UniSim Flare, the starting object is the Application object. All other objects are accessible from this starting object. 14.2.3 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 are both include a built in Object Browser. Accessing the Object Browser in Excel 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 Honeywell UniSim Flare. If this is not displayed, use the Browse button to locate flare.exe. 4. Click OK. 5. Choose Object Browser from the View menu or press <F2>. 6. Select UniSimFlare under Libraries/Workbooks drop down. 14-4 Automation 14-5 Example: Navigating through the type library This example shows how to navigate through the type library in order to determine the object hierarchy necessary to access a particular property. The desired property is the mass flow of a relief valve called “PSV 1” in the currently active scenario. The first step is to start with the starting object that in the case of UniSim Flare is always the Application object. Figure 14.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 UniSim Flare, the ReliefValves object is a 14-5 Automation 14-6 logical choice. Figure 14.3 The ReliefValves object is shown to be of type IReliefValve. This object is a simple object that is a collection of other objects with some properties and methods for navigation through the collection. Figure 14.4 The Item property is shown to return an indexed object of type IReliefValve, The argument named “What” is of type Variant which is the default argument type for an argument unless otherwise specified. All collection objects within UniSim Flare allow access to an individual member of the collection either by index number (like an array) or directly by name. Named arguments are case insensitive so “PSV 1” is the same as “psv 1”. Either approach is equally valid. Examining the IReliefValve object type shows a property called 14-6 Automation 14-7 PropertyByName, which is type Variant. Figure 14.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”) Note: The samples in folder"\Samples\OLE\Ex cel\"declare the object by setting the default install path "C:\Program Files\Honeywell\UniSim Flare Rxxx\flare.exe". If UniSim Flare doesn’t install in the default path, update the path of object in these files first. 14.2.4 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: 14-7 Automation 14-8 Dim | Public | Private Objectvar as ObjectName as specified in the type library Late Binding: Dim | Public | Private objectvar as Object Once a reference to a type library has been established, the actual name of the object as it appears in the type library can be used. This is called early binding. It offers some advantages over late binding, including speed and access to Microsoft’s IntelliSense® functionality when using Visual Basic or VBA. Example: Object Declaration Early Binding: Public fnApp as Object Public thisPsv as Object Late Binding: Public fnApp as UniSimFlare.IApplication Public thisPsv as UniSimFlare.IReliefValve The Set Keyword Syntax: Set objectvar = object.[object...].object | Nothing Connections or references to object variables are made by using the Set keyword. Example: Set Assuming fnApp is set to the Application Object Dim thisPsv as UniSimFlare.IReliefValve Set thisPsv - fnApp.ReliefValves.item(1) CreateObject, GetObject Syntax for creating an instance of an application: 14-8 Automation 14-9 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 UniSim Flare this is accomplished through the starting object Application. The CreateObject function will start a new instance of the main application. CreateObject is used in UniSim Flare with the UniSimFlare.Application class as defined in the type library. This connects to the main application interface of UniSim Flare. Example: CreateObject Dim FnApp As Object Set FnApp = CreateObject (“UniSimFlare.Application”) The following example uses early binding in the object declaration to create an instance of UniSim Flare and then load a specified model. Example: CreateObject Dim FnApp As UniSimFlare.Application Set FnApp = CreateObject (“UniSimFlare.Application”) FnApp.OpenModel “c:\Program Files\Honeywell\UniSim Flare Rxxx\samples\ole\Excel\olesample.ufnw” The GetObject function will connect to an instance of the server application that is already running. If an instance of the application is not already running then a new instance will be started. Object Properties, Methods and Hierarchy Syntax for creating and accessing properties: Set objectvar = object.[object.object...] .object 14-9 Automation 14-10 Variable = object.[object.object...] .object.property Syntax for accessing methods: Function Method returnvalue = object.method ([argument1, argument2, ...]) Subroutine method object.method argument1, argument2, ... The sequence of objects is set through a special dot function. Properties and methods for an object are also accesses through the dot function. It is preferable to keep the sequences of objects to a minimum since each dot function is a call to a link between the client and the server application. The object hierarchy is an important and fundamental concept for utilizing automation. A particular property can only be accessed by following a specific chain of objects. The chain always begins with the Application object and ends with the object containing the desired property. The methods of objects are accessed in the same fashion as properties by utilizing the dot function. A method for a particular object is nothing more than a function or subroutine whose behavior is related to the object in some fashion. Typically the methods of an object will require arguments to be passed when the method is called. The type library will provide information about which arguments are necessary to call a particular method. A function will return a value. Note: Subroutines in Visual Basic do not require parentheses around the argument list Examples: Accessing UniSim Flare Object Properties Dim FnApp As UniSimFlare.Application Dim SepDiam as Double Set FnApp = CreateObject (“UniSimFlare.Application”) 14-10 Automation 14-11 FnApp.OpenModel “c:\Program Files\Honeywell\UniSim Flare Rxxx\Samples\ole\olesample.ufnw” SepDiam - FnApp.VerticalSeparators.Item[1].PropertyByName (“Diameter”) This example starts up UniSim Flare 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 UniSimFlare.Application Dim Seps as UniSimFlare.IVerticalSeparators Dim Sep as UniSimFlare.IVerticalSeparator Dim SepDiam as Double Set FnApp = CreateObject (“UniSimFlare.Application”) FnApp.OpenModel “c:\Program Files\Honeywell\UniSim Flare Rxxx\Samples\ole\olesample.ufnw” 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 14-11 Automation 14-12 [statements] [Exit For] [statements] Next [element] A collection object is an object that contains a set of other objects. This is similar to an array of objects. The difference between an array of objects and a collection object is that a collection object is that a collection object contains a set of properties and methods for manipulating the objects in the collection. The Count property returns the number of items in the collection and the Item property takes an index value or name as the argument and returns a reference to the object within the collection. A special type of For loop is available for enumerating through the objects within the collection. The For Each loop provides a means for enumerating through the collection without explicitly specifying how many items are in the collection. This helps avoid having to make additional function call to the Count and Item properties of the collection object in order to perform the same type of loop. Examples: Accessing Collection Objects Dim myPsvs as UniSimFlare.ReliefValves Dim name as String Dim i As Integer Set myPsvs = myApp.ReliefValves For i = 1 To myPsvs.Count name = myPsvs.Item(i).PropertyByName(“Name”) MsgBox name Next i This example connects to a collection of relief valves by setting the myPsvs object. A For loop is created that uses the Count and item properties of a collection in order to display a message box that display the name of each relief valve in turn. The items in the collection are indexed beginning at 1. The application object is assumed to have been already set to myApp. 14-12 Automation 14-13 Dim myPsvs as UniSimFlare.ReliefValve Dim myPsvs as UniSimFlare.ReliefValves Dim name as String Set myPsvs = myApp.ReliefValves For Each myPsvs in myPsvs name = myPsv.PropertyByName(“Name”) MsgBox name Next This example is identical to the first example except that a For Each loop is used instead of the standard For loop in order to enumerate through the ReliefValves collection. Variants Syntax: Using variant values: Dim myvariant as Variant myvariant = [object.property] To determine the upper and lower bound of the variant: UBound(arrayname[,dimension]) 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 14-13 Automation 14-14 number of Variants being used. It is also just good programming practice to explicitly declare variables whenever possible. Example: Using Variants in UniSim Flare Dim myPsvs as UniSimFlare.ReliefValve Dim molefracs as Variant Dim i As Integer Set myPsv = myApp.ReliefValves.Item(1) molefracs = myPsv.PropertyByName (“Composition”) For i = LBound(molefracs) To Ubound (molefracs) Debug.Print molefracs(i) Next i This example shows how to get the mole fractions of a relief valve for the current scenario. The values are sent to the Visual Basic Immediate window. The application object is assumed to have been already set to myApp. Unknown Values There are a number of occasions where a variable may be unknown such as all the calculated values prior to the calculation or the flange size of a control valve. In all cases this is represented by the value fntUnknownValue. Example: Using Unknown Values in UniSim Flare Dim myValve as UniSimFlare.ControlValves Dim myValves as UniSimFlare.ControlValve Dim flange as Double Dim name as String Set myValves = myApp.ControlValves For Each myValve in myValves 14-14 Automation 14-15 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. 14.3 UniSim Flare Object Reference The following subsections summaries the methods and properties available in each of the objects available within UniSim Flare. These are ordered purely alphabetically. For each object the attributes comprises the type (or class) of object followed by the access characteristics which may be read only or read/ write. In general, data will have the read/write attribute and calculated values will have the read only attribute. Each method is shown with the method name including any arguments, a description of the method and a description of the arguments. Each property is shown with the property name including any arguments, a description of the property, the property attributes and a description of the arguments. Optional arguments are shown in square brackets []. Many of the objects support a PropertyByName property. In such cases a further table gives the valid property names which are case insensitive as well as the property attributes and the units of measure where appropriate. The property names will generally match the field descriptions on the corresponding views but they never contain any space characters. 14-15 Automation 14-16 Application Description : Application object Attributes : Application, read only Methods Name Description Arguments OpenModel(fn As String) Open a UniSim Flare model fn = Model filename SaveModel(fn as String) Save a UniSim Flare model fn = Model filename DoImport(imType As importType, source As String, Definition As String, Flag As Integer) As Integer Import a UniSim Flare Model imType = 0,1,2 for xml,xls,mdb files DoExport(exType As exportType, source As String, Definition As String, Flag As Integer) As Integer Export a UniSim Flare Model source = importfilename Definition = definitionfilename Flag = 0 exType = 0,1,2 for xml, xls, mdb files source = exportfilename Definition = definitionfilename Flag = 0 Properties Name Description Attributes Bleeds Collection of flow bleed node objects IBleeds, read only Components Collection of component objects IComponents, read only Connectors Collection of connector objects IConnectors, read only ControlValves Collection of control valve objects IControlValves, read only HorizontalSeparators Collection of horizontal separator objects IHorizontalSeparato rs, read only Nodes Collection of node objects INodes, read only Pipes Collection of pipe objects IPipes, read only ReliefValves Collection of relief valve objects IReliefValves, read only Scenarios Collection of scenario objects IScenarios, read only Solver Solver object ISolver, read only Tees Collection of tee objects ITees, read only Tips Collection of flare tip objects ITips, read only VerticalSeparators Collection of vertical separator objects IVerticalSeparators, read only Visible Set visibility of the application window Boolean, read/write Arguments 14-16 Automation 14-17 14.3.1 Bleed Description :Flow bleed node object Attributes : IBleed, read only Methods Name Description Arguments Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd Connect to a pipe Disconnect(conidx as fntNodeEnd) Disconnect from a pipe conidx = Connection on bleed pip = Pipe to connect to pipeconidx = Connection on pipe conidx = Connection on bleed Properties Name Description Attributes Arguments PropertyByName(wh as String) Property value for a named property Variant, read/write wh = Property name PropertyNames Variant array of all the property names Variant, read only ConnectedObject(Conid x as fntNodeEnd) Gives the name of the pipe connected to Bleed Variant, read only conidx = connection on Bleed Named Properties For PropertyByName() Name Units Attributes Name Units Attributes Ignored fntYesNo, read/write Location String, read/write Name String, read/write OfftakeMaximum kg/hr Double, read/write OfftakeMinimum kg/hr Double, read/write OfftakeMultiplier Double, read/write OfftakeOffset kg/hr Double, read/write PressureDrop bar Double, read/write 14.3.2 Bleeds Description :Collection of flow bleed node objects Attributes : IBleed, read only 14-17 Automation 14-18 Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single Add a new bleed nm = Name. If omitted a new name is automatically generated Delete (wh as Variant) Delete a bleed x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Count Number of items in the collection Integer, read only Item (wh as Variant) Indexed item in the collection IBleed, read only Arguments Wh = Index as Name (String) or Number (Integer/ Long) 14.3.3 Component Description :Component object Attributes : IComponent, read only Methods Name Description Arguments Clear Clear all component data EstimateUnknown Estimate all unknown component data Properties Name Descrption Attributes IsValid Validate component data is complete Boolean, read only PropertyByName(wh as String) Property value for a named property Variant, read/write PropertyNames Variant array of all the property names Variant, read only Arguments wh = Property name Named Properties For PropertyByName() Name Units AcentricFactor Attributes Double, read/write AcentricFactorSrk Double, read/write CharacteristicVolume m3/kgmole Double, read/write CriticalPressure bar abs Double, read/write 14-18 Automation 14-19 Name Units Attributes CriticalTemperature K Double, read/write CriticalVolume m3/kgmole Double, read/write EnthalpyCoefficients kJ/kgmole Double(1 To 6), read/write kJ/kgmole/K kJ/kgmole/K2 kJ/kgmole/K3 kJ/kgmole/K4 kJ/kgmole/K5 EntropyCoefficient Double, read/write Id Integer, read/write MolecularWeight Double, read/write Name String, read/write NormalBoilingPoint K Double, read/write StandardDensity kg/m3 Double, read/write Type fntCompType, read/write WatsonK Double, read/write ViscosityCoefficient Double(1 To 2), read/write 14.3.4 Components Description :Collection of component objects Attributes : IComponents, read only Methods Name Description Arguments AddLibrary(wh as Variant) Add a library component wh = Component identifier as either name (String) or ID (Integer/Long) AddHypothetical(wh as String) Add a named hypothetical component wh = Name for new component Delete(wh as Variant) Delete a component wh = Index as component as either Name (String) or Number (Integer/ Long) Properties Name Description Attributes Count Number of items in the collection Integer, read only Item(What as Variant) Indexed item in the collection IComponent, read only Arguments What = Index as Name (String) Or Number (Integer/Long) 14-19 Automation 14-20 14.3.5 Connector Description :Connector node object Attributes : IConnector, read only Methods Name Description Arguments Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe Disconnect(conidx as fntNodeEnd) Disconnect from a pipe conidx = Connection on connector pip = Pipe to connect to pipeconidx = Connection on pipe conidx = Connection on connector Properties Name Description Attributes Arguments PropertyByName(wh as String) Property value for a named property Variant, read/write wh = Property name PropertyNames Variant array of all the property names Variant, read only ConnectedObject(Co nidx as fntNodeEnd) Gives the name of the pipe connected to connector variant, read only conidx = connection on connector Named Properties For PropertyByName() Name Units Attributes Angle radians Double, read/write compressibletransition % Double, read fittinglossmethod Integer, read isothermaldpoption Integer, read Ignored Length fntYesNo, read/write m Double, read/write Location String, read/write Name String, read/write swagemethod Integer, read twophasecorrectionoption Integer, read 14.3.6 Connectors Description :Collection of connector node objects Attributes : IConnectors, read only 14-20 Automation 14-21 Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single Add a new connector nm = Name. If omitted a new name is automatically generated Delete (wh as Variant) Delete a Connector x = X coordinate on PFD (Twips) y = Y coordinate in PFD (Twips) wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Arguments Count Number of items in the collection Integer, read only Item(What as Variant) Indexed item in the collection IConnector, read only What = Index as Name (String) Or Number (Integer/Long) 14.3.7 ControlValve Description :Control valve node object Attributes : IControlValve, read only Methods Name Description Arguments Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe Disconnect(conidx as fntNodeEnd) Disconnect from a pipe conidx = Connection on control valve pip = Pipe to connect to pipeconidx = Connection on pipe conidx = Connection on control valve Properties Name Description Attributes Arguments PropertyByName(wh as String, Property value for a named property Variant, read/ write wh = Property name PropertyNames Variant array of all the property names Variant, read only ConnectedObject(Co nidx as fntNodeEnd) Gives the name of the pipe connected to control valve variant, read only [sc as Variant]) sc = Scenario Index as Name (String) or Number (Integer/Long) conidx = connection on control valve 14-21 Automation 14-22 Named Properties For PropertyByName() Name Units Attributes Composition fractions Double (1 To ?), read/write CompositionBasis fntCompBasis, read/write ElevationChange Double, read Energy kJ/hr Double, read only Enthalpy kJ/kgmole Double, read only Entropy kJ/kgmole/K fittinglossoffset fittinglossfactor FlangeDiameter Double, read only Double, read Double, read mm Double, read/write FluidType fntCompType, read/write Ignored fntYesNo, read/write internaldiameter mm Double, read length m Double, read Location String, read/write LockMabp fntYesNo, read/write Mabp bar abs Double, read only MassFlow kg/hr Double, read/write materialcode fntPipeMaterial, read MolecularWeight Double, read/write Name nominaldiameter String, read/write inch OutletMachNumber String, read Double, read only OutletSonicVelocity m/s Double, read only OutletTemperature C Double, read only OutletTemperatureSpecifica tion C Double, read only OutletVelocity m/s Double, read only pipeschedule String, read ReliefPressure bar abs Double, read only roughness mm Double, read StaticOutletPressure bar abs Double, read only StaticInletPipePressureDrop bar Double, read only Temperature C Double, read only TemperatureSepcification fntTempSpec, read/write TotalOutletPressure bar abs Double, read only TotalInletPipePressureDrop bar Double, read only usepipeclass VapourFraction fntYesNo, read molar fraction Double, read only 14-22 Automation 14-23 14.3.8 Control Valves Description :Collection of control valve node objects Attributes : IControlValves Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new control valve nm = Name. If omitted a new name is automatically generated Delete(wh as Variant) Delete a control valve x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Arguments Count Number of items in the collection Integer, read only Item(wh as Variant) Indexed item in the collection IControlValve, read only wh = Index as Name (String) or Number (Integer/Long) 14.3.9 HorizontalSeparator Description :Horizontal separator node object Attributes : IHorizontalSeparator, read only Methods Name Description Arguments Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe conidx = Connection on horizontal separator Disconnect(conidx as fntNodeEnd) Disconnect from a pipe pip = Pipe to connect to pipeconidx = Connection on pipe conidx = Connection on horizontal separator Properties Name Description Attributes Arguments PropertyByName(w h as String) Property value for a named property Variant, read/ write wh = Property name 14-23 Automation 14-24 Name Description Attributes PropertyNames Variant array of all the property names Variant, read only ConnectedObject(C onidx as fntNodeEnd) Gives the name of the pipe connected to Horizontal separator Variant, read only Arguments conidx = connection on Horizontal separator Named Properties For PropertyByName() Name Units Attributes balend Long, read bodydimension Integer, read compressibletransition % Double, read ddrop mm Double, read denbody kg/m3 Double, read designlength m Double, read Diameter mm Double, read/write drainvol M3 Double, read min Double, read fittinglossmethod holduptime Integer, read Ignored fntYesNo, read/write isothermaldpoption Integer, read istear LiquidLevel fntYesNo, read mm Double, read/write Location String, read/write Name String, read/write presbody bar abs swagemethod Integer, read tearend tempbody Double, read Long, read °C twophasecorrectionopti on Double, read Integer, read velbody m/s Double, read vsetting m/s Double, read 14.3.10 HorizontalSeparators Description :Collection of horizontal separator node objects Attributes : IHorizontalSeparators, read only 14-24 Automation 14-25 Method Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new horizontal separator nm = Name. If omitted a new name is automatically generated Delete(wh as Variant) Delete a horizontal separator x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Arguments Count Number of items in the collection Integer, read only Item(What as Variant) Indexed item in the collection IHorizontalSepara tor, read only What = Index as Name (String) Or Number (Integer/Long) 14.3.11 Nodes Description :Collection of all node objects Attributes : INodes, read only Properties Name Description Attributes Count Number of items in the collection Integer, read only Arguments 14.3.12 OrificePlate Description :Orifice plate node object Attributes : IOrificePlate, read only Method Name Description Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe Disconnect(conidx as fntNodeEnd) Disconnect from a pipe Arguments conidx = Connection on orifice plate pip = Pipe to connect to pipeconidx = Connection on pipe conidx = Connection on orifice plate 14-25 Automation 14-26 Properties Name Description Attributes Arguments PropertyByName( wh as String) Property value for a named property Variant, read/write wh = Property name PropertyNames Variant array of all the property names Variant, read only ConnectedObject( Conidx as fntNodeEnd) Gives the name of the pipe connected to Orifice plate Variant, read only conidx = connection on Orifice plate Named Properties For PropertyByName() Name Units Attributes compressibletransition % Double, read Diameter mm Double, read/write DratioIn Double, read/write DratioOut Double, read/write fittingglossmethod Integer, read Ignored fntYesNo, read/write isothermaldpoption Integer, read Location String, read/write Name String, read/write swagemethod Integer, read twophasecorrectionoption Integer, read OrificePlates Description :Collection of orifice plate node objects Attributes : IOrificePlates, read only Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Ass a new orifice plate nm = Name. If omitted a new name is automatically generated x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) Delete(wh as Variant) Delete an orifice plate wh = Index as Name (String) or Number (Integer/Long) 14-26 Automation 14-27 Properties Name Description Attributes Count Number of items in the collection Integer, read only Item(What as Variant) Indexed item in the collection IOrificePlate, read only Arguments What = Index as Name (String) Or Number (Integer/Long) 14.3.13 Pipe Description :Pipe object Attributes : IPipe, read only Methods Name Description Arguments AddFitting(FittingName As String, Optional Count As Integer = 1) Add a fiitting to the fittings list FittingName = Name of fitting defined in the pipe fittings database Count = Number of fittings of this type to add Connect(conidx as fntPipeEnd, nod as Object, nodeconidx as fntNodeEnd) Connect to a node conidx = Connection on pipe nod = Node to connect to nodeconidx = Connection on DeleteAllFittings() Delete all fittings from the fittings list DeleteFittingByIndex(FittingIndex As Integer) Delete a fitting from the fittings list FittingIndex = Index of fitting in the fittings list to delete DeleteFittingByName(FittingName As String, Optional Count As Integer = 1) Delete a fitting from the fittings list FittingName = Name of fitting defined in the pipe fittings database Count = Number of fittings of this type to delete Disconnect(conidx as fntPipeEnd) Disconnect from a node GetFittingCount() As Integer Get number of fittings in the fitting list GetFittingName(FittingIndex As Integer) As String Get name of indeded pipe fitting conidx = Connection on FittingIndex = Index of fitting in the fittings list to retreive name for 14-27 Automation 14-28 Properties Name Description Attributes Arguments PropertyByName(wh as String, Property value for a named property Variant, read /write wh = Property name [sc as Variant], [ph as Variant], sc = Scenario Index as Name (String) or Number (Integer/ Long) ph = Phase Index (fntFluidPhase) [en as Variant]) en = Pipe end (fntPipeEnd) PropertyNames Variant array of all the property names Variant, read only UseFittings Flag to indicate if a fittings list is used instead of loss coefficients Boolean, read/write ConnectedObject(Conidx as fntPipeEnd) Gives the name of the node connected to Pipe variant, read only conidx = connection on Pipe Named Properties For PropertyByName() Name Units Attributes AccelerationPressureDrop bar Double, read only AmbientTemperature C Double, read only CanSize fntYesNo, read/write dampingfactor Double, read Density kg/m3 Duty kJ/hr Double, read only ElevationChange m Double, read/write ElevationPressureDrop bar Double, read only Energy kJ/hr Double, read only Enthalpy kJ/kgmole Double, read only Entropy kJ/kgmole/K Double, read only EquivalentLength m Double, read only ExternalDuty W Double, read/write ExternalHeatTransferCoefficient W/m2/K Double, read only Emissivity Double, read only externalmedium Integer, read ExternalRadiativeHeatTransferCo efficient W/m2/K ExternalTemperature C FittingsLossConstant Double, read only Double, read only Double, read only FittingsLossMultiplier FittingsPressureDrop Double, read only Double, read only bar Double, read only FlowRegime fntFlowRegime, read only FrictionFactor Double, read only FrictionPressureDrop bar Double, read only 14-28 Automation Name 14-29 Units Attributes HeatCapacity kJ/kgmole/K Double, read only HeatTransfer kJ/hr Double, read only horizontalpipemethod fntPresDropMethod, read Ignored fntYesNo, read/write IgnoreHeadRecovery fntYesNo, read/write inclinedpipemethod fntPresDropMethod, read InsulationName String, read/write InsulationThickness mm Double, read/ write InsulationThermalConductivity W/m/K Double, read/write InternalDiameter mm Double, read/write Length m Double, read/write LengthMultiplier Double, read/write Location String, read/write MachNumber Double, read only MachNumberAtZeroBarg Double, read only MassFlow kg/hr Double, read/write Material fntPipeMaterial, read/ write MolecularWeight Double, read only MolarFlow kgmole/hr Double, read only MoleFractions Double(1 To ?), read only multielementheattransfer Integer, read Name String, read/write Noise dB Double, read only OutletTemperatureSpecification C Double, read/write OverallHeatTransferCoefficient W/m2/K Double, read only NominalDiameter String, read/write UsePipeClass fntYesNo, read/write PhaseFraction Double, read only PressureDrop bar Double, read only RatedMassFlow kg/hr Double, read only ReynoldsNumber Double, read only RhoV2 kg/m/s2 Double, read only RhoV2AtZeroBarg Kgg/m/s2 Double, read only Roughness mm Double, read/write SoundPowerLevel dB Double, read only StaticPressure bar abs Schedule SurfaceTension Double, read only String, read/write dynes/cm Double, read only 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 TailPipe fntYesNo, read/write twophaseelements fntYesNo, read 14-29 Automation 14-30 Name Units Attributes VelocityAtZeroBarg m/s Double, read only cP Double, read only WallThermalConductivity W/m/K Double, read/write WallTemperature C Double, read only WallThickness mm Double, read/write WindSpeed m/s Double, read/write verticalpipemethod fntPresDropMethod, read Viscosity vlemethod fntVleMethod, read Zfactor Double, read only 14.3.14 Pipes Description :Collection of pipe Attributes : IPipes Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new pipe nm = Name. If omitted a new name is automatically generated x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) Delete(wh as Variant) Delete a pipe wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Count Number of items in the collection Integer, read only Item(wh as Variant) Indexed item in the collection IPipe, read only Arguments wh = Index as Name (String) or Number (Integer/Long) 14.3.15 ReliefValve Description :Relief valve node object Attributes : IReliefValve, read only 14-30 Automation 14-31 Methods Name Description Arguments Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe conidx = Connection on relief valve Disconnect(conidx as fntNodeEnd) Disconnect from a pipe pip = Pipe to connect to pipeconidx = Connection on pipe conidx = Connection on relief valve Properties Name Description Attributes Arguments PropertyByName( wh as String, Property value for a named property Variant, read/write PropertyNames Variant array of all the property names Variant, read only ConnectedObject( Conidx as fntNodeEnd) Gives the name of the pipe connected to ReliefValve Variant, read only wh = Property name sc = Scenario Index as Name (String) or Number (Integer/Long) [sc as Variant]) conidx = connection on ReliefValve Named Properties For PropertyByName() Name Units Attributes Composition fractions Double (1 To ?), read/ write CompositionBasis fntCompBasis, read/write Contingency fntContingency, read/ write ElevationChange m Double, read Energy kJ/hr Double, read only Enthalpy kJ/kgmole Double, read only Entropy kJ/kgmole/K Double, read only fittinglossoffset Double, read fittinglossfactor FlangeDiameter Double, read mm FluidType Double, read/write fntCompType, read/write HemCd Double, read/write HemLiqCd Double, read/write internaldiameter mm Double, read Ignored fntYesNo, read/write Kb Double, read/write Location String, read/write LockMabp fntYesNo, read/write LockReliefPressure fntYesNo, read/write LockRatedMassFlow length fntYesNo, read/write m Double, read 14-31 Automation Name 14-32 Units Attributes Mabp bar abs Double, read only MassFlow kg/hr Double, read/write materialcode fntPipeMaterial, read Mawp bar abs MechanicalPressure bar abs Double, read/write Double, read/write MolecularWeight Double, read/write Name String, read/write nominaldiameter inch String, read Orific String, read/write OutletMachNumber Double, read only OutletSonicVelocity m/s Double, read only OutletTemperature C Double, read only OutletTemperatureSpecification C Double, read only OutletVelocity m/s Double, read only pipeschedule String, read RatedMassFlow kg/hr ReliefPressure bar abs Double, read only roughness mm double, read SizingBackPressure Bar abs Double, read/write SizingMethod Double, read/write Integer, read/write StaticOutletPressure bar abs Double, read only StaticInletPipePressureDrop bar Double, read only Temperature C Double, read only TemperatureSpecification fntTempSpec, read/write TotalOutletPressure bar abs Double, read only TotalInletPipePressureDrop bar Double, read only usedpipeclass ValveArea fntYesNo, read mm2 ValveCount Valvetype VapourFraction Double, read/write Integer, read/write fntPsvType, read/write molar fraction Double, read only 14.3.16 ReliefValves Description :Collection of relief valve node objects Attributes : IReliefValves 14-32 Automation 14-33 Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new relief valve nm = Name. If omitted a new name is automatically generated Delete(wh as Variant) Delete a relief valve x = X coordinate on PFD (Twips) y = Y coordinated on PFD (Twips) wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Arguments Count Number of items in the collection Integer, read only Item(wh as Variant) Indexed item in the collection IReliefValve, read only wh = Index as Name (String) or Number (Integer/Long) 14.3.17 Scenario Description :Scenario object Attributes : IScenario, read only Properties Name Description Attributes Arguments PropertyByName( wh as String) Property value for a named property Variant, read/write wh = Property name PropertyNames Variant array of all the property names Variant, read only Named Properties For PropertyByName() Name Units Attributes AtmosphericPressure bar abs Double, read/write Calculate fntYesNo, read/write CheckConstraintsForZeroBarg HeaderLiquidVelocityLimit fntYesNo, read/write m/s HeaderMachLimit Double, read/write Double, read/write HeaderNoiseLimit dB HeaderRhoV2Limit kg/m/s2 Double, read/write HeaderVapourVelocityLimit m/s Double, read/write Name String, read/write overallvelcheck TailpipeLiquidVelocityLimit TailpipeMachLimit Double, read/write fntYesNo, read/write m/s Double, read/write Double, read/write 14-33 Automation Name 14-34 Units Attributes TailpipeNoiseLimit dB Double, read/write TailpipeRhoV2Limit kg/m/s2 Double, read/write TailpipeVapourVelocityLimit m/s Double, read/write 14.3.18 Scenarios Description : Collection of scenario objects Attributes : IScenarios, read only Methods Name Description Add(nm As String, Add a new scenario Arguments nm = New scenario name cl = Index of scenario to copy data from for initialization [cl as Integer]) Delete(wh as Variant) Delete a scenario wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Arguments Active Get active scenario Object, read only ActiveName Set active scenario Name String, write only wh = Name as String ActiveIndex Set active Scenario Index Integer, write only wh = Index as Integer/ Long Count Number of items in the collection Integer, read only Item(wh as Variant) Indexed item in the collection IScenario, read only wh = Index as Name (String) or Number (Integer/Long) 14.3.19 Solver Description : Solver object Attributes : ISolver, read only Methods Name Description Halt Stop calculations Start Start calculations Arguments 14-34 Automation 14-35 Properties Name Description Attributes IsActive Get calculation status Boolean, read only Arguments PropertyByName(wh as String) Property value for a named property Variant, read/write PropertyNames Variant array of all the property names Variant, read only wh = Property name Named Properties For PropertyByName() Name Units Attributes AmbientTemperature C Double, read/write AtmosphericPressure bar abs Double, read/write CalculationMode fntCalcMode, read/write CheckChokedFlow fntYesNo, read/write Elements Integer, read/write EnableHeatTransfer fntYesNo, read/write EnthalpyMethod InitialPressure fntEnthMethod, read/write bar abs Double, read/write KineticEnergyBasis fntKeBasis, read/write LengthMultiplier Double, read/write LoopIteration Integer, read only LoopIterationLimit LoopTolerance Integer, read/write % Double, read/write PressureDropMethod fntPresDropMethod(0 to 2), read/write PropertyIteration Integer, read only PropertyIterationLimit Integer, read/write PropertyTolerance % Double, read/write RelativeHumidity % Double, read/write ScenarioMode UnitOperationTolerance fntScenarioMode, read/ write % Double, read/write UseKineticEnergy fntYesNo, read/write UseRatedFlow fntYesNo, read/write UseZeroBarg fntYesNo, read/write VleMethod fntVleMethod, read/write WindSpeed Double, read/write 14.3.20 Tee Description :Tee node object Attributes : ITee, read only 14-35 Automation 14-36 Methods Name Description Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe Arguments Disconnect(conidx as fntNodeEnd) Disconnect from a pipe conidx = Connection to tee pip = Pipe to connect to pipeconidx = Connection on pipe conidx - Connection on tee Properties Name Description Attributes Arguments PropertyByName (wh as String) Property value for a named property Variant, read/write wh = Property name PropertyNames Variant array of all the property names Variant, read only ConnectedObject(C onidx as fntNodeEnd) Gives the name of the pipe connected to Tee variant, read only conidx = connection on Tee Named Properties For PropertyByName() Name Units Attributes Angle fntTeeAngle, read/write Body fntTeeEnd, read/write bodydimension compressibletransition Integer, read % Double, read connectorifincomplete Integer, read fittinglossmethod Integer, read Ignored fntYesNo, read/write isothermaldpoption Integer, read Location String, read/write millerextrapolate Integer, read Name String, read/write swagemethod Integer, read twophasecorrectionoption Integer, read 14.3.21 Tees Description :Collection of tee node objects Attributes : ITees, read only 14-36 Automation 14-37 Method Name Description arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new tee nm = Name. If omitted a new name is automatically generated x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) Delete(wh as Variant) Delete a tee wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Count Number of items in the collection Integer, read only Item(wh as Variant) Indexed item in the collection IConnector, read only Arguments wh = Index as Name (String) Or Number (Integer/Long) 14.3.22 Tip Description :Flare tip node object Attributes : ITip, read only Methods Name Description AddCurve() Add a pressure drop curve AddCurvePoint(w h as Integer) Append a point to a pressure drop curve wh = Index of curve DeleteCurve(wh as Integer) Delete a pressure drop curve wh = Index of curve DeleteCurvePoint( wh as Integer, id as Integer) Arguments wh = Index of curve id = Index of point Properties Name Description Attributes Arguments CurveMolwt(wh as Integer) Molecular weight of indexed pressure drop curve Double, read/write wh = Curve index CurvePointMassFl ow(Wh as Integer, id as Integer) Mass flow of point on a pressure drop curve (kg/hr) Double, read/write wh = Index of curve id = Index of point 14-37 Automation 14-38 Name Description Attributes Arguments CurvePointPressu reDrop(Wh as Integer, id as Integer) Pressure drop of point on a pressure drop curve (bar) Double, read/write PropertyByName( wh as String) Property value for a named property Variant, read/write PropertyNames Variant array of all the property names Variant, read only ConnectedObject( Conidx as fntNodeEnd) Gives the name of the pipe connected to Tip variant, read only wh = Index of curve id = Index of point wh = Property name conidx = connection on Tip Named Properties For PropertyByName() Name Units Attributes AllowableRadiation KW/m2 Double, read/write compressibletransition % Double, read Diameter mm Double, read/write EstimatedRadiation KW/m2 Double, read/write extrapolateflow fntYesNo, read extrapolatemolwt fntYesNo, read extrapolatepressurecorrect fntYesNo, read FractionofRadiation Double, read/write Ignored fntYesNo, read/write isothermaldpoption Integer, read K Double, read/write Kbasis fntKbasis, read/write Location String, read/write Name ReferenceObjectDistance String, read/write m Reference Temperature StackHeight swagemethod Double, read/write Double, read/write m Double, read/write Integer, read twophasecorrectionoption Integer, read UseCurves fntYesNo, read/write 14.3.23 Tips Description :Collection of flare tip node objects Attributes : ITip, read only 14-38 Automation 14-39 Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new tip nm = Name. If omitted a new name is automatically generated x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) Delete(wh as Variant) Delete a tip wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Count Number of items in the collection Integer, read only Item(What as Variant) Indexed item in the collection IConnector, read only Arguments What = Index as Name (String) Or Number (Integer/Long) 14.3.24 VerticalSeparator Description :Vertical separator node object Attributes : IVerticalSeparator, read only Methods Name Description Arguments Connect(conidx as fntNodeEnd, pip as IPipe, pipeconidx as fntPipeEnd) Connect to a pipe conidx = Connection on vertical separator pip = Pipe to connect to pipeconidx = Connection on pipe Disconnect(conidx as fntNodeEnd) Disconnect from a pipe conidx - Connection on vertical separator Properties Name Description Attributes Arguments PropertyByName( wh as String) Property value for a named property Variant, read/write wh = Property name PropertyNames Variant array of all the property names Variant, read only ConnectedObject( Conidx as fntNodeEnd) Gives the name of the pipe connected to vertical separator variant, read only conidx = connection on vertical separator 14-39 Automation 14-40 Named Properties For PropertyByName() Name Units balend Attributes Long, read compressibletransition % Double, read ddrop mm Double, read denbody kg/m3 Double, read designdiameter m Double, read Diameter mm Double, read/write fittinglossmethod Integer, read Ignored Boolean, read/write isothermaldpoption Integer, read Location String, read/write Name String, read/write presbody bar abs swagemethod Integer, read tempbody °C Double, read velbody m/s Double, read vsetting m/s Double, read twophasecorrectionoption Double, read Integer, read 14.3.25 VerticalSeparators Description :Collection of vertical separator node objects Attributes : IVerticalSeparators, read only Methods Name Description Arguments Add (Optional nm as Variant, Optional x as Single, Optional y as Single) Add a new vertical separator nm = Name. If omitted a new name is automatically generated x = X coordinate on PFD (Twips) y = Y coordinate on PFD (Twips) Delete(wh as Variant) Delete a vertical separator wh = Index as Name (String) or Number (Integer/Long) Properties Name Description Attributes Count Number of items in the collection Integer, read only Item(What as Variant) Indexed item in the collection IHorizontalSeparat or, read only Arguments What = Index as Name (String) Or Number (Integer/Long) 14-40 Automation 14-41 14.4 Example – Automation In Visual Basic This complete example has also been pre-build and is located in the ..\Samples\Ole \Vb\Bounds directory. This example will show how that UniSim Flare can be used as an automation server by a program that analyses a UniSim Flare model to search for the maximum and minimum values of a user defined named property within all the pipes. Note: Although Visual Basic is recommended for this example, you may create the Automation application in the Visual Basic editor provided in Microsoft Excel and Microsoft Word®. 1. Open a new project in Visual Basic® 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 14.6. Figure 14.6 2. By default you should have a form associated with the project. Begin, by giving the form a name. In the Name field of the Properties Window give the form the name:frmBounds. 3. In the Caption field type: UniSim Flare Model Pipe Property Bounds. This caption should now appear in the title bar of the form. 14-41 Automation 14-42 4. Before adding objects to the form, resize the view to accommodate the different objects that will be required. In the Width field 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 form as shown in Figure 14.7. Figure 14.7 6. Ensure that the text box is the active control. This can be done in one of two ways: • Select the text box on the form so that the object guides appear around the object. • From the drop down list found at the top of the properties windows select the name of the text box you have just created. 7. In the Properties windows, set the name of the text box as ebModelName in the Name field. If you wish, you may also change the default text that appears inside the edit box by entering a new name in the Text field. 8. You may add a label to the form. i.e. to identify the object from others, by selecting the Label tool and drawing the label on the form just above the text box you have just created. 14-42 Automation 14-43 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. Figure 14.8 10. Add the following objects to the form using the previously described methods. Figure 14.9 14-43 Automation 14-44 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 14.10. Figure 14.10 12. You are now ready to begin defining the events behind the form and objects. You may enter the code environment using a number of methods: • • • Click the View Code button. Select the Code option from the View menu. Double click the frmBounds form. The Private Sub Form_Load() method definition will only be visible if you enter the code environment by double clicking the form. Figure 14.11 14-44 Automation 14-45 13. Begin by declaring the following variables under the Option Explicit Declaration. Figure 14.12 14. Add a reference to the UniSim Flare type library to allow access to predefined constants by selecting References from the Project menu. Figure 14.13 14-45 Automation 14-46 15. The first subroutine should already be declared. The Form_Load subroutine is the first subroutine called once the program is run. It is usually used to initialize the variables and objects used by the program. Enter the following code into the Form_Load subroutine. Code Explanation Private Sub Form_Load() Signifies the start of the form load subroutine. You do not have to add as it should already be there ebModelName.Text = "" Clears all the text fields ebPropertyName.Text = "" ebMinValue.Text = "" ebMaxValue.Text = "" End Sub Signifies the end of the initialization subroutine. This line does not need to be added. 16. The next section of code to be added is what will occur when the name of the model is changed in the ebModelName box. Code Explanation Private Sub ebModelName_Validate(Cancel As Boolean) Signifies the start of the subroutine. ModelName = ebModelName.Text Copies the entered name for the model to the String Variable ModelName End Sub Signifies the end of the subroutine. 17. The next section of code to be added is what will occur when the desired property is changed in the ebPropertyName box. Code Explanation Private Sub ebPropertyName_Validate(Cancel As Boolean) Signifies the start of the subroutine. PropertyName = ebPropertyName.Text Copies the entered name for the property to the String Variable PropertyName End Sub Signifies the end of the subroutine. 18. The final two routines define the actions of the two buttons: btnUpdate and btnExit. Code Explanation Private Sub btnUpdate_Click() Signifies the start of the subroutine. Dim MaxVal As Double Declare work variables Dim MinVal As Double Dim Pipe As UniSimFlare.IPipe Dim WorkVal As Double On Error Resume Next Prevents an error from being raised if for example an invalid name for the property is selected 14-46 Automation 14-47 Code Explanation If Trim$(ModelName) = "" Then If a model name is defined then opens the model defined by the String variable ModelName otherwise connects to the currently running instance of UniSim Flare. Set FnApp = GetObject(, "UniSimFlare.Application") Else Set FnApp = CreateObject("UniSimFlare.Application") FnApp.OpenModel ModelName End If If Not FnApp Is Nothing Then Ensure successful connection to the Application object MaxVal = -10000000000# Initializes the maximum and minimum values to values outside the range of possible values. MinVal = 10000000000# For Each Pipe In FnApp.Pipes Loop through all the pipes in the model WorkVal = Pipe.PropertyByName(PropertyName) Get the property named and stores in the String variable PropertyName If WorkVal <> fntUnknownValue Then Check for an unknown value. Do not consider the value further if it is unknown. If WorkVal > MaxVal Then MaxVal = WorkVal Update maximum value If WorkVal < MinVal Then MinVal = WorkVal Update minimum value End If End of loop and value update Next ebMinValue.Text = Format$(MinVal, "0.000e+00") Update the displayed values in the 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. Private Sub btnExit_Click() Signifies the start of the subroutine. Set FnApp = Nothing Releases the connection to UniSim Flare Unload Me Unload the form and end the program End End Sub Signifies the end of the subroutine. 19. You are now ready to compile and run the program. Before you begin, please ensure that you have a copy of UniSim Flare installed. 20. To compile the program do one of the following: • • • Click the Start button... Select Start from the Run menu. Press <F5> from the keyboard. Visual Basic will inform you of any errors that occur during compile time. 14-47 Theoretical Basis A-1 A Theoretical Basis A.1 Pressure Drop................................................................................ 2 A.1.1 Pipe Pressure Drop Method........................................................ 2 A.1.2 Fittings Pressure Change Methods .............................................11 A.2 Vapor-Liquid Equilibrium ..............................................................23 A.2.1 Compressible Gas ...................................................................23 A.2.2 Vapor Pressure .......................................................................23 A.2.3 Soave Redlich Kwong ..............................................................24 A.2.4 Peng Robinson........................................................................26 A.3 Physical Properties.......................................................................27 A.3.1 Vapor Density.........................................................................27 A.3.2 Liquid Density ........................................................................27 A.3.3 Vapor Viscosity .......................................................................28 A.3.4 Liquid Viscosity.......................................................................28 A.3.5 Thermal Conductivity ..............................................................31 A.3.6 Enthalpy ................................................................................32 A.4 Noise ............................................................................................35 A.4.1 Pipe Noise..............................................................................35 A.4.2 PSV Noise ..............................................................................38 A-1 Theoretical Basis A-2 A.1 Pressure Drop A.1.1 Pipe Pressure Drop Method Vapor Phase Pressure Drop Methods Pressure drop can be calculated either from the theoretically derived equation for isothermal flow of a compressible fluid in a horizontal pipe2: 2 L G 2 G P1 M P22 P12 2 f f 0 In 2 RT a P2 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 Or from the theoretically derived equation for adiabatic flow of a compressible fluid in a horizontal pipe2: V 1 2 ã + 1 V 2 P 1 a 2 L 4f f - = -ã---–----1 + ---- -- 1 – ---- – --------- ln ---- V 2 V 1 ã V 1 G 2 ã (A.2) A-2 Theoretical Basis A-3 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 ff Re 3.61 log e 0.135 Re 6.5 (A.3) where : f f Fanning friction factor Re Reynolds number Internal diameter e Absolute pipe roughness Or from the Chen21 equation: 1 ff 0.8981 e / 5.0452 e / 1.1098 7.149 log 4 log 2.8257 Re Re 3.7065 (A.4) A-3 Theoretical Basis A-4 where : f f Fanning friction factor Re Reynolds number Internal diameter e Absolute pipe roughness Transition Flow (2100 £ Re £ 4000) 1 ff e 5.02 e e 5.02 13.0 log log 4.0 log 3 . 7 3 . 7 Re Re 3.7 Re (A.5) where : f f Fanning friction factor Re Reynolds number Internal diameter e Absolute pipe roughness Laminar Flow (Re < 2100) ff 16 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) A-4 Theoretical Basis A-5 where : f f Fanning friction factor f m Moody friction factor 2-Phase Pressure Drop Although the Beggs and Brill method was not 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. Beggs and Brill The Beggs and Brill9 method is based on work done with an air-water mixture at many different conditions, and is applicable for inclined flow. In the Beggs and Brill correlation, the flow regime is determined using the Froude number and inlet liquid content. The flow map used is based on horizontal flow and has four regimes: segregated, intermittent, distributed and transition. Once the flow regime has been determined, the liquid hold-up for a horizontal pipe is calculated, using the correlation applicable to that regime. A factor is applied to this hold-up to account for pipe inclination. From the hold-up, a two-phase friction factor is calculated and the pressure gradient determined. Figure A.1 A-5 Theoretical Basis A-6 The boundaries between regions are defined in terms of two constants and the Froude number10: L1 exp 4.62 3.757 x 0.481x 2 0.0207 x 3 2 3 (A.8) 5 (A.9) L 2 = exp 1.061 – 4.602x – 1.609x + – 0.0179 x + 0.000625x where : x In ë ë Input liquid content q liquid / q liquid q gas q In situ volumetric flowrate According to Beggs and Brill: 1. If the Froude number is less than L1, the flow pattern is segregated. 2. If the Froude number is greater than both L1 and L2, the flow pattern is distributed. 3. If the Froude number is greater than L1 and smaller than L2 the flow pattern is intermittent. Dukler Method The Dukler10 method breaks the pressure drop into three components Friction, Elevation and Acceleration. The total pressure drop is the sum of the pressure drop due to these components: PTotal PF PE PA (A.10) where : PTotal Total change in pressure PF Change in pressure due to friction PE Change in pressure due to elevation PA Change in pressure due to acceleration A-6 Theoretical Basis A-7 The pressure drop due to friction is: 2 2 f LV m ñ m PF TP 144 g c D (A.11) where : f TP Two phase friction factor (determined empirically ) L Equivalent length of the pipeline ( ft ) Vm Velocity of the two phase mixture in pipeline assuming equal velocity ( ft / s ) ñ m Density of two phase mixture (lb / ft 3 ) g c Gravitational constant (32.2lbm ft / lbf s 2 ) D Inside diameter of pipe ( ft ) The pressure drop due to elevation is as follows: PE Ehñ L H (A.12) 144 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: 2 2 2 ñ Q 2 ñ g QGPL ñ L Q LPL ñ L Q LPL 1 g GPL cos è PA 1 R RL R L 144 g c A 2 1 R L L DS US (A.13) A-7 Theoretical Basis A-8 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 gas phase. The liquid slug between the gas bubbles virtually disappears in the transition regime. In the annular-mist regime, the gas phase is continuous and is the controlling phase. The bulk of the liquid is entrained and carried in the gas phase. Orkiszewski defined bubble flow, slug flow, mist flow and gas velocity numbers which are used to determine the appropriate flow regime. If the ratio of superficial gas velocity to the non-slip velocity is less than the bubble flow number, then bubble flow exists, for which the pressure A-8 Theoretical Basis A-9 drop is: 2 VsL R P f tp ñ L L 2gc D (A.14) where : P Pressure drop (lb / ft 2 per foot of length) f tp Two phase friction factor ñ L Liquid density (lb / ft 3 ) VsL Superficial liquid velocity ( ft / s ) R L Dimensionless factor dependent on non slip velocity g c Gravitational constant (32.2 lbm ft / lbf s 2 ) D Hydraulic diameter ( ft ) If the ratio of superficial gas velocity to the non-slip velocity is greater than the bubble flow number, and the gas velocity number is smaller than the slug flow number, then slug flow exists. The pressure drop in this case is: f ñ V 2 V Vr P tp L ns sL 2g D V V c r ns (A.15) where : Vns Non slip velocity Vr Bubble rise velocity Constant The pressure drop calculation for mist flow is as follows: 2 (Vsg ) P f tp n~g 2 gc D (A.16) A-9 Theoretical Basis A-10 where : V sg Superficia l 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 onefoot length of pipe. These are converted to total pressure drop by: Ptotal ñPL Q G 1441 total f 2 4637PAp (A.18) where : ñ Density of the flowing regime (lb / ft 3 ) Qtotal Mass rate of combined liquid / gas (lb / s ) G f Gas flow rate ( ft 3 / s ) A p Cross sectional area of pipe ( ft 2 ) p Average pressure in segment ( psia ) P Unit pressure drop (as calculated above) L Length of line segment ( ft ) A-10 Theoretical Basis A-11 A.1.2 Fittings Pressure Change Methods The correlations used for the calculation of the pressure change across a fitting are expressed using either the change in static pressure or the change in total pressure. Static pressure and total pressure are related by the relationship: Pt Ps ñv 2 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 Figure 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. Figure A.2 Figure A.3 A-11 Theoretical Basis A-12 Incompressible Single Phase Flow The total pressure change across the fitting is given by: Pt K1 ñ1v12 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 e· 2 2 K 1 = 2.6 sin - 1 – â 2 (A.22) Otherwise 2 2 K 1 = 1 – â (A.23) A-12 Theoretical Basis A-13 Sudden and Gradual Contraction For a contraction the fittings loss coefficient is calculated from ratio of the smaller area to the larger area, . d ó 2 d1 2 (A.24) The fittings loss coefficients are defined by HTFS27 K t 19.2211ó 2 8.54038ó 2.5 14.24265ó 1.5 4.5385ó 0.39543ó 0.5 (A.25) 0.57806 K1 Kt Cc ó2 (A.26) The contraction coefficient, is defined by If è = 180 × (Abrupt contraction) Cc 1 1 0.411 - ó (A.27) Otherwise C c = 0.0179le – 9.6240 e·' · 1 + e' · 4.79028 0.25 + 0.03614 e' (A.28) where : è' è/180 o A-13 Theoretical Basis A-14 Incompressible Two Phase Flow Sudden and Gradual Enlargement The static pressure change across the fitting is given by HTFS27 Ps 2 LO ( K1 1 1 2 )m1 ó2 2 2n~l LO x g2 n~l (1 x g ) 2 å n~ 1 å g (A.29) (A.30) g g where : m Mass flux ñ Phase mass density å Phase void fraction x Phase mass fraction Sudden and Gradual Contraction The static pressure change across the fitting is given by HTFS27 Ps ( K t 1 ó 2 )m22 2 LO 2n~l 2 LO L2 (1 x g ) 2 L2 1 1 C 2 X X (A.31) (A.32) (A.33) A-14 Theoretical Basis A-15 1 x g ñ g 0.5 X x ñ g l ñ C l ñ g 0 .5 ñ g ñl (A.34) 0 .5 (A.35) where : m Mass flux ñ Phase mass density å Phase void fraction x Phase mass fraction Compressible Single Phase Flow Sudden and Gradual Enlargement The static pressure change across the fitting is given by HTFS27 m12 n~1 Ps ~ ( ~ 1) n1ó1 n2 ó (A.36) where : m Mass flux ñ Phase mass density 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. A-15 Theoretical Basis A-16 Compressible Two Phase Flow Sudden and Gradual Enlargement The static pressure change across the fitting is given by HTFS27 Ps m12 E 2 ( E1 ) ó ó (A.37) where : vE Equivalent specific volume given by (1 x g ) (u R 1) 2 E ( xg g u R (1 x g ) l ) x g 1 u R g 0.5 1 l v u R H vl 0 .5 v u R H vl 0 .5 (A.38) (A.39) (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 A-16 Theoretical Basis A-17 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. For the flow from the inlet to the vena conracta, the pressure change is modeled in accordance with HTFS27 by: E m12 E1 Et 1 d æ 1 1 E1 2 P1 E1 (Cc ó) 2 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 Figure A.4 Constant Loss Coefficients The following static pressure loss coefficients values are suggested by the API23: K13 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 A-17 Theoretical Basis A-18 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: K13 K 12 90o 0.38 1.37 <>90o 0.50 1.37 • 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: Ps K ñv 2 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 coefficients can be determined either from graphical representation by Miller25 or from the Gardel28 equations. Using these methods, static pressure changes can be calculated from: A-18 Theoretical Basis • Combining Flow ñ1v12 ñ 3 v32 P3 P 1 2 2 K 13 2 ñ 3v2 2 ñ1v22 ñ v2 P2 3 3 P3 2 2 K 23 2 ñ 3v2 2 • A-19 (A.44) (A.45) Dividing Flow ñ 3 v32 ñ1v12 P P1 3 2 2 K 31 2 ñ 3 v2 2 (A.46) ñ 3 v32 ñ 2 v22 P P2 3 2 2 K 32 2 ñ 3v2 2 (A.47) A-19 Theoretical Basis A-20 Miller Method A typical Miller chart for K 23 in combining flow is shown. Figure A.5 Gardel Method These coefficients can also be calculated analytically from the Gardel28 Equations given below: • Combining flow: cos 1 cos 2 K 13 0.921 q r 2 1.2 1 0.81 2 1 q r 2 q r 1 q r cos 1 0.381 q r 2 K 23 0.031 q r 2 1 1.62 2 q r 1 q r • Dividing Flow A-20 Theoretical Basis A-21 0.4 0.1 2 1 0 . 9 K 31 0.951 q r 2 1.3 tan 0.3 q 2 r 2 1 0.41 tan q r 1 q r 2 K 32 0.03 1 q r 2 0.35q r 2 0.2q r 1 q r where: qr = Ratio of volumetric flow rate in branch to total volumetric flow rate = area ratio of pipe connected with the branch to the pipe carrying the total flow = ratio of the fillet radius of the branch to the radius of the pipe connected with the branch = angle between branch and main flow as shown in Fig A.4 Orifice Plates Orifice plates can be modeled either as a sudden contraction from the inlet pipe size to the orifice diameter followed by a sudden expansion from the orifice diameter to the outlet pipe size or by using the HTFS equation for a thin orifice plate. Ps 2 2.825 2 1.5082 â 0.08956 m1 ( 1 â ) â4 2~ n1 (A.48) See Incompressible Single Phase Flow for a definition of the symbols. 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 A-21 Theoretical Basis A-22 Friction losses are ignored. Figure A.6 Horizonal Separators The Pressure change across the separator comprises the following components calculated using the methods described in Incompressible Single Phase Flow: • • Expansion of the multiphase inlet from the inlet diameter, d1, to the vapor space characterized by equivalent diameter of the vapor area. Contraction of vapor phase outlet from the vapor space characterized by the equivalent diameter of the vapor area, to the outlet diameter, d2 A-22 Theoretical Basis • A-23 Friction losses are ignored. Figure A.7 A.2 Vapor-Liquid Equilibrium A.2.1 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. A.2.2 Vapor Pressure The following equations are used for estimating the vapor pressure, A-23 Theoretical Basis A-24 given the component critical properties3: Inp * r Inp * r ù Inp 0 * (A.50) 1 r Inp 5.92714 6.09648 1.28862InT 0.169347T * 0 r (A.51) 6 r r Tr Inp 15.2518 16.6875 13.4721InT 0.43577T * 1 r Tr r 6 r (A.52) where : pr* Reduced vapour pressure ( p * / pc ) p * Vapour pressure ( psi abs ) pc Critical pressure ( psi abs ) ù Acentric factor Tr Reduced temperature (T / Tc ) T Temperature ( oR ) Tc Critical temperature ( oR ) This equation is restricted to reduced temperatures greater than 0.30, and should not be used below the freezing point. Its use was intended for hydrocarbons, but it generally works well with water. A.2.3 Soave Redlich Kwong It was noted by Wilson (1965, 1966) that the main drawback of the Redlich-Kwong equation of state was its inability of accurately reproducing the vapor pressures of pure component constituents of a given mixture. He proposed a modification to the RK equation of state using the acentricity as a correlating parameter, but this approach was widely ignored until 1972, when Soave (1972) proposed a modification A-24 Theoretical Basis A-25 of the SRK equation of this form: P RT a T , Tc , ù V b V V b (A.53) The a term was fitted in such a way as to reproduce the vapor pressure of hydrocarbons using the acentric factor as a correlating parameter. This led to the following development: P ac a RT ac á V b V V b R 2Tc2 a the same as RK Pc á 1 S 1 Tr0.5 S 0.480 1.574ù - 0.176ù 2 (A.54) (A.55) (A.56) (A.57) The reduced form is: Pr 3Tr 3.8473á Vr 0.2559 Vr Vr 0.2599 (A.58) The SRK equation of state can represent with good accuracy the behavior of hydrocarbon systems for separation operations, and since it is readily converted into computer code, its usage has been extensive in the last twenty years. Other derived thermodynamic properties, like enthalpies and entropies, are reasonably accurate for engineering work, and the SRK equation enjoys wide acceptance in the engineering community today. A-25 Theoretical Basis A-26 A.2.4 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: P RT ac á V b V V b bV b ac 0.45724 R 2Tc2 Pc b 0.07780 RTc Pc (A.59) (A.60) (A.61) They used the same functional dependency for the a term as Soave: á 1 S 1 Tr0.5 (A.62) S 0.37464 1.5422ù - 0.26992ù 2 (A.63) 3.2573Tr 4.8514á 2 Vr 0.2534 Vr 0.5068Vr 0.0642 (A.64) Pr The accuracy of the SRK and PR equations of state are roughly the A-26 Theoretical Basis A-27 same (except for density calculations). A.3 Physical Properties A.3.1 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. 6 .0 P Z 1.0 0.0703 r 1.0 2 Tr Tr ñ PM ZRT (A.65) (A.66) A.3.2 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 UniSim Flare's library. The parameters for hypothetical components are based on the API gravity and the generalized Lu equation. Although the COSTALD method was developed for saturated liquid densities, it can be applied to sub-cooled liquid densities, i.e., at pressures greater than the vapor pressure, using the Chueh and Prausnitz correction factor for compressed fluids. The COSTALD model was modified to improve its accuracy to predict the density for all systems whose pseudo-reduced temperature is below 1.0. Above this temperature, the equation of state compressibility factor is used to calculate the liquid density. A-27 Theoretical Basis A-28 A.3.3 Vapor Viscosity Vapor viscosity is calculated from the Golubev3 method. These equations correlate the vapor viscosity to molecular weight, temperature and the pseudo critical properties. Tr > 1.0 ì 3.5M 0.5 Pc0.667Tr( 0.71 0.29 / Tr ) 10000.0Tc0.167 (A.67) Tr = 1.0 ì 3.5M 0.5 Pc0.667Tr( 0.965) 10000.0Tc0.167 (A.68) A.3.4 Liquid Viscosity UniSim Flare 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 UniSim Flare: a modification of the NBS method (Ely and Hanley), Twu's model, and a modification of the Letsou-Stiel correlation. UniSim Flare will select the appropriate model using the following criteria: Chemical System Liquid Phase Methodology Lt Hydrocarbons (NBP < 155 F) Mod Ely & Hanley Hvy Hydrocarbons (NBP > 155 F) Twu Non-Ideal Chemicals Mod Letsou-Stiel All the models are based on corresponding states principles and have been modified for more reliable application. These models were selected since they were found from internal validation to yield the most reliable results for the chemical systems shown. Viscosity predictions for light hydrocarbon liquid phases and vapor phases were found to be handled more reliably by an in-house modification of the original Ely and Hanley model, heavier hydrocarbon liquids were more effectively handled by Twu's model, and chemical systems were more accurately handled by an in-house modification of the original Letsou- A-28 Theoretical Basis A-29 Stiel model. A complete description of the original corresponding states (NBS) model used for viscosity predictions is presented by Ely and Hanley in their NBS publication16. The original model has been modified to eliminate the iterative procedure for calculating the system shape factors. The generalized Leech-Leland shape factor models have been replaced by component specific models. UniSim Flare 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 UniSim Flare's internal pure component viscosity correlations. UniSim Flare 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. A-29 Theoretical Basis A-30 The parameters supplied for all UniSim Flare 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 UniSim Flare's component librarian or by entering the desired component as a hypothetical and supplying its viscosity curve. Liquid Phase Mixing Rules for Viscosity The estimates of the apparent liquid phase viscosity of immiscible Hydrocarbon Liquid - Aqueous mixtures are calculated using the following "mixing rules": • If the volume fraction of the hydrocarbon phase is greater than or equal to 0.33, the following equation is used19: ì eff ì oil e 3.6 1voil (A.69) where : ì eff Apparent viscosity ì oil Viscosity of Hydrocarbon phase voil Volume fraction Hydrocarbon phase • If the volume fraction of the hydrocarbon phase is less than 0.33, the following equation is used20: ì 0.4ì H O 2 ì ì eff 1 2.5voil oil H 2O ì ì H 2O oil (A.70) where : ì eff Apparent viscosity ì oil Viscosity of Hydrocarbon phase ì H O Viscosity of Aqueous phase 2 voil Volume fraction Hydrocarbon phase A-30 Theoretical Basis A-31 The remaining properties of the pseudo phase are calculated as follows: mweff xi mwi ( molecular weight ) (A.71) ñ eff 1 / xi / pi ( mixture density ) (A.72) Cp eff xi Cp i (A.73) ( misture specific heat ) A.3.5 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 Polings15was 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. A-31 Theoretical Basis A-32 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. A.3.6 Enthalpy Ideal Gas The ideal gas enthalpy is calculated from the following equation: H ideal Ai BiT CiT 2 DiT 3 EiT 4 (A.74) where : H Ideal enthalpy T Temperature A, B, C , D, E Ideal gas heat capacity terms Lee-Kesler The Lee-Kesler enthalpy method corrects the ideal gas enthalpy for temperature and pressure. H H ideal H dep s r s H dep H dep ù H dep H dep r RTc RTc ù RTc RTc (A.75) (A.76) A-32 Theoretical Basis A-33 2b3k 3b4k 3c3k k k b c 2 T T2 2 T2 H dep d 2k k r t r Tr Z 1.0 3E 2 5 2TrVr 5TrVr TrVr RTc k ãk k ã k Vr2 c4k k E 3 k â 1.0 â 1 2 e 2Tr ã Vr (A.77) (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 Equations of State The Enthalpy and Entropy calculations are performed rigorously using the following exact thermodynamic relations: 1 V P H H ID Z 1 P dV T RT RT T V (A.79) 1 P V 1 P S S oID InZ In o dV P R T V V R (A.80) A-33 Theoretical Basis A-34 For the Peng Robinson Equation of State, we have: (A.81) P A Tda Z 2 0.5 1 B S S oID In Z B In o 1.5 In 2 B adT Z 2 0.5 1 B P R (A.82) 1 da V 2 0.5 1 b H H ID In Z 1 1 .5 a T 2 bRT dt V 2 0.5 1 b RT where : a xi x j ai a j 0.5 1 kij N N i 1 j 1 For the SRK Equation of State: 1 da b H H ID Z 1 a T In1 RT bRT dt V (A.83) S S oID P A Tda B In Z B In o In1 R P B adT Z (A.84) A-34 Theoretical Basis A-35 A and B term definitions are provided below: Term Peng-Robinson bi 0.077796 ai aci á i a ci RTci Pci Soave-Redlich-Kwong b i 0.08664 RTci Pci ai aci á i aci 0.457235 RTci 2 Pci 0.42748 RTci 2 Pci ái ai 1 mi 1 Tri0.5 1 mi 1 Tri0.5 mi mi 0.37646 1.54226ù i 0.48 26992 ù i2ù i 0.176ù i2 1.57 where : a xi x j ai a j 0.5 1 kij N N i 1 j 1 and b xi bi N i 1 ID Ideal gas Reference state R Ideal gas constant H Enthalpy S Entropy o A.4 Noise A.4.1 Pipe 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 A-35 Theoretical Basis A-36 friction. 2 P W m = 1.26 ----- ------- v L 4 1013 ç Wm L t SPLr 10 log 2 4 ðr (A.85) (A.86) 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 A-36 Theoretical Basis A-37 The acoustical efficiency is calculated from the following graph. Figure A.8 10 - 3 10 - 4 Aco us tical Efficien cy 1 0-5 10 - 6 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 P T pt 1 2 P2 T1 2 (A.87) The transmission loss due to the pipe wall is calculated from: 0.5mv 36.0 t 17.0 (A.88) where: m = Pipe wall mass per unit area = Internal diameter v = Average fluid velocity A-37 Theoretical Basis A-38 A.4.2 PSV Noise Standard methods exist for predicting Noise from valve from a reference point. Noise at the source is termed as Sound Power level (PWL) and evaluated as 2 PWL = 10 log 0.5MC + 120 (A.89) where: 0.5MC2 = the Kinetic power of the flow through the relief valve M = Mass flow rate (kg/s) C = Speed of sound in the fluid at the valve (m/s) = Acoustic Efficiency which is measured of transformation of kinetic power to sound power Acoustic efficiency is given by Franken graph as Figure A.9 The Sound Pressure level (SPL) evaluates the noise at specific distance r (in m) from the source relief valve SPL = PWL – 10 log 4r2 (A.90) The summary tab of the relief valve unit op displays the SPL at a distance of 1m from the source. A-38 References B-1 B References B-1 References B-2 1 "GPSA Engineering Data Book". 2 "Chemical Engineering Volume 1", 2nd Edition, J. M Coulson and J. F. Richardson, Pergamon Press. 3 "Viscosity of Gases And Mixtures", I. F. Golubev, National Technical Information Services, TT7050022, 1959. 4 "Chemical Process Computations 1, Chemical Engineering-Data Processing", Raman, Raghu, Elsevier Applied Science Publishers Ltd, 1985. 5 "Journal Of Physics", 3 ,263 , D. J. Berthalot. 6 "Technical Data Book-Petroleum Refining", American Petroleum Institute, 1977. 7 Ely, J.F. and Hanley, H.J.M., "A Computer Program for the Prediction of Viscosity and Thermal Conductivity in Hydrocarbon Mixtures", NBS Technical Note 1039 (1983). 8 Hankinson, R.W., and Thompson, G.H., AIChE J., 25, 653 (1979). 9 Beggs, H.D., and Brill, J.P., "A Study of Two-Phase Flow in Inclined Pipes", J. Petrol. Technol., p. 607, May (1973). 10 Gas Conditioning and Processing, Volume 3, Robert N. Maddox and Larry L. Lilly, 1982 by Campbell Petroleum Series (second edition, 1990). 11 Orkiszewski, J., Journal of Petroleum Technology, B29-B38, June, 1967. 12 Gas Conditioning and Processing, Volume 3, Robert N. Maddox and Larry L. Lilly, 1982 by Campbell Petroleum Series (second edition, 1990). 13 API Technical Data Book - Volume 1 , 1983, American Petroleum Institute. 14 Hankinson, R.W. and Thompson, G.H., A.I.Ch.E. Journal, 25, No. 4, p.653 (1979). 15 Reid, R.C., Prausnitz, J.M., Poling, B.E., "The Properties of Gases &Liquids", McGraw-Hill, Inc., 1987. 16 Ely, J.F. and Hanly, H.J.M., "A Computer Program for the Prediction of Viscosity and Thermal Conductivity in Hydrocarbon Mixtures", NBS Technical Note 1039. 17 Pausnitz, J.M., Lichtenthaler, R.N., Azevedo, E.G., "Molecular Thermodynamics of Fluid Phase Equilibria", 2nd. Ed., McGraw-Hill, Inc. 1986. 18 Twu, C.H., IEC. Proc Des & Dev, 24, p. 1287 (1985). 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 B-2 References B-3 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. 28 Gardel, A., "Les Pertes de Charges dans les Écoulements au Travers de". Bulletin Technique de la Suisse Romande, 83, 1957 29 Refer to API Standard 521 for guideline values on Fraction of Heat Radiation (F Factor) based on the component and burner diameter. B-3 File Format C-1 C File Format C-1 File Format C-2 C.1 Import/Export Details This section provides further details of the import and export capabilities of UniSim Flare. C.1.1 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 UniSim Flare version if required. The next step is to process the file to build the object selector tree view for Step 3. Any problems in reading the import definition file are reported. Step 3 During this step, the Import Wizard extracts Source tab data and Field Details for each data item as different data objects are selected. Whenever a new data object is selected the data on the Source tab is validated and any problems are reported. C-2 File Format C-3 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 UniSim Flare case. If not add component to list. For database components use information from database, otherwise use the data values from file. 4. Read binary interaction parameter data. 5. Read data for pipes, connector nodes and source nodes one object type at a time, updating the progress view as appropriate. 6. As each instance of a particular object type is read check if it already exists. If so use the data read to update it otherwise create a new instance of the appropriate object type. 7. Make connections between pipes and nodes. Processing allows for only one end of the connection to be read. 8. Read scenario data. Existing scenarios will be updated and new ones created if required. 9. Read Solver options. 10. Update automatic calculations to reflect new data values. 11. Refresh all views. 12. Close log file and then close Import Data File. Any background copy of Excel will be closed at this point. 13. Close Import Wizard view and finish. General Data Object Import Procedure For each object type that is read the detailed import procedure is as follows: 1. Check to see if import of this object type is required. Quit reading this type of data object if not. 2. Process the data object definition data from the Import Definition File. Search for and open the specified source object. Quit if any errors are encountered. 3. Search the source data object for an instance of the appropriate object type using the defined select criteria if required. For Access imports this will be a row in the specified table; for Excel imports this will be a row or column range in the specified worksheet where cell offset 1,1 is not blank; for XML imports this will be an item element within the specified group element. 4. Repeat steps 2 and 3 to open any sub section data objects. C-3 File Format C-4 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 UniSim Flare 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. C-4 File Format C-5 End of Step 4 The first action taken is to save the export definition file if required, prompting for the file name to be used. The export process proper then begins. In detail the steps are: 1. Clear existing data from export file if requested by the user. 2. Write components data 3. Write binary interaction parameter data 4. Write pipe data 5. Write connector node and source node data working through each type of node in turn 6. Write scenario data for scenarios that are selected for calculation. 7. Write results data for scenarios that are selected for calculation. 8. Write solver options. 9. Save export file. Any background copy of Excel will be closed at this point. 10. Close Export Wizard view. General Data Object Export Procedure For each object type that is written the detailed export procedure is as follows: 1. Check that export of this data object type is required. Quit if not. 2. Create target data object using information from export definition file. For Access export this will create a table with the correct fields; for Excel export a worksheet with the correct name; for XML export a group tag with the correct name. Quit if any errors are encountered. 3. Create target data objects as required for any data subsections. 4. For each instance of the data object to be written search the output file to see if this instance already exists. If so select this to be overwritten. Otherwise create a new instance for the data object in the output file. For Access export this will be a new row in that target table, for Excel export the next row or column range where cell offset 1,1 is blank, for XML export a new item element. Quit if the new target instance cannot be found. 5. Write the values to the target object instance. 6. Update counters for number of items read and mark target instance as complete. 7. Repeat steps 4 to 6 for until each instance of this data object has been written. C-5 File Format C-6 C.1.2 Definition File Formats The import and export definition files are XML formatted data files that describe how the various UniSim Flare data objects and their corresponding data items should be read from or written to the supported external file formats. This section of the documentation describes the layout of these files. Import File Formats File Header The top level element of an import definition file must have the tag name UniSimFlareImport and contain the following attributes: Attribute Description LastModified This is a date string that indicates the date that the file was last updated. UniSimFlareVersi on This indicates the version of UniSim Flare that the file is applicable to in the format N.NN. FileType This indicates the type of external file import that is described in this definition file. Valid values are Access, Excel or XML Data Object Elements The child elements of the UniSim FlareImport tag define the various data objects that may be imported by UniSim Flare. These parent data object elements may contain child data object elements that describe data subsections that may be imported from a different location to the parent data object. For example a pipe data object has a data subsection defined for the PFD layout information. A data object element has the following attributes: Attribute Description ObjectName This defines the source of the data object in the external file. Its usage depends on the type of external file as follows: Access – The entry defines a database table Excel – The entry defines a worksheet XML – The entry defines the tag name of a group element Import This indicates whether this object type is to be imported. Valid values are Yes or No. C-6 File Format C-7 Attribute Description Select This defines any selection criteria to be used when selecting instances of data objects from the external file. Its usage depends on the type of external file but data substitution codes can be defined in the selection criteria for child data object elements in all cases. Access – A valid SQL statement for the database table specified under ObjectName. Excel – A statement of the form R#,C#=”criteria” where R#,C# is a cell offset in the specified worksheet and “criteria” is either a value or a substitution code. Multiple statements can be entered, separated by the word AND. XML – A statement of the form “item tag”=”criteria” where “item tag” is a data item element in the specified group element and “criteria” is either a value or a substitution code. Contained This indicates whether the data for this object is contained in the same external data source as the parent object. Valid values are Yes or No. This setting is always No for a parent data object. DataBy This entry appears in Excel import definition files only. It defines how the data for this object is organized. Valid values are Row, Column or Sheet. StartAt This entry appears in Excel import definition files only. When DataBy is set to Row or Column it defines the starting row or column for the data. When DataBy is set to Sheet it defines the tag by which worksheets of the requisite layout can be identified. PerItem This entry appears in Excel import definition files only. It defines the number of rows or columns occupied by a single instance of a data object, including any spacing, when DataBy is set to Row or Column. ItemTag This entry appears in XML import definition files only. It defines the element tag name used to identify each instance of a data object within the group tag name defined in the ObjectName attribute. A list of valid Data Object elements names is given in Data Objects List. Data Item Elements Each data object element contains data item elements that define the location of the individual data item in the external data source. A data item element contains the following attributes: Attribute Description Import This indicates whether the item is to be imported. Valid values are Yes or No. Offset This defines the location of the data value in the external file. Its usage depends on the type of external file but data substitution codes can be defined for the offset in all cases – see Data Substitution Codes. Access – The entry defines a field within the database table for the object. Excel – The entry defines a cell within the worksheet for the object. The cell is defined either by a single row or column offset or by a row, column offset. XML – The entry defines the tag name of an element within the item tag element for the object. C-7 File Format C-8 A list of the data item elements that are recognized for each data object is given in Data Items List. Export File Formats File Header The top level element of an export definition file must have the tag name UniSimFlareExport and contain the following attributes: Attribute Description LastModified This is a date string that indicates the date that the file was last updated. UniSimFlareVersi on This indicates the version of UniSim Flare 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. Data Object Elements The child elements of the UniSimFlareExport tag define the various data objects that may be exported by UniSim Flare. These parent data object elements may contain child data object elements that describe data subsections that may be exported to a different location to the parent data object. A data object element has the following attributes: Attribute Description ObjectName This defines the name of the data object that will be created and written to in the external file. Its usage depends on the type of external file as follows: Access – The entry defines a database table. Excel – The entry defines a worksheet, XML – The entry defines the tag name of a group element. Export This indicates whether this object type is to be exported. Valid values are Yes or No. Contained This indicates whether the data for this object is to be written to the same external data source as the parent object. Valid values are Yes or No. This setting is always No for a parent data object. DataBy This entry appears in Excel export definition files only. It defines how the data for this object is organized. Valid values are Row, Column or Sheet. StartAt This entry appears in Excel export definition files only. When DataBy is set to Row or Column it defines the starting row or column for the data. When DataBy is set to Sheet it defines the name of the worksheet that will be copied to create a worksheet for each instance of the data object. This name must begin with a “%” character. C-8 File Format C-9 Attribute Description 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. Data Item Elements Each data object element contains data item elements that define how an individual data item is to be written to the external data source. A data item element contains the following attributes: Attribute Description Export This indicates whether the item is to be exported. Valid values are Yes or No. Offset This defines the location where the data value will be written in the external file. Its usage depends on the type of external file Its usage depends on the type of external file but data substitution codes can be defined for the offset in all cases – see Data Substitution Codes. Access – The entry defines a field within the database table for the object. Excel – The entry defines a cell within the worksheet for the object. The cell is defined either by a single row or column offset or by a row, column offset. XML – The entry defines the tag name of an element within the item tag element for the object. Type This appears in Access export definition files only. It defines the data type of the field to be created for this item. Valid values are Text for text strings, Long for integer values, Double for floating point values. Length This appears in Access export definition files only. It defines the length of the field to be created. For fields of type Text it defines the length of the text string in characters. For fields of type Long and Double it is set to 0 and will be ignored though it must be present. A list of the data item elements that are recognized for each data object is given in Data Items List. Data Substitution Codes As indicated in the above data substitution codes may be defined in the Select attribute for import data objects and the Offset attribute for item import and export data items. The details of these codes are as follows: C-9 File Format C-10 Select Codes The code “.itemname” where itemname is the tag name of a data item element is recognized when processing the Select attribute for import definition files. The code “.itemname” will be replaced in the selection criteria by the current value of that item in the parent data object. Therefore it follows that this code cannot be defined for parent data objects; only child data objects that describe data subsections. Multiple “.itemname” codes are allowed in a single select criteria. For example consider the default import definition file for Access files – DefAccess.fni. This file is set up to assume that the PFD layout information for each node is contained in a separate table to the node data. Thus a select code is needed to identify the appropriate row in this table as each node is read. Taking a tee as an example node, the relevant lines of the import definition file are: 1. <Tees ObjectName="Tees" Import="Yes" Select="" Contained="No"> The data in this line specifies the following: The ObjectName attribute says that the data for tee nodes lies in a database table called Tees. The Import attribute says tee node data is to be imported. The Select attribute is blank 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 UniSimFlareImport 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 C-10 File Format C-11 this object will be found in a different table (PFDLayout) to that of the parent object (Tees). A further example can be taken from the default Excel definition file DefExcel.fni. C This expects source data for all scenarios to be held on a dedicated worksheet. The SourceData data object element within the Scenarios data object element is as follows: 4. <SourceData ObjectName="SourceData" Import="Yes" Select="1=.Name" Contained="No" DataBy="Row" PerItem="1" StartAt="1"> This identifies the worksheet as SourceData, and that import of this data is required. The layout is defined as being in rows (DataBy) with 1 row per source data object (PerItem) starting at row 1 (StartAt). The Select attribute says that the data for the current scenario is to be found in rows where column 1 contains the name of the scenario. Offset Codes The following codes are recognized and processed in the Offset attribute in both import and export definition files. “%ObjectName” where ObjectName is the name of a data object element, will be replaced by a value that iterates as successive instances of that type of object are read or written for this instance of the parent data object. It is used to provide a value that iterates through repeated data items e.g. component data or pipe fitting data. ObjectName may refer to any data object element that is a parent of the data item. The code is usually used in conjunction with a + symbol to add the iteration value to some constant value. In an Access or XML import or export definition file the + symbol means that the iteration value is concatenated with the constant value. E.g. Frac+%Composition will be expanded to Frac1, Frac2 etc. In an Excel import or export definition file*, -, and / symbols as well as the + symbol are recognized to combine the iteration value with a constant value to calculate a cell address. E.g. 2,2+%Composition will be expanded to the cell references 2,3 then 2,4 etc. See the CurveMassFlow data item in the TipCurveData data object in the definition file DefExcel.fni for a more complicated example. “#ObjectName” where ObjectName is the name of a data object element, will be replaced by the total number of instances of that type of data object that have been read. ObjectName may refer to any data object C-11 File Format C-12 element that is a child of the current data object element. The value returned is usually combined with some constant value through a + or other symbols as for the “%ObjectName” code. “?Composition” is a special code that is used exactly as it stands. “?Composition” will be replaced by each component name or offset in turn as successive component composition data items are read or written It is generally used in conjunction with a + symbol to each component name or offset to some constant value. In an Access or XML import or export definition file ?Composition will return component names in turn from the master component list e.g. Frac+?Composition will be evaluated as FracMethane, FracEthane etc. In an Excel import or export definition ?Composition will return the index number of a component in the master component list to allow it to be used to calculate a cell offset. In both cases the master component list is the union of the components in the current UniSim Flare case and the import or export definition files. Essentially this code allows unambiguous specification of a component identity when merging of the component lists between a UniSim Flare case and an import or export definition file. C.1.3 Recognized Objects and Items Data Objects List Data object elements for the following data objects and sub-sections are recognized in import and export definition files. Element Tag Sub Section Data Object Elements Description Components None Component data BIPs None Binary interaction parameters Connectors PFDLayout Connector nodes ControlValves PFDLayout Control valve source nodes SourceData FlowBleeds PFDLayout Flow bleed nodes HorizontalSeparators PFDLayout Horizontal separator nodes OrificePlates PFDLayout Orifice plate nodes C-12 File Format Element Tag Pipes C-13 Sub Section Data Object Elements Description PFDLayout Pipes Fittings Fittings None Fitting data for pipes ReliefValves PFDLayout Relief valve source nodes SourceData Tees PFDLayout Tee nodes Tips PFDLayout Flare tip nodes TipCurves TipCurves TipCurveData Tip pressure drop curves TipCurveData None Data points in tip pressure drop curve VerticalSeparators PFDLayout Vertical separator nodes Scenarios SourceData PipeEstimates Scenario data SolverOptions WarningMsgs Calculation option data WarningMsgs None Warning message flags PFDLayout None PFD layout information SourceData Composition Scenario specific source data Composition None Component composition data PipeEstimates None Scenario specific flow estimates for tear streams EndResults Summary results data for each pipe. Export definition files only. PFSummary CompResults StreamProps PhaseProps EndResults None End specific results for each pipe. Export definition files only. CompResults None Composition results for each pipe. Export definition files only. StreamProps None Stream properties at each end of each pipe. Export definition files only. PhaseProps None Properties for each phase at each end of each pipe. Export definition files only. Data Items List The data items that can be read for each data object are as follows: C-13 File Format C-14 Components Attribute Description ID The component id number, -1 for hypotheticals Name The component name (30 chars) Type The component type (8 chars) MolWt The component molecular weight StdDensity The component standard density (kg/m3) NBP The component boiling point (K) WatsonK The component Watson K value Pc The component critical pressure (bar a) Tc The component critical temperature (K) Vc The component critical volume (m3/kgmole) Vchar The component characteristic volume (m3/kgmole) Omega The component acentric factor Omega The component SRK acentric factor Ha The enthalpy A coefficient (kJ/kgmole) Hb The enthalpy B coefficient (kJ/kgmole/K) Hc The enthalpy C coefficient (kJ/kgmole/K2) Hd The enthalpy C coefficient (kJ/kgmole/K3) He The enthalpy C coefficient (kJ/kgmole/K4) Hf The enthalpy C coefficient (kJ/kgmole/K5) S The entropy coefficient ViscA The viscosity A parameter ViscB The viscosity B parameter BIPs Attribute PropPkg Description The code for the property package: 0 – Vapor pressure 1 – Peng Robinson 2 – Soave Redlich Kwong 3 – Compressible Gas IPType The code for the interaction parameter type -1 – None 0 – Kij or Aij 1 – Bij 2 – Cij Comp1 The name of the first component (30 chars) Comp2 The name of the second component (30 chars) Kij12 Value of interaction parameter for comp1 / comp2 Kij21 Value of interaction parameter for comp2 / comp1 C-14 File Format C-15 Connectors Attribute Description Name The connector name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored UpstreamConnection The name of the upstream pipe (30 chars) UpstreamConnectionAt The code for the upstream pipe connection point 0 = upstream end, 1 = downstream end DownstreamConnnection The name of the downstream pipe (30 chars) DownstreamConnnectionAt The code for the downstream pipe connection point 0 = upstream end, 1 = downstream end Length Length of the swage (mm) Theta The internal angle of the swage (radians) FittingLossMethod Code for the fitting loss method 0 = ignored, 1 = calculated TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes ControlValves Attribute Description Name The control valve name (30 chars) Location The location text (30 chars) DownstreamConnnection The name of the downstream pipe (30 chars) DownstreamConnnectionAt The code for the downstream pipe connection point FlangeID Internal diameter of flange (mm) Length The length of the inlet piping (m) ElevationChange The elevation change of the inlet piping (m) 0 = upstream end, 1 = downstream end MaterialCode The code for the inlet pipe material 0 = Carbon Steel, 1 = Stainless steel Roughness The inlet pipe roughness (mm) NominalDiameter The inlet pipe nominal diameter (20 char text) PipeSchedule The inlet pipe schedule (20 char text) C-15 File Format Attribute C-16 Description 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 C-16 File Format C-17 FlowBleeds Attribute Description Name The flow bleed name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored UpstreamConnection The name of the upstream pipe (30 chars) UpstreamConnectionAt The code for the upstream pipe connection point 0 = upstream end, 1 = downstream end DownstreamConnnection The name of the downstream pipe (30 chars) DownstreamConnnectionAt The code for the downstream pipe connection point PressureDrop Pressure drop over bleed (bar) 0 = upstream end, 1 = downstream end FlowOffset Bleed flow offset (kg/h) FlowMultiplier Flow bleed multiplier FlowMinimum Minimum bleed flow (kg/h) FlowMaximum Maximum bleed flow (kg/h) TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes HorizontalSeparators Attribute Description Name The horizontal separator name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored PrimaryInlet The name of the primary inlet pipe (30 chars) PrimaryInletAt The code for the primary inlet pipe connection point 0 = upstream end, 1 = downstream end SecondaryInlet The name of the secondary inlet pipe (30 chars) SecondaryInletAt The code for the secondary inlet pipe connection point VapourOutlet The name of the vapor outlet pipe (30 chars) VapourOutletAt The code for the vapor outlet pipe connection point 0 = upstream end, 1 = downstream end 0 = upstream end, 1 = downstream end Diameter The vessel diameter (mm) LiquidLevel The liquid level (mm) C-17 File Format Attribute FittingLossMethod C-18 Description Code for fittings loss calculation 0 = Ignored, 1 = Calculated TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes BodyDimension Code for body area usage 0 = Full body area, 1 = Partial body area on flow C-18 File Format C-19 OrificePlates Attribute Description Name The orifice plate name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored UpstreamConnection The name of the upstream pipe (30 chars) UpstreamConnectionAt The code for the upstream pipe connection point 0 = upstream end, 1 = downstream end DownstreamConnnection The name of the downstream pipe (30 chars) DownstreamConnnectionAt The code for the downstream pipe connection point OrificeDiameter Diameter of orifice (mm) UpstreamDiameterRatio Ratio of orifice to upstream diameter DownstreamDiameterRatio Ratio of orifice to downstream diameter 0 = upstream end, 1 = downstream end FittingLossMethod Code for pressure loss method 0 = Ignored, 1 = Thin Plate, 2 = Contraction/ Expansion TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition= CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes Pipes Attribute Description Name The flow bleed name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored UpstreamConnection The name of the upstream node (30 chars) UpstreamConnectionAt The code for the upstream node connection point 0,1,2 depending on upstream node DownstreamConnnection The name of the downstream node (30 chars) DownstreamConnnectionAt The code for the downstream pipe connection point TailPipe Code to identify tailpipe 0,1,2 depending on downstream node 0 = No, 1 = Yes Length Pipe length (m) ElevationChange Pipe elevation change (m) MaterialCode Code for pipe material 0 = Carbon steel, 1 = Stainless steel C-19 File Format Attribute C-20 Description ThermalCond Pipe material thermal conductivity (W/m/C) Roughness Pipe absolute roughness (mm) InternalDiameter Pipe internal diameter (mm) NominalDiameter Pipe nominal diameter (20 char text) WallThickness Pipe wall thickness (mm) PipeSchedule Pipe schedule (20 char text) UsePipeClass Code for pipe class usage 0 = No, 1 = Yes Sizeable Code for indicating sizeable pipe 0 = No, 1 = Yes LengthMultiplier Multiplier for pipe length FittingLossOffset Fittings loss offset FittingLossFactor Fittings loss Ft factor AmbientTemperature Temperature outside pipe (C) WindSpeed Wind speed (m/s) HeatTransfer Code to enable heat transfer calcs 0 = No, 1 = Yes OutletTemperature Temperature leaving pipe (C) Duty Heat transferred (kJ/h) InsulationType Insulation description (30 chars) InsulationThickness Insulation thickness (mm) InsulationConductivity Insulation thermal conductivity (W/m/C) VLEMethod Code for VLE method 0 = Default, 1 = Compressible Gas, 2 = Peng Robinson, 3 = Soave Redlich Kwong, 4 = Vapor Pressure HorizontalPipeMethod Code for DP method for horizontal pipes 0 = Default, 1 = Isothermal gas, 2 – Adiabatic gas, 3 = Beggs&Brill, 4 = Dukler InclinedPipeMethod Code for DP method for inclined pipes 0 = Default, 1 = Isothermal gas, 2 – Adiabatic gas, 3 = Beggs&Brill, 4 = Dukler VerticalPipeMethod Code for DP method for vertical pipes 0 = Default, 1 = Isothermal gas, 2 – Adiabatic gas, 3 = Beggs&Brill, 4 = Dukler, 5 = Orkisewski TwoPhaseElements Number of elements for pipe calculation FrictionFactorMethod Code for friction factor method 0 = Default, 1 = Round, 2 = Chen DampingFactor Damping factor FittingsCount Number of fittings linked to this pipe C-20 File Format C-21 Fittings Attribute Description ItemName The name of the fitting (30 chars) FittingDesc Description of the fitting (50 chars) FittingKOffset Fitting loss constant FittingKMultiplier Fitting loss Ft factor ReliefValves Attribute Description Name The relief valve name (30 chars) Location The location text (30 chars) DownstreamConnnection The name of the downstream pipe (30 chars) DownstreamConnnectionAt The code for the downstream pipe connection point FlangeID Internal diameter of flange (mm) MAWP Maximum allowable working pressure (bar a) ValveType Type code for valve 0 = upstream end, 1 = downstream end 0 = Balanced, 1 = Conventional ValveCount Number of valves AreaPerValve Area of each valve orifice (mm2) MechanicalPressure Mechanical pressure limit (bar a) OrificeType Standard type code for orifice (5 char text) Length The length of the inlet piping (m) ElevationChange The elevation change of the inlet piping (m) MaterialCode The code for the inlet pipe material 0 = Carbon Steel, 1 = Stainless steel Roughness The inlet pipe roughness (mm) NominalDiameter The inlet pipe nominal diameter (20 char text) PipeSchedule The inlet pipe schedule (20 char text) InternalDiameter The inlet pipe diameter (mm) UsePipeClass Code for enabling pipe class usage 0 = No, 1 = Yes FittingLossOffset Fittings loss offset for inlet pipe FittingLossFactor Fittings loss Ft factor for inlet pipe Tees Attribute Description Name The tee name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored C-21 File Format C-22 Attribute Description UpstreamConnection The name of the upstream pipe (30 chars) UpstreamConnectionAt The code for the upstream pipe connection point 0 = upstream end, 1 = downstream end BranchConnection BranchConnectionAt The name of the branch pipe (30 chars) The code for the branch pipe connection point 0 = upstream end, 1 = downstream end DownstreamConnection The name of the downstream pipe (30 chars) DownstreamConnectionAt The code for the downstream pipe connection point 0 = upstream end, 1 = downstream end AngleIndex Code for branch angle 0 = 30 deg, 1 = 45 deg, 2 = 60 deg, 3 = 90 deg FittingLossMethod Code for fittings loss calculation 0 = Ignored, 1 = Simple, 2 = Miller BodyType Code for body type 0 = Run, 1 = Tail, 2 = Branch, 3 = Auto TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes BodyDimension Code for body area usage 0 = Full body area, 1 = Partial body area on flow ConnectorIfIncomplete Code to use connector calc 0 = No, 1 = Yes C-22 File Format C-23 Tips Attribute Description Name The tip name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored UpstreamConnection UpstreamConnectionAt The name of the upstream pipe (30 chars) The code for the upstream pipe connection point 0 = upstream end, 1 = downstream end Diameter Diameter of flare (mm) FittingLoss Fittings loss coefficient FittingLossBasis Code for fittings loss basis 0 = Total pressure, 1 = static pressure TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes UseCurves Code for curve usage 0 = No, 1 = Yes ReferenceTemperature Reference temperature for curve data (C) NumCurves Number of pressure drop curves TipCurves Attribute Description TipName The name of the top (30 chars) CurveMolWt The reference molecular weight for the curve CurveNumPoints The number of points in the curve TipCurveData Attribute Description CurveMolWt The mole weight of the curve CurveDataPointNo The number of the curve data point CurveMassFlow The mass flow for the curve data point (kg/h) CurvePressureDrop The pressure drop for the curve data point (bar) C-23 File Format C-24 VerticalSeparators Attribute Description Name The vertical separator name (30 chars) Location The location text (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored PrimaryInlet The name of the primary inlet pipe (30 chars) PrimaryInletAt The code for the primary inlet pipe connection point VapourOutlet The name of the vapor outlet pipe (30 chars) VapourOutletAt The code for the vapor outlet pipe connection point 0 = upstream end, 1 = downstream end 0 = upstream end, 1 = downstream end Diameter FittingLossMethod The vessel diameter (mm) Code for fittings loss calculation 0 = Ignored, 1 = Calculated TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs 0 = No, 1 = Yes Scenarios Attribute Description Name The scenario name (30 chars) Pressure System back pressure (bar a) HeaderMach Header mach number limit HeaderVapVel Header vapor velocity limit (m/s) HeaderLiqVel Header liquid velocity limit (m/s) HeaderRV2 Header momentum limit (kg/m/s2) HeaderNoise Header noise limit (dB) TailPipeMach Tailpipe mach number limit TailPipeVapVel Tailpipe vapor velocity limit (m/s) TailPipeLiqVel Tailpipe liquid velocity limit (m/s) TailPipeRV2 Tailpipe momentum limit (kg/m/s2) TailPipeNoise Tailpipe noise limit (dB) C-24 File Format C-25 SolverOptions Attribute Description Tag Fixed text “Solver Options” AllScenarios Code to indicate which scenarios are calculated EchoLoops Are loop calcs echoed 0 – Current, 1 – All, 2 – Selected 0 = No, 1 = Yes CheckChoke Check for choke flow 0 = No, 1 = Yes IterationsProperties Number of iterations in inner (properties) loop PresTolProperties Pressure tolerance in properties loop (%) MassTol Mass balance tolerance in outer loop (%) DamperProperties Damping factor for inner (properties) loop AmbientTemperature External temperature (C) AtmosphericPressure Atmospheric pressure (bar a) WindSpeed Wind velocity (m/s) LengthMultiplier Pipe length multiplication factor Mode Code for calculation mode 0 = Rating, 1 = Design, 2 = Debottleneck RatedFlow Use rated flow for tailpipes 0 = No, 1 = Yes HeatTransfer Enable heat transfer calculations 0 = No, 1 = Yes Vle Code for VLE method 0 = Compressible gas, 1 = Peng Robinson, 2 = Soave Redlich Kwong, 3 = Vapor Pressure Enthalpy Code for enthalpy method 0 = Ideal gas, 1 = PengRobinson, 2 = Soave Redlich Kwong, 3 = Lee Kesler Horizontal Code for horizontal pressure drop method 0 = Isothermal gas, 1 = Adiabatic Gas, 2 = Beggs&Brill 3 = Dukler Inclined Code for inclined pressure drop method 0 = Isothermal gas, 1 = Adiabatic Gas, 2 = Beggs&Brill 3 = Dukler Vertical Code for vertical pressure drop method 0 = Isothermal gas, 1 = Adiabatic Gas, 2 = Beggs&Brill 3 = Dukler, 4 = Orkisewski Elements FrictionFactor Number of elements for two phase calculations Code for friction factor method 0 = Round, 1 = Chen Choke Code for choke calculation method 0 = Simple, 1 = HEM MinTemp1 Minimum allowed temperature for carbon steel (C) MinTemp2 Minimum allowed temperature for stainless steel (C) MaxTemp1 Maximum allowed temperature for carbon steel (C) MaxTemp2 Maximum allowed temperature for stainless steel (C) InitPres Initial pressure for property calculations (bar a) C-25 File Format Attribute C-26 Description UpdateEstimates Update flow estimates from solution 0 = No, 1 = Yes PresTolUnitOps Pressure tolerance for unit operation calculations (%) PresTolLoops Pressure tolerance for loop calculations (%) IterationsLoops Number of iterations for loop calculations DamperLoops Damping factor for loop calculations CalcIgnoredSources Calculate ignored sources as zero flow 0 = No, 1 = Yes IgnoreSizeChange Ignore valve flange size change in design calcs 0 = No, 1 = Yes MabpInactive Check MABP for inactive sources 0 = No, 1 = Yes LoopMethod Select loop convergence method 0=Newton Raphson, 1=Broyden, 2=Force Convergent LoopAnalyser Select analyzer for looped systems 0 = Convergent, 1 = Simultaneous UseKineticEnergy Include kinetic energy 0 = No, 1 = Yes KineticEnergyBasis Code for kinetic energy basis 0 = Inlet Pipe Velocity, 1 = Zero velocity IgnoreSepKineticEnergy Ignore kinetic energy in separators 0 = No, 1 - Yes C-26 File Format C-27 SourceData Attribute Description ScenarioName The name of the scenario (30 chars) SourceName The name of the source (30 chars) Ignored The ignored flag 0 = not ignored, 1=ignored MassFlow Mass flow of the source (kg/h) RatedFlow Rated flow of the source (kg/h) RelievingPressure Relieving pressure of source (bar a) TemperatureFlag The code for inlet temperature specification 0 = Actual, 1 = Superheat, 2 = Subcool InletTemperatureSpec Inlet temperature value (C) AllowableBackPressure Maximum allowable back pressure (bar a) OutletTemperature Outlet temperature (C) VLEMethod Code for VLE method 0 = Model default, 1 = Compressible gas, 2 = Peng Robinson, 3 = Soave Redlich Kwong, 4 = Vapor Pressure FittingLossMethod Code for fitting loss calculation 0 = Ignored, 1 = Calculated TwoPhaseCorrectionOption Code for two phase correction option 0 = No, 1 = Yes SwageMethod Code for size change calculation method 0 = Compressible, 1 = Incompressible, 2 = Transition CompressibleTransition DP percent of inlet pressure for transition (%) IsothermalDPOption Code for enabling isothermal pressure drop calcs SizingMethod Code for PSV sizing method 0 = No, 1 = Yes 0 = API, 1 = HEM ContingencyFlag Code for sizing contingency 0 = Operating, 1 = Fire HemCd LockRatedFlow Cd for HEM sizing method Auto update of rated flow 0 = No, 1 = Yes LockMABP Auto update of MABP 0 = No, 1 = Yes LockReliefPressure Auto update of relieving pressure 0 = No, 1 = Yes FluidType Code for fluid type 0 = HC, 1 = Misc, 2 = Amine, 3 = Alcohol, 4 = Ketone, 5 = Aldehyde, 6 = Ester, 7 = Carbacid, 8 = Halogen, 9 = Nitrile, 10 = Phenol, 11 = Ether MolWt CompositionBasis Fluid mole weight Code for composition input basis 0 = MolWt, 1 = Mole fraction, 2 = Mass fraction C-27 File Format C-28 Composition Attribute Description ScenarioName The name of the scenario (30 chars) SourceName The name of the source (30 chars) CompositionBasis Code for composition input basis 0 = MolWt, 1 = Mole fraction, 2 = Mass fraction Fraction Individual component fraction ScenarioName Name of the scenario (30 chars) SegmentName Name of the pipe segment (30 chars) NoTear Selects whether pipe segment can be a tear object in looped system FlowEstimate Estimated flow rate for the pipesegment (kgmole/ hr) MaxStep Maximum change in pipe flow allowed in a single solver iteration (kgmole/hr) MaxFlow Maximum flow allowed for this pipe segment (kgmole/hr) MinFlow Minimum flow allowed for this pipe segment (kgmole/hr) 0 = No, 1 = Yes PFDLayout Attribute Description ItemName The name of the PFD item (30 chars) XPosition The X coordinate of the item YPosition The Y coordinate of the item LabelXPosition The X coordinate of the item label LabelYPosition The X coordinate of the item label Rotation Code for icon rotation 0 = None, 1 = Rotate 90, 2 = Rotate 180, 3 = Rotate 270, 4 = Flip X, 5 = Rotate 90 + Flip Y, 6 = Flip Y, 7 = Rotate 90 + Flip X PFSummary Attribute Description ScenarioName The name of the scenario (30 chars) SegmentName The name of the pipe segment (30 chars) MassFlow The mass flow (kg/h) RatedFlow The rated flow (kg/h) MoleFlow The mole flow (kgmole/h) PressureDrop Pressure drop over pipe (bar) SourcePressure Pressure of attached source node (bar a) DPFriction Pressure drop due to friction (bar) DPElevation Pressure drop due to elevation change (bar) DPAcceleration Pressure drop due to acceleration (bar) C-28 File Format Attribute Description DPFittings Pressure drop due to fittings (bar) Noise Noise (dB) FrictionFactor Friction factor ReynoldsNo Reynolds number EquivalentLength Equivalent length (m) C-29 Duty Heat transferred (kJ/h) HTC Overall heat transfer coefficient (W/m2/C) HTCExternal External heat transfer coefficient (W/m2/C) HTCInternal Internal heat transfer coefficient (W/m2/C) WallTemperature Temperature of pipe wall (C) C-29 File Format C-30 EndResults Attribute Description ScenarioName The name of the scenario (30 chars) SegmentName The name of the pipe segment (30 chars) UpstreamPressure Pressure at upstream end of pipe (bar a) UpstreamTemperature Temperature at upstream end of pipe (C) UpstreamVelocity Velocity at upstream end of pipe (m/s) UpstreamMach Mach number at upstream end of pipe UpstreamRhoV2 Momentum at upstream end of pipe (kg/m/s2) UpstreamEnergy Energy at upstream end of pipe (kJ/h) UpstreamFlowRegime Flow regime at upstream end of pipe (20 chars) DownstreamPressure Pressure at downstream end of pipe (bar a) DownstreamTemperature Temperature at downstream end of pipe (C) DownstreamVelocity Velocity at downstream end of pipe (m/s) DownstreamMach Mach number at downstream end of pipe DownstreamRhoV2 Momentum at downstream end of pipe (kg/m/s2) DownstreamEnergy Energy at downstream end of pipe (kJ/h) DownstreamFlowRegime Flow regime at downstream end of pipe (20 chars) CompResults Attribute Description ScenarioName The name of the scenario (30 chars) SegmentName The name of the pipe segment (30 chars) MolWt The molecular weight of the fluid Fraction The mole fraction of each component StreamProps Attribute Description ScenarioName The name of the scenario (30 chars) SegmentName The name of the pipe segment (30 chars) UpstreamDensity Density at upstream end of pipe (kg/m3) UpstreamEnthalpy Energy at upstream end of pipe (kJ/kgmole) UpstreamEntropy Entropy at upstream end of pipe (kJ/kgmole/K) UpstreamHeatCapacity Heat capacity at upstream end of pipe (kJ/kgmole/ K) UpstreamMolWt Mol Wt at upstream end of pipe UpstreamSurfaceTension Surface tension at upstream end of pipe (dyne/ cm) UpstreamThermConductivity Thermal cond. at upstream end of pipe (W/m/K) UpstreamViscosity Viscosity at upstream end of pipe (cP) UpstreamZFactor Z Factor at upstream end of pipe DownstreamDensity Density at downstream end of pipe (kg/m3) C-30 File Format C-31 Attribute Description DownstreamEnthalpy Energy at downstream end of pipe (kJ/kgmole) DownstreamEntropy Entropy at downstream end of pipe (kJ/kgmole/K) DownstreamHeatCapacity Heat capacity at downstream end of pipe (kJ/ kgmole/K) DownstreamMolWt Mol Wt at downstream end of pipe DownstreamSurfaceTension Surface tension at downstream end of pipe (dyne/ cm) DownstreamThermConductivity Thermal cond. at downstream end of pipe (W/m/ K) DownstreamViscosity Viscosity at downstream end of pipe (cP) DownstreamZFactor Z Factor at downstream end of pipe PhaseProps Attribute Description ScenarioName The name of the scenario (30 chars) SegmentName The name of the pipe segment (30 chars) SegmentEnd End of the pipe segment Phase Phase description (25 chars) Density Density of the phase (kg/m3) Enthalpy Energy of the phase (kJ/kgmole) Entropy Entropy of the phase (kJ/kgmole/K) Phase Fraction Fraction of the phase HeatCapacity Heat capacity of the phase (kJ/kgmole/K) MolWt Mol Wt of the phase SurfaceTension Surface tension of the phase (dyne/cm) ThermConductivity Thermal conductivity of the phase (W/m/K) Viscosity Viscosity of the phase (cP) ZFactor Z Factor of the phase C.2 FMT Files Format The printouts can be customized to a limited extent using a series of ASCII text files with the extension “.fmt”. These files may be edited using any ASCII text editor such as the NOTEPAD application distributed with Microsoft Windows. The default “.fmt” files for each printed report are: Report “.fmt’ file Component Data Comps.fmt Component Database DbComps.fmt Compositions MoleFrac.fmt Fittings Database DbFittings.fmt C-31 File Format Report “.fmt’ file Messages Messages.fmt Node Data Node.fmt Pipes Data Pipes.fmt Physical Properties Properties.fmt Pipe Schedule Database DbSchedules.fmt Pressure/Flow Summary Summary.fmt Scenarios Data Scenarios.fmt Scenarios Summary ScenSum.fmt Source Data Sources.fmt C-32 By default, these files are located in the UniSim Flare program directory. You can change the location and “.fmt“ file for each report on the Reports tab on the Preferences Editor view. Figure C.1 These files confirm to the following format, here shown for part of the DbSchedules.fmt file. Variable Description version 1 File format version. DO NOT CHANGE. 5 Number of variables to display 6 Font Size (Point) Arial Font Name schedule,20.0,0 Variable Name,width (mm), repeat flag (0 = All panes, 1 = Once only), extend flag (0 = no, 1 = yes), alignment flag (0 = left, 1 = center, 2 = right) nominal,20.0,1 internal,20.0,1 wall,20.0,1 group,20.0,1 C-32 File Format C-33 Ambient Ambient Temperature Angle Angle to Horizontal Backpres Back Pressure Basis Composition Basis Calcloss Autocalculated Fittings Loss Calculations Node Run, Branch and Tail Segment Class Pipe Class Comps Mole Fractions Sources.fmt ScenSum.fmt Scenarios.fmt Summary.fmt DbSchedules.fmt Proerties.fmt Pipes.fmt Nodes.fmt Messages.fmt DbFitting.fmt MoleFracs.fmt Variable Description DbComps.fmt Variable Name Comps.fmt The following defines which variable may be printed with each report: x x x x x x Connections x x Count Number of Items Damp Dampint Factor Density Standard Liquid Density Densitydown Downstream Density DensityUp Upstream Density Desc Description Dsn Downstream Node Duty Heat Loss Elevation Elevation Change Energy Energy Energydown Downstream Energy Flow x Energyup Upstream Energy Flow x Enthalpy Enthalpy Enthalpydown Downstream Enthalpy x Enthalpyup Upstream Enthalpy x Entropy Entropy Entropydown Downstream Entropy x Entropyup Upstream Entropy x Equivlength Equivalent Length Factor Rated Flow Factor Fitloss Fittings Loss Equation Fittingsa Fitting Loss A x x x x x x x x x x x x C-33 Sources.fmt ScenSum.fmt Scenarios.fmt Summary.fmt DbSchedules.fmt Proerties.fmt C-34 Pipes.fmt Nodes.fmt Messages.fmt Fitting Loss B DbFitting.fmt Fittingsb MoleFracs.fmt Variable Description DbComps.fmt Variable Name Comps.fmt File Format x Fittingsuse x Flange Flange Diameter x Flow Mass Flow Fractiondown Downstream Phase Fraction x Fractionup Upstream Phase Fraction x Frictionfractor Friction Factor Group Item Group Headmach Header Mach No. x Headvelvap Header Vapor Velocity x Headvelliq Header Liquid Velocity x Headrhov2 Header Rho V2 x Headnoise Header Noise x Heatcapdown Downstream Heat Capacity x Heatcapup Upstream Head Capacity x Hhia Ethalpy A Coefficient x x Hib Enthalpy B Coefficient x x Hic Enthalphy C Coefficient x x Hid Enthalpy D Coefficient x x Hie Enthalpy E Coefficient x x Hif Enthalpy F Coefficient x x Htc Heat Transfer Coefficient Htcoverall Overall HTC x Htcexternal External HTC x Htcinternal Internal HTC Id Item ID Ignored Item Ignorned Insname Insulation Description x Insthick Insulation Thickness x x x x x x x C-34 Insconductivity Insulation Conductivity x Internal Internal Diameter x Length Segment Length x Lmultiply Length x Location Segment Location Machdown Downstream Mach Number x Machup Upstream Mach Numnber x Massflow Mass Flow x Material Material Of Construction x Methoddamping Damping Factor x Methoddp Pressure Drop Method Methodelements Twp Phase Elements x Methodfriction Friction Factor x Methodfitlos Fittings Loss Method Methodhordp Horizontal 2 Phase Pressure Drop Method x Methodincdp Inclined Pressure Drop x Methodverdp Vertical 2 Phase Pressure Drop Method x Methodvle VLE method x Molarflow Molar Flow Moleflow Source Molar Flow Molwt Molecular Weight Molwtdown Downstream Molecular Weight x Molstup Upstream Molecular Weight x Msg Text Message Multiply Fittings Equation Multiplier Name Item Name x x Nbp Normal Boiling Point x x Node Node Noise Noise Sources.fmt ScenSum.fmt Scenarios.fmt Summary.fmt DbSchedules.fmt Proerties.fmt C-35 Pipes.fmt Nodes.fmt Messages.fmt DbFitting.fmt MoleFracs.fmt Variable Description DbComps.fmt Variable Name Comps.fmt File Format x x x x x x x x x x x x x x x x x x x x x x C-35 x Nominal Nominal Pipe Diameter Number Index Number Offmaximum Maximum Flow Offtake Ooffminimum Minimum Flow Offtake Offmultiply Offtake Flow Multipler Offrate Offtake Flow Offset Offset Fittings Equation Offset Omega Acentric Factor x x Omegasrk SRK Acentric Factor x x Pc Critical Pressure x x Phase Phase Label Plant Source Plant Location Pressource Static Source Back Pressure Presallow Allowable Back Pressure Presdown Downstream Static Pressure Presdrop Pressure Drop x Presdropfriction Static Pipe Acceleration Loss x Presdropaccelera tion Static Pipe Acceleration Loss x Presdropelev Static Pipe x Presdropfittings Static Pipe Fittings Loss x Presin Inlet Pressure Presup Upstream Static Pressure Property Property Description Ratedflow Rated Mass Flow Refer Literature Reference Regime Flow Regime Resize Resizable Flag Reynolds Reynolds Number x Rhov2up Upstream Rho V2 x Sources.fmt ScenSum.fmt Scenarios.fmt Summary.fmt DbSchedules.fmt Proerties.fmt C-36 Pipes.fmt Nodes.fmt Messages.fmt DbFitting.fmt MoleFracs.fmt Variable Description DbComps.fmt Variable Name Comps.fmt File Format x x x x x x x x x x x x x x C-36 Rhov2down Downstream Rho V2 Roughness Wall roughness Scenario Scenario Name Schedule Pipe Schedule Seg1 Node Run Segment x Seg2 Node Branch Segment x Seg3 Node Tail Segment x Separate Separator Flag Si Entropy Coefficient Source Source Name Status Ignored Status Flag Surftendn Downstream Surface Tension x Surftenup Upstream Surface Tension x Tailmach Tailpipe Mach No. Tailnoise Tailpipe Noise Tailpipe Tailpipe Flag tailrhov2 Tailpipe RhoV2 x Tailvelliq Tailpipe Liquid Velocity x Tailvelvap Tailpipe Vapor Velocity x Tc Critical Temperature Temp Temperature Tempcalc Inlet Temperature Calculations Tempdown Downstream Temperature Tempout Outlet Temperature Tempspec Inlet Temperature Specification Tempup Upstream Temperature Thermconddn Downstream Thermal Conductivity x Thermcondup Upstream Thermal Conductivity x Type Item Type Sources.fmt ScenSum.fmt Scenarios.fmt Summary.fmt DbSchedules.fmt Proerties.fmt C-37 Pipes.fmt Nodes.fmt Messages.fmt DbFitting.fmt MoleFracs.fmt Variable Description DbComps.fmt Variable Name Comps.fmt File Format x x x x x x x x x x x x x x x x x x x x x C-37 x x Vchar Characteristic Volume x x Veldn Downstream Velocity Velup Upstream Velocity Visca Viscosity A Coefficient x x Viscb Viscosity B Coefficient x x Viscdown Downstream Viscosity x Viscup Upstream Viscosity x Volume Pipe Volume Wall Wall Thickness Watson Watson Characterisation Parameter Wind Wind Velocity Zfactordown Downstream Compressibility Factor x Zfactorup Upstream Compressibility Factor x Sources.fmt Critical Volume ScenSum.fmt Vc Scenarios.fmt Source Vapor Summary.fmt Upstream Node Vapourfrac Pipes.fmt Usn Nodes.fmt Variable Description Comps.fmt Variable Name DbSchedules.fmt C-38 Proerties.fmt Messages.fmt DbFitting.fmt MoleFracs.fmt DbComps.fmt File Format x x x x x x x x x C-38 Glossary of Terms D-1 D Glossary of Terms D-1 Glossary of Terms D-2 Adiabatic Flow Adiabatic flow is the constant enthalpy flow of a fluid in a pipe. Choked Flow The velocity of a fluid in a pipe of constant cross sectional area cannot exceed the sonic velocity of the fluid. If the flow of fluid in a pipe is great enough that the sonic velocity is reached, then a pressure discontinuity is seen at the exit end of the pipe. Critical Pressure The critical pressure is the pressure at which the vapor density and liquid density of a substance may be the same. Critical Temperature The critical temperature is the temperature at which the vapor density and liquid density of a substance may be the same. Dongle See Security Device. Equivalent Length The equivalent length of a pipe is the straight length of pipe which would create the same pressure drop as the actual pipe length plus losses due to bends and fittings. 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%. D-2 Glossary of Terms D-3 MABP The Maximum Allowable Back Pressure on a relief device is the maximum pressure that can exist at the outlet of the device without affecting the capacity of the device. In general the MABP for a conventional pressure relief valve should not exceed 10% of the set pressure at 10% overpressure. In general the MABP for a balanced pressure relief valve should not exceed 40% of the set pressure at 10% overpressure. Mach Number Mach number is the ratio of the fluid velocity to the sonic velocity in the fluid. Node Nodes define the connection points between pipes, and pipes with sources. Each node must have a unique name. Reduced Pressure Reduced pressure is the ratio of the absolute pressure to the critical pressure of the fluid. Reduced Temperature Reduced temperature is the ratio of the absolute temperature to the critical temperature of the fluid. 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. D-3 Glossary of Terms D-4 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. Velocity Pressure 2 U Given by ------- , also called the kinematic pressure. 2 D-4 Index A Acentric Factor A-25, A-31 Adiabatic Flow definition D-2 Automation 14-1 B Berthalot Equation A-27 Boundary Nodes 8-29 Button Bar 2-4 C Calculation Options Editor 9-2 Calculation Problems Group 9-10 Design Problems Group 9-10 General tab 9-2 Initialization tab 9-14 Methods tab 9-6 Scenarios tab 9-4 Sizing Status Group 9-11 Sizing tab 9-11 Solver tab 9-11 Warnings tab 9-9 Calculations 9-1 Case opening an existing 3-3 saving 3-4 Case Description View 3-2 Changing Column Order 2-7 Chen Equation A-3 Choked Flow definition D-2 Column Order changing 2-7 Column width changing 2-6 Comma Separated Values 13-3 Component list 4-3 selecting matching name string 4-3 selection filter 4-3 sorting 4-9 type 4-2 Component Editor View estimating unknown properties 4-8 Component Manager View 4-2 Components 4-1 selecting 4-2 Connection Nodes 8-4 Connector Editor Connections tab 8-4 Control Valve 8-29 Control Valve Editor Connections tab 8-30 COSTALD Calculations A-27 Creating and Saving Cases 3-1 Critical Pressure definition D-2 Critical Temperature defintion D-2 CSV See Comma Separated Values 13-3 D Darcy Friction Factor A-4 Data nodes 11-4 pipes 11-3 sources 11-4 viewing 11-1 Database Editor component 10-8 fittings 10-7 pipe schedule 10-5 Database Features 10-2 adding/deleting data 10-4 selection filter 10-2 Databases 10-1 Dongle See Security Device D-2 E Equation Berthalot A-27 Chen A-3 Round A-3 SRK A-25 Equivalent Length definition D-2 Export Wizard 13-19, 13-21 Export Data Layouts 13-19, 13-21 Step 1 13-23 Step 2 13-25 Step 3 13-26 Step 4 13-30 Using 13-19, 13-21 F Flare Tip 8-48 Flare Tip Editor Calculations tab 8-49 Connections tab 8-49 Flow laminar A-4 mist A-9 transition A-4, A-8, A-10 turbulent A-3 Flow Bleed Editor Connections tab 8-7 I-1 Index I-2 FMT Files 13-4 Froude Number A-6 G Gardel equations of A-20 Groups 5-1 H Horizontal Separator 8-10 Horizontal Separator Editor Connections tab 8-10 I Import Wizard Importing Source Data 13-15 Step 1 13-7 Step 2 13-9 Step 3 13-10 Step 4 13-14 Using 13-7 Import/Export Examples 13-31 Importing ASCII Text Files 13-15 Importing UniSim Design Source Data 13-18 Interface 2-1–2-2 Menu Bar 2-3 Status Bar 2-5 Terminology 2-2 Toolbar 2-4 Isothermal Flow definition D-2 M MABP definition D-3 Mach Number definition D-3 Menu Bar 2-3 Modelling Techniques 9-17 Moody Friction Factor A-3 Multiple Editing 7-14 N Network rating an existing 9-17 Node definition D-3 Node Manager 8-2 Node Types Connector 8-4 Flare Tip 8-48 Flow Bleed 8-7 Horizontal Separator 8-10 Orifice Plate 8-15 Sources 8-29 Tee 8-19 Vertical Separator 8-24 Nodes 8-1 Connection 8-4 Noise acoustical efficiency A-37 O Orifice Plate 8-15 Orifice Plate Editor Connections tab 8-16 P Password setting 10-4 PFD 12-1 changing view options 12-13 connecting objects 12-9 icons 12-2 installing objects 12-8 manipulating 12-9 moving objects 12-10 object inspection 12-3 printing 12-12 regenerate 12-11 saving 12-12 selecting objects 12-9 method one 12-10 method two 12-10 toolbar 12-3 unselecting objects 12-10 view 12-3 Physical Properties A-27 enthalpy A-32 Equations of State A-33 ideal gas A-32 mixing rules A-30 thermal conductivity A-31 vapour density A-27 vapour viscosity A-28 Golubev method A-28 Pipe multiple editing 7-14 Pipe Marker 7-1 Pipe Network 7-1 Pipe Tools pipe class editor 7-15 Preferences 2-8 Preferences Editor Databases Tab 2-11 Defaults Tab 2-10 General Tab 2-9 Import Tab 2-14 PFD Tab 2-13 Reports Tab 2-12 I-2 Index I-3 Pressure Drop A-2 Pressure/Flow Summary 11-8 Printing 13-2 location-specific 13-5 PVT Relationship A-23 R Reduced Pressure definition D-3 Reduced Temperature definition D-3 Refresh Source Temperatures 8-48 Relief Valve 8-38 Results Compositions 11-8 messages 11-5 physical properties 11-9 profile 11-11 scenario summary 11-13 viewing 11-1 Round Equation A-3 S Scenario definition D-3 Scenario Editor General Tab 6-5 Sources tab 6-7 Scenario Management 6-2 Scenario Manager view 6-2 Scenario Tools 6-13 Scenarios 6-1 adding single source 6-13 adding/editing 6-4 General Tab 6-4 Sources tab 6-7 Schedule definition D-4 Security Device definition D-4 Source definition D-4 Source Tools 8-48 adding single source scenarios 8-48 updating downstream temperatures 8-48 Source Types Control Valve 8-29 SRK Equation A-25 SRK Equation of State A-34 Static Pressure definition D-4 Status Bar 2-5 Swapping two components 4-9 T Tab Separated Values 13-3 Tailpipe definition D-4 Tee 8-19 Connections tab 8-20 Terminology 2-2 Toolbar 2-4 Total Pressure definition D-4 TSV See Tab Separated Values 13-3 Two-Phase Pressure Drop A-5 Beggs and Brill A-5 Dukler method A-6 Orkiszewski method A-8 V Vapour Phase Pressure Drop methods A-2 Vapour-Liquid Equilibrium compressible gas A-23 Peng Robinson A-26 Soave Redlich Kwong A-24 vapour pressure A-23 Velocity Pressure definition D-4 Vertical Separator 8-24 Vertical Separator Editor Connections tab 8-25 Viewing Data and Results 11-1 I-3
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )