OWA-EPANET Toolkit  2.2
Enumerated Types

These are the toolkit's enumerated types whose members are used as function arguments. More...

Macros

#define EN_MISSING   -1.E10
 Missing value indicator.
 

Enumerations

enum  EN_SizeLimits
 Size Limts. More...
 
enum  EN_ObjectType
 Types of network objects. More...
 
enum  EN_CountType
 Types of objects to count. More...
 
enum  EN_NodeType
 Node Types. More...
 
enum  EN_LinkType
 Link types. More...
 
enum  EN_PumpType
 Types of pump curves. More...
 
enum  EN_PumpStateType
 Pump states. More...
 
enum  EN_CurveType
 Types of data curves. More...
 
enum  EN_QualityType
 Types of water quality analyses. More...
 
enum  EN_SourceType
 Water quality source types. More...
 
enum  EN_ControlType
 Simple control types. More...
 
enum  EN_HeadLossType
 Head loss formulas. More...
 
enum  EN_NodeProperty
 Node properties. More...
 
enum  EN_LinkProperty
 Link properties. More...
 
enum  EN_LinkStatusType
 Link status. More...
 
enum  EN_TimeParameter
 Time parameters. More...
 
enum  EN_Option
 Simulation options. More...
 
enum  EN_FlowUnits
 Flow units. More...
 
enum  EN_DemandModel
 Demand models. More...
 
enum  EN_MixingModel
 Tank mixing models. More...
 
enum  EN_StatisticType
 Reporting statistic choices. More...
 
enum  EN_InitHydOption
 Hydraulic initialization options. More...
 
enum  EN_ActionCodeType
 Deletion action codes. More...
 
enum  EN_AnalysisStatistic
 Analysis convergence statistics. More...
 
enum  EN_StatusReport
 Status reporting levels. More...
 
enum  EN_RuleObject
 Network objects used in rule-based controls. More...
 
enum  EN_RuleVariable
 Object variables used in rule-based controls. More...
 
enum  EN_RuleOperator
 Comparison operators used in rule-based controls. More...
 
enum  EN_RuleStatus
 Link status codes used in rule-based controls. More...
 

Overview

These are the toolkit's enumerated types whose members are used as function arguments.

Enumeration Type Documentation

◆ EN_ActionCodeType

Deletion action codes.

These codes are used in EN_deletenode and EN_deletelink to indicate what action should be taken if the node or link being deleted appears in any simple or rule-based controls or if a deleted node has any links connected to it.

Enumerator
EN_UNCONDITIONAL 

Delete all controls and connecing links.

EN_CONDITIONAL 

Cancel object deletion if it appears in controls or has connecting links.

◆ EN_AnalysisStatistic

Analysis convergence statistics.

These statistics report the convergence criteria for the most current hydraulic analysis and the cumulative water quality mass balance error at the current simulation time. They can be retrieved with EN_getstatistic.

Enumerator
EN_ITERATIONS 

Number of hydraulic iterations taken.

EN_RELATIVEERROR 

Sum of link flow changes / sum of link flows.

EN_MAXHEADERROR 

Largest head loss error for links.

EN_MAXFLOWCHANGE 

Largest flow change in links.

EN_MASSBALANCE 

Cumulative water quality mass balance ratio.

EN_DEFICIENTNODES 

Number of pressure deficient nodes.

EN_DEMANDREDUCTION 

% demand reduction at pressure deficient nodes

◆ EN_ControlType

Simple control types.

These are the different types of simple (single statement) controls that can be applied to network links. They are used as an argument to EN_addcontrol,EN_getcontrol, and EN_setcontrol.

Enumerator
EN_LOWLEVEL 

Act when pressure or tank level drops below a setpoint.

EN_HILEVEL 

Act when pressure or tank level rises above a setpoint.

EN_TIMER 

Act at a prescribed elapsed amount of time.

EN_TIMEOFDAY 

Act at a particular time of day.

◆ EN_CountType

Types of objects to count.

These options tell EN_getcount which type of object to count.

Enumerator
EN_NODECOUNT 

