UniSim Excel Interface Tool User Notes

9
USE-IT v1.0 User Notes – UniSim Design R390 1 USE-IT v1.0 User Notes 1 Introduction USE-IT is a Case Study tool, for the UniSim® Design program. USE-IT takes the form of a Microsoft Excel worksheet which is used to configure the case study and store the results. 2 Installation When installing UniSim Design if you choose the Complete option the USE- IT tool will be installed. If you choose the Custom option, the USE-IT feature is initially disabled. At this point the user can choose to install USE- -IT by enabling the option. NOTE : Excel macros security should be enabled in order to use USE-IT (UniSim Excel Interface Tool) Excel 2003 : Excel Standard Menu Æ Tools Æ Macro Æ Security Æ Check Security Level ‘Medium’ Excel 2007 : Office Button Æ Excel options Æ Trust center Æ Trust center settings Macro settings Æ Enable all macros 3 Components of USE-IT USE-IT is broadly split into three components: Template Workbook (USE-IT10_Template.xlt). The user can save their own copies of the template workbook but should take care when overwriting the master template (stored in C:\Program Files\Honeywell\UniSim Design R390\UniSim Excel Interface) Excel Add-In (UniSimExcelInterface10.xla). Contains macros that ‘drive’ USE-IT Supporting dlls (stored in C:\Program Files\Honeywell\UniSim Design R390\UniSim Excel Interface) 4 Starting USE-IT From the Start menu choose Programs\Honeywell\UniSim Design R390\UniSim Excel Interface\UniSim Excel Interface Template Workbook.

description

Uni sim notes

Transcript of UniSim Excel Interface Tool User Notes

Page 1: UniSim Excel Interface Tool User Notes

USE-IT v1.0 User Notes – UniSim Design R390 1

USE-IT v1.0 User Notes 1 Introduction

USE-IT is a Case Study tool, for the UniSim® Design program. USE-IT takes the form of a Microsoft Excel worksheet which is used to configure the case study and store the results.

2 Installation

When installing UniSim Design if you choose the Complete option the USE-IT tool will be installed. If you choose the Custom option, the USE-IT feature is initially disabled. At this point the user can choose to install USE--IT by enabling the option.

NOTE : Excel macros security should be enabled in order to use USE-IT (UniSim Excel Interface Tool)

Excel 2003 : Excel Standard Menu Tools Macro Security Check Security Level ‘Medium’

Excel 2007 : Office Button Excel options Trust center Trust center settings

Macro settings Enable all macros

3 Components of USE-IT

USE-IT is broadly split into three components:

• Template Workbook (USE-IT10_Template.xlt). The user can save their own copies of the template workbook but should take care when overwriting the master template (stored in C:\Program Files\Honeywell\UniSim Design R390\UniSim Excel Interface)

• Excel Add-In (UniSimExcelInterface10.xla). Contains macros that ‘drive’ USE-IT

• Supporting dlls (stored in C:\Program Files\Honeywell\UniSim Design R390\UniSim Excel Interface)

4 Starting USE-IT

From the Start menu choose Programs\Honeywell\UniSim Design R390\UniSim Excel Interface\UniSim Excel Interface Template Workbook.

Page 2: UniSim Excel Interface Tool User Notes

2 www.honeywell.com/ps

5 What USE-IT Does

USE-IT is a case study tool. The user defines Input Variables and Output variables and configures a number of cases. USE-IT will step through the cases in turn, set the values of all the Input Variables into UniSim Design, Solve UniSim Design and then report the values of the Output Variables.

6 Layout of USE-IT Template Worksheet

USE-IT is configured using the Template Worksheet. A master template is supplied with the USE-IT install. The user is free to ‘Save As’ as many copies of this as they like for later reuse, but should take care when overwriting the master template (stored in C:\Program Files\Honeywell\UniSim Design R390\UniSim Excel Interface).

When a spreadsheet based on the USE-IT Template Worksheet is opened it will automatically open the USE-IT Excel Add In and will create a USE-IT menu entry in the Excel menus.

USE-IT is configured by making changes in the Template Worksheet and operated using the USE-IT menu.

The USE-IT Template Worksheet is split into several sections as follows:

Page 3: UniSim Excel Interface Tool User Notes

USE-IT v1.0 User Notes – UniSim Design R390 3

• Enter the UniSim Design case file path and name into cell C3 (either manually or via the USE-IT menu ‘Load Simulation’ option).

• Set Input Variables (in the Yellow cells) and Output Variables (in the Blue cells). Variables are configured using the Object Browser.

• Define the values of the Input Variables for each case (either by hand or by getting the current values from UniSim Design).

• Run the required cases.

7 The USE-IT menu

Use the USE-IT menu to:

• Set the file name & path of the UniSim Design case to work with into cell C3 (‘Load Simulation’)

• Run a case study (or read current values into the input or output cells) (‘Run Simulation’)

