ENgetnodevalue | R Documentation |
ENgetnodevalue
retrieves the values of specific node parameters.
ENgetnodevalue(nodeindex, paramcode)
nodeindex |
An integer vector specifying the node index. |
paramcode |
An integer or character string, the parameter codes (see below). |
parameter value
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).
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.