Source#

module wntr.network.elements

class Source[source]#

Bases: object

Water quality source class.

Constructor

This class is intended to be instantiated through the add_source method.

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

  • node_name (string) – Injection node.

  • source_type (string) – Source type, options = CONCEN, MASS, FLOWPACED, or SETPOINT.

  • strength (float) – Source strength in Mass/Time for MASS and Mass/Volume for CONCEN, FLOWPACED, or SETPOINT.

  • pattern (Pattern, optional) – If None, then the value will be constant. Otherwise, the Pattern will be used (default = None).

Attributes

name

the name for this source

node_name

the node where this source is located

source_type

the source type for this source

strength_timeseries

timeseries of the source values (read only)


__init__(model, name, node_name, source_type, strength, pattern=None)[source]#
to_dict()[source]#
property name#

the name for this source

Type:

str

property node_name#

the node where this source is located

Type:

str

property source_type#

the source type for this source

Type:

str

property strength_timeseries#

timeseries of the source values (read only)

Type:

TimeSeries