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

Hydraulic calculation doesn't converge when the network has two parallel pumps for a gas #545

Open
oporras opened this issue Jun 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@oporras
Copy link

oporras commented Jun 30, 2023

Describe the bug
A simple network for a gas with two parallel pumps doesn't converge while the same network with compressors works well.

To Reproduce
The attached code allows selecting between standard pumps or compressors and shows a simple case where the problem can be reproduced.
simpleNetworkTwoParallelStdPump.py.zip

Error message
The following Error message occurred (incl. traceback)
File "/Users/orlandoporrasrey/Documents/Proyectos/Simulmax/Clientes/Biogas-Dona-Juana/Modelos/simpleNetworkTwoParallelStdPump.py", line 72, in
pp.pipeflow(net)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandapipes/pipeflow.py", line 101, in pipeflowraise PipeflowNotConverged("The hydraulic calculation did not converge to a solution.")
pandapipes.pipeflow.PipeflowNotConverged: The hydraulic calculation did not converge to a solution.

Expected behavior
A symmetric solution with a different pressure increase through pumps (according to the P2 standard type pump).

Screenshots
If applicable, add screenshots to help explain your problem.
image

Python environment (please complete the following information):

  • OS: [macOS 11.7.6]
  • pandapipes version [hotfix 0.8.5)
@oporras oporras added the bug Something isn't working label Jun 30, 2023
@dlohmeier
Copy link
Collaborator

Dear @oporras ,
thanks for your question, which took a while to figure out, as our pump expert is currently not available. We usually use pumps with liquid transporting networks, which is why such an error has not occurred previously. The pump standard types were also mainly defined with a focus on liquids, which is why the three pre-defined standard types probably wouldn't suite your problem. So, in order to make the simulation converge, we need to define a pump for which the given simulation conditions (volume flow and pressure) are in the allowed range. A configuration that worked for me:

st_p4 = pp.std_type_class.PumpStdType.from_list(name="P4", x_values=[0., 2., 5.],
                                                y_values=[2, 1.8, 1.2], degree=2)
net.std_types["pump"]["P4"] = st_p4
pump0 = pp.create_pump(net, from_junction=j1, to_junction=j3, std_type="P4", name="Pump 0")
pump1 = pp.create_pump(net, from_junction=j2, to_junction=j4, std_type="P4", name="Pump 1")

Unfortunately, I also found that the method PumpStdType.from_list does not return anything. I will try to fix that asap on the hotfix branch. For the time being, you could just add a return statement (return reg_st) at the end of this method inside your own code.

Probably your pump would look a little different than the one I created, so please feel free to find a suitable pressure curve for yourself. Does that help you solve your problem?

@dlohmeier
Copy link
Collaborator

I managed to update the hotfix_0.8.5 branch, so that you can pull the changes now. I think, this issue is related to #544 and it would be very helpful to differentiate pumps between liquids and gases. However, it might make more sense to get a better differentiation into the whole component model. So, we would like to have components that depend on a curve (currently pumps) and such that create a constant pressure ratio (currently compressors), and differentiate them between liquids and gases. I am not yet sure which way is the perfect to go, but we will need some restructuring here. I think it is less confusing to take the following approach:

  • pumps are components for liquid networks and compressors for gas networks
  • inside the table, we can distinguish between pumps that use a curve and those with a constant pressure ratio

Would that make sense to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants