-
-
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
[Reactor] clarify FlowDevice interface #667
Conversation
b9d66e4
to
0bf3bf0
Compare
Codecov Report
@@ Coverage Diff @@
## master #667 +/- ##
==========================================
- Coverage 70.66% 70.62% -0.04%
==========================================
Files 372 372
Lines 43507 43564 +57
==========================================
+ Hits 30744 30768 +24
- Misses 12763 12796 +33
Continue to review full report at Codecov.
|
5724346
to
bfab8a0
Compare
bfab8a0
to
7a5bef8
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.
I think having valve flow rate be a function of both time and the pressure difference will be a nice addition. The implementation looks good to me. I just had a few comments, mainly about the terminology used for the new functions.
276a974
to
ed4c564
Compare
aba17ff
to
e6aa1a1
Compare
@speth ... thanks for the review! Your comment and suggestion regarding the naming convention led me to clarify further, and I believe the interface is even clearer now: using a coefficient plus You are correct that those changes were necessary to properly address #665. On a separate note: on my last merged PR (#660) for some reason my author tag was overwritten (no idea how a rebase/fixup may cause this: a squash is the likely culprit). The effect is that the commits aren't associated with @ischoegl: the associated sha's are d263566 and 77295b2. I can't fix this myself at this point, but I'm also not sure whether it matters and/or that it needs to be changed. |
@ischoegl The issue with commit ownership applies to this PR as well -- the "commiter" will get reset to me (or whoever merges this PR), but the "author" field will be preserved. The problem is that your "author" information is using your GMail address, while the "committer" field is using your LSU address (which I guess is your primary address on GitHub). After updating your Git configuration, you can reset this for this commit by doing |
e6aa1a1
to
7c8dc8e
Compare
Thanks for the clarification: I will fix that momentarily (both here and for #676). It's highly confusing as my commits still show up with my tag. |
7c8dc8e
to
ce8a13f
Compare
* differentiated Valve::setValveCoeff from PressureController::setPressureCoeff and introduced MassFlowController::setMassFlowCoeff for consistency. * introduced FlowDevice::setTimeFunction and FlowDevice::setPressureFunction to differentiate time-dependent and pressure-dependent functions. * introduced arbitrary pressure dependence for PressureController * deprecated FlowDevice::setFunction which is replaced by time and pressure specific functions. * introduced properties Valve.valve_coeff / PressureController.pressure_coeff / MassFlowController.mass_flow_coeff in Cython interface and deprecated Valve.set_pressure_coeff / PressureController.set_pressure_coeff * deprecated corresponding function calls in clib interface * deprecate FlowDevice.setParameters (which was only used by MATLAB interface)
ce8a13f
to
1748996
Compare
Alright. I changed my primary address to my work and made sure that the commit shows the same. (Until now, I had my primary address set to gmail, which I used to set my account up years ago.) Let's see what happens ... . |
The one remaining to-do for this change is to update the "science" documentation for the reactor model on cantera.org (https://cantera.org/science/reactors.html#reactor-networks-and-devices). |
@speth ... I can tackle this, but need to know how the docs are generated? Is there a primer you can direct me to? |
The restructuredText documents are stored in the Cantera/cantera-website repo. That file will be in the pages/science/reactors.rst I think (sorry no links, I'm on my phone). |
@bryanwweber ... when is an appropriate time to change the cantera website for features only implemented in the development branch? |
That's a great question. I think the best thing to do is mark the updates as "development version only", to the extent that you can do that without deleting existing content. Anything that will be removed should be marked as deprecated or changed somehow. Let's try that out and see how it goes. |
@bryanwweber ... would it make sense to create a branch that holds information until 2.5 goes live? (there are obviously multiple ways of handling this) |
I think (maybe?) it would make sense for the information to be deployed now, but clearly marked as for the development version only. But let's move this conversation over to the website repo. |
Descriptions of mass flow devices (`Valve`, `MassFlowController` and `PressureController`) are updated due to changes in Cantera/cantera#667.
Descriptions of mass flow devices (`Valve`, `MassFlowController` and `PressureController`) are updated due to changes in Cantera/cantera#667.
Descriptions of mass flow devices (`Valve`, `MassFlowController` and `PressureController`) are updated due to changes in Cantera/cantera#667.
Descriptions of mass flow devices (`Valve`, `MassFlowController` and `PressureController`) are updated due to changes in Cantera/cantera#667.
This PR seeks to clarify the FlowDevice interface; specifically, the implementation of
Valve.set_pressure_coeff
was non-intuitive (misleading function name and partially incorrect doc string)Please fill in the issue number this pull request is fixing:
Fixes #666
(also: addresses comment in #587, and prepares fix needed for #665)
Changes proposed in this pull request:
Valve::setValveCoeff
fromPressureController::setPressureCoeff
Valve::setValveLift
for time-dependent valve opening/closingValve.set_valve_function
to eliminateValve.valve_coeff(Func1)
being erroneously applied toValve::setFunction
Valve.valve_coeff
/PressureController.pressure_coeff
in Cython interface and deprecateValve.set_pressure_coeff
/PressureController.set_pressure_coeff
(which is consistent with coefficient handling used by otherzeroD
objects)FlowDevice.setParameters
(which was only used by MATLAB interface)