-
-
Notifications
You must be signed in to change notification settings - Fork 398
Simplify Reactor evaluation/synchronization logic #2069
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
Draft
speth
wants to merge
14
commits into
Cantera:main
Choose a base branch
from
speth:reactor-eval-sync
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Anthony Walker <walkanth@oregonstate.edu>
9ade7a5 to
4e04870
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2069 +/- ##
==========================================
- Coverage 76.75% 76.69% -0.06%
==========================================
Files 457 457
Lines 53745 53590 -155
Branches 9122 9084 -38
==========================================
- Hits 41251 41100 -151
- Misses 9386 9401 +15
+ Partials 3108 3089 -19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
This PR implements changes to how reactor governing equations are implemented to make use of the new requirement that all reactors have unique/independent contents.
syncStateandrestoreStatemethods of reactor objects. These steps are no longer necessary.ReactorSurfaceobjects are now responsible for calculating their own governing equations (for the surface coverages or moles). As a result, thegetSurfaceInitialConditionsandevalSurfacesmethods are no longer necessary.ReactorSurfaceFactoryclass for handling distinct reactor surface types. There are two versions of thenewReactorSurfacemethod, one which takes an explicit model type parameter, and another which creates the "right" type ofReactorSurfacedepending on the types of the adjacentReactors (for exampleFlowReactorSurfacefor surfaces adjacent to aFlowReactor.ExtensibleReactorSurfaceclass to Python, which allows customization of the governing equations for surfaces.vector<Triplet>where components indices are global indices within the network rather than reactor-local. This allows reactors to add terms for dependence on state variables of other reactors. Mostly supersedes Extensible jacobian and network jacobian interfaces #1634.ExtensibleReactoror otherwise creates derived types from theReactorclasses will likely need to be updated. Merging this PR commits us to a major version bump.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
A simple example of an
ExtensibleReactorSurface(fromtest_reactor.py) now looks like this:Previously, this required implementing an
ExtensibleReactortype and using that to replace the rate calculations for the attached surface even though the bulk phase governing equations were not being modified.AI Statement (required)
all design, logic, and implementation decisions were made by the contributor.
Checklist
scons build&scons test) and unit tests address code coverage