-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1D/Python] Create BurnerIonFlame and add test
Create a base class (IonFlameBase) for both IonFreeFlame and BurnerIonFlame, and use the set_axisymmetric_flow() and set_free_flow() methods to select the flow type. Also combines FreeFlow and AxisymmetricStagnationFlow classes into class IdealGasFlow.
- Loading branch information
Showing
7 changed files
with
196 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
interfaces/cython/cantera/examples/onedim/ion_burner_flame.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.IonBurnerFlame(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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.