Reservoir#

module wntr.network.elements

class Reservoir[source]#

Bases: Node

Reservoir class, inherited from Node

Constructor

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

Parameters:
  • name (string) – Name of the reservoir.

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

  • base_head (float, optional) – Base head at the reservoir. Internal units must be meters (m).

  • head_pattern (str, optional) – Head pattern name

Attributes

name

The name of the node (read only)

node_type

"Reservoir" (read only)

base_head

The constant head (elevation) for the reservoir, or the base value for a head timeseries

head_pattern_name

Name of the head pattern to use

head_timeseries

The head timeseries for the reservoir (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

demand

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

head

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

pressure

(read-only) the current simulation pressure (0.0 for reservoirs)

quality

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


__init__(name, wn, base_head=0.0, head_pattern=None)[source]#
to_dict()#

Dictionary representation of the node

to_ref()#
property base_head#

The constant head (elevation) for the reservoir, or the base value for a head timeseries

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 head_pattern_name#

Name of the head pattern to use

Type:

str

property head_timeseries#

The head timeseries for the reservoir (read only)

property initial_quality#

The initial quality (concentration) 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#

"Reservoir" (read only)

property pressure#

(read-only) the current simulation pressure (0.0 for reservoirs)

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