Add test to catch superflous entries in a tranport file

This commit is contained in:
Santosh Shanbhogue 2016-12-06 20:04:08 -05:00 committed by Ray Speth
parent 06578612eb
commit 3f382e2590
2 changed files with 16 additions and 0 deletions

View file

@ -321,6 +321,13 @@ class chemkinConverterTest(utilities.CanteraTest):
outName=pjoin(self.test_work_dir, 'h2o2_transport_missing_species.cti'),
quiet=True)
def test_transport_extra_column_entries(self):
with self.assertRaises(ck2cti.InputParseError):
convertMech(pjoin(self.test_data_dir, 'h2o2.inp'),
transportFile=pjoin(self.test_data_dir, 'h2o2-extra-column-entries-tran.dat'),
outName=pjoin(self.test_work_dir, 'h2o2_extra-column-entries-tran.cti'),
quiet=True)
def test_transport_duplicate_species(self):
with self.assertRaises(ck2cti.InputParseError):
convertMech(pjoin(self.test_data_dir, 'h2o2.inp'),

View file

@ -0,0 +1,9 @@
AR 0 136.500 3.330 0.000 0.000 0.000
H 0 145.000 2.050 0.000 0.000 0.000
H2 1 38.000 2.920 0.000 0.790 280.000
H2O 2 572.400 2.605 1.8 0. 0.000 4.000 ! bad entry
H2O2 2 107.400 3.458 0.000 0.000 3.800
HO2 2 107.400 3.458 0.000 0.000 1.000 ! *
O 0 80.000 2.750 0.000 0.000 0.000
O2 1 107.400 3.458 0.000 1.600 3.800
OH 1 80.000 2.750 0.000 0.000 0.000