Contents - Index

Equations Window


The Equations window operates very much like a word processor.  The equations that EES is to solve are entered in this window.  Editing the text in the Equations window is facilitated with the Cut, Copy, Clear, Paste, and Undo commands in the Edit menu and the Find, Replace and Next commands in the Search menu.  Many of the capabilities of the Edit menu can be accessed by pressing the right mouse button anywhere within the Equations window.  Features of the Equations window are listed below.


1. Blank lines may be used to make the Equations window more legible.  


2. Comments are enclosed in braces {­comment} or within quote marks "comment" and may span multiple lines.  The can also be initiated with the // characters, as indicated in #3.  Comments within braces may be nested in which case only the outermost set of braces are recognized.  Comments within quote marks will also be displayed in the Formatted Equations window and long comments will be automatically wrapped to fit the width of the window.   Pressing the right mouse button in the Equations window will cause a pop-up menu to appear with a menu item to place (or remove) brace or quote comments around the selected text.  The selected text can also be highlighted with a yellow background from this pop-up menu.  The color and font of the comments can be set in the Equations Display Tab of the Preferences dialog. 


3. Any line that begins with characters // is assumed to be a comment (starting with version 7.534).  Starting with version 9.988, // placed anywhere on initiates a comment that includes all characters to the right of the // (including the //) up to the end of the line.  This type of comment is not displayed in the Formatted Equations window.  Note that it is possible to allow use the '//' character sequence by placing the $Allow '//' directive at the top of the Equations window.


4. Syntax highlighting is optional and it can be turned on/off by clicking the right-most pane in the status bar at the bottom of the Equations window.  The time required to compile equations is necessary longer when syntax highlighting is used.   


5. The units of a numerical constant can be specified by enclosing the units in brackets after the constant.   For example: 


                        P_4=100 [bar] 


A comment can be embedded within a unit string by surrounding the comment with either {­ } or \ characters, e.g., h=100 [kJ/kg{­CH4}]  The comment will be displayed with the unit but it will be ignored by the Convert function when doing unit conversions.  Curly braces {­ } can be entered only in the Solution window, the Variable Information dialog or in the header of the Parametric and Arrays tables.


The pop-up menu that appears when you right-click in the Equations window has a Units List item.  Selecting that item will bring up the Units List dialog  that holds many of the common unit strings eliminating the need to key in the unit string and its brackets. 


Note:  EES versions previous to 6.646 allowed the units of a variable on the left side of an equal sign to be assigned units that were specified in a comment statement that began with a units specification.  This capability is no longer provided.  Information provided in a comment is not used to set units. 


6. Equations may be entered in any order.  The order of the equations has no effect on the solution, since EES will block the equations and reorder them for efficient solution.


7. The mathematical operators used in the equations conform to the rules used in procedural languages such as FORTRAN, Pascal or C.  For example, the equation 


  X =  3 + 4 * 5 


will result in X having a value of 23.  The caret symbol (^) or ** can be used to indicate raising to a power.  Arguments of functions are enclosed in parentheses.  EES does not require a variable to appear by itself on the left-hand side of the equation, as do FORTRAN and most other programming languages.  It is equivalent to enter the above equation as


             (X - 3) / 4 = 5


8. Upper and lower case letters are not distinguished.  EES will (optionally) change the case of all variables to match the manner in which they first appear in the Equations window depending on the settings made with the Preferences dialog in the Options menu.  However, this change is made only when the equation is first compiled or modified or when the Check/Format command in the Calculate menu is issued. 


9. Variable names must start with a letter and consist of any keyboard characters except  ( ) * / + - ^ {­ } ;.  The maximum variable length is 30 characters.  Array variables are identified with square braces around the array index or indices, e.g., X[5,3].  The quantity within the braces must be a number or predefined constant, except within the control of the SUM, PRODUCT or DUPLICATE commands.  As a general rule, variables should not be given names that correspond to those of built-in functions (e.g., PI, SIN, ENTHALPY).   Multiple array values can be entered with the short-hand Array Range Notation, e.g., 




10. EES has an upper limit of 6000 variables (12,000 for the Professional version and 24,000 for the 64-bit Professional version) in the main program. Note that variables in a module are added to the variables in the main program each time the module is called.  However variables in Subprograms are contained in a separate memory space.  


11. Equations are normally entered one per line.  Multiple equations may be entered on one line if they are separated by a semicolon (U.S. format) or colon (European format).  There is no limit on the length of an equation, although the use of short equations is encouraged.  Long equations are accommodated by the provision of a horizontal scroll bar that appears if any of the equations is wider than the window.  Alternatively, long lines may be wrapped within the window so that a horizontal scroll bar is not needed by making appropriate choices in the General Display tab of the Preferences dialog.   An equation may be entered on two or more lines provided that each line, except the last, ends with the line break character, which is an ampersand (&).  The ampersand character is removed by EES so that it is not included in the equation.  The ampersand character is useful primarily when creating a LaTeX/PDF report as LaTeX will not automatically wrap long equations.


12. EES compiles equations into a compact stack-based form.  The compiled form is saved in memory so that an equation needs to be compiled only when it is first used or when it is changed.  Additional compilation is needed when syntax highlighting is in effect.  Turn off this option if compilation speed is an issue. Any error detected during the compilation or solution process will result in an explanatory error message and highlighting of the line in which the problem was discovered.


13 Equations can be imported from other .EES files or from .TXT files containing ASCII characters using the $INCLUDE directive.  EES files can also be imported from versions of EES on other operating systems, e.g., the Macintosh, if they are saved in Export format, as described in the Save As command.  Note that the Macintosh version of EES is no longer available but modern Macintosh computers can run the Windows operating system.


