Download EES User`s Manual
Transcript
Appendix B Numerical Methods used in EES recognizes that equation 2 can be solved directly for x3. Once this is done, equation 3 can be solved for x2. Finally, equation 1 can be solved for x1. This results in three blocks of equations, each with one equation and one variable which are directly solved. Because the equations in this example are linear and they can be totally uncoupled, the process looks trivial. Things can get a little more interesting if the blocks are a little less obvious. Consider the following example with 8 linear equations in 8 unknowns: + x8 x3 x5 + x4 x1 x7 - x7 - x6 - x6 + x8 + x7 x2 - x5 x3 x4 + x6 x1 + x7 = 11 =7 = -8 = -1 = 10 = 5 = 4 = 14 These equations and variables can be re-numbered and blocked. Each block is solved in turn. In the case above, blocking allows the equations to be solved in 6 blocks as follows: Block 1: Equation 7 x4 = 4 Block 2: Equation 2 x7 = 7 Block 3: Equations 4 and 8 x1 + x4 - x6 = -1 x1 + x6 + x7 = 14 From here and: x1 = 1 x6 = 6 Block 4: Equation 3 x5 - x6 - x7 From here: x5 = 5 Block 5: Equations 1 and 6 x3 + x8 = 11 x3 - x5 + x7 = 5 From here: and: x3 = 3 x8 = 8 Block 6: Equation 5: x2 + x8 = 10 From here: x2 = 2 = -8 The first two blocks contain a single equation with a single variable. These blocks simply define constants. EES will recognize that equations that depend from the start on a single variable are in reality parameter or constant definitions. These parameters are determined before any solution of the remaining equations takes place. No lower and upper limits on the guesses are needed for parameters, since the values of these parameters are determined 306