-
-
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
Fix reactor mass flow rate #886
Conversation
Since the mass flow rate can depend on both a function of time and the state of the connected reactors, the only time for which the mass flow rate can be reliably returned is the current time of the reactor network.
Eliminate unnecessary variables m_mdot_in and m_mdot_out, and remove the need to update the mass flow rates in both updateState and evalEqs by using the current (trial) time when updating them in updateState.
Codecov Report
@@ Coverage Diff @@
## master #886 +/- ##
==========================================
- Coverage 70.49% 70.42% -0.08%
==========================================
Files 375 375
Lines 45649 45652 +3
==========================================
- Hits 32182 32152 -30
- Misses 13467 13500 +33
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.
This looks good to me. One small point for discussion is whether this would be a good time to change the references to the master
flow devices, or whether that would be better in another PR. I'm fine either way.
@paulblum these changes will affect what you're working on.
I was going to save that for another PR. I'm trying to keep my PRs to a manageable size. 😂 |
The foreberance is appreciated 🤣 |
Changes to the blessed output file are a result of updates to atomic weights, and to fixes for how flow devices are updated (Cantera#886)
Changes to the blessed output file are a result of updates to atomic weights, and to fixes for how flow devices are updated (#886)
Changes proposed in this pull request
This PR comes from my attempts to get repeatable output from the
combustor.cpp
sample in #883. I separated these changes out to avoid bloating that PR.FlowDevice
objects is correct after a call toReactorNet::advance
, and not the value at some later time that the integrator reached.time
argument toFlowDevice::massFlowRate
(and equivalent methods in the various language interfaces), since getting the value at any time other than the current integrator time may not be correct.Checklist
scons build
&scons test
) and unit tests address code coverage