Contents - Index


Units List

 

EES can check the unit consistency of each equation in the Equations Window.  This is a very important capability since experience has shown that unit errors is a very common problem both for students and practicing engineers.  In order for EES to check unit consistency, the units of each variable used in the equations must be specified.  There are several ways to enter unit information.  Units can be for constants in an equation in the Equations window, as in the following example:

 

L = 15 [m]

 

Units for each variable can also be entered in the Variable Information dialog and by right clicking on a variable in the Solutions window or Parametric table.  In each case, it is necessary to enter the unit designation from the keyboard, and this chore can be cumbersome.  The Units List eliminates the need to key in the units. 

 

The Units List can be accessed from the Equations window, the Parametric table and the Solutions window by clicking the right mouse button and selecting Units List from the pop up menu.  In the Variable Info dialog, the Units List is accessed by right-clicking in the Units column when the units field is selected (i.e., shown within a rectangle).  The units list appears as shown.

 

 

Clicking on the desired unit and then clicking the Paste button will paste that unit string into the window that the Units List was accessed from, eliminating the need to enter the units.  Note that double-clicking on a units string in the list has the same effect as clicking the Paste button.  If the units list was accessed from the Equations window, the unit string will be enclosed within quotes and square braces before it is pasted into the Equations window.

 

The name of the current units list file is shown in the title bar of the units list dialog.  Note that the filename extension is .unt1 (for units) or .unt2 (for alternate units), but the units file is a simple text file that contains the desired unit strings.  It is possible to develop customized units lists in separate .unt1 and .unt2 files.  The buttons located on the panel at the right of the dialog facilitate this process.  

 

Load brings up a file open dialog from which a previously stored units list file can be selected.  The unit strings in this file will then be displayed in the units list.

 

Save brings up a file save dialog that saves the current units list in a specified .unt1 or .unt2 file. The .unt1 and .unt2 files will be automatically opened if they are found in the working directory.  There can be more than one .unt1 and .unit2 file.  EES will automatically read the most recent file, but others can be opened with the Load command.  Note:  if you make a change to the units list and Exit without clicking the Save button, the changes will be in effect only for the current EES session.  

 

Add New allows a new unit string to be added to the current list.  Note that the information in this list is case insensitive.  EES will not add a units string if it already exists.

  

Merge will add all of the units strings in the currently open EES file to the existing units list file.

 

Remove will remove the selected units string from the units list.

 

Clear All will remove all units strings from the units list. 

 

If any changes are made to the units list, the Exit button will be enabled.  Clicking the Exit button will close the dialog, keeping any changes that have been made, but without pasting any information into a window.  This behavior differs from the Cancel button in which the dialog is closed without saving any changes, and the Paste button in which the dialog is closed with the specified changes, but the selected units string is pasted into the window that was open when the units dialog was opened.  

 

Note that you can edit the .unt1 and .unt2 files with a text editor if you wish.  

 

If the .unt1 or .unt2 file is located in a write-protected directory, it will not be possible for EES to save any specified changes.  An error condition will be displayed.  This situation occurs when EES is run from a write-protected server.  In this case, it will be necessary to Save the units file into a directory that provides write permission to the user.  An ideal location is the working directory.  

 

A units file, other than the default file, can be automatically loaded with the $INCLUDE directive.

 

See also: Entering units