- Make sure your unit system is set to what you think it is.
Go to the Options menu and pick "Unit System" to check/change it. Also be aware that your equations must be dimensionally consistent. EES can help with this, but it won't catch all unit errors.
- Use good guess values.
The default guess value for all variables is 1 with upper and lower limits of ± infinity. For many problems these guess values are too far off to converge on a sloution. Therefore, guesstimate some reasonable values and limits and change them in the "Variable Info" dialog box. You can access this by selecting "Variable Info" from the "Options" menu, or by hitting F9.
- Start with simple problems first.
Here's an example. You would like an EES code to solve for all flowrates, temperatures, pressures, powers and heat transfer rates of a steam turbine cycle with three turbines, two reheaters, three pumps, two open feedwater heaters, and a closed feedwater heater. If you create this code with all the necessary equations all at once there is a good chance it will not converge! Instead, create an EES code that solves for the conditions of a simple, ideal cycle that has just one turbine and one pump with no reheat or feedwater heaters. When you get this to work, update your guess values by going to the "Calculate" menu and selecting "Update Guesses", or by pressing "Ctrl G". This takes the values of all variables from the solution and plugs them into the guess values for those variables. Now add more complexity, say one of your reheats. Solve that, and update your guess values again. This method will keep your guess values close enough to a solution that convergence should easily be obtained. (See item 2 above.)
- Use the
Residuals Window
to spot problem equations.
It is helpful to know how EES actually solves equations. EES solves different groups of coupled equations called blocks. It solves block 0 equations first, where block 0 equations are simple assignment statements for which no iteration is required; e.g.
g = 9.81
Next EES iteratively solves the coupled equations starting with block 1. Using the values obtained from the solution of block 1 equations, EES goes on to block 2, and so on. EES arranges the contents of the blocks and their respective order for the most efficient scheme possible.
EES solves the equations by making educated guesses as to the values of the varibles using a variation of Newton's method. It knows when to stop iterating when the residuals, the differences between the left-hand-side and the right-hand-side of the equations, are less than small assigned small value. (By default this value, of tolerence, is 1.0000E-06, though it can be changed if desired.)
You can view all this information in the Residuals Window found under the Windows menu. You can view this information for the last iteration even if a solution is not obtained. This information often helps you zoom in on which equations are giving you trouble when convergence is not obtained.
When you have "Convergence not obtained" type problems, try going to the Residuals Window and looking for the block of equations that is giving you trouble. Temporarily decouple some of the equations, get a solution, update your guess values, and then go back and solve the original set of equations. Here is an example:
Let's say EES is hanging up on a block of equations in which the equation
Tfilm = (Ts + Tamb)/2
appears. Let's assume that both Tfilm and Ts are unknowns, but Tamb is assigned a value in the equations window. To decouple the equations, temporarily replace the above equations with
Tfilm = Tamb
and solve the resulting equation set. Once it solves, update your guess values and put the original equation back into the set.
- Min/max feature
When using the min/max feature, be sure your variable bounds for your independent variable(s) are reasonable. If you have convegence problems, try switching from "Golden Sections search" to "Quadratic Approximations" (or vice versa) in the min/max dialog box.