Skip to content
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

Feature/circ pump branch model #635

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from

Conversation

SimonRubenDrauz
Copy link
Collaborator

forbidding mass to disappear/appear

sdrauz and others added 30 commits January 31, 2023 09:53
enable multiple creation of heat exchanger
- fixing slack equation position
- adding a new relevant idx branch to identify circ pumps
…branch_model

# Conflicts:
#	pandapipes/component_models/abstract_models/branch_models.py
#	pandapipes/idx_branch.py
#	src/pandapipes/component_models/abstract_models/circulation_pump.py
#	src/pandapipes/component_models/circulation_pump_pressure_component.py
#	src/pandapipes/component_models/junction_component.py
#	src/pandapipes/idx_node.py
#	src/pandapipes/pf/build_system_matrix.py
#	src/pandapipes/toolbox.py
…_branch_model

# Conflicts:
#	src/pandapipes/pipeflow.py
#	src/pandapipes/test/api/test_components/test_circ_pump_mass.py
- required test adaption to ensure test passing
- no mass creation in circ pumps
- required test adaption to ensure test passing
…branch_model

# Conflicts:
#	setup.py
#	src/pandapipes/component_models/component_toolbox.py
#	src/pandapipes/pipeflow.py
PL = 32
TL = 33 # Temperature lift [K]
BRANCH_TYPE = 34 # branch type relevant for the pressure controller
PUMP_TYPE = 35
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should follow a concept of branch types:

  • remove PUMP_TYPE and shift the CIRC value to BRANCH_TYPE
  • do not use CP from idx_node, but from idx_branch as BRANCH_TYPE for pressure controllers

@@ -23,5 +22,9 @@
NODE_TYPE_T = 10
EXT_GRID_OCCURENCE = 11
EXT_GRID_OCCURENCE_T = 12
CIRC_PUMP_OCCURENCE = 13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter is only used within the circulation pump model, so I would prefer to make it a component_array entry.

@@ -23,5 +22,9 @@
NODE_TYPE_T = 10
EXT_GRID_OCCURENCE = 11
EXT_GRID_OCCURENCE_T = 12
CIRC_PUMP_OCCURENCE = 13
INFEED = 14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't really get my head around the difference of these variables. To me it seems like there is just this concept of "at this node a pressure is set" and "at this node, mass can appear / disappear (slack)". Couldn't we just use this kind of definition to set different node types?
My idea: Use node types "P" and "SLACK". While the former can be used for pressure controllers and circulation pumps, the latter is more exclusively for ext_grids. This way, we can distinct the two concepts within build_system_matrix. The values can be set inside the component models with an order: Inside of circulation pump, set the node type to "P", except if it is already "SLACK".
This way, we can move circ_pump_occurence to the internal array, rename ext_grid_occurence to slack_occurence, and probably drop the "INFEED" parameter.
If we do need to consider the number of "P" type components at a specific node, we can also change to concept to just counting "P_COMP_OCCURENCE" and "SLACK_OCCURENCE" without setting any type, and then distinguish the type from this occurrence number.

…etoflow/pandapipes into feature/circ_pump_branch_model

# Conflicts:
#	src/pandapipes/component_models/component_toolbox.py
#	src/pandapipes/pf/derivative_calculation.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants