-
-
Notifications
You must be signed in to change notification settings - Fork 394
Modify third body efficiencies using modify_reaction #1143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1143 +/- ##
=======================================
Coverage 73.50% 73.51%
=======================================
Files 365 365
Lines 48247 48284 +37
=======================================
+ Hits 35466 35497 +31
- Misses 12781 12787 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @lavdwall ... thanks for the pull request! While I believe the objective of modifying the collision efficiencies is well conceived, there has been some ongoing work on the code base, which unfortunately affects your work. Cantera 2.6 will introduce significant changes in the way reactions and associated rates are handled (see Cantera/enhancements#87, a substantial portion was recently merged with #1101). Specifically, your PR targets The way things are handled going forward involves a shared pointer |
|
Hm, I see.. Thanks for the clarification! I tested it two weeks ago on a mechanism loaded from YAML and back then everything still worked correctly, but that was before #1101 :) |
|
Yes, the changes hit
Good question: the setters all appear to be there, but that is somewhat misleading: similar to the handling of reaction rates, things won't get updated for |
|
Fwiw, Cantera/enhancements#133 may implicitly address this issue. |
Changes proposed in this pull request
Until now, when modifying a reaction using the
modifyReactionfunction in C++ (ormodify_reactionfrom Python), only the rates are modified, not the third-body efficiencies. Although the composition map that stores the efficiencies can be modified from Python (using get/set functionefficiencies), these modifications are not taken into account when consequently calculating the reaction rates.In this pull request, the functionality of
modifyReactionis extended to also include modifications to third-body efficiencies. This is possible with only a few additions toGasKinetics.cppandThirdBodyCalc.hFor testing, I modified the
add_falloff_reactiontest inkineticsFromScratch.cpp: I added a reaction with wrong third-body-efficiencies first, verified that this gives wrong results, then usedmodifyReactionto correct the third-body efficiencies and verify the result is as expected.Checklist
scons build&scons test) and unit tests address code coverage