Getting Started Guide: Inserting Functions
The Insert Function user interface is the recommended way of inserting JSteam functions into your Excel Workbook. Advantages include:
- Automatic adding of the current number format (kJ/kg, psi, etc.).
- Customizable input format including automatic tables and argument lists.
- Documentation window describes the function and it's arguments.
- Easily change return arguments for unit operations before inserting the function.
- Automatically adds the composition sheet if required.
You may also type the functions manually or use the Excel Insert Function interface, however the above features will not be automatically present.
Changing the Input Format
There are three modes available for pasting a JSteam function from the Insert Function interface, selectable from the checkboxes at the bottom left of the window. These are covered below with examples of the Steam Enthalpy function HPT():
1 - No Table The first mode leaves both top checkboxes un-ticked, which is the basic insert mode:
This will insert the function with no table or argument lists, and instead list the input arguments using default names in a single cell:
In the above example, P is pressure and T is temperature, and these letters should be replaced by the user with the correct values. If the function has multiple output arguments an array will be created, and the user should use CTRL+SHIFT+ENTER in order to evaluate an array function once the values have been updated.
2 - Table The second mode ticks the insert table checkbox:
This will insert the function with an input and output table designated by small borders. A thick border separates the inputs from outputs:
3 - Table with Input Arguments Listed The third mode ticks all checkboxes, which is the default mode:
This will insert the function similar to the second mode except an extra column will be used to list the input and output arguments:
Choosing the Function Location
The bottom checkbox allows the interface to automatically place the selected function at your currently selected cell. However if you wish to place at another location, you may leave this checkbox un-ticked, and will be presented with the following window when you click paste:
Which will place the function at the location you select.
Customizing the Return Arguments
When inserting a unit operation function you are able to select which return arguments you would like to have returned via the Return Arguments edit box:
For the above example, the Boiler is currently selected and the documentation page describing the return arguments is shown. Within the edit box all default return arguments are automatically generated. For the purposes of this example, lets say we don't wish to return blowdown enthalpy or mass flow, we would simply delete the corresponding tokens:
Clicking Paste will then insert the Boiler function with only these return arguments selected:
In this way you can choose to only return the arguments you want to display in your model. To change the return arguments, simply reinsert the function on top of the existing one, and delete any cells if necessary.
Note by default not all arguments may be included, so ensure you modify the return argument string if required.