-
Notifications
You must be signed in to change notification settings - Fork 62
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
Flow control model #413
Flow control model #413
Conversation
status: hydraulic calculation implemented
… flow_control � Conflicts: � pandapipes/component_models/abstract_models/branch_w_internals_models.py � pandapipes/component_models/pressure_control_component.py � pandapipes/component_models/valve_component.py
# Conflicts: # pandapipes/create.py
…low_control � Conflicts: � pandapipes/toolbox.py
…low_control � Conflicts: � pandapipes/create.py
Codecov ReportBase: 87.90% // Head: 88.34% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #413 +/- ##
===========================================
+ Coverage 87.90% 88.34% +0.43%
===========================================
Files 80 81 +1
Lines 4753 4863 +110
===========================================
+ Hits 4178 4296 +118
+ Misses 575 567 -8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This might solve #361 |
I think this will be very helpful in heating networks. But does this actually work with gas grids? If the velocity is fixed, the mass flow still depends on the density (but the user will assume that it is enforced, since it is an input parameter). I'd propose that an Error or Warning should be raised if |
I think there is a misunderstanding here. We fix the velocity internally, that is true. But we have to keep in mind that this is the velocity at norm state, so in order to derive the mass flow from it, we will always multiply it with the norm density. The velocity itself will change indeed inside this component, depending on the pressure / compressibility. |
I added a test for the flow control model and also added it to the toolbox functions and nx-graph creation. What is still missing is plotting. I would like to draw a valve patch with a T above to show that the valve is regulated. |
* basically a valve with a T on top * not yet fully tested (filled/ not filled, to be discussed) * for robustness, the call of create_simple_collections in simple_plot was changed to kwargs instead of positional arguments
Thanks for the great addition! Something that just crossed my mind is that we might need a keyword like "control_active" as in the pressure regulator component. If it is set to false, the flow control acts like an open valve. For plotting I thought of something fancy:
|
… in plotting (control_active adds / removes fancy arrow, wrong color for heat exchangers used)
Thanks for the hint, I did that. |
Heat exchanger and valve have a |
I am not too sure about that because the flow controller models an ideal control valve. In case of active control (which should be the normal behavior), the loss coefficient would have no effect on the model. It could only come into play when the flow controller acts as an open valve. |
# Conflicts: # CHANGELOG.rst
…ntrol # Conflicts: # pandapipes/create.py
I've added a chapter in the documentation. Please check & update it if required, @dlohmeier |
Looks good, thanks! |
The flow controller is a branch component that controls the flow through itself. It means that the pressure drop is adapted to reflect the desired flow situation. This is especially helpful for heating grids, where otherwise the flow through heat exchangers needs to be controlled through the loss coefficient.
As the flow controller is a new component, it must be reflected in many parts of pandapipes: