Replies: 2 comments 1 reply
-
Dear @jdbelenol , |
Beta Was this translation helpful? Give feedback.
-
Dear @dlohmeier, To analyze the pressure drop along the longest pipeline path, I graphed all the junctions in that pipeline on both the supply side and the return side of the pump. The resulting graph is showed below. Figure 1. Junctions of Interest: My Question: Additional Notes: Thank you in advance for your support and insights into addressing this situation. I greatly appreciate your feedback. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Dear dlohmeier,
I hope this message finds you well. I am a student at OTH Amberg in Germany, currently working on a project using pandapipes to calculate pressure drops and flow velocities in a district heating pipe network. As part of this project, I need to implement flow control to ensure that the heat exchangers receive the desired water flow. To understand how flow control works, I am testing a simplified configuration.
See Figure 1 in the file attached.
In this configuration, I am observing different water flows at the heat exchangers (hx_1 and hx_2), where both should ideally receive 20 kg/s. Instead, one heat exchanger is receiving more than 20 kg/s, while the other is receiving less.
The next configuration show how I am implementing the flow control.
See Figure 2 in the file attached.
I have placed the flow control elements after each heat exchanger by adding two new junctions, Jc1 and Jc2, so that flow control can be applied to both heat exchangers. Below is the code I am using in pandapipes.
import pandapipes as pp
import pandapipes.plotting as plot
import pandas as pd
from networkx.algorithms.approximation import diameter
from pandapipes import create_junction
#create empty net
net = pp.create_empty_network(fluid="water")
#create junctions
j0 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 0")
j1 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 1")
j2 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 2")
j3 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 3")
j4 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 4")
j5 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 5")
j6 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 6")
j7 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction 7")
jc1 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction c1")
jc2 = create_junction(net, pn_bar=5, tfluid_k=293.15, name="Junction c2")
#create pump
pp.create_circ_pump_const_mass_flow(net, return_junction=j5, flow_junction=j0, p_flow_bar=5,
mdot_flow_kg_per_s=40, t_flow_k=273.15+35)
#create heat exchanger
hx_1 =pp.create_heat_exchanger(net,from_junction=j2, to_junction=j3, diameter_m=0.125, qext_w=100000)
hx_2 =pp.create_heat_exchanger(net,from_junction=j6, to_junction=j7, diameter_m=0.125, qext_w=100000)
#create flow controllers
flow_cont_1 = pp.create_flow_control(net, from_junction=j3, to_junction=jc1, controlled_mdot_kg_per_s=20, diameter_m=0.125, control_active=True)
flow_cont_2 = pp.create_flow_control(net, from_junction=j6, to_junction=jc2, controlled_mdot_kg_per_s=20, diameter_m=0.125, control_active=True)
#create pipes
p1 = pp.create_pipe_from_parameters(net, from_junction=j0, to_junction=j1, length_km=0.01,diameter_m=0.2, k_mm=0.02, alpha_w_per_m2k=10,
sections=5,text_k=283, name="pipe 1")
p2 = pp.create_pipe_from_parameters(net, from_junction=j1, to_junction=j2, length_km=0.5,diameter_m=0.125, k_mm=0.02, alpha_w_per_m2k=10,
sections=5,text_k=283, name="pipe 2")
p3 = pp.create_pipe_from_parameters(net, from_junction=jc1, to_junction=j4, length_km=0.5,diameter_m=0.125, k_mm=0.02, alpha_w_per_m2k=10,
sections=5,text_k=283, name="pipe 3")
p4 = pp.create_pipe_from_parameters(net, from_junction=j4, to_junction=j5, length_km=0.01,diameter_m=0.2, k_mm=0.02, alpha_w_per_m2k=10,
sections=5,text_k=283, name="pipe 4")
p5 = pp.create_pipe_from_parameters(net, from_junction=jc2, to_junction=j4, length_km=1,diameter_m=0.125, k_mm=0.02, alpha_w_per_m2k=10,
sections=5,text_k=283, name="pipe 5")
p6 = pp.create_pipe_from_parameters(net, from_junction=j1, to_junction=j7, length_km=1,diameter_m=0.125, k_mm=0.02, alpha_w_per_m2k=10,
sections=5,text_k=283, name="pipe 6")
plot.simple_plot(net)
#run pipeflow
pp.pipeflow(net)
this is the plot of the pipe:
See Figure 3 in the file attached.
=====================================================================================
The result is that the pipeflow simulation does not converge. I have double-checked the connections of all elements in the network, as well as the dimensions, flows, and pump head values to confirm they are reasonable. This is the error I am encountering:
No or insufficient geodata available --> Creating artificial coordinates. This may take some time
C:\OTH\WS 23-24\Project with seminar\Heating District py.venv\Lib\site-packages\pandapipes\pipeflow.py:231: MatrixRankWarning: Matrix is exactly singular
x = spsolve(jacobian, epsilon)
dgstrf info 68
dgstrf info 2
dgstrf info 2
dgstrf info 2
dgstrf info 2
dgstrf info 2
dgstrf info 2
dgstrf info 2
dgstrf info 2
dgstrf info 2
Traceback (most recent call last):
File "C:\OTH\WS 23-24\Project with seminar\Heating District py\circular_flow_in_a_district_heating_grid_jose.py", line 52, in
pp.pipeflow(net)
File "C:\OTH\WS 23-24\Project with seminar\Heating District py.venv\Lib\site-packages\pandapipes\pipeflow.py", line 98, in pipeflow
raise PipeflowNotConverged("The hydraulic calculation did not converge to a solution.")
pandapipes.pf.pipeflow_setup.PipeflowNotConverged: The hydraulic calculation did not converge to a solution.
Process finished with exit code 1
Questions:
• Could you provide any hints on what might be causing this error?
• Am I implementing the flow control correctly?
Thank you in advance for your support. I look forward to hearing from you.
Figures.pdf
Best regards,
Jose Beleno
Beta Was this translation helpful? Give feedback.
All reactions