[1D] Fix IonFlow docstrings and simplify testIonFlame
This commit is contained in:
parent
6b6d758f23
commit
1057d20731
4 changed files with 6 additions and 15 deletions
1
AUTHORS
1
AUTHORS
|
|
@ -6,6 +6,7 @@ tracker.
|
|||
|
||||
Philip Berndt
|
||||
Victor Brunini, Sandia National Laboratory
|
||||
Bang-Shiuh Chen, Purdue University
|
||||
Steven Decaluwe, Colorado School of Mines
|
||||
Thomas Fiala, Technische Universität München
|
||||
David Fronczek
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
A freely-propagating, premixed hydrogen flat flame with multicomponent
|
||||
transport properties.
|
||||
A freely-propagating, premixed methane-air flat flame with charged species.
|
||||
"""
|
||||
|
||||
import cantera as ct
|
||||
|
|
@ -39,4 +38,3 @@ print('mixture-averaged flamespeed = {0:7f} m/s'.format(f.u[0]))
|
|||
|
||||
# write the velocity, temperature, density, and mole fractions to a CSV file
|
||||
f.write_csv('CH4_adiabatic.csv', quiet=False)
|
||||
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ class IonFlame(FreeFlame):
|
|||
|
||||
@property
|
||||
def poisson_enabled(self):
|
||||
""" Get/Set whether or not to solve the energy equation."""
|
||||
""" Get/Set whether or not to solve the Poisson's equation."""
|
||||
return self.flame.poisson_enabled
|
||||
|
||||
@poisson_enabled.setter
|
||||
|
|
@ -552,7 +552,7 @@ class IonFlame(FreeFlame):
|
|||
|
||||
@property
|
||||
def velocity_enabled(self):
|
||||
""" Get/Set whether or not to solve the energy equation."""
|
||||
""" Get/Set whether or not to solve the velocity."""
|
||||
return self.flame.velocity_enabled
|
||||
|
||||
@velocity_enabled.setter
|
||||
|
|
|
|||
|
|
@ -870,23 +870,15 @@ class TestIonFlame(utilities.CanteraTest):
|
|||
|
||||
# stage one
|
||||
self.sim.solve(loglevel=0, auto=True)
|
||||
T1 = self.sim.T[-1]
|
||||
|
||||
# stage two
|
||||
self.sim.solve(loglevel=0, stage=2, enable_energy=False)
|
||||
|
||||
# stage two
|
||||
self.sim.solve(loglevel=0, stage=2, enable_energy=True)
|
||||
Electron2 = self.sim.value(self.sim.flame, 'E', self.sim.flame.n_points-1)
|
||||
|
||||
#stage three
|
||||
self.sim.solve(loglevel=0, stage=3, enable_energy=True)
|
||||
Electron3 = self.sim.value(self.sim.flame, 'E', self.sim.flame.n_points-1)
|
||||
T3 = self.sim.T[-1]
|
||||
|
||||
# check Temperature at outlet
|
||||
self.assertNear(T1, T3, 1e-3)
|
||||
self.assertNotEqual(T1, T3)
|
||||
# check Electron concentration at outlet
|
||||
self.assertNear(Electron2, Electron3, 1e-13)
|
||||
self.assertNotEqual(Electron2, Electron3)
|
||||
# Regression test
|
||||
self.assertNear(min(self.sim.E) / max(self.sim.E), -5.0765, 1e-3)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue