An previous post presented Cantera, a package for thermodynamics, kinetic and transport calculations. Cantera is a function library with object-oriented features that can be use in C++, FORTRAN, MATLAB, and PYTHON applications. One of its main strength may be the functions for combustion problems. In this sense it is possible to do equilibrium and kinetic calculations.
Let us talk about an easy sample which you wish to calculate the adiabatic flame temperature for stoichiometric combustion of methane using air:
The piece of PYTHON code below shows a short script to solve the problem. GRI30() is an object includes the GRI-Mech 3.0, a well-known optimized mechanism for natural gas combustion. This mechanism includes 53 chemical species and 325 related chemical reactions. The initial state is defined in the line 3. The function equilibrate(‘HP’) (line 4) computes the equilibrium state of object gas by minimizing the Gibbs free energy holding enthalpy and pressure constant.
Originally Posted on ChEngineer Space.