**Residuals Window**

The Residuals window will display the following columns:

Block Rel. Res. Abs. Res. Units Calls Time(ms) Equations

The information in this window indicates the equation blocking and calculation order used by EES, in addition to the relative and absolute residual values and number of times each equation was called. The absolute residual, abbreviated as Abs. Res., is the difference between the left and right hand sides of the equation using the calculated values for the variables. The relative residual, Rel. Res., is the absolute value of Abs. Res. divided by the value of the left-hand side of the equation, assuming that it is not equal to zero. During the calculations, a solution is considered to be found if the maximum relative residual value for all equations is less than the Residual Tolerance specified with the Stop Criteria in the Options menu.

The block number or letter shown in the Residuals window indicates the source of the equation and the order in which EES is solving the set of equations. Block letters have the following definition.

Import - variable is set to a constant with the $IMPORT directive

Macro - variable is set to a constant with a Macro command

D - variable is set in the Diagram window.

M - variable is set as an independent variable with the Min/Max or Min/Max Table command.

T - variable is set to a constant in the Parametric Table

V - variable is set by an equation entered for the guess value, lower limit or upper limit in the Variable Information dialog.

Block 0 is used for equations having a single unknown that are solved individually. The order in which equations having block 0 appear is the order in which they are solved. After the block 0 equations are solved, EES will then simultaneously solve all equations in block 1, then block 2, and so on until all equations are solved. The order in which equations are shown *within a block* for block numbers greater than 0 is irrelevant. **Bold block numbers **are used to identify equations that were not solved to the specified tolerance. The block number will display "Last' for equations contained within $DOLAST - $ENDDOLAST directives.

EES will check the consistency of the units in each equation in the Residuals window if the "Check Units automatically" control in the General tab of the Preferences dialog is selected. OK will be displayed if the unit check is successful. A ? will be display if the unit check fails. An X will be displayed if unit checking has been disabled for this equation. Clicking the right mouse button on an equation will bring up a pop-up menu that has 3 items. The first menu item "Jump to Equation window', will move the focus to the Equations window and place the cursor on the equation that was selected in the Residuals window. The second item, "Check Units" will check the units for the selected equation. Selecting this menu item will display the message from the unit checking processor. If there is a unit consistency problem, the message dialog will offer the opportunity to open the Variable Information dialog specialized for the equation being considered in which the units of each variable in the equation can be viewed and/or changed. The third item will enable or disable unit checking for this equation.

The column labeled "Calls" indicates the number of times each equation was evaluated including the evaluations needed to calculate numerical derivatives.

The column labeled "Time(ms)" is the accumulated computational time in ms EES required to solve this equation. If the total time is less than 1 millisecond, it is reported as 0.

The equations shown in the Residuals window will have one or more **variables displayed in bold font**. The variable(s) shown in bold are determined by the equation(s) in the block. The value of the variables in the equation under the cursor is displayed in the status bar at the bottom of the Residuals window. The values can be displayed with the units either showing or hidden. Right-click on the status bar to change the setting. By default, the height of the status bar will change to accommodate all of the information for the equation under the cursor. If you would prefer to not have the status bar height change, right-click the mouse in the status bar and select the Auto size item from the pop-up menu so that a check mark does not appear.

If EES is configured to manipulate complex numbers, two equations, one each for the real and imaginary parts, will be generated for each equation entered in the Equations window. The real and imaginary equations are identified with a (r) and (i) just to the left of the equation.

It is possible to display the Residuals window in a debugging situation. If the number of equations is less than the number of unknowns, EES will not be able to solve the equation set, but the Residuals window can be made visible by selecting it from the Windows menu. Normally, the block numbers appear in sequential order. When one or more equations are missing, EES will skip a block number at the point in which it encounters this problem. The equations in the following blocks should be carefully reviewed to determine whether they are correctly and completely entered.

The information in the Residuals window is useful in coaxing a stubborn set of equations to converge. The bold block numbers will indicate which equations have not been successfully solved by EES. The bold variable(s) are determined by the equations. In this way, the block of equations and the associated variables that EES could not solve can be identified. Check these equations to be sure that there is a solution. You may need to change the guess values or bounds for the variables in this block using the Variable Info command.

Double-clicking the left mouse button on an equation in the Residuals window will cause the Equations window to be brought to the front with the selected equation highlighted. Alternatively, right-clicking on the equation will bring up a popup menu with a 'Jump to Equations window' menu item' that will produce the same behavior.

Sections of the Residuals window can be selected by dragging the mouse while holding the mouse button down. The selected lines will be copied as tab-delimited text to the Clipboard if the Copy command is issued.

Tip: Use the Find command in the Search menu to find a particular variable or equation in the Residuals window.

The Professional license provides the Computational Flow window as an alternative to the Residuals window. Both windows display similar information but in different formats.