back.gif (198 bytes)up.gif (182 bytes)next.gif (196 bytes)

Working with TPX

The TPX Command Bar and Pop-Up Menu
Enabling the Workbook
Setting Units

The TPX Command Bar and Pop-Up Menu

When TPX is loaded into Excel, a floating command bar appears. Like all Excel command bars, if you drag it off the spreadsheet, it will merge with the command bar or border where you drag it.

TPX Command Bar (40049 bytes)

 

popup.gif (8411 bytes)

The TPX Pop-Up Menu

All of the items on the TPX Command Bar are also available from the pop-up menu which appears when you click the right mouse button. The usual Excel menu items are present, but a new item labeled "TPX" appears at the top, which includes the items on the TPX command bar and contains some additional ones which are context-sensitive. For example, if you first select a range of cells and then press the right mouse button, as shown here, an item "Add To Plots" appears, which adds the state properties in the selected cells to process representation plots (see the section on Plotting).

The pop-up menu is a new feature, and if it works well it may replace the TPX Command Bar entirely in future versions.

Enabling the Workbook

The first time you use any TPX command with a new workbook, you will be asked if you wish to "enable the workbook" for TPX. If you answer YES, a hidden worksheet will be added to the workbook where data used by TPX is stored. If you answer NO, nothing is added to your workbook, but you will not be able to use TPX. A workbook only has to be enabled once. When you re-open an enabled workbook, it is ready for TPX.

You can keep TPX loaded even when you are using Excel for other purposes. TPX will not modify any workbook unless you tell it to do so.

TPX only checks to see that the workbook has been enabled when you select a command from the command bar or pop-up menu. If you open a new workbook and enter a TPX worksheet function in a cell, no checking will be done but an error will result.

Units

units.jpg (10138 bytes)You can use almost any set of units you like with TPX. To set the units, choose Tools / Units.   Set the units for temperature, pressure, energy, mass, moles, and length to the values you prefer.  The units for calculated properties will be contructed from these. For example, the units for specific entropy will be [Energy]/[Mass][Temperature], and for density they will be [Mass]/[Length]^3.  There are no restrictions on your choices: selecting cal for energy, lbm for mass, and K for temperature is a valid unit system as far as TPX is concerned (albeit a highly unusual one). If you wish to use the SI or English systems, you can press SI or English instead of making individual unit choices.

Press OK to accept the displayed units. All further calculations will be done in the selected units, and both inputs and outputs must be in these units.

The selected units are stored in the workbook on the "hidden" sheet. If you close and re-open the workbook, TPX will set the units to those you last used - if you used English units last time, English units will still be in force for that workbook the next time you open it. Each workbook may use a different set of units, even if multiple workbooks are open simultaneously. But every worksheet in one workbook must use the same unit system.

If you press Save, the units are stored in the Add-In file itself, and become the default units for new workbooks. Pressing Restore brings these units back. Also, you may check a box to lock the selected units (not shown here), which disables changing units while the box is checked.

Warning: if you have already entered TPX formulas into the worksheet, changing the units will not automatically cause these formulas to recalculate (see Tips and Tricks for a discussion of recalculation issues), since in Excel a formula only recalculates when one of its input parameters changes. But beware that when they do recalculate, the numerical input values will be interpreted in the new units. If the temperature unit is changed, say,  from K to C, TPX will interpret an input for temperature of 300 to mean 300 C, not 300 K. For this reason, it is usually best to set the desired units before you begin work.

This is also why the option of locking the units is available, since if the units are inadvertently changed on an existing worksheet with formulas, there is no way to know what the original unit system was, or to determine what a temperature input of "300" was supposed to mean.

Now you're ready to begin using TPX. The next section covers how to calculate properties using a simple pop-up calculator, and if desired transfer property functions to the worksheet.

back.gif (198 bytes)up.gif (182 bytes)next.gif (196 bytes)