-
Notifications
You must be signed in to change notification settings - Fork 230
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
Add regression test for RMS reactor #2446
Add regression test for RMS reactor #2446
Conversation
0d607fd
to
51e7e59
Compare
This PR resolves #2442 |
One strange thing I found when making these regression tests: regardless of what reactors are used to generate the mechanism, we are using Cantera's IdealGasReactor to simulate the generated mechanism in the regression step. This includes the liquid oxidation regression test: https://github.com/ReactionMechanismGenerator/RMG-Py/blob/main/test/regression/liquid_oxidation/regression_input.py#L17. This makes sense if we just want to compare the generated mechanism and use IdealGasReactor as a standardized simulator. Although it makes the regression test for catalytic cases a bit awkward. |
51e7e59
to
fad3123
Compare
I added regression tests for three RMS reactors: constant V ideal gas reactor, CSTR through constant T V liquid reactor with inlet and outlet, and liquid surface reactor.
|
This does sound curious. Hard to change? |
Currently, we hard coded to use Cantera class for simulation here. Switching to use the reactor that we generate the mechanism shouldn't be too hard. We just need to add a class to simulate RMG-based reactor and a class to simulate for RMS-based reactor and the downstream process to return the organized data same as the Cantera class's simulate function
|
The regression test passed for the constant V ideal gas reactor and the CSTR ones, but it failed for the liquid-surface reactor. It failed because we currently don't have a We could add one for the multi-domain case in the future. Although I take a quick look at the version for I don't think this is something needs to be resolved with this PR. I'm going to remove the regression test for the explicit two-phase liquid-surface reactor. |
cbc73de
to
ada87d8
Compare
I rebased and removed the regression test for RMS's liquidSurfaceReactor explicitly |
You can turn off the filter and that should let that RMG job run properly. The barrier to turning the filter on for SystemSimulations is that filter rate constants are only defined between liquid species and between gas phase species. I don't believe we have defined filter rate coefficients on surfaces or on inter-phase reactions. We should be able to turn it on for SystemSimulations that involve the same phase...which the code right now would prevent. |
ada87d8
to
fe52f1e
Compare
@mjohnson541 Good point. I turned off the filtering for the regression test case for the liquid surface reactor in the new push. |
The CI failed at the point expected by @JacksonBurns and I. I think this PR is now ready to be reviewed. I will rebase the branch with main and turn this from a WIP to ready to review. |
fe52f1e
to
d748684
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI fail is to be expected here as @hwpang stated. Commenting on this but not approving since I can't critique the new examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me...although some commits should be squashed.
d748684
to
283c838
Compare
I squashed relevant commits and rebased! I will force merge once the tests proceed to the expected failure point. |
saveEdgeSpecies should be in options block
…talyte example using pentane as solvent placeholder Decrease tolerance for ch4o2cat to include more species and reactions Update model settings borrowed from liquid oxidation Remove filtering for liquid surface reactor as we currently don't have a filtering threshold for surface reactions
283c838
to
420b3a2
Compare
I rebased this PR with |
The CI test failed at the expected point as there's no "stable" version of the regression tests I just added. I think this PR is ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge thanks @hwpang ! LGTM
Unfortunately there seems to be some sort of problem when the CI is trying to compare the results of Regression test RMS_liquidSurface_ch4o2cat: see
|
Motivation or Problem
Currently we don't have any regression test for RMS based reactors. See #2442.
Description of Changes
I add
input.py
andregression_input.py
to test RMS's Constant V Ideal Gas Reactor and RMS's CSTR. Once this regression runs normally on CI, I will add more for other RMS reactors.