Skip to content
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

Preamble to InterfaceKinetics refactoring #1184

Merged
merged 25 commits into from
Feb 6, 2022

Conversation

ischoegl
Copy link
Member

@ischoegl ischoegl commented Jan 28, 2022

Changes proposed in this pull request

This PR seeks to address several issues that came up while working on #1181.

  • Fix compilation errors if NO_LEGACY_REACTIONS_26 is set
  • Streamline nomenclature for activationEnergy in the context of BlowersMasel ... use effectiveActivationEnergy for version that includes dependency on thermodynamic state (same will be introduced for ReactionRate classes that handle interface reactions).
  • Limit use of Arrhenius ... clarify as Arrhenius2 in legacy framework and make it equivalent with ArrheniusBase in new framework (ArrheniusBase should be renamed to Arrhenius after Cantera 2.6). Note: Defining a reduced Arrhenius(Base) class will also allow for additional templated classes - see e.g. Rethink handling of 3rd body colliders enhancements#133.
  • Remove leftover '3' from ChebyshevRate(3)
  • Calculate deltaH within BlowersMasel without requiring associated Kinetics object

If applicable, fill in the issue number this pull request is fixing

If applicable, provide an example illustrating new features this pull request is introducing

This PR will allow to disable legacy reactions (actually typedefs) from SCons as

$ scons build no_legacy_reactions=y

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@ischoegl ischoegl marked this pull request as draft January 28, 2022 15:49
@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #1184 (ce94ac1) into main (2d772ab) will increase coverage by 0.05%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1184      +/-   ##
==========================================
+ Coverage   65.39%   65.44%   +0.05%     
==========================================
  Files         318      318              
  Lines       46109    46106       -3     
  Branches    19601    19604       +3     
==========================================
+ Hits        30153    30175      +22     
+ Misses      13452    13435      -17     
+ Partials     2504     2496       -8     
Impacted Files Coverage Δ
include/cantera/kinetics/FalloffFactory.h 90.00% <ø> (ø)
include/cantera/kinetics/FalloffMgr.h 92.85% <ø> (ø)
include/cantera/kinetics/GasKinetics.h 100.00% <ø> (ø)
include/cantera/kinetics/MultiRateBase.h 100.00% <ø> (ø)
include/cantera/kinetics/RateCoeffMgr.h 100.00% <ø> (ø)
include/cantera/kinetics/Reaction.h 100.00% <ø> (ø)
include/cantera/kinetics/ReactionData.h 93.75% <0.00%> (+1.91%) ⬆️
src/kinetics/FalloffFactory.cpp 92.85% <ø> (ø)
src/kinetics/GasKinetics.cpp 88.99% <50.00%> (ø)
include/cantera/kinetics/Falloff.h 77.98% <61.53%> (ø)
... and 18 more

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 2d772ab...ce94ac1. Read the comment docs.

@ischoegl ischoegl force-pushed the interface-refactor-preamble branch 7 times, most recently from 847a3a5 to a1c4b5c Compare January 30, 2022 03:38
@ischoegl ischoegl force-pushed the interface-refactor-preamble branch 3 times, most recently from 906afe7 to f5008ce Compare January 30, 2022 16:37
@ischoegl ischoegl marked this pull request as ready for review January 30, 2022 16:37
@ischoegl ischoegl requested a review from speth January 30, 2022 16:38
@ischoegl
Copy link
Member Author

ischoegl commented Jan 30, 2022

@speth ... this should take care of a lot of accumulated lint, and clearly mark legacy objects wherever used. Efficient handling of the BlowersMasel API will be important for #1181, where some preparatory work is done here. The new CI runner ensures that the typedef Arrhenius2 Arrhenius can be safely disabled.

There should be only minimal overlap with #1183 (if any). I added one instance of setContext, which I believe is a workable solution to the removal of remaining Reaction specializations that involve third bodies.

@ischoegl
Copy link
Member Author

ischoegl commented Feb 4, 2022

@speth ... rebased now that #1183 is merged. Once this PR is resolved, I can get back to InterfaceKinetics (#1181).

Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out, since a lot of this is just reorganization and name changes. I think it will make reviewing #1181 a fair bit easier.

I like the addition of setContext -- it makes a lot of sense to have a function that can be called to set things like species indices that can be resolved at the point when a reaction is added to a Kinetics object, but not before.

include/cantera/kinetics/RxnRates.h Outdated Show resolved Hide resolved
include/cantera/kinetics/RxnRates.h Outdated Show resolved Hide resolved
include/cantera/kinetics/Falloff.h Outdated Show resolved Hide resolved
include/cantera/kinetics/FalloffMgr.h Show resolved Hide resolved
include/cantera/kinetics/Arrhenius.h Show resolved Hide resolved
interfaces/cython/cantera/reaction.pyx Show resolved Hide resolved
interfaces/cython/cantera/reaction.pyx Outdated Show resolved Hide resolved
interfaces/cython/cantera/reaction.pyx Outdated Show resolved Hide resolved
test/kinetics/kineticsFromScratch3.cpp Show resolved Hide resolved
include/cantera/kinetics/Arrhenius.h Show resolved Hide resolved
@ischoegl

This comment was marked as outdated.

@ischoegl ischoegl marked this pull request as draft February 5, 2022 23:50
@ischoegl ischoegl marked this pull request as ready for review February 5, 2022 23:56
@ischoegl
Copy link
Member Author

ischoegl commented Feb 5, 2022

@speth ... I addressed all comments. GH actions appears down for the time being; I'll try to re-trigger later on. Regarding the renaming of ArrheniusBase, I am tabling this as there is another tweak that I'd like to test first.

@ischoegl
Copy link
Member Author

ischoegl commented Feb 6, 2022

GH actions are back up, and everything ran through …

- Add todo item for deprecation of Arrhenius2 constructor
- Add missing override declarations in BlowersMaselRate
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates, @ischoegl. This looks good to me.

@speth speth merged commit f85d54f into Cantera:main Feb 6, 2022
@ischoegl ischoegl mentioned this pull request Feb 7, 2022
5 tasks
@ischoegl ischoegl deleted the interface-refactor-preamble branch February 7, 2022 02:22
@ischoegl ischoegl mentioned this pull request Feb 22, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optionally disable legacy reactions in Cantera 2.6
2 participants