Number of nodes (junctions + tanks + reservoirs)

EN_TANKCOUNT 

Number of tanks and reservoirs.

EN_LINKCOUNT 

Number of links (pipes + pumps + valves)

EN_PATCOUNT 

Number of time patterns.

EN_CURVECOUNT 

Number of data curves.

EN_CONTROLCOUNT 

Number of simple controls.

EN_RULECOUNT 

Number of rule-based controls.

◆ EN_CurveType

Types of data curves.

These are the different types of physical relationships that a data curve can represent as returned by calling EN_getcurvetype.

Enumerator
EN_VOLUME_CURVE 

Tank volume v. depth curve.

EN_PUMP_CURVE 

Pump head v. flow curve.

EN_EFFIC_CURVE 

Pump efficiency v. flow curve.

EN_HLOSS_CURVE 

Valve head loss v. flow curve.

EN_GENERIC_CURVE 

Generic curve.

◆ EN_DemandModel

Demand models.

These choices for modeling consumer demands are used with EN_getdemandmodel and EN_setdemandmodel.

A demand driven analysis requires that a junction's full demand be supplied in each time period independent of how much pressure is available. A pressure driven analysis makes demand be a power function of pressure, up to the point where the full demand is met.

Enumerator
EN_DDA 

Demand driven analysis.

EN_PDA 

Pressure driven analysis.

◆ EN_FlowUnits

Flow units.

These choices for flow units are used with EN_getflowunits and EN_setflowunits. They are also used for the flow units type argument in EN_init. If flow units are expressed in US Customary units ( EN_CFS through EN_AFD ) then all other quantities are in US Customary units. Otherwise they are in metric units.

Enumerator
EN_CFS 

Cubic feet per second.

EN_GPM 

Gallons per minute.

EN_MGD 

Million gallons per day.

EN_IMGD 

Imperial million gallons per day.

EN_AFD 

Acre-feet per day.

EN_LPS 

Liters per second.

EN_LPM 

Liters per minute.

EN_MLD 

Million liters per day.

EN_CMH 

Cubic meters per hour.

EN_CMD 

Cubic meters per day.

◆ EN_HeadLossType

Head loss formulas.

The available choices for the EN_HEADLOSSFORM option in EN_getoption and EN_setoption. They are also used for the head loss type argument in EN_init. Each head loss formula uses a different type of roughness coefficient ( EN_ROUGHNESS ) that can be set with EN_setlinkvalue.

Enumerator
EN_HW 

Hazen-Williams.

EN_DW 

Darcy-Weisbach.

EN_CM 

Chezy-Manning.

◆ EN_InitHydOption

Hydraulic initialization options.

These options are used to initialize a new hydraulic analysis when EN_initH is called.

Enumerator
EN_NOSAVE 

Don't save hydraulics; don't re-initialize flows.

EN_SAVE 

Save hydraulics to file, don't re-initialize flows.

EN_INITFLOW 

Don't save hydraulics; re-initialize flows.

EN_SAVE_AND_INIT 

Save hydraulics; re-initialize flows.

◆ EN_LinkProperty

Link properties.

These link properties are used with EN_getlinkvalue and EN_setlinkvalue. Those marked as read only are computed values that can only be retrieved.

Enumerator
EN_DIAMETER 

Pipe/valve diameter.

EN_LENGTH 

Pipe length.

EN_ROUGHNESS 

Pipe roughness coefficient.

EN_MINORLOSS 

Pipe/valve minor loss coefficient.

EN_INITSTATUS 

Initial status (see EN_LinkStatusType)

EN_INITSETTING 

Initial pump speed or valve setting.

EN_KBULK 

Bulk chemical reaction coefficient.

EN_KWALL 

Pipe wall chemical reaction coefficient.

EN_FLOW 

Current computed flow rate (read only)

EN_VELOCITY 

Current computed flow velocity (read only)

EN_HEADLOSS 

Current computed head loss (read only)

EN_STATUS 

Current link status (see EN_LinkStatusType)

EN_SETTING 

Current link setting.

EN_ENERGY 

