(294f) Don't Take the Difficult Path in Solving Systems of Nonlinear Equations | AIChE

# (294f) Don't Take the Difficult Path in Solving Systems of Nonlinear Equations

Conference

Year

Proceeding

Group

Session

Time

## Authors

Ben Gurion University of the Negev
University of Connecticut
Intel Corporation
The LearnChemE group at the University of Colorado has produced a voluminous library of Screencasts, ConcepTests and Interactive Simulations that is widely used by the chemical and biochemical engineering community. We became interested in particular with the PolyMath Screencasts and the associated examples (see link below[1]), as we found that these examples can be used for additional educational purposes to those that were originally envisioned by the developers.

For example there are courses associated with the use of the computer for problem solving in ChE and other engineering disciplines with titles and content such as Numerical Methods and Programming. In such courses, artificial examples and assignments are often used for demonstration and training. We have found that using ChE related problems for demonstration and training can increase considerably a student's motivation to learn such subjects. Our textbook (Cutlip and Shacham[2]) provides such examples, and we have found that with the help of the LearnChemE examples we can effectively demonstrate and apply additional principles.

During the screencast where the mathematical model of a particular phenomenon is explained, the user can enter the model equations simultaneously into the PolyMathLite[3] package using an Android Tablet or Smartphone. The screencast can be paused as necessary to complete the problem solution entry. This allows the PolyMathLite software to solve the problem, and the user can compare the results with those obtained by the instructor in the screencast.

Consider for example the "VLE: Wilson's Equation" screencast which details the modeling of the vapor-liquid equilibrium for a binary mixture using Wilson's equation. The equations can be entered into the PolyMathLIte app. as shown in Figure 1. Note that PolyMathLite automatically detects that the problem involves a system of nonlinear equations when the RUN button is pressed. Note that a HELP is provided within the PolyMathLite app.

Â Execution of this program yields determination of the 10 unknowns where the critical unknowns are the bubble point temperature (T = 344.226 K), the gas phase mole fraction of component 1,(y1 = 0.86) and gas phase mole fraction of component 2, (y2= 0.139).

In addition to possible use in a â??Thermodynamicsâ? course, this problem can be of interest for a course that teaches â??Numerical Methodsâ?. The inexperienced user would think of generating a solution involving 10 implicit algebraic equations with 10 unknowns. This would requireÂ initial estimates for all variables.Â An additional concern is that the presence of logarithmic terms in some equations might cause some of the functions to become undefined for non-positive values of some of the unknowns. The practical solution process can be considerably improved by rearrangement of the equations so that some can be written in explicit form of single variables.Â Also reformulation of the equations to replace the logarithmic terms by exponential terms. This screencast demonstrates that a systematic method for carrying out such rearrangements and reformulations can be an important contribution to a successful problem solution.Â This concept is a good practical addition to a â??Numerical Methodsâ? course. The revised form of the equation set is shown in Figure 2.

Â Note that there is only one implicit equation that remains in the revised form (f(T) = 1- y1 â?? y2) with TÂ as the only unknown that requires an initial estimate.Â A practical interval to bracket the temperature solution can easily be explored.Â TheÂ remainingÂ equations were converted to explicit forms and the logarithmic expressions were converted to exponential expressions. The resulting set of equations was easily solved with PolyMathLite, and the resulting solution agrees nicely with the solution obtained within the screencast video.

Additionally the PolyMathLite solution report also contains a ready to run MATLAB[4]Â m-file program for solving the same problem when MATLAB is available. The MATLAB program generated for solving the revised form of the VLE Wilson's Equation problem is shown in Figure 3.Â The PolyMathLite generated MATLAB program can serve as a basis for MATLAB programming exercises of various difficulty levels.

References

1. â??LearnChemE â?? Educational Resources for Chemical Engineeringâ? website of the University of Colorado, Boulder (http://www.learncheme.com/student-resources/polymath)
2. Cutlip, M. B., and M. Shacham, Problem solving in chemical and biochemical engineering with POLYMATH, Excel and MATLAB. 2nd Ed., Prentice Hall, Upper Saddle River, N. J. (2008)
3. PolyMathLite is a product of Polymath Software (http://www.PolyMathLite.com.).
4. MATLAB is a trademark of The Math Works, Inc. (http://www.mathworks.com).