ReactionMechanismSimulator.jl: A Modern Approach to Chemical Kinetic Mechanism Simulation and Analysis

Matthew S. Johnson,Hao-Wei Pang,A. Mark Payne,William H. Green
DOI: https://doi.org/10.26434/chemrxiv-2023-tj34t-v2
2024-01-12
Abstract:We present ReactionMechanismSimulator.jl (RMS), a modern differentiable software for the simulation and analysis of chemical kinetic mechanisms, including multiphase systems. RMS has already been applied to problems in combustion, pyrolysis, polymers, pharmaceuticals, catalysis, and electrocatalysis. RMS is written in Julia, making it easy to develop and allowing it to take advantage of Julia’s extensive numerical computing ecosystem. In addition to its extensive library of optimized analytic Jacobians, RMS can generate and use Jacobians computed using automatic differentiation and symbolically generated analytic Jacobians. RMS is demonstrated to be faster than Cantera and Chemkin in several benchmarks. RMS also implements an extensive set of features for analyzing chemical mechanisms, including a library of easy-to-call plotting functions, molecular structure resolved flux diagram generation, crash analysis, traditional sensitivity analysis, transitory sensitivity analysis and an automatic mechanism analysis toolkit. RMS implements efficient adjoint and parallel forward sensitivity analyses. We also demonstrate the ease of adding new features to RMS.
Chemistry
What problem does this paper attempt to address?
The main problems that this paper attempts to solve are the performance and flexibility issues encountered by existing chemical kinetics simulation software when dealing with large - scale chemical mechanisms. Specifically: 1. **Performance Bottleneck**: Traditional software such as Chemkin and Cantera, although widely used in the field of chemical kinetics, have low computational efficiency when dealing with large - scale chemical mechanisms containing a large number of species and reactions, especially when calculating the Jacobian matrix and conducting sensitivity analysis. 2. **Lack of Flexibility**: These traditional software have difficulties in integrating modern numerical methods (such as automatic differentiation, computer algebra systems, neural networks, and adjoint sensitivity analysis) because they are based on static - type languages (such as FORTRAN and C++), and these languages face challenges when integrating new technologies. 3. **Difficulty in Development and Debugging**: Due to the complexity of static - type languages, developing and debugging these software requires more time and effort, which limits the rapid addition and improvement of new functions. To solve these problems, the author proposes **ReactionMechanismSimulator.jl (RMS)**, a modern chemical kinetics simulation and analysis tool written in the Julia language. The main features of RMS include: - **High Performance**: Utilizing Julia's efficient just - in - time compiler, RMS is comparable in computational speed to C++ and FORTRAN while maintaining the flexibility of a dynamic language. - **Automatic Differentiation and Symbol Generation**: RMS supports automatic differentiation and symbol - generated Jacobian matrix calculations, improving computational accuracy and efficiency. - **Rich Analysis Tools**: RMS provides a series of analysis tools, including plotting functions, flux graph generation for molecular structure analysis, crash analysis, traditional sensitivity analysis, transient sensitivity analysis, and automatic mechanism analysis tools. - **Easy to Extend**: The design of RMS makes it easy to add new functions, reducing the threshold for development and maintenance. Through these features, RMS aims to provide a more efficient and flexible tool for chemical kinetics research, applicable to a variety of application fields from combustion to polymers, pharmaceuticals, catalysis, and electro - catalysis.