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.  However, 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 entered as a comment following 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.



The title bar shows the name of the units list file.  EES provides two default lists named SI_DefaultUnits.unt and ENG_DefaultUnits.unt that hold common units for the SI and English system, respectively.  The units are shown in the list.  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 .UNT, but the units file is a simple text (.txt) file that contains the desired unit strings.  It is possible to develop customized units lists in separate .UNT 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 (.UNT or .TXT) 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 .UNT or .TXT file.  Note that EES will automatically read the SI_DefaultUnits.UNT or the ENG_DefaultUnits.UNT file, depending on the current unit system setting, if this file is found in the working directory.  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 .UNT file with a text editor if you wish.  If the .UNT 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.


Right-clicking while editing the units field in the Variable Information dialog will bring up a list of units that are stored in the SI_DefaultUnits.unt and ENG_DefaultUnits.unt files.  If you do not wish to have the pop-up list of units appear, you can rename or delete these files.