Combustion and Flame, Vol.128, No.3, 270-291, 2002
On upgrading the numerics in combustion chemistry codes
A method of updating and reusing legacy FORTRAN codes for combustion simulations is presented using the DAEPACK software package, The procedure is demonstratcd on two codes that come with the CHEMKIN-II package, CONP and SENKIN, for the constant-pressure batch reactor simulation. Using DAEPACK generated code. analytical derivative calculations, sparsity pattern information, and hidden discontinuity information can be obtained for the models. of interest, This information can be easily integrated with different solvers giving the modeler great flexibility in selecting the best solution procedure. Using the generated code, the CONP code was connected to three different solvers. and the SENKIN code was connected to two different solvers. The effect of model formulation, analytical derivatives, sparsity, and sensitivity equation solution method were analyzed for three large kinetic mechanism, for methane, acetylene, and n-heptane. For the n-heptane model, with 544 species and 2446 reactions, a factor of 10-speed improvement over the original solution procedure was found using analytical derivatives and sparse linear algebra, For sensitivity calculations, for a small number of parameters, a factor of 55 improvement over the original solution procedure was found for the n-heptane problem. Upon closer examination of results, no one method is found to always he superior to other methods, and selection of the appropriate solution procedure requires an examination of the specific kinetic mechanism, which is easily conducted using DAEPACK generated code.