ENgetnodevalue: Retrieve node parameter value.

Description Usage Arguments Value Note See Also Examples

View source: R/nodes.r

Description

ENgetnodevalue retrieves the values of specific node parameters.

Usage

1
ENgetnodevalue(nodeindex, paramcode)

Arguments

nodeindex

An integer vector specifying the node index.

paramcode

An integer or character string, the parameter codes (see below).

Value

parameter value

Note

Node indexes are consecutive integers starting from 1.

Node parameter codes consist of the following constants:

EN_ELEVATION 0 Elevation
EN_BASEDEMAND 1 Base demand
EN_PATTERN 2 Demand pattern index
EN_EMITTER 3 Emitter coeff.
EN_INITQUAL 4 Initial quality
EN_SOURCEQUAL 5 Source quality
EN_SOURCEPAT 6 Source pattern index
EN_SOURCETYPE 7 Source type (see note below)
EN_TANKLEVEL 8 Initial water level in tank
EN_DEMAND 9 Actual demand
EN_HEAD 10 Hydraulic head
EN_PRESSURE 11 Pressure
EN_QUALITY 12 Actual quality
EN_SOURCEMASS 13 Mass flow rate per minute of a chemical source

Parameters 9 - 13 (EN_DEMAND through EN_SOURCEMASS) are computed values. The others are input design parameters.

Source types are identified with the following constants:

EN_CONCEN 0
EN_MASS 1
EN_SETPOINT 2
EN_FLOWPACED 3

See [SOURCES] for a description of these source types.

Values are returned in units which depend on the units used for flow rate in the EPANET input file (see Units of Measurement).

See Also

http://wateranalytics.org/EPANET/group___network_info.html

Examples

1
2
3
4
5
6
# path to Net1.inp example file included with this package
inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp")  
ENopen( inp, "Net1.rpt")
ENgetnodevalue(1, "EN_ELEVATION")
ENgetnodevalue(5, "EN_BASEDEMAND")
ENclose()

epanet2toolkit documentation built on July 28, 2018, 1:06 a.m.