Current computed pump energy usage (read only)

EN_LINKQUAL 

Current computed link quality (read only)

EN_LINKPATTERN 

Pump speed time pattern index.

EN_PUMP_STATE 

Current computed pump state (read only) (see EN_PumpStateType)

EN_PUMP_EFFIC 

Current computed pump efficiency (read only)

EN_PUMP_POWER 

Pump constant power rating.

EN_PUMP_HCURVE 

Pump head v. flow curve index.

EN_PUMP_ECURVE 

Pump efficiency v. flow curve index.

EN_PUMP_ECOST 

Pump average energy price.

EN_PUMP_EPAT 

Pump energy price time pattern index.

◆ EN_LinkStatusType

Link status.

One of these values is returned when EN_getlinkvalue is used to retrieve a link's initial status ( EN_INITSTATUS ) or its current status ( EN_STATUS ). These options are also used with EN_setlinkvalue to set values for these same properties.

◆ EN_LinkType

Link types.

These are the different types of links that can be returned by calling EN_getlinktype.

Enumerator
EN_CVPIPE 

Pipe with check valve.

EN_PIPE 

Pipe.

EN_PUMP 

Pump.

EN_PRV 

Pressure reducing valve.

EN_PSV 

Pressure sustaining valve.

EN_PBV 

Pressure breaker valve.

EN_FCV 

Flow control valve.

EN_TCV 

Throttle control valve.

EN_GPV 

General purpose valve.

◆ EN_MixingModel

Tank mixing models.

These are the different types of models that describe water quality mixing in storage tanks. The choice of model is accessed with the EN_MIXMODEL property of a Tank node using EN_getnodevalue and EN_setnodevalue.

Enumerator
EN_MIX1 

Complete mix model.

EN_MIX2 

2-compartment model

EN_FIFO 

First in, first out model.

EN_LIFO 

Last in, first out model.

◆ EN_NodeProperty

Node properties.

These node properties are used with EN_getnodevalue and EN_setnodevalue. Those marked as read only are computed values that can only be retrieved.

Enumerator
EN_ELEVATION 

Elevation.

EN_BASEDEMAND 

Primary demand baseline value.

EN_PATTERN 

Primary demand time pattern index.

EN_EMITTER 

Emitter flow coefficient.

EN_INITQUAL 

Initial quality.

EN_SOURCEQUAL 

Quality source strength.

EN_SOURCEPAT 

Quality source pattern index.

EN_SOURCETYPE 

Quality source type (see EN_SourceType)

EN_TANKLEVEL 

Current computed tank water level (read only)

EN_DEMAND 

Current computed demand (read only)

EN_HEAD 

Current computed hydraulic head (read only)

EN_PRESSURE 

Current computed pressure (read only)

EN_QUALITY 

Current computed quality (read only)

EN_SOURCEMASS 

Current computed quality source mass inflow (read only)

EN_INITVOLUME 

Tank initial volume (read only)

EN_MIXMODEL 

Tank mixing model (see EN_MixingModel)

EN_MIXZONEVOL 

Tank mixing zone volume (read only)

EN_TANKDIAM 

Tank diameter.

EN_MINVOLUME 

Tank minimum volume.

EN_VOLCURVE 

Tank volume curve index.

EN_MINLEVEL 

Tank minimum level.

EN_MAXLEVEL 

Tank maximum level.

EN_MIXFRACTION 

Tank mixing fraction.

EN_TANK_KBULK 

Tank bulk decay coefficient.

EN_TANKVOLUME 

Current computed tank volume (read only)

EN_MAXVOLUME 

Tank maximum volume (read only)

EN_CANOVERFLOW 

Tank can overflow (= 1) or not (= 0)

EN_DEMANDDEFICIT 

Amount that full demand is reduced under PDA (read only)

◆ EN_NodeType

Node Types.

These are the different types of nodes that can be returned by calling EN_getnodetype.

Enumerator
EN_JUNCTION 

Junction node.

EN_RESERVOIR 

Reservoir node.

EN_TANK 

Storage tank node.

◆ EN_ObjectType

