Run the network hydraulic analysis twice

I want to do the water network analysis twice. When I want to get the pressures for the second time after adding pressure relief valves to the water network, MATLAB crashes and leaves the program. What do you think I should do to solve this problem?
I mean two d.openHydraulicAnalysis…

1 Like

Hello Peyman
you should to specify the start and end nodes of the pipe that you want to add the PRV. Then you can use d.openHydraulicAnalysis …

1 Like

@Jafariasl Thanks for your reply
I have done this before.I mean to get the pressure first without adding valves because i need them; Then do the analysis again by adding the valve.
Do i need to run d.openHydraulicAnalysis… twice in matlab?

Yes you should to run it again.

I do this but Matlab crashes and it closes.i mentioned this in topic.

Make sure you use closeHydraulicAnalysis after first hydraulic simulation.

@mosi2x I did but the problem was not solved

Share the lightest version (remove unnecessary lines) of your code which still have the mentioned problem.