Can I Trust This Software Package? An Exercise In Validation Of Computational Results
Abstract
Mathematical software packages such as Polymath, MATLAB, and Mathcad are currently widely used for engineering problem solving. Applications of several of these packages to typical chemical engineering problems have been demonstrated by Cutlip, et al.[1] The main characteristic of these packages is that they provide a “problem-solving environment (PSE)” (Enright[2]) rather than just scientific subroutine libraries callable from programming languages that were popular a few years ago. For routine use of the software packages for problem solving, there is no need to be an expert in either numerical methods or programming. In most cases it is sufficient to specify the mathematical model of the problem using the syntax required by the package. The technical details of the solution are carried out by the package. However, there are cases where the solution is obviously incorrect and/or the program stops with an error message. The failure of a software package to reach a correct solution is commonly due to the presence of errors in the mathematical model or because of the selection of an inappropriate solution algorithm and/or inappropriate algorithm parameters (such as initial estimates, error tolerances, etc). Validation of the mathematical models has been discussed in detail by Brauner, et al.[3] In this paper we present an exercise that can be used to educate students to identify difficulties associated with an algorithm used for the solution of a problem and to select appropriate parameters for the algorithm. This exercise involves numerical solution of a system of ordinary differential equations (ODEs). It can be used at two levels. 1. The first is in courses where students routinely use numerical software for solving ODEs (i.e., Reaction Engineering, Process Control, and Process Simulation). In such courses, this part of the exercise can be used to demonstrate that computer solutions can be inaccurate or even completely incorrect, and that it is always necessary to validate a numerical solution. 2. At the more advanced level, the second part of the exercise can be used in courses related to mathematical modeling and numerical analysis. In such courses this part of the exercise provides training and demonstration of advanced topics, such as error estimation and step size control, error propagation and stiffness of ODEs.