• Configure Input\Output Variables (‘Object Browser’ Set ‘USE-IT Options’

Page 4: UniSim Excel Interface Tool User Notes

4 www.honeywell.com/ps

7.1 Configuring Variables using the Object Browser

Select any cell in the row in the input (yellow) or output (blue) cells in which it is desired to add a variable and then choose ‘Object Browser’ from the USE-IT menu. The Object Browser shows all the objects in the selected case, organised into a tree structure by flowsheet and object type. For each object a list of available properties is displayed.

USE-IT uses XML to record the variables it will read and write. This XML is stored in column A. By ticking the ‘Use Description’ checkbox a more descriptive variable name will be written in column B. Units are written in column C and may be modified by the user.

Page 5: UniSim Excel Interface Tool User Notes

USE-IT v1.0 User Notes – UniSim Design R390 5

7.2 ‘Run Simulation’ window

Here the user can start a case study for any previously configured cases, or retrieve the current values of the Input or Output variables.

Select the cases to run in the list box (Use ‘Shift’ or ‘Ctrl’ to select multiple cases if required).

The action taken on the selected cases when ‘Run UniSim Design’ is pressed depends on the Mode radio button setting:

Run = Run the case study for each of the selected cases (i.e. Set Inputs, Solve UniSim Design, Get Outputs)

Set Inputs = Set the Inputs for the selected case(s), but don’t solve UniSim Design

Get Inputs = Get the current value for each of the Inputs

Get Outputs = Get the current value for each of the Outputs

Page 6: UniSim Excel Interface Tool User Notes

6 www.honeywell.com/ps

7.3 Options

A number of options can be set from the USE-IT options menu button. Hover the mouse over each option to see a description of that option.

The settings for the options are saved in a hidden sheet in the Template Workbook, so different Template Workbooks can have different values for the settings.

Run Options

Run UniSim in Visible Mode : UniSim Design flowsheet simulation case will be visible while the case is running. This option depends on the ‘UniSim Design Leave Open’ option setting. Only when ‘UniSim Design Leave Open’ is checked on does ‘Run UniSim Visible Mode’ take effect.

UniSim Design Leave Open : If checked UniSim Design application window will be left open once executions are done.

Run Oil Manager : If checked UniSim Design will Enter and Leave the Oil Environment before each case is run. Should be used when Oil Environment settings are changed in the USE-IT case study.

Force Download : Force re-load of UniSim Design file before each case is run. Each time the case is loaded a new instance of UniSim Design is started.

Page 7: UniSim Excel Interface Tool User Notes

USE-IT v1.0 User Notes – UniSim Design R390 7

Disable PreCalc Macro :

Disable PostCalc Macro :

The USE-IT Template spreadsheet includes two predefined macro functions eSim_UserPreCalc and eSim_UserPostCalc. If the relevant Disable macro checkbox is unchecked then the macro will be called either before or after the run of each case. These macros can be used to enable custom functionality.

Case Iterations : Allows the user to run each case multiple times in succession., before moving on to the next. Can be used with the Pre/PostCalc Macro to enable custom functionality.

Browser Options

Auto Description : Automatically use UniSim Object / Property name in description (Column B)

Excel Auto Move Down : Cannot be disabled. Move the Excel selection down to the next row after a variable has been added. If less than three rows are left blank in the Inputs / Outputs section below the cell where the variable is added, USE-IT will add additional rows.

UniSim SS Auto Move Down : After a UniSim spreadsheet cell property is added as a variable automatically increment the row selection in the Browser to select the row underneath.

Page 8: UniSim Excel Interface Tool User Notes

8 www.honeywell.com/ps

Allow UniSim SS Overrun : Allow Linking to cells beyond UniSim Spreadsheet limits.

Check Input Specifiable : When an input variable is added to the spreadsheet using the Browser check whether it is currently specifiable and if it is not display a warning message to the user. If this option is disabled then the user will not be warned when adding a calculated variable as an input. At run time USE-IT will always give an error when attempting to specify a variable which is calculated in Unisim Design.

Hide XML Path : Hide XML object path display in Object Browser and expand UniSim object tree view to fill the whole window.

Object/Property Sorted : If ticked Object and Property items are sorted alphabetically (A to Z) when displayed in the Object Browser. If unticked Objects are displayed in the order they were added to the case and properties with most commonly used first.

Hide Calculated in Input : When active cell is in input range, calculated variables are hidden in the property selection box in the Object Browser.

Analyze Specifiable : Check which properties are calculated or specifiable and colour code the Object Browser property selection box accordingly (black = calculated, blue = specifiable).

Other Options

Show Error in Dialog : Show any error messages within a dialog box

Page 9: UniSim Excel Interface Tool User Notes

USE-IT v1.0 User Notes – UniSim Design R390 9

Write Error In Log File : Write any error messages to a log file (eSimErrorLog.txt) in the same folder where the USE-IT template file is stored. (If the USE-IT template has not yet been saved as a specific xls file then the error log file will be written in the root directory: e.g. C: or D:). If USE-IT cannot write the error log file for any reason an error message is displayed.

8 Typical Usage

Typical workflow would be as follows:

1. Open UniSim® Design and load any Steady State case.

2. Open USE-IT (From the Start menu choose Programs\Honeywell\UniSim Design R390\UniSim Excel Interface\UniSim Excel Interface Template Workbook.)

3. Set the UniSim Design case in cell C3, either manually or via the USE-IT menu ‘Load Simulation’ option. (If C3 is empty and USE-IT finds that a UniSim Design case is currently open it offers to enter it into C3 when the user picks ‘Load Simulation’.)

4. Enter Run time/description for each required case.

5. Define Inputs – Select one of the Yellow coloured cells then choose USE-IT\Object Browser and pick some input variables.

6. Define Outputs – Select one of the Blue coloured cells, then choose USE-IT\Object Browser and pick some output variables.

7. Manually populate the ‘Calculation period number’ columns with input variables, or populate them automatically based on the current case. (USE-IT\Run Simulation, select the runs to populate in the list box and choose Get Inputs then press Run UniSim.)

8. Run the case study – Click USE-IT\Run Simulation, select the periods to run then choose Run and press Run UniSim Design.