Combustion Toolbox: An open-source thermochemical code for gas- and condensed-phase problems involving chemical equilibrium

Alberto Cuadra,César Huete,Marcos Vera
2024-09-24
Abstract:The Combustion Toolbox (CT) is a newly developed open-source thermochemical code designed to solve problems involving chemical equilibrium for both gas- and condensed-phase species. The kernel of the code is based on the theoretical framework set forth by NASA's computer program CEA (Chemical Equilibrium with Applications) while incorporating new algorithms that significantly improve both convergence rate and robustness. The thermochemical properties are computed under the ideal gas approximation using an up-to-date version of NASA's 9-coefficient polynomial fits. These fits use the Third Millennium database, which includes the available values from Active Thermochemical Tables. Combustion Toolbox is programmed in MATLAB with an object-oriented architecture composed of three main modules: CT-EQUIL, CT-SD, and CT-ROCKET. The kernel module, CT-EQUIL, minimizes the Gibbs/Helmholtz free energy of the system using the technique of Lagrange multipliers combined with a multidimensional Newton-Raphson method, upon the condition that two state functions are used to define the mixture properties (e.g., enthalpy and pressure). CT-SD solves processes involving strong changes in dynamic pressure, such as steady shock and detonation waves under normal and oblique incidence angles. Finally, CT-ROCKET estimates rocket engine performance under highly idealized conditions. The new tool is equipped with a versatile Graphical User Interface and has been successfully used for teaching and research activities over the last four years. Results are in excellent agreement with CEA, Cantera within Caltech's Shock and Detonation Toolbox (SD-Toolbox), and the Thermochemical Equilibrium Abundances (TEA) code. CT is available under an open-source GPLv3 license via GitHub <a class="link-external link-https" href="https://github.com/CombustionToolbox/combustion_toolbox" rel="external noopener nofollow">this https URL</a>, and its documentation can be found in <a class="link-external link-https" href="https://combustion-toolbox-website.readthedocs.io" rel="external noopener nofollow">this https URL</a>.
Chemical Physics,Instrumentation and Methods for Astrophysics
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to develop an open - source thermochemical calculation toolbox (Combustion Toolbox, CT) for solving gas - phase and condensed - phase problems involving chemical equilibrium. Specifically, the paper focuses on the following aspects: 1. **Chemical equilibrium calculation**: Develop an efficient algorithm to calculate the chemical equilibrium composition of multi - component mixtures after undergoing complex thermochemical transformations. This involves minimizing the Gibbs free energy or Helmholtz free energy of the system while satisfying the mass conservation conditions. 2. **Thermochemical property calculation**: Use the latest NASA 9 - coefficient polynomial fitting and Third Millennium database to calculate thermochemical properties under the ideal gas approximation. These data include standard enthalpy of formation, chemical potential, etc. 3. **Modular design**: CT consists of three main modules: - **CT - EQUIL**: The core module for calculating the chemical equilibrium composition of multi - component gas mixtures under a given initial state (temperature, pressure, and composition). - **CT - SD**: Solve processes involving strong dynamic pressure changes, such as normal shock waves and oblique shock waves. - **CT - ROCKET**: Estimate the performance of rocket engines under idealized conditions. 4. **User interface**: Provide a user - friendly graphical user interface (GUI) so that users can easily perform parameter settings and result analysis. 5. **Performance optimization**: Improve the computational efficiency and robustness of the code by using MATLAB's object - oriented programming (OOP) and efficient interpolation methods (such as PCHIP). 6. **Open - source code**: CT is released under the GPLv3 license, aiming to promote wide application in scientific research and teaching activities. The paper demonstrates the advantages of CT in terms of accuracy and computational efficiency by comparing and validating with existing thermochemical calculation tools (such as NASA's CEA, Cantera, etc.).