Pipe#

module wntr.network.elements

class Pipe[source]#

Bases: Link

Pipe class, inherited from Link.

Constructor

This class is intended to be instantiated through the add_pipe() method. Direct creation through the constructor is highly discouraged.

Parameters:
  • name (string) – Name of the pipe

  • start_node_name (string) – Name of the start node

  • end_node_name (string) – Name of the end node

  • wn (WaterNetworkModel) – The water network model this pipe will belong to.

Attributes

name

The link name (read-only)

link_type

returns "Pipe"

start_node

The start node object.

start_node_name

The name of the start node (read only)

end_node

The end node object.

end_node_name

The name of the end node (read only)

length

length of the pipe

diameter

diameter of the pipe

roughness

pipe roughness

minor_loss

minor loss coefficient

initial_status

The initial status (Opened, Closed, Active) of the Link

cv

does this pipe have a check valve

bulk_coeff

if not None, then a pipe specific bulk reaction coefficient

wall_coeff

if not None, then a pipe specific wall reaction coefficient

vertices

A list of curve points, in the direction of start node to end node.

tag

A tag or label for this link

Read-only simulation results

flow

(read-only) current simulated flow through the link

velocity

(read-only) current simulated velocity through the link

headloss

(read-only) current simulated headloss

friction_factor

(read-only) the current simulation friction factor in the pipe

reaction_rate

(read-only) the current simulation reaction rate in the pipe

quality

(read-only) current simulated average link quality

status

the current status of the pipe


__init__(name, start_node_name, end_node_name, wn)[source]#
to_dict()#

Dictionary representation of the link

to_ref()#
property bulk_coeff#

if not None, then a pipe specific bulk reaction coefficient

Type:

float or None

property cv#

does this pipe have a check valve

Type:

bool

property diameter#

diameter of the pipe

Type:

float

property end_node#

The end node object.

Type:

Node

property end_node_name#

The name of the end node (read only)

Type:

str

property flow#

(read-only) current simulated flow through the link

Type:

float

property friction_factor#

(read-only) the current simulation friction factor in the pipe

Type:

float

property headloss#

(read-only) current simulated headloss

Type:

float

property initial_setting#

The initial setting for the link (if Active)

Type:

float

property initial_status#

The initial status (Opened, Closed, Active) of the Link

Type:

LinkStatus

property length#

length of the pipe

Type:

float

returns "Pipe"

property minor_loss#

minor loss coefficient

Type:

float

property name#

The link name (read-only)

Type:

str

property quality#

(read-only) current simulated average link quality

Type:

float

property reaction_rate#

(read-only) the current simulation reaction rate in the pipe

Type:

float

property roughness#

pipe roughness

Type:

float

property setting#

(read-only) current simulated setting of the link

Type:

float

property start_node#

The start node object.

Type:

Node

property start_node_name#

The name of the start node (read only)

Type:

str

property status#

the current status of the pipe

Type:

LinkStatus

property tag#

A tag or label for this link

Type:

str

property velocity#

(read-only) current simulated velocity through the link

Type:

float

property vertices#

A list of curve points, in the direction of start node to end node.

The vertices should be listed as a list of (x,y) tuples when setting.

property wall_coeff#

if not None, then a pipe specific wall reaction coefficient

Type:

float or None