Types of network objects.

The types of objects that comprise a network model.

Enumerator
EN_NODE 

Nodes.

EN_LINK 

Links.

EN_TIMEPAT 

Time patterns.

EN_CURVE 

Data curves.

EN_CONTROL 

Simple controls.

EN_RULE 

Control rules.

◆ EN_Option

enum EN_Option

Simulation options.

These constants identify the hydraulic and water quality simulation options that are applied on a network-wide basis. They are accessed using the EN_getoption and EN_setoption functions.

Enumerator
EN_TRIALS 

Maximum trials allowed for hydraulic convergence.

EN_ACCURACY 

Total normalized flow change for hydraulic convergence.

EN_TOLERANCE 

Water quality tolerance.

EN_EMITEXPON 

Exponent in emitter discharge formula.

EN_DEMANDMULT 

Global demand multiplier.

EN_HEADERROR 

Maximum head loss error for hydraulic convergence.

EN_FLOWCHANGE 

Maximum flow change for hydraulic convergence.

EN_HEADLOSSFORM 

Head loss formula (see EN_HeadLossType)

EN_GLOBALEFFIC 

Global pump efficiency (percent)

EN_GLOBALPRICE 

Global energy price per KWH.

EN_GLOBALPATTERN 

Index of a global energy price pattern.

EN_DEMANDCHARGE 

Energy charge per max. KW usage.

EN_SP_GRAVITY 

Specific gravity.

EN_SP_VISCOS 

Specific viscosity (relative to water at 20 deg C)

EN_UNBALANCED 

Extra trials allowed if hydraulics don't converge.

EN_CHECKFREQ 

Frequency of hydraulic status checks.

EN_MAXCHECK 

Maximum trials for status checking.

EN_DAMPLIMIT 

Accuracy level where solution damping begins.

EN_SP_DIFFUS 

Specific diffusivity (relative to chlorine at 20 deg C)

EN_BULKORDER 

Bulk water reaction order for pipes.

EN_WALLORDER 

Wall reaction order for pipes (either 0 or 1)

EN_TANKORDER 

Bulk water reaction order for tanks.

EN_CONCENLIMIT 

Limiting concentration for growth reactions.

◆ EN_PumpStateType

Pump states.

One of these codes is returned when EN_getlinkvalue is used to retrieve a pump's current operating state ( EN_PUMP_STATE ). EN_PUMP_XHEAD indicates that the pump has been shut down because it is being asked to deliver more than its shutoff head. EN_PUMP_XFLOW indicates that the pump is being asked to deliver more than its maximum flow.

Enumerator
EN_PUMP_XHEAD 

Pump closed - cannot supply head.

EN_PUMP_CLOSED 

Pump closed.

EN_PUMP_OPEN 

Pump open.

EN_PUMP_XFLOW 

Pump open - cannot supply flow.

◆ EN_PumpType

Types of pump curves.

EN_getpumptype returns one of these values when it is called.

Enumerator
EN_CONST_HP 

Constant horsepower.

EN_POWER_FUNC 

Power function.

EN_CUSTOM 

User-defined custom curve.

EN_NOCURVE 

No curve.

◆ EN_QualityType

Types of water quality analyses.

These are the different types of water quality analyses that EPANET can run. They are used with EN_getqualinfo, EN_getqualtype, and EN_setqualtype.

Enumerator
EN_NONE 

No quality analysis.

EN_CHEM 

Chemical fate and transport.

EN_AGE 

Water age analysis.

EN_TRACE 

Source tracing analysis.

◆ EN_RuleObject

Network objects used in rule-based controls.

Enumerator
EN_R_NODE 

Clause refers to a node.

EN_R_LINK 

Clause refers to a link.

EN_R_SYSTEM 

Clause refers to a system parameter (e.g., time)

◆ EN_RuleOperator

Comparison operators used in rule-based controls.

Enumerator
EN_R_EQ 

Equal to.

EN_R_NE 

Not equal.

EN_R_LE 

Less than or equal to.

EN_R_GE 

Greater than or equal to.

EN_R_LT 

Less than.

