TCValve#

module wntr.network.elements

class TCValve[source]#

Bases: Valve

Throttle control valve class, inherited from Valve.

Constructor

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

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

  • 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 valve will belong to

Attributes

name

The link name (read-only)

link_type

returns "Valve"

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)

initial_status

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

initial_setting

The initial setting for the link (if Active)

valve_type

returns "TCV"

tag

A tag or label for this link

vertices

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

Result attributes

flow

(read-only) current simulated flow through the link

velocity

(read-only) current simulated velocity through the link

headloss

(read-only) current simulated headloss

quality

(read-only) current simulated average link quality

status

(abstract) current status of the link

setting

(read-only) current simulated setting of the link


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

Dictionary representation of the link

to_ref()#
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 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

returns "Valve"

property name#

The link name (read-only)

Type:

str

property quality#

(read-only) current simulated average link quality

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#

(abstract) current status of the link

Type:

LinkStatus

property tag#

A tag or label for this link

Type:

str

property valve_type#

returns "TCV"

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.