Skip to content

Commit

Permalink
A failing unit test for chemkin files with weird names in PDep rates.
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
rwest authored and speth committed Jul 12, 2017
1 parent b41038f commit 55a8910
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/test/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_pathologicalSpeciesNames(self):
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])
Expand Down
6 changes: 6 additions & 0 deletions test/data/species-names.inp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 55a8910

Please sign in to comment.