EN_R_GT 

Greater than.

EN_R_IS 

Is equal to.

EN_R_NOT 

Is not equal to.

EN_R_BELOW 

Is below.

EN_R_ABOVE 

Is above.

◆ EN_RuleStatus

Link status codes used in rule-based controls.

Enumerator
EN_R_IS_OPEN 

Link is open.

EN_R_IS_CLOSED 

Link is closed.

EN_R_IS_ACTIVE 

Control valve is active.

◆ EN_RuleVariable

Object variables used in rule-based controls.

Enumerator
EN_R_DEMAND 

Nodal demand.

EN_R_HEAD 

Nodal hydraulic head.

EN_R_GRADE 

Nodal hydraulic grade.

EN_R_LEVEL 

Tank water level.

EN_R_PRESSURE 

Nodal pressure.

EN_R_FLOW 

Link flow rate.

EN_R_STATUS 

Link status.

EN_R_SETTING 

Link setting.

EN_R_POWER 

Pump power output.

EN_R_TIME 

Elapsed simulation time.

EN_R_CLOCKTIME 

Time of day.

EN_R_FILLTIME 

Time to fill a tank.

EN_R_DRAINTIME 

Time to drain a tank.

◆ EN_SizeLimits

Size Limts.

Limits on the size of character arrays used to store ID names and text messages.

Enumerator
EN_MAXID 

Max. # characters in ID name.

EN_MAXMSG 

Max. # characters in message text.

◆ EN_SourceType

Water quality source types.

These are the different types of external water quality sources that can be assigned to a node's EN_SOURCETYPE property as used by EN_getnodevalue and EN_setnodevalue.

Enumerator
EN_CONCEN 

Sets the concentration of external inflow entering a node.

EN_MASS 

Injects a given mass/minute into a node.

EN_SETPOINT 

Sets the concentration leaving a node to a given value.

EN_FLOWPACED 

Adds a given value to the concentration leaving a node.

◆ EN_StatisticType

Reporting statistic choices.

These options determine what kind of statistical post-processing should be done on the time series of simulation results generated before they are reported using EN_report. An option can be chosen by using STATISTIC option as the argument to EN_setreport.

Enumerator
EN_SERIES 

Report all time series points.

EN_AVERAGE 

Report average value over simulation period.

EN_MINIMUM 

Report minimum value over simulation period.

EN_MAXIMUM 

Report maximum value over simulation period.

EN_RANGE 

Report maximum - minimum over simulation period.

◆ EN_StatusReport

Status reporting levels.

These choices specify the level of status reporting written to a project's report file during a hydraulic analysis. The level is set using the EN_setstatusreport function.

Enumerator
EN_NO_REPORT 

No status reporting.

EN_NORMAL_REPORT 

Normal level of status reporting.

EN_FULL_REPORT 

Full level of status reporting.

◆ EN_TimeParameter

Time parameters.

These time-related options are used with EN_gettimeparam andEN_settimeparam. All times are expressed in seconds The parameters marked as read only are computed values that can only be retrieved.

Enumerator
EN_DURATION 

Total simulation duration.

EN_HYDSTEP 

Hydraulic time step.

EN_QUALSTEP 

Water quality time step.

EN_PATTERNSTEP 

Time pattern period.

EN_PATTERNSTART 

Time when time patterns begin.

EN_REPORTSTEP 

Reporting time step.

EN_REPORTSTART 

Time when reporting starts.

EN_RULESTEP 

Rule-based control evaluation time step.

EN_STATISTIC 

Reporting statistic code (see EN_StatisticType)

EN_PERIODS 

Number of reporting time periods (read only)

EN_STARTTIME 

Simulation starting time of day.

EN_HTIME 

Elapsed time of current hydraulic solution (read only)

EN_QTIME 

Elapsed time of current quality solution (read only)

EN_HALTFLAG 

Flag indicating if the simulation was halted (read only)

EN_NEXTEVENT 

Shortest time until a tank becomes empty or full (read only)

EN_NEXTEVENTTANK 

Index of tank with shortest time to become empty or full (read only)