-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
17
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.
+1,573
−1,575
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
9ade7a5 to
4e04870
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2069 +/- ##
==========================================
- Coverage 77.22% 77.16% -0.06%
==========================================
Files 456 456
Lines 53026 52879 -147
Branches 8998 8954 -44
==========================================
- Hits 40947 40804 -143
- Misses 9035 9055 +20
+ Partials 3044 3020 -24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4e04870 to
e721a2c
Compare
Co-authored-by: Anthony Walker <walkanth@oregonstate.edu>
e1ccb99 to
204d46f
Compare
204d46f to
b12fc94
Compare
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