Chemical Engineering Communications, Vol.189, No.5, 657-674, 2002
Automatic generation of procedures for the simulation of multistage separators using computer algebra
We successfully extended a computer algebra program (Thermath), originally developed for the automatic computer implementation of physical property calculations, in order to perform the global phase stability test and to generate code for the steady state simulation of multistage separators. Analytical derivatives of the modeling equations and of the thermodynamic properties were rapidly obtained and automatically implemented in Fortran 77 using Thermath. Even though the final assembly of the code was done manually, the largest portion of the programs corresponds to automatically generated code, A program for the simulation of extraction columns was developed and showed excellent agreement with results available in the literature. The global phase stability program was tested in the identification of liquid-liquid phase transitions. showing results coherent with those from the extraction column program, Quadratic convergence rates in the Newton-Raphson method were obtained with both programs, as should be expected when the functions and their derivatives are correctly implemented.