# Using Cantera for Combustion Problems

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:

$rm{CH_4} + 2(rm{O_2} + 3.76rm{N_2}) rightarrow rm{CO_2} + 2rm{H_2O} + 7.52rm{N_2}$

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.

 ```1 2 3 4 5``` ```from Cantera import * gas = GRI30() gas.set(T=300, P=OneAtm, X='CH4:1, O2:2, N2:7.52') gas.equilibrate('HP') print gas.temperature()```

The line 5 returns the adiabatic flame temperature as 2225.52K (1952.37°C) that is consistent with values are found on the Wikipedia and WolframAlpha.

Originally Posted on ChEngineer Space.

### 2 Responses to Using Cantera for Combustion Problems

1. Jesús Delgado March 21, 2012 at 6:51 am #

I would be interested on knowing the application of this combustions models to the Enhanced Oil Recovery (EOR) techniques based on In Situ Combustion (ISC). Best regards.

2. Rodolfo Rodrigues July 18, 2012 at 5:51 am #

Jesús, Cantera has available a library of 0-D and 1-D chemical reactor models. From them it is possible to model a sort of practical cases involved chemical reactions. You only need to model the EOR process by approaching with one of reactor models. Most of hydrocarbons combustion mechanisms are easily found for free use.