From 3c3ef10f9321f418db3caf9394ee551635588da3 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 6 Jun 2018 23:32:06 -0400 Subject: [PATCH] [1D/Test] Add flame test for unity Lewis number transport --- interfaces/cython/cantera/test/test_onedim.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/interfaces/cython/cantera/test/test_onedim.py b/interfaces/cython/cantera/test/test_onedim.py index b21e0cee22..d147f2f6dc 100644 --- a/interfaces/cython/cantera/test/test_onedim.py +++ b/interfaces/cython/cantera/test/test_onedim.py @@ -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