14. If the Display Subscripts and Greek Symbols option in the General Display tab of the Preferences dialog is selected, then the format of variables entered in Equations window will be enhanced in several ways.  Greek names (e.g., alpha, beta) will display as Greek symbolsArray variables, e.g., XZ[2] will display with the array index as a subscript.  The underscore character will usually indicate a subscript, e.g., X_1 but X_dot, X_ddot, X_hat, X_bar, and X_tilde will place a dot, double-dot, hat (^), bar, or tilde respectively over the variable name.  The vertical bar indicates a superscript.  For example, G|o will be displayed as G superscript o.  |star and |plus will be replaced with superscript * and superscript +, respectively.


15. Clicking the right mouse button in the Equations window will bring up a pop-up menu, shown below,  that will allow commenting (or uncommenting), character highlighting (with yellow background), cutting, copying or printing of the selected text.  A units list is also available in the pop-up menu to simplify entering the units of constants.  The Professional version provides a menu item to protect the Equations window from being changed.  


16. By default, a variable information palette is displayed on the right side of the Equations window, as shown below.  This palette displays the variables in use in alphabetical order and the assigned units.  Clicking the left mouse button on a variable brings up a dialog that allows the variable properties (including its units) to be altered.  Clicking the right-mouse button finds the variable in the Equations window.  See Variable Information Palette in the Equations Window for more information.




17. Selecting a math function, string function, or property function in the Equations window and then pressing the right mouse button will bring up a pop-up menu which offers access to the online help for the selected function as one of the options, as shown below.  



18. The dimensional and unit consistency of the equations entered into the Equations Window can be checked with the Check Units command.



19. Equations can be imported or exported from/to other applications by using Cut, Copy and Paste commands in the Edit menu.  The Load Library commands in the File menu and the $INCLUDE directive may also be used to import the equations from an existing file.  Equations imported with the $INCLUDE directive will not be visible in the Equations window. 


20. If EES is configured to operate in complex mode, all variables as assumed to have real and imaginary components.  The complex mode configuration can be changed in the Preferences dialog or with the $Complex On/Off directive.


21. The Professional version of EES provides a splitter bar on the Equations window that allows two simultaneous views of the text in the Equations window. 


22.  Constants representing time may be entered in Time Format.  For example, a time of 9 hours, 30 minutes and 10 seconds may be entered as 9:30:10.  EES will internally convert this value to hours and associate units of hours with its value.  However, it is preferable to enter times using the Time function, which allows a wider range of time formats. 


23.  Dates may be entered in Date Format using the Date function


24.  Active hypertext can be entered into the Equations window.  Obviously, this should only be done within comments.  EES will automatically identify hypertext links that begin with http:\\, https:\\ or file:  In addition, a hypertext link that begins with \\EES_ following by the name of an EES window is understood to be a link to that window.  Clicking on a link will move the focus to that location, opening another program if necessary.  A summary of the recognized links is shown below:


http:\\ {­open the default browser and point it at the web page that follows http:}  

https:\\ {­open the default browser and point it at the web page that follows https:}  

file:c:\ees32\ees_manual.pdf  {­open the local file with a forename that follows file: and start the appropriate application}


\\EES_Solution {­open the Solution window and bring it to the front} 

\\EES_Format  {­open the Formatted equations window and bring it to the front}

\\EES_Plot {­open the Plot window and bring it to the front} 

\\EES_Plot3 {­open the Plot window and bring the 3rd plot to the front} 

\\EES_Parametric {­open the Parametric table and bring it to the front} 

\\EES_Lookup {­open the Lookup table and bring it to the front} 

\\EES_Array {­open the Array table and bring it to the front} 

\\EES_Integral {­open the Integral table and bring it to the front} 

\\EES_Report  {­open the Report window and bring it to the front} 

\\EES_Diagram  {­open the Diagram window and bring it to the front}

\\EES_Residual  {­open the Residuals window and bring it to the front}

\\EES_Calculator {­open the EES Calculator window and bring it to the front}


\\EES_Solve {­solve the current set of equations}

\\EES_SolveTable {­apply the Solve Table command in the Calculate menu}

\\EES_MinMax {­apply the MinMax command in the Calculate menu}

\\EES_MinMaxTable {­apply the MinMax Table command in the Calculate menu}


Hypertext links that begin with http: or https: will also be active in the Formatted Equations window provided that the Enable http links menu item in that window is checked.


25. A status bar is provided at the bottom of the Equations window showing the keyboard setting (US/EU), position of the cursor, and settings for word wrap, Caps lock, Insert mode, unit system, warnings, unit checking, complex math mode, and syntax highlighting on/off.  Clicking the Equations window button in the button bar just below the menu bar will also toggle the syntax highlighting on/off.  Clicking on most of the settings in the status bar toggles their settings. 



Note that the Warning setting in the status bar controls whether Warning Information dialog will automatically appear after calculations are completed when warning messages exist.  If Warning setting in the status bar is set to off, any warnings that were generated can be viewed by selecting Warnings from the Windows menu


The US/EU setting is set by the Region and Language choice in the Windows Control Panel.  The choices affect whether the decimal part of a real number is delimited with the decimal point (US) or comma (EU) as well as other differences.  This choice can also be overwritten with the $Keyboard directive.


26.  Bookmarks can be placed in the Equations window to make it easy to find equations in the Equations window when there are many lines.  The Bookmarks are entered with the $Bookmark directive, e.g., entering $Bookmark Bookmark1.  After checking the equations, the bookmarks will appear at the bottom of the popup menu that appears when you right-click the mouse in the Equations window