[Cython/1D] Fixed DiffusionFlame to work with phases not containing carbon
This commit is contained in:
parent
64aef5fac7
commit
aac9435a0e
1 changed files with 5 additions and 3 deletions
|
|
@ -1063,9 +1063,11 @@ class CounterflowDiffusionFlame(FlameBase):
|
|||
|
||||
if stoich is None:
|
||||
if oxidizer == 'O2':
|
||||
nH = self.gas.nAtoms(fuel, 'H')
|
||||
nC = self.gas.nAtoms(fuel, 'C')
|
||||
stoich = 1.0 * nC + 0.25 * nH
|
||||
stoich = 0.0
|
||||
if 'H' in self.gas.elementNames:
|
||||
stoich += 0.25 * self.gas.nAtoms(fuel, 'H')
|
||||
if 'C' in self.gas.elementNames:
|
||||
stoich += self.gas.nAtoms(fuel, 'C')
|
||||
else:
|
||||
raise Exception('oxidizer/fuel stoichiometric ratio must be '
|
||||
'specified since the oxidizer is not O2')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue