Validating methane's adiabatic temperature and heating value

483 views
Skip to first unread message

Nicholas Rackham

unread,
Oct 2, 2014, 9:42:53 AM10/2/14
to canter...@googlegroups.com
To whom may be able to help,
 
I am trying to make some sense with the values I am producing with an adiabatic combustion of methane for atmospheric conditions. The adiabatic temperature and the enthalpy I am getting does not seem to correlate with the supposed 2223Kelvin and the 50MJ/kg respectively (enthalpy being taken as the heating value). Instead I am getting 1326.1Kelvin and -571853.898J/kg far too low from what I am expecting. I am lead to believe that cantera makes its calculations interchangeably between J/kg and J/kmol. Can anyone shed any light into how it may makes these calculations, with respect to maybe having to make any potential conversion or further calculation on the basis of the interchangeable calculation between  J/kg and J/kmol, and what would be the correct approach in obtaining the values from literature.

Kind regards,

Nick

P.S. please find the code I am currently using below:

"""

Constant-pressure, adiabatic kinetics simulation.

"""


import numpy as np

import cantera as ct


temp = 298.0 #Initial temperature = Atmosphereic temperature in Kelvin


pres
= ct.one_atm #Atmospheric pressure

# phases


gas_CH4
= ct.Solution('gri30.cti')

air_O2 = ct.Solution('gri30.cti')

air_N2 = ct.Solution('gri30.cti')


# the phases that will be included in the calculation, and their initial moles


mix_phases = [ (gas_CH4, 16.04),(air_O2, 32.0),(air_N2, 28.0) ]




# gaseous fuel species


fuel_species = 'CH4'




# air composition


air_N2_O2_ratio = 3.76


# equivalence ratio range


phi_min = 0.8


phi_max = 1.2


npoints = 10



##############################################################################


mix = ct.Mixture(mix_phases)


nsp = mix.n_species #Number of species


# create some arrays to hold the data


phi = np.zeros(npoints,'d')


tad = np.zeros(npoints,'d')


xeq = np.zeros([nsp/3,npoints],'d')



# find fuel, nitrogen, and oxygen indices


ifuel= gas_CH4.species_index(fuel_species)


io2= air_O2.species_index('O2')


in2 = air_N2.species_index('N2')



for i in range(npoints):


    phi[i] = phi_min + (phi_max - phi_min)*i/(npoints - 1)


    X = np.zeros(nsp)


    X[ifuel] = phi[i]


    X[io2] = 1 #Stoichiometric mixture


    X[in2] = 1*air_N2_O2_ratio




# set the gas state


gas_CH4.TPX= temp, pres, 'CH4:phi[i]'


   


air_O2.TPX=temp,pres,'O2:1.055'


air_N2.TPX=temp,pres,'N2:1.055*air_N2_O2_ratio'


mix_phases = [(gas_CH4, phi[i]),(air_O2, 1),(air_N2,1*air_N2_O2_ratio)]

 


# create a mixture of 1 mole of gas, and 0 moles of solid carbon.


mix = ct.Mixture(mix_phases)



# equilibrate the mixture adiabatically at constant P


mix.equilibrate('HP')


print 'Methane: CH4'


print '%10s %15s' % ('T [K]', 'h [J/kg]')


print mix.T, gas_CH4.h


Bryan W. Weber

unread,
Oct 2, 2014, 10:06:29 AM10/2/14
to canter...@googlegroups.com
Dear Nick,

I don't know how much I can help, but I do know that you should use one Solution class to represent your system. As I believe Ray told you earlier, the Mixture class is when you have a mixture of phases (solid-gas, liquid-gas, etc) and the Solution class can represent mixtures of the same phase. Therefore, you should use the following code to set the mole fractions/temperature/pressure and equilibrate:

gas = ct.Solution('gri30.cti')
gas
.TPX  = 298, 101325, 'CH4:1,O2:2,N2:7.52'
gas
.equilibrate('HP')

If I do that, I get 2224 K for the adiabatic flame temperature, very close to the value you expect for stoichiometric methane/air mixture.

Hope it helps,
Bryan

Ray Speth

unread,
Oct 2, 2014, 11:27:41 AM10/2/14
to canter...@googlegroups.com
Nick,

There are several problems in the code you provided.

First, the sum of the mole fractions for a phase is always 1, and as such, Cantera normalizes the provided mole fractions. Thus, when you set the composition of a phase to a pure species, the number you put with it doesn't actually matter. The number of moles for each component is set by the values provided in the tuples passed to the Mixture constructor.

Second, you can't put variable names and mathematical expressions in strings and expect them to be interpreted as anything other than a string. The most recent version of Cantera (2.1.2) will generate an error if you make this mistake. If you want to calculate values and put their representation in a string, you can use Python's string formatting functions, e.g.:

foo = 3.76
bar
= 0.2
X
= 'N2:{0}, O2:{1}'.format(foo, 5*bar)
which will set X to be 'N2:3.76, O2:1.0'.

Third, 1 mole of methane and 1 mole of oxygen do not constitute a stoichiometric mixture.

Fourth, the specific enthalpy of the mixture after equilibrating is not the heating value of the fuel. You need to look at the definition for the heating value and think about what quantities are needed to actually calculate that.

Finally, you should follow the example Bryan gave and just use a single instance of class Solution to model this.

Regards,
Ray

On Thursday, October 2, 2014 9:42:53 AM UTC-4, Nicholas Rackham wrote:
Reply all
Reply to author
Forward
0 new messages