Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pandapipes/component_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
from pandapipes.component_models.flow_control_component import *
from pandapipes.component_models.mass_storage_component import *
from pandapipes.component_models.heat_consumer_component import *
from pandapipes.component_models.heat_generator_component import *
from pandapipes.component_models.component_toolbox import *
3 changes: 2 additions & 1 deletion src/pandapipes/component_models/heat_consumer_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ def adaption_after_derivatives_hydraulic(cls, net,
from_nodes = get_from_nodes_corrected(hc_pit)
t_in = node_pit[from_nodes, TINIT]
t_out = hc_pit[:, TOUTINIT]
qext = hc_pit[:, QEXT]

df_dm = - cp * (t_out - t_in)
mask_equal = t_out >= t_in
mask_equal = np.where(qext < 0, t_in >= t_out, t_out >= t_in)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @Theda-ISE for the contribution,

I would recommend to create an own component as it would be misleading that a consumer can suddenly act as supplier.

mask_zero = hc_pit[:, QEXT] == 0
mask_ign = mask_equal | mask_zero
hc_pit[mask & mask_ign, MDOTINIT] = 0
Expand Down
Loading
Loading