Skip to content

Commit

Permalink
Merge pull request #638 from EPrade/fix/plot_pressure_drop
Browse files Browse the repository at this point in the history
Fix/plot pressure drop
  • Loading branch information
mfranz13 authored Jul 4, 2024
2 parents 314d0bf + 12cf554 commit 5b7e42c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Change Log
-[ADDED] heat_consumer plotting
-[CHANGED] switched from setup.py to pyproject.toml
- [CHANGED] variable "alpha_w_per_m2k" to "u_w_per_m2k"
- [FIXED] Pressure plot not working for circ pump
- [ADDED] variable "u_w_per_m2k" to std_type pipe
- [ADDED] standard district heating pipe types

Expand Down
6 changes: 3 additions & 3 deletions src/pandapipes/plotting/pipeflow_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def plot_pressure_profile(net, ax=None, x0_junctions=None, plot_pressure_control
axis to plot to, by default None
x0_junctions : Any[list[int], pd.Index[int]], optional
list of junction indices which should be at position x0. If None, all in service slack junctions are considered,
by default None
by default None. For circ pumps, if no x0_junctions are given the flow junctions are chosen automatically.
plot_pressure_controller : bool, optional
Whether vertical lines should be plotted to display the pressure drop of the pressure controller,
by default True
Expand Down Expand Up @@ -92,9 +92,9 @@ def plot_pressure_profile(net, ax=None, x0_junctions=None, plot_pressure_control
if x0_junctions is None:
x0_junctions = set(net.ext_grid[net.ext_grid.in_service].junction.values)
if hasattr(net, "circ_pump_pressure"):
x0_junctions |= set(net.circ_pump_pressure[net.circ_pump_pressure.in_service].junction.values)
x0_junctions |= set(net.circ_pump_pressure[net.circ_pump_pressure.in_service].flow_junction.values)
if hasattr(net, "circ_pump_mass"):
x0_junctions |= set(net.circ_pump_mass[net.circ_pump_mass.in_service].junction.values)
x0_junctions |= set(net.circ_pump_mass[net.circ_pump_mass.in_service].flow_junction.values)
x0_junctions = list(x0_junctions)

unsupplied_junctions = list(top.unsupplied_junctions(net, slacks=set(x0_junctions)))
Expand Down

0 comments on commit 5b7e42c

Please sign in to comment.