From 5082a212c446743e57996d403c1061037864d540 Mon Sep 17 00:00:00 2001 From: bangshiuh Date: Sat, 4 Aug 2018 17:12:54 -0400 Subject: [PATCH] [1D/Examples] Add example burner_ion_flame --- .../examples/onedim/burner_ion_flame.py | 29 +++++++++++++++++++ .../examples/onedim/ion_burner_flame.py | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 interfaces/cython/cantera/examples/onedim/burner_ion_flame.py diff --git a/interfaces/cython/cantera/examples/onedim/burner_ion_flame.py b/interfaces/cython/cantera/examples/onedim/burner_ion_flame.py new file mode 100644 index 000000000..c0204a7d1 --- /dev/null +++ b/interfaces/cython/cantera/examples/onedim/burner_ion_flame.py @@ -0,0 +1,29 @@ +""" +A burner-stabilized lean premixed hydrogen-oxygen flame at low pressure. +""" + +import cantera as ct +import numpy as np + +p = ct.one_atm +tburner = 600.0 +reactants = 'CH4:1.0, O2:2.0, N2:7.52' # premixed gas composition +width = 0.5 # m +loglevel = 1 # amount of diagnostic output (0 to 5) + +gas = ct.Solution('gri30_ion.cti') +gas.TPX = tburner, p, reactants +mdot = 0.15 * gas.density + +f = ct.BurnerIonFlame(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 = 'Ion' +f.solve(loglevel, auto=True) +f.solve(loglevel=loglevel, stage=2, enable_energy=True) +f.save('CH4_burner_flame.xml', 'mix', 'solution with mixture-averaged transport') + +f.write_csv('CH4_burner_flame.csv', quiet=False) + diff --git a/interfaces/cython/cantera/examples/onedim/ion_burner_flame.py b/interfaces/cython/cantera/examples/onedim/ion_burner_flame.py index f6982a18f..279c6f575 100644 --- a/interfaces/cython/cantera/examples/onedim/ion_burner_flame.py +++ b/interfaces/cython/cantera/examples/onedim/ion_burner_flame.py @@ -1,5 +1,5 @@ """ -A burner-stabilized lean premixed hydrogen-oxygen flame at low pressure. +A burner-stabilized premixed methane-air flame with charged species. """ import cantera as ct