diff --git a/interfaces/python/ck2cti.py b/interfaces/python/ck2cti.py index 572900a1e..630a00cd5 100755 --- a/interfaces/python/ck2cti.py +++ b/interfaces/python/ck2cti.py @@ -1518,6 +1518,7 @@ class Parser(object): transportLines.append('!'.join((line, comment))) else: transportLines.append(line) + line, comment = readline() line, comment = readline() diff --git a/test/data/with-transport.inp b/test/data/with-transport.inp new file mode 100644 index 000000000..65ee7723c --- /dev/null +++ b/test/data/with-transport.inp @@ -0,0 +1,31 @@ +Elements +H C +END +SPECIES +foo bar baz +END +thermo + 300.000 1000.000 5000.000 +foo C 1H 4 G 200.000 3500.000 1000.000 1 + 7.48514950E-02 1.33909467E-02-5.73285809E-06 1.22292535E-09-1.01815230E-13 2 +-9.46834459E+03 1.84373180E+01 5.14987613E+00-1.36709788E-02 4.91800599E-05 3 +-4.84743026E-08 1.66693956E-11-1.02466476E+04-4.64130376E+00 4 +bar C 1H 4 G 200.000 3500.000 1000.000 1 + 7.48514950E-02 1.33909467E-02-5.73285809E-06 1.22292535E-09-1.01815230E-13 2 +-9.46834459E+03 1.84373180E+01 5.14987613E+00-1.36709788E-02 4.91800599E-05 3 +-4.84743026E-08 1.66693956E-11-1.02466476E+04-4.64130376E+00 4 +baz C 1H 4 G 200.000 3500.000 1000.000 1 + 7.48514950E-02 1.33909467E-02-5.73285809E-06 1.22292535E-09-1.01815230E-13 2 +-9.46834459E+03 1.84373180E+01 5.14987613E+00-1.36709788E-02 4.91800599E-05 3 +-4.84743026E-08 1.66693956E-11-1.02466476E+04-4.64130376E+00 4 +end + +reactions +foo + bar = 2 baz 1.2345e12 1.0 200.0 +2foo + baz = 3bar 5.4321e10 1.0 500.0 +end +transport +foo 2 357.000 5.180 0.000 0.000 1.000 +bar 2 266.800 4.982 0.000 0.000 1.000 +baz 2 266.800 4.982 0.000 0.000 1.000 +end diff --git a/test/python/testConvert.py b/test/python/testConvert.py index cb700b6dc..352acf9d5 100644 --- a/test/python/testConvert.py +++ b/test/python/testConvert.py @@ -200,6 +200,16 @@ class chemkinConverterTest(utilities.CanteraTest): gas.set(X='H2:1.0, O2:1.0', T=300, P=101325) self.assertAlmostEqual(gas.thermalConductivity(), 0.07663, 4) + def test_transport_embedded(self): + convertMech('../data/with-transport.inp', + outName='with-transport.cti', quiet=True) + + gas = ct.IdealGasMix('with-transport.cti') + gas.set(X=[0.2, 0.3, 0.5]) + D = gas.mixDiffCoeffs() + for d in D: + self.assertTrue(d > 0.0) + def test_transport_missing_species(self): def convert(): convertMech('../../data/inputs/h2o2.inp',