-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Improve handling of max_time_step in ReactorNet #731
Improve handling of max_time_step in ReactorNet #731
Conversation
Codecov Report
@@ Coverage Diff @@
## master #731 +/- ##
==========================================
- Coverage 70.84% 70.84% -0.01%
==========================================
Files 374 374
Lines 43666 43668 +2
==========================================
+ Hits 30937 30938 +1
- Misses 12729 12730 +1
Continue to review full report at Codecov.
|
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.
Thanks @ischoegl. This looks good to me, I didn't even realize you couldn't query this value. One small change, I think.
@bryanwweber ... before making the requested change (which is minor). Do you have any comments on the default behavior (see #730). I believe that limiting the time step may resolve some of the undesirable behavior (very large time step with CVODE interpolation missing some potential changes). |
No, I think we should leave the default as-is. CVODES has a built-in way to determine the appropriate time step. I think it is on the user to determine for their use case if that needs to be limited somehow. I don't think we can pick a value that is both 1) large enough that we don't limit the CVODES unnecessarily and 2) small enough to actually effect any change. |
1953dd2
to
5b1f4b2
Compare
OK. |
* implement ReactorNet::maxTimeStep to allow for external queries * implement getter/setter for property ReactorNet.max_time_step * deprecate ReactorNet.set_max_time_step
5b1f4b2
to
cb67182
Compare
Enable checks for
max_time_step
from Python frontend, and clarify default setting in docstring.Please fill in the issue number this pull request is fixing:
Fixes #730
Changes proposed in this pull request:
ReactorNet::maxTimeStep
to allow for external queriesReactorNet.max_time_step
ReactorNet.set_max_time_step
Changing the default behavior would be simple by restricting
m_maxstep
here:cantera/src/zeroD/ReactorNet.cpp
Line 22 in c149c4e
but I am hesitant to do so.