CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   cantera 2.2.1 two steps mechanism (https://www.cfd-online.com/Forums/main/171032-cantera-2-2-1-two-steps-mechanism.html)

AGL May 3, 2016 12:27

cantera 2.2.1 two steps mechanism
 
Dear Users

I am a new user of cantera and I am trying to run 1D premixed free flame using a reduced mechanism.

The reactions run into cantera is the following
phi=1.0
gas= ct.Solution('ch4_2step.cti') # use one step model input (.cti) file
stoich_O2 =gas.n_atoms(Fuel,'C') + 0.25*gas.n_atoms(Fuel,'H')
X={Fuel: phi/stoich_O2, 'O2': 1.0, 'N2':3.76}
# set the gas state
gas.TPX=T,P,X


The program converge only when I put 'N2':0.0, but I would like to have the Nitrogen in the mixture calculation.

I tried to take into account the nitrogen by putting this following reaction

# Reaction 4
reaction(" N2 => N2", [0.0,0,12000.0])

but with no success and only a time integration error.

I did not find any examples on how to add your own mechanism in the a cti.file.

Therefore , I do not know if the error is coming from my writing of the cti file or to the way I add the nitrogen.

Thank you very much for the help.

Best regards

################################################## ################################################## ############################
units(length='cm', time='s', quantity='mol', act_energy='cal/mol')

ideal_gas(name = "ch4_2steps",
elements = " O H C N ",
species = """ CH4 O2 CO2 H2O CO H2 N2""",
reactions = "all",
transport = "Mix",
initial_state = state(temperature = 300.0,
pressure = OneAtm) )

#-------------------------------------------------------------------------------
# Species data
#-------------------------------------------------------------------------------

species(name = "CH4",
atoms = " C:1 H:4 ",
thermo = (
NASA( [ 200.00, 1000.00], [ 5.149876130E+00, -1.367097880E-02,
4.918005990E-05, -4.847430260E-08, 1.666939560E-11,
-1.024664760E+04, -4.641303760E+00] ),
NASA( [ 1000.00, 3500.00], [ 7.485149500E-02, 1.339094670E-02,
-5.732858090E-06, 1.222925350E-09, -1.018152300E-13,
-9.468344590E+03, 1.843731800E+01] )
),
transport = gas_transport(
geom = "nonlinear",
diam = 3.75,
well_depth = 141.40,
polar = 2.60,
rot_relax = 13.00),
note = "L 8/88")


species(name='O2',
atoms='O:2',
thermo=(NASA([200.00, 1000.00],
[ 3.78245636E+00, -2.99673416E-03, 9.84730201E-06,
-9.68129509E-09, 3.24372837E-12, -1.06394356E+03,
3.65767573E+00]),
NASA([1000.00, 3500.00],
[ 3.28253784E+00, 1.48308754E-03, -7.57966669E-07,
2.09470555E-10, -2.16717794E-14, -1.08845772E+03,
5.45323129E+00])),
transport=gas_transport(geom='linear',
diam=3.458,
well_depth=107.4,
polar=1.6,
rot_relax=3.8),
note='TPIS89')

species(name = "CO2",
atoms = " C:1 O:2 ",
thermo = (
NASA( [ 200.00, 1000.00], [ 2.356773520E+00, 8.984596770E-03,
-7.123562690E-06, 2.459190220E-09, -1.436995480E-13,
-4.837196970E+04, 9.901052220E+00] ),
NASA( [ 1000.00, 3500.00], [ 3.857460290E+00, 4.414370260E-03,
-2.214814040E-06, 5.234901880E-10, -4.720841640E-14,
-4.875916600E+04, 2.271638060E+00] )
),
transport = gas_transport(
geom = "linear",
diam = 3.76,
well_depth = 244.00,
polar = 2.65,
rot_relax = 2.10),
note = "L 7/88")

species(name='H2O',
atoms='O:1 H:2',
thermo=(NASA([200.00, 1000.00],
[ 4.19864056E+00, -2.03643410E-03, 6.52040211E-06,
-5.48797062E-09, 1.77197817E-12, -3.02937267E+04,
-8.49032208E-01]),
NASA([1000.00, 3500.00],
[ 3.03399249E+00, 2.17691804E-03, -1.64072518E-07,
-9.70419870E-11, 1.68200992E-14, -3.00042971E+04,
4.96677010E+00])),
transport=gas_transport(geom='nonlinear',
diam=2.605,
well_depth=572.4,
dipole=1.844,
rot_relax=4.0),
note='L8/89')


species(name = "CO",
atoms = " C:1 O:1 ",
thermo = (
NASA( [ 200.00, 1000.00], [ 3.579533470E+00, -6.103536800E-04,
1.016814330E-06, 9.070058840E-10, -9.044244990E-13,
-1.434408600E+04, 3.508409280E+00] ),
NASA( [ 1000.00, 3500.00], [ 2.715185610E+00, 2.062527430E-03,
-9.988257710E-07, 2.300530080E-10, -2.036477160E-14,
-1.415187240E+04, 7.818687720E+00] )
),
transport = gas_transport(
geom = "linear",
diam = 3.65,
well_depth = 98.10,
polar = 1.95,
rot_relax = 1.80),
note = "TPIS79"
)

species(name = "H2",
atoms = " H:2 ",
thermo = (
NASA( [ 200.00, 1000.00], [ 2.344331120E+00, 7.980520750E-03,
-1.947815100E-05, 2.015720940E-08, -7.376117610E-12,
-9.179351730E+02, 6.830102380E-01] ),
NASA( [ 1000.00, 3500.00], [ 3.337279200E+00, -4.940247310E-05,
4.994567780E-07, -1.795663940E-10, 2.002553760E-14,
-9.501589220E+02, -3.205023310E+00] )
),
transport = gas_transport(
geom = "linear",
diam = 2.92,
well_depth = 38.00,
polar = 0.79,
rot_relax = 280.00),
note = "TPIS78"
)

species(name = "N2",
atoms = " N:2 ",
thermo = (
NASA( [ 300.00, 1000.00], [ 3.298677000E+00, 1.408240400E-03,
-3.963222000E-06, 5.641515000E-09, -2.444854000E-12,
-1.020899900E+03, 3.950372000E+00] ),
NASA( [ 1000.00, 5000.00], [ 2.926640000E+00, 1.487976800E-03,
-5.684760000E-07, 1.009703800E-10, -6.753351000E-15,
-9.227977000E+02, 5.980528000E+00] )
),
transport = gas_transport(
geom = "linear",
diam = 3.62,
well_depth = 97.53,
polar = 1.76,
rot_relax = 4.00),
note = "121286"
)

#-------------------------------------------------------------------------------
# Reaction data
#-------------------------------------------------------------------------------

# Reaction 1
reaction(" CH4 + 0.5 O2 => CO + 2 H2 ", [2.0E15,0,35000.0],
order="CH4:0.9 O2:1.1")

# Reaction 2
reaction(" CO2 => CO + 0.5 O2", [8.11E10,0,77194.0])

# Reaction 3
reaction(" CO + 0.5 O2 => CO2", [2.0E9,0,12000.0])


All times are GMT -4. The time now is 15:25.