Skip to content

ZeroDivisionError in Arrhenius.changeT0 called from Reaction.generateReverseRateCoefficient #34

@rwest

Description

@rwest

When I add pressure dependence to my (otherwise functioning) methylformate test case, it dies with the following:

========================================================================
Network Information
-------------------
Isomers:
    methylformate(1)                                     -368.115 kJ/mol
Reactant channels:
Product channels:
    CO(3) + CH4O(4)                                      -330.855 kJ/mol
    CHO2(5) + CH3(6)                                     -34.8517 kJ/mol
    C2H3O2(7) + H(8)                                       46.279 kJ/mol
    CHO(9) + CH3O(10)                                     41.2276 kJ/mol
    H(8) + C2H3O2(11)                                     42.8663 kJ/mol
    CO2(12) + CH4(13)                                    -487.574 kJ/mol
    C2H4O2(14)                                            27.7775 kJ/mol
Path reactions:
    CO(3) + CH4O(4) <=> methylformate(1)                 -107.597 kJ/mol
    CHO2(5) + CH3(6) <=> methylformate(1)                -34.4148 kJ/mol
    C2H3O2(7) + H(8) <=> methylformate(1)                 45.9413 kJ/mol
    CHO(9) + CH3O(10) <=> methylformate(1)                 39.762 kJ/mol
    H(8) + C2H3O2(11) <=> methylformate(1)                42.5453 kJ/mol
    CO2(12) + CH4(13) <=> methylformate(1)                -156.38 kJ/mol
    C2H4O2(14) <=> methylformate(1)                       95.9767 kJ/mol
========================================================================

Using 200 grains from -368.12 to 283.99 kJ/mol in steps of 3.28 kJ/mol
Calculating densities of states for Network #1...
Calculating phenomenological rate coefficients for Network #1...
Traceback (most recent call last):
  File "rmg.py", line 673, in <module>
    execute(args)
  File "rmg.py", line 275, in execute
    reactionModel.enlarge(spec, database)
  File "/Users/rwest/XCodeProjects/RMGpy/RMG-Py/rmgpy/rmg/model.py", line 929, in enlarge
    self.updateUnimolecularReactionNetworks(database)
  File "/Users/rwest/XCodeProjects/RMGpy/RMG-Py/rmgpy/rmg/model.py", line 1390, in updateUnimolecularReactionNetworks
    network.update(self, database)
  File "/Users/rwest/XCodeProjects/RMGpy/RMG-Py/rmgpy/rmg/model.py", line 497, in update
    K, p0 = self.calculateRateCoefficients(Tlist, Plist, Elist, method)
  File "/Users/rwest/XCodeProjects/RMGpy/RMG-Py/rmgpy/measure/network.py", line 465, in calculateRateCoefficients
    Kij, Gnj, Fim = self.calculateMicrocanonicalRates(Elist, densStates0, T)
  File "/Users/rwest/XCodeProjects/RMGpy/RMG-Py/rmgpy/measure/network.py", line 361, in calculateMicrocanonicalRates
    dummy, Gnj[reac,prod,:] = calculateMicrocanonicalRateCoefficient(rxn, Elist, None, densStates[prod,:], T)
  File "reaction.pyx", line 143, in rmgpy.measure.reaction.calculateMicrocanonicalRateCoefficient (build/pyrex/rmgpy/measure/reaction.c:2148)
  File "reaction.py", line 322, in rmgpy.reaction.Reaction.generateReverseRateCoefficient (build/pyrex/rmgpy/reaction.c:6740)
  File "reaction.py", line 349, in rmgpy.reaction.Reaction.generateReverseRateCoefficient (build/pyrex/rmgpy/reaction.c:6684)
  File "kinetics.py", line 320, in rmgpy.kinetics.Arrhenius.changeT0 (build/pyrex/rmgpy/kinetics.c:5276)
ZeroDivisionError: float division

The latter part of this stack trace is recreated by one of the unit tests:

======================================================================
ERROR: testGenerateReverseRateCoefficient (reactionTest.TestReaction)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rwest/XCodeProjects/RMGpy/RMG-Py/unittest/reactionTest.py", line 236, in testGenerateReverseRateCoefficient
    reverseKinetics = self.reaction2.generateReverseRateCoefficient(Tlist)
  File "reaction.py", line 322, in rmgpy.reaction.Reaction.generateReverseRateCoefficient (build/pyrex/rmgpy/reaction.c:6740)
  File "reaction.py", line 349, in rmgpy.reaction.Reaction.generateReverseRateCoefficient (build/pyrex/rmgpy/reaction.c:6684)
  File "kinetics.py", line 320, in rmgpy.kinetics.Arrhenius.changeT0 (build/pyrex/rmgpy/kinetics.c:5276)
ZeroDivisionError: float division

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions