Contents - Index

Unit Conversion Info


EES provides a powerful unit conversion function which has the following format:


Convert('From', 'To')


From and To are character strings identifying the unit type such as 'Btu/hr-ft^2-R' or 'mph'.  (Note that the single quotes marks around the unit identifier are optional.)  Many of the unit identifiers are obvious, but not all.  The major purpose of this window is to display the unit identifiers that have been defined.


Click on the dimension in the list at the left.  All of the units that have been defined with that dimension are listed in the list on the right.  Note that the defined units having the selected dimension are listed first followed in some cases by unit combinations that provide the same dimension.  For example, if you click on Area, Acre and Hectares will be displayed first followed by the list of recognized length units raised to power 2.  


Click on a unit in the list of the right.  If one unit is selected as shown below, the Copy button will be enabled.  Clicking the Copy button will copy the unit to the clipboard, where it can be pasted to wherever it is needed.  This feature provides one easy way to energy units such as m which may be otherwise difficult to enter from the keyboard.



Click on any two items in the list on the right to see the conversion factor relating these items, as shown below.



Note that unit combinations, such as Btu/hr-ft^2-R, can be assigned to variables.  The rules for combining units are:


1) Only one divide symbol can appear in a unit grouping

2) All units to the right of the division sign are assumed to be in the denominator

3) Units are separated with a - (hyphen), a space or Alt-250 which appears as a dot ()  

4) The * symbol multiplies groups of units.  It is best not to use the * as a separator.

5) Multiple groups can be used provided that they are enclosed in parentheses and separated by a *, e.g., (Btu/lb_m)*(lb_m/hr). Use the * as a separator without parentheses is not recommended.

6) A dimensionless variable can be designated with an empty unit string or with a - (hyphen).  For example, Re = 4 [-] sets variable Re to dimensionless variable with a value of 4.

7) Raising units to a power is accomplished using the ^ symbol followed by the power.  Negative powers are supported.  The ^ symbol is optional.


See the example below for equivalent ways to enter units. Also, see the Convert function for additional information.



"This simple problem illustrates a variety of equivalent ways for entering the units of a variable"

A=2 [Btu/hr-ft^2-F]                             "all units to the right of the / sign are assumed to be in the denominator"

B=2 [Btu hr-1 ft-2 F-1]                       "spaces separate each dimension"

C=2 [Btu hr^-1 ft^-2 F-1]                  "the ^ is usually optional, but recommended"

D=2 [Btu/(hr-ft^2-F)]                         "use parentheses sparingly"

E=2 [Btuhr-1ft^-2F-1]                    "the dot character is entered as alt-250"

F=2 [(Btu/hr)*(ft^-2*F-1)]                 "use * to multiply groups of units"



You can add additional units if needed.  They are stored in the UNITS.TXT file.  The UNITS.TXT file must be placed in the working directory.  This file is automatically read when EES is started or when the EES.prf file is loaded.  An existing .prf file in any directory can be loaded with the Load button in the Preferences dialog or with a $INCLUDE directive. in the main EES directory.  Instructions for adding new units are provided at the top of the UNITS.TXT file.


Note that a list of frequently used units composed of the basic units in this dialog can be entered and accessed so that you need not continuously key in unit string information.  See the Units List dialog for details.