Computers & Chemical Engineering, Vol.19, No.S, 779-784, 1995
Automatic Differentiation Applications to Computer-Aided Process Engineering
The numerical methods used for solving many scientific computing problems, in particular, for computer aided process engineering, require the computation of derivatives of a function. Both the accuracy and the computational requirements of the derivat:ives are, usually, of critical importance to ensure the robustness and the efficiency of the numerical solution. The purpose of this paper is to report on the development and application of computer algebra systems for automating the implementation of differentiation into existing computer codes. The so-called Automatic Differentiation (AD) Methods have been tested on several examples of thermodynamic property calculation routines. We have used the Odyssee system, developed for the project SAFIR. The various automatic differentiation algorithms, called forward (direct) mode and reverse (adjoint) mode, have been compared on these examples. Our results show that Automatic Differentiation algorithms can handle real-life codes and that the codes generated are competitive in time with calculation of derivatives by divided-difference approximations. For some classes of programs, the codes generated are much more efficient so as to be competitive with handmade derivatives. Moreover, Automatic Differentiation avoids the truncation errors found in finite difference approximation Calculation and also the tedious (and error prone) analytical derivation work done by hand.