A failing unit test for chemkin files with weird names in PDep rates.

Reactions of the type
 A (+B) <=> C (+B)
ought to work, as long as they are provided a pressure-dependent rate
expression. This commit adds three examples to the test file. The first
works OK, the second two cause problems.

(For what it's worth, this currently crashes the official chemkin.
 Or at least the parentheses do; I've not tested the plus.
 Ansys have created a defect record and say they will fix the issue.)
This commit is contained in:
Richard West 2017-06-29 18:30:27 -04:00 committed by Ray Speth
parent b41038f84b
commit 55a8910686
2 changed files with 7 additions and 1 deletions

View file

@ -151,7 +151,7 @@ class chemkinConverterTest(utilities.CanteraTest):
self.assertEqual(gas.species_name(5), 'eq=uals')
self.assertEqual(gas.species_name(6), 'plus')
self.assertEqual(gas.n_reactions, 7)
self.assertEqual(gas.n_reactions, 10)
nu = gas.product_stoich_coeffs() - gas.reactant_stoich_coeffs()
self.assertEqual(list(nu[:,0]), [-1, -1, 0, 2, 0, 0, 0])
self.assertEqual(list(nu[:,1]), [-2, 3, 0, -1, 0, 0, 0])

View file

@ -45,5 +45,11 @@ plus+ + (Parens) = 2plus+ 9.999e9 9.9 999.9
plus + plus+ = 2 (Parens) 9.999e9 9.9 999.9
plus+ eq=uals = plus++(Parens) 9.999e9 9.9 999.9
co:lons: + eq=uals = 2 (Parens) 9.999e9 9.9 999.9
plus+ (+plus) = eq=uals (+plus) 9.999e9 9.9 999.9
LOW / 8.888e8 8.8 888.8 /
plus+ (+(Parens)) = eq=uals (+(Parens)) 9.999e9 9.9 999.9
LOW / 8.888e8 8.8 888.8 /
plus+ (+plus+) = eq=uals (+plus+) 9.999e9 9.9 999.9
LOW / 8.888e8 8.8 888.8 /
end