break_pipe(wn, pipe_name_to_split, new_pipe_name, new_junction_name_old_pipe, new_junction_name_new_pipe, add_pipe_at_end=True, split_at_point=0.5, return_copy=True)[source]#

Break a pipe by adding a two unconnected junctions and one new pipe segment.

This function splits the original pipe into two disconnected pipes by adding two new junctions and new pipe to the model. This provides a true broken pipe – i.e., there is no longer flow possible from one side of the break to the other. This is more likely to introduce non-convergable hydraulics than a simple split_pipe with a leak added. The updated model retains the original length of the pipe section. The split occurs at a user specified distance between the original start and end nodes of the pipe (in that direction). The new pipe can be added to either end of the original pipe.

  • The new junction has a base demand of 0 and the default demand pattern. The elevation and coordinates of the new junction are based on a linear interpolation between the end points of the original pipe.

  • The new pipe has the same diameter, roughness, minor loss, and base status of the original pipe.

  • Check valves are not added to the new pipe. Since the new pipe can be connected at either the start or the end of the original pipe, the user can control if the split occurs before or after a check valve.

  • No controls are added to the new pipe; the original pipe keeps any controls.

  • wn (wntr WaterNetworkModel) – Water network model

  • pipe_name_to_split (string) – Name of the pipe to split.

  • new_pipe_name (string) – Name of the new pipe to be added as the split part of the pipe.

  • new_junction_name_old_pipe (string) – Name of the new junction to be added to the original pipe

  • new_junction_name_new_pipe (string) – Name of the new junction to be added to the new pipe

  • add_pipe_at_end (bool, optional) – If True, add the new pipe at after the new junction. If False, add the new pipe before the new junction

  • split_at_point (float, optional) – Relative position (value between 0 and 1) along the original pipe where the new junction will be located.

  • return_copy (bool, optional) – If True, modify and return a copy of the WaterNetworkModel object. If False, modify and return the original WaterNetworkModel object.


Water network model with pipe break

Return type:

wntr WaterNetworkModel