Skip to content

Commit

Permalink
[1D/Test] Add flame test for unity Lewis number transport
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jun 7, 2018
1 parent 29a3c19 commit 3c3ef10
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions interfaces/cython/cantera/test/test_onedim.py
Expand Up @@ -292,6 +292,21 @@ def test_multicomponent(self):
self.assertNear(Su_multi, Su_soret, 2e-1)
self.assertNotEqual(Su_multi, Su_soret)

def test_unity_lewis(self):
self.create_sim(ct.one_atm, 300, 'H2:1.1, O2:1, AR:5.3')
self.sim.transport_model = 'UnityLewis'
self.sim.set_refine_criteria(ratio=3.0, slope=0.08, curve=0.12)
self.sim.solve(loglevel=0, auto=True)
dh_unity_lewis = self.sim.enthalpy_mass.ptp()

self.sim.transport_model = 'Mix'
self.sim.solve(loglevel=0)
dh_mix = self.sim.enthalpy_mass.ptp()

# deviation of enthalpy should be much lower for unity Le model (tends
# towards zero as grid is refined)
self.assertLess(dh_unity_lewis, 0.1 * dh_mix)

def test_soret_with_mix(self):
# Test that enabling Soret diffusion without
# multicomponent transport results in an error
Expand Down

0 comments on commit 3c3ef10

Please sign in to comment.