Skip to content

Commit

Permalink
[Transport] Add test for unity Lewis number transport model
Browse files Browse the repository at this point in the history
  • Loading branch information
awehrfritz authored and speth committed Jun 7, 2018
1 parent d38d9da commit 29a3c19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions interfaces/cython/cantera/test/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ def test_scalar_properties(self):
self.assertTrue(self.phase.viscosity > 0.0)
self.assertTrue(self.phase.thermal_conductivity > 0.0)

def test_unityLewis(self):
self.phase.transport_model = 'UnityLewis'
alpha = self.phase.thermal_conductivity/(self.phase.density*self.phase.cp)
Dkm = self.phase.mix_diff_coeffs

eps = np.spacing(1) # Machine precision
self.assertTrue(all(np.diff(Dkm) < 2*eps))
self.assertNear(Dkm[0], alpha)

def test_mixtureAveraged(self):
self.assertEqual(self.phase.transport_model, 'Mix')
Dkm1 = self.phase.mix_diff_coeffs
Expand Down

0 comments on commit 29a3c19

Please sign in to comment.