Warning
This documentation is for an old version of Cantera. You can find docs for newer versions here.
burner_flame.py¶
"""
A burner-stabilized lean premixed hydrogen-oxygen flame at low pressure.
"""
import cantera as ct
import numpy as np
p = 0.05 * ct.one_atm
tburner = 373.0
mdot = 0.06
reactants = 'H2:1.5, O2:1, AR:7' # premixed gas composition
width = 0.5 # m
loglevel = 1 # amount of diagnostic output (0 to 5)
gas = ct.Solution('h2o2.xml')
gas.TPX = tburner, p, reactants
f = ct.BurnerFlame(gas, width=width)
f.burner.mdot = mdot
f.set_refine_criteria(ratio=3.0, slope=0.05, curve=0.1)
f.show_solution()
f.transport_model = 'Mix'
f.solve(loglevel, auto=True)
f.save('h2_burner_flame.xml', 'mix', 'solution with mixture-averaged transport')
f.transport_model = 'Multi'
f.solve(loglevel) # don't use 'auto' on subsequent solves
f.show_solution()
f.save('h2_burner_flame.xml', 'multi', 'solution with multicomponent transport')
f.write_csv('h2_burner_flame.csv', quiet=False)