RMG-Py
RMG-Py copied to clipboard
correct barrier for library reactions
Motivation or Problem
We do not correct the barriers for library reactions. For some library reactions, the Ea < H0 of reaction with RMG thermo which means the forward rate is too fast and the reverse rate is way way too fast. This is particularly a problem for the X + CHX -> HX + CX
in the Deutchmann kinetics library.
Description of Changes
added an input file option correct_library_kinetics
(default False) which when turned on, corrects the barriers for library reactions based on the thermo.

Testing
Tested this with @mazeau CPOX model, and the barrier for the Deutchmann reaction was corrected.
Codecov Report
Merging #2167 (15427a0) into master (5fd6881) will increase coverage by
0.02%
. The diff coverage is33.33%
.
@@ Coverage Diff @@
## master #2167 +/- ##
==========================================
+ Coverage 47.93% 47.95% +0.02%
==========================================
Files 102 102
Lines 27063 27069 +6
Branches 6935 6937 +2
==========================================
+ Hits 12973 12982 +9
+ Misses 12712 12708 -4
- Partials 1378 1379 +1
Impacted Files | Coverage Δ | |
---|---|---|
rmgpy/rmg/model.py | 41.03% <20.00%> (-0.10%) |
:arrow_down: |
rmgpy/rmg/input.py | 41.35% <100.00%> (+0.09%) |
:arrow_up: |
rmgpy/molecule/draw.py | 53.52% <0.00%> (+0.25%) |
:arrow_up: |
arkane/encorr/data.py | 94.25% <0.00%> (+0.95%) |
:arrow_up: |
rmgpy/thermo/thermoengine.py | 84.05% <0.00%> (+2.89%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5fd6881...15427a0. Read the comment docs.
I still think we should check for which reaction rates this is true and just remove them from our libraries, or stop using those libraries, or fix them. Rather than just quietly altering the barrier (but not the A factor) and hence replacing one dodgy rate estimate with another even dodgier rate estimate (albeit one that is less fast and less prone to cause ODE solver crashes).
But this looks like it should work as intended, and seems harmless, and will solve some of our problems. But if we're going to keep it then it probably needs documentation (maybe @mazeau could add).
I suppose one approach would be to build a model with this on but then check the log files and annotated chemkin files to identify all the reactions it applied to, and go look at them carefully and fix the libraries. Maybe that advice could be part of the documentation of this feature.
Does the importer check if Ea >= H0? We might want to check it then. Although I think this is less of an issue for gas phase kinetics, and more of a problem for catalysis, especially if you are using a kinetics library on a different metal/facet with different thermo or a kinetics library from a model that is not thermodynamically consistent (doesn't use thermo to calculate reverse rates). @mazeau compared Deutchmanns thermo to ours and it was very different. We could remove these reactions from libraries, however if our families can't make them, we may have model truncation error. I'd rather have them in there and correct the barriers so that the rates are more sensible so they don't crash the solver.
Does anyone like the idea of keeping the unmolested deutschmann reactions in one direction in one library and then the "fixed" Ea in a separate "adjusted" deutschmann library? That way kids can choose whether they want the OG/as published rates vs the rmg fixed rates?
This pull request is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant pull request, otherwise it will automatically be closed in 30 days.