Node#

module wntr.network.base

class Node[source]#

Bases: object

Base class for nodes.

For details about the different subclasses, see one of the following: Junction, Tank, and Reservoir

Constructor

This is an abstract class and should not be instantiated directly.

Parameters:
  • wn (WaterNetworkModel) – WaterNetworkModel object

  • name (string) – Name of the node (must be unique among nodes of all types)

Attributes

name

The name of the node (read only)

node_type

The node type (read only)

coordinates

The node coordinates, (x,y)

initial_quality

The initial quality (concentration) at the node

tag

A tag or label for the node

Read-only simulation results

The following attributes are read-only. The values are the final calculated value from a simulation.

head

(read-only) the current simulation head at the node (total head)

demand

(read-only) the current simulation demand at the node (actual demand)

leak_demand

(read-only) the current simulation leak demand at the node

leak_status

(read-only) the current simulation leak status at the node

leak_area

(read-only) the current simulation leak area at the node

leak_discharge_coeff

(read-only) the current simulation leak discharge coefficient


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

Dictionary representation of the node

to_ref()[source]#
property coordinates#

The node coordinates, (x,y)

Type:

tuple

property demand#

(read-only) the current simulation demand at the node (actual demand)

Type:

float

property head#

(read-only) the current simulation head at the node (total head)

Type:

float

property initial_quality#

The initial quality (concentration) at the node

Type:

float

property leak#

(read-only) the current simulation leak area at the node

Type:

float

property leak_area#

(read-only) the current simulation leak area at the node

Type:

float

property leak_demand#

(read-only) the current simulation leak demand at the node

Type:

float

property leak_discharge_coeff#

(read-only) the current simulation leak discharge coefficient

Type:

float

property leak_status#

(read-only) the current simulation leak status at the node

Type:

bool

property name#

The name of the node (read only)

Type:

str

property node_type#

The node type (read only)

Type:

str

property pressure#

(read-only) the current simulation pressure at the node

Type:

float

property quality#

(read-only) the current simulation quality at the node

Type:

float

property tag#

A tag or label for the node

Type:

str