Units of Measurement¶
Table 1 list EPANET parameters and their associated US and SI units.
PARAMETER | US CUSTOMARY | SI METRIC |
---|---|---|
Concentration | mg/L or ug/L | mg/L or ug/L |
Demand | (see Flow units) | (see Flow units) |
Diameter (Pipes) | inch | millimeter |
Diameter (Tanks) | foot | meter |
Efficiency | percent | percent |
Elevation | foot | meter |
Emitter Coefficient | flow unit/ (psi)1/2 | flow unit/ (meter)1/2 |
Energy | kilowatt - hour | kilowatt - hour |
Flow | CFS (cu foot/sec) GPM (gal/min) MGD (Million gal/day) IMGD (Imperial MGD) AFD (ac-foot/day) |
LPS (liter/sec) LPM (liter/min) MLD (Megaliter/day) CMH (cubic meter/hr) CMD (cubic meter/day) |
Friction Factor | unitless | unitless |
Hydraulic Head | foot | meter |
Length | foot | meter |
Minor Loss Coefficient | unitless | unitless |
Power | horsepower | kilowatt |
Pressure | pounds per square inch | meter |
Reaction Coefficient (Bulk) | 1st-order 1/day | 1st-order 1/day |
Reaction Coefficient (Wall) | 0-order mass/L/day 1st-order ft/day |
0-order mass/L/day 1st-order meter/day |
Roughness Coefficient | Darcy-Weisbach 10-3foot Otherwise unitless |
Darcy-Weisbach millimeter Otherwise unitless |
Source Mass Injection | mass/minute | mass/minute |
Velocity | foot/second | meter/second |
Volume | cubic foot | cubic meter |
Water Age | hour | hour |
Note: US Customary units apply when CFS, GPM, AFD, or MGD is chosen as flow units. SI Metric units apply when flow units are expressed using either liters or cubic meters.
Error Messages¶
Table 2 list EPANET error codes and their explanation.
ID | EXPLANATION |
---|---|
101 | An analysis was terminated due to insufficient memory available. |
110 | An analysis was terminated because the network hydraulic equations could not be solved. Check for portions of the network not having any physical links back to a tank or reservoir or for unreasonable values for network input data. |
200 | One or more errors were detected in the input data. The nature of the error will be described by the 200-series error messages listed below. |
201 | There is a syntax error in a line of the input file created from your network data. This is most likely to have occurred in .INP text created by a user outside of EPANET. |
202 | An illegal numeric value was assigned to a property. |
203 | An object refers to undefined node. |
204 | An object refers to an undefined link. |
205 | An object refers to an undefined time pattern. |
206 | An object refers to an undefined curve. |
207 | An attempt is made to control a check valve. Once a pipe is assigned a Check Valve status with the Property Editor, its status cannot be changed by either simple or rule-based controls. |
208 | Reference was made to an undefined node. This could occur in a control statement for example. |
209 | An illegal value was assigned to a node property. |
210 | Reference was made to an undefined link. This could occur in a control statement for example. |
211 | An illegal value was assigned to a link property. |
212 | A source tracing analysis refers to an undefined trace node. |
213 | An analysis option has an illegal value (an example would be a negative time step value). |
214 | There are too many characters in a line read from an input file. The lines in the .INP file are limited to 255 characters. |
215 | Two or more nodes or links share the same ID label. |
216 | Energy data were supplied for an undefined pump. |
217 | Invalid energy data were supplied for a pump. |
219 | A valve is illegally connected to a reservoir or tank. A PRV, PSV or FCV cannot be directly connected to a reservoir or tank. Use a length of pipe to separate the two. |
220 | A valve is illegally connected to another valve. PRVs cannot share the same downstream node or be linked in series, PSVs cannot share the same upstream node or be linked in series, and a PSV cannot be directly connected to the downstream node of a PRV. |
221 | A rule-based control contains a misplaced clause. |
223 | There are not enough nodes in the network to analyze. A valid network must contain at least one tank/reservoir and one junction node. |
224 | There is not at least one tank or reservoir in the network. |
225 | Invalid lower/upper levels were specified for a tank (e.g., the lower lever is higher than the upper level). |
226 | No pump curve or power rating was supplied for a pump. A pump must either be assigned a curve ID in its Pump Curve property or a power rating in its Power property. If both properties are assigned then the Pump Curve is used. |
227 | A pump has an invalid pump curve. A valid pump curve must have decreasing head with increasing flow. |
230 | A curve has non-increasing X-values. |
233 | A node is not connected to any links. |
302 | The system cannot open the temporary input file. Make sure that the EPANET Temporary Folder selected has write privileges assigned to it. |
303 | The system cannot open the status report file. See Error 302. |
304 | The system cannot open the binary output file. See Error 302. |
308 | Could not save results to file. This can occur if the disk becomes full. |
309 | Could not write results to report file. This can occur if the disk becomes full. |
Command Line EPANET¶
General Instructions¶
EPANET can also be run as a console application from the command line within a DOS window. In this case network input data are placed into a text file and results are written to a text file. The command line for running EPANET in this fashion is:
runepanet inpfile rptfile outfileHere inpfile is the name of the input file, rptfile is the name of the output report file, and outfile is the name of an optional binary output file that stores results in a special binary format. If the latter file is not needed then just the input and report file names should be supplied. As written, the above command assumes that you are working in the directory in which EPANET was installed or that this directory has been added to the system PATH variable. Otherwise full pathnames for the executable runepanet.exe and the files on the command line must be used. The error messages for command line EPANET are the same as those for Windows EPANET and are listed in Appendix Error Messages.
Input File Format¶
The input file for command line EPANET has the same format as the text file that Windows EPANET generates from its File >> Export >> Network command. It is organized in sections, where each section begins with a keyword enclosed in brackets. The various keywords are listed below in Table 3.
Network Components |
System Operation |
Water Quality |
Options | Network Map/Tags |
---|---|---|---|---|
[TITLE] [JUNCTIONS] [RESERVOIRS] [TANKS] [PIPES] [PUMPS] [VALVES] [EMITTERS] |
[CURVES] [PATTERNS] [ENERGY] [STATUS] [CONTROLS] [RULES] [DEMANDS] |
[QUALITY] [REACTIONS] [SOURCES] [MIXING] |
[OPTIONS] [TIMES] [REPORT] |
[COORDINATES] [VERTICES] [LABELS] [BACKDROP] [TAGS] |
The order of sections is not important. However, whenever a node or link is referred to in a section it must have already been defined in the [JUNCTIONS], [RESERVOIRS], [TANKS], [PIPES], [PUMPS], or [VALVES] sections. Therefore, it is recommended that these sections be placed first, right after the [TITLE] section. The network map and tags sections are not used by command line EPANET and can be eliminated from the file.
Each section can contain one or more lines of data. Blank lines can appear anywhere in the file and the semicolon (;) can be used to indicate that what follows on the line is a comment, not data. A maximum of 255 characters can appear on a line. The ID labels used to identify nodes, links, curves and patterns can be any combination of up to 31 characters and numbers.
Listing 1 displays the input file that represents the tutorial network discussed in Chapter Quick Start Tutorial.
[TITLE] EPANET TUTORIAL [JUNCTIONS] ;ID Elev Demand ;------------------ 2 0 0 3 710 650 4 700 150 5 695 200 6 700 150 [RESERVOIRS] ;ID Head ;--------- 1 700 [TANKS] ;ID Elev InitLvl MinLvl MaxLvl Diam Volume ;----------------------------------------------- 7 850 5 0 15 70 0 [PIPES] ;ID Node1 Node2 Length Diam Roughness ;----------------------------------------- 1 2 3 3000 12 100 2 3 6 5000 12 100 3 3 4 5000 8 100 4 4 5 5000 8 100 5 5 6 5000 8 100 6 6 7 7000 10 100 [PUMPS] ;ID Node1 Node2 Parameters ;--------------------------------- 7 1 2 HEAD 1 [PATTERNS] ;ID Multipliers ;----------------------- 1 0.5 1.3 1 1.2 [CURVES] ;ID X-Value Y-Value ;-------------------- 1 1000 200 [QUALITY] ;Node InitQual ;------------- 1 1 [REACTIONS] Global Bulk -1 Global Wall 0 [TIMES] Duration 24:00 Hydraulic Timestep 1:00 Quality Timestep 0:05 Pattern Timestep 6:00 [REPORT] Page 55 Energy Yes Nodes All Links All [OPTIONS] Units GPM Headloss H-W Pattern 1 Quality Chlorine mg/L Tolerance 0.01 [END]On the pages that follow the contents and formats of each keyword section are described in alphabetical order.
[BACKDROP]¶
Purpose:
Identifies a backdrop image and dimensions for the network map.
Format:
DIMENSIONS LLx LLy URx URy UNITS FEET/METERS/DEGREES/NONE FILE filename OFFSET X Y
Definitions:
DIMENSIONS provides the X and Y coordinates of the lower-left and upper-right corners of the map’s bounding rectangle. Defaults are the extents of the nodal coordinates supplied in the [COORDINATES] section.
UNITS specifies the units that the map’s dimensions are given in. Default is NONE.
FILE is the name of the file that contains the backdrop image.
OFFSET lists the X and Y distance that the upper-left corner of the backdrop image is offset from the upper-left corner of the map’s bounding rectangle. Default is zero offset.
Remarks:
- The [BACKDROP] section is optional and is not used at all when EPANET is run as a console application.
- Only Windows Enhanced Metafiles and bitmap files can be used as backdrops.
[CONTROLS]¶
Purpose:
Defines simple controls that modify links based on a single condition.
Format:
One line for each control which can be of the form:
LINK linkID status IF NODE nodeID ABOVE/BELOW value LINK linkID status AT TIME time LINK linkID status AT CLOCKTIME time AM/PM where:
linkID = a link ID labelstatus = OPEN or CLOSED, a pump speed setting, or a control valve settingnodeID = a node ID labelvalue = a pressure for a junction or a water level for a tanktime = a time since the start of the simulation in decimal hours or in hours:minutes formattime = a 12-hour clock time (hours:minutes)
Remarks:
- Simple controls are used to change link status or settings based on tank water level, junction pressure, time into the simulation or time of day.
- See the notes for the [STATUS] section for conventions used in specifying link status and setting, particularly for control valves.
Examples:
[CONTROLS]
;Close Link 12 if the level in Tank 23 exceeds 20 ft.
LINK 12 CLOSED IF NODE 23 ABOVE 20
;Open Link 12 if pressure at Node 130 is under 30 psi
LINK 12 OPEN IF NODE 130 BELOW 30
;Pump PUMP02's speed is set to 1.5 at 16 hours into
;the simulation
LINK PUMP02 1.5 AT TIME 16
;Link 12 is closed at 10 am and opened at 8 pm
;throughout the simulation
LINK 12 CLOSED AT CLOCKTIME 10 AM
LINK 12 OPEN AT CLOCKTIME 8 PM
[COORDINATES]¶
Purpose:
Assigns map coordinates to network nodes.
Format:
One line for each node containing:
- Node ID label
- X-coordinate
- Y-coordinate
Remarks:
- Include one line for each node displayed on the map.
- The coordinates represent the distance from the node to an arbitrary origin at the lower left of the map. Any convenient units of measure for this distance can be used.
- There is no requirement that all nodes be included in the map, and their locations need not be to actual scale.
- A [COORDINATES] section is optional and is not used at all when EPANET is run as a console application.
Example:
[COORDINATES]
;Node X-Coord. Y-Coord
;-------------------------------
1 10023 128
2 10056 95
[CURVES]¶
Purpose:
Defines data curves and their X,Y points.
Format:
One line for each X,Y point on each curve containing:
- Curve ID label
- X value
- Y value
Remarks:
- Curves can be used to represent the following relations:
- Head v. Flow for pumps
- Efficiency v. Flow for pumps
- Volume v. Depth for tanks
- Headloss v. Flow for General Purpose Valves
- The points of a curve must be entered in order of increasing X-values (lower to higher).
- If the input file will be used with the Windows version of EPANET, then adding a comment which contains the curve type and description, separated by a colon, directly above the first entry for a curve will ensure that these items appear correctly in EPANET’s Curve Editor. Curve types include PUMP, EFFICIENCY, VOLUME, and HEADLOSS. See the examples below.
Example:
[CURVES]
;ID Flow Head
;PUMP: Curve for Pump 1 C1 0 200
C1 1000 100
C1 3000 0
;ID Flow Effic.
;EFFICIENCY:
E1 200 50
E1 1000 85
E1 2000 75
E1 3000 65
[DEMANDS]¶
Purpose:
Supplement to [JUNCTIONS] section for defining multiple water demands at junction nodes.
Format:
One line for each category of demand at a junction containing:
- Junction ID label
- Base demand (flow units)
- Demand pattern ID (optional)
- Name of demand category preceded by a semicolon (optional)
Remarks:
- Only use for junctions whose demands need to be changed or supplemented from entries in [JUNCTIONS] section.
- Data in this section replaces any demand entered in [JUNCTIONS] section for the same junction.
- Unlimited number of demand categories can be entered per junction.
- If no demand pattern is supplied then the junction demand follows the Default Demand Pattern specified in the [OPTIONS] section or Pattern 1 if no default pattern is specified. If the default pattern (or Pattern 1) does not exist, then the demand remains constant.
Example:
[DEMANDS]
;ID Demand Pattern Category
;---------------------------------
J1 100 101 ;Domestic
J1 25 102 ;School
J256 50 101 ;Domestic
[EMITTERS]¶
Purpose:
Defines junctions modeled as emitters (sprinklers or orifices).
Format:
One line for each emitter containing:
- Junction ID label
- Flow coefficient, flow units at 1 psi (1 meter) pressure drop
Remarks:
- Emitters are used to model flow through sprinkler heads or pipe leaks.
- Flow out of the emitter equals the product of the flow coefficient and the junction pressure raised to a power.
- The power can be specified using the EMITTER EXPONENT option in the [OPTIONS] section. The default power is 0.5, which normally applies to sprinklers and nozzles.
- Actual demand reported in the program’s results includes both the normal demand at the junction plus flow through the emitter.
- An [EMITTERS] section is optional.
[ENERGY]¶
Purpose:
Defines parameters used to compute pumping energy and cost.
Format:
GLOBAL PRICE/PATTERN/EFFIC value PUMP PumpID PRICE/PATTERN/EFFIC value DEMAND CHARGE value
Remarks:
- Lines beginning with the keyword GLOBAL are used to set global default values of energy price, price pattern, and pumping efficiency for all pumps.
- Lines beginning with the keyword PUMP are used to override global defaults for specific pumps.
- Parameters are defined as follows:
- PRICE = average cost per kW-hour,
- PATTERN = ID label of time pattern describing how energy price varies with time,
- EFFIC = either a single percent efficiency for global setting or the ID label of an efficiency curve for a specific pump,
- DEMAND CHARGE = added cost per maximum kW usage during the simulation period.
- The default global pump efficiency is 75% and the default global energy price is 0.
- All entries in this section are optional. Items offset by slashes (/) indicate allowable choices.
Example:
[ENERGY]
GLOBAL PRICE 0.05 ;Sets global energy price
GLOBAL PATTERN PAT1 ;and time-of-day pattern
PUMP 23 PRICE 0.10 ;Overrides price for Pump 23
PUMP 23 EFFIC E23 ;Assigns effic. curve to Pump 23
[JUNCTIONS]¶
Purpose:
Defines junction nodes contained in the network.
Format:
One line for each junction containing:
- ID label
- Elevation, ft (m)
- Base demand flow (flow units) (optional)
- Demand pattern ID (optional)
Remarks:
- A [JUNCTIONS] section with at least one junction is required.
- If no demand pattern is supplied then the junction demand follows the Default Demand Pattern specified in the [OPTIONS] section or Pattern 1 if no default pattern is specified. If the default pattern (or Pattern 1) does not exist, then the demand remains constant.
- Demands can also be entered in the [DEMANDS] section and include multiple demand categories per junction.
Example:
[JUNCTIONS]
;ID Elev. Demand Pattern
;------------------------------
J1 100 50 Pat1
J2 120 10 ;Uses default demand pattern
J3 115 ;No demand at this junction
[LABELS]¶
Purpose:
Assigns coordinates to map labels.
Format:
One line for each label containing:
- X-coordinate
- Y-coordinate
- Text of label in double quotes
- ID label of an anchor node (optional)
Remarks:
- Include one line for each label on the map.
- The coordinates refer to the upper left corner of the label and are with respect to an arbitrary origin at the lower left of the map.
- The optional anchor node anchors the label to the node when the map is re-scaled during zoom-in operations.
- The [LABELS] section is optional and is not used at all when EPANET is run as a console application.
Example:
[LABELS]
;X-Coord. Y-Coord. Label Anchor
;-----------------------------------------------
1230 3459 “Pump 1”
34.57 12.75 “North Tank” T22
[MIXING]¶
Purpose:
Identifies the model that governs mixing within storage tanks.
Format:
One line per tank containing:
- Tank ID label
- Mixing model (MIXED, 2COMP, FIFO, or LIFO)
- Compartment volume (fraction)
Remarks:
- Mixing models include:
- Completely Mixed (MIXED)
- Two-Compartment Mixing (2COMP)
- Plug Flow (FIFO)
- Stacked Plug Flow (LIFO)
b. The compartment volume parameter only applies to the two-compartment model and represents the fraction of the total tank volume devoted to the inlet/outlet compartment.
c. The [MIXING] section is optional. Tanks not described in this section are assumed to be completely mixed.
Example:
[MIXING]
;Tank Model
;-----------------------
T12 LIFO
T23 2COMP 0.2
[OPTIONS]¶
Purpose:
Defines various simulation options.
Formats:
UNITS CFS/GPM/MGD/IMGD/AFD/ LPS/LPM/MLD/CMH/CMD HEADLOSS H-W/D-W/C-M HYDRAULICS USE/SAVE filename QUALITY NONE/CHEMICAL/AGE/TRACE id VISCOSITY value DIFFUSIVITY value SPECIFIC GRAVITY value TRIALS value ACCURACY value HEADERROR value FLOWCHANGE value UNBALANCED STOP/CONTINUE/CONTINUE n PATTERN id DEMAND MODEL DDA/PDA MINIMUM PRESSURE value REQUIRED PRESSURE value PRESSURE EXPONENT value DEMAND MULTIPLIER value EMITTER EXPONENT value TOLERANCE value MAP filename
Definitions:
UNITS sets the units in which flow rates are expressed where:
CFS = cubic feet per secondGPM = gallons per minuteMGD = million gallons per dayIMGD = Imperial MGDAFD = acre-feet per dayLPS = liters per secondLPM = liters per minuteMLD = million liters per dayCMH = cubic meters per hourCMD = cubic meters per dayFor CFS, GPM, MGD, IMGD, and AFD other input quantities are expressed in US Customary Units. If flow units are in liters or cubic meters then Metric Units must be used for all other input quantities as well. (See Appendix A. Units of Measurement). The default flow units are GPM.
HEADLOSS* selects a formula to use for computing head loss for flow through a pipe. The choices are the Hazen-Williams (**H-W), Darcy-Weisbach (D-W), or Chezy-Manning (C-M) formulas. The default is H-W.
HYDRAULICS option allows you to either SAVE the current hydraulics solution to a file or USE a previously saved hydraulics solution. This is useful when studying factors that only affect water quality behavior.
QUALITY selects the type of water quality analysis to perform. The choices are NONE, CHEMICAL, AGE, and TRACE. In place of CHEMICAL the actual name of the chemical can be used followed by its concentration units (e.g., CHLORINE mg/L). If TRACE is selected it must be followed by the ID label of the node being traced. The default selection is NONE (no water quality analysis).
VISCOSITY is the kinematic viscosity of the fluid being modeled relative to that of water at 20 deg. C (1.0 centistoke). The default value is 1.0.
DIFFUSIVITY is the molecular diffusivity of the chemical being analyzed relative to that of chlorine in water. The default value is 1.0. Diffusivity is only used when mass transfer limitations are considered in pipe wall reactions. A value of 0 will cause EPANET to ignore mass transfer limitations.
SPECIFIC GRAVITY is the ratio of the density of the fluid being modeled to that of water at 4 deg. C (unitless).
TRIALS are the maximum number of trials used to solve network hydraulics at each hydraulic time step of a simulation. The default is 200.
ACCURACY prescribes the convergence criterion that determines when a hydraulic solution has been reached. The trials end when the sum of all flow changes from the previous solution divided by the total flow in all links is less than this number. The default is 0.001.
HEADERROR augments ACCURACY option. Sets the maximum head loss error that any network link can have for hydraulic convergence to occur. A link’s head loss error is the difference between the head loss found as a function of computed flow in the link (such as by the Hazen-Williams equation for a pipe) and the difference in computed heads for the link’s end nodes. The units of this parameter are feet (US) or meters (SI). The default value of 0 indicates that no head error limit applies.
FLOWCHANGE augments the ACCURACY option. Sets the largest change in flow that any network element (link, emitter, or pressure driven demand) can have for hydraulic convergence to occur. It is specified in whatever flow units the project is using. The default value of 0 indicates that no flow change limit applies.
UNBALANCED determines what happens if a hydraulic solution cannot be reached within the prescribed number of TRIALS at some hydraulic time step into the simulation. “STOP” will halt the entire analysis at that point. “CONTINUE” will continue the analysis with a warning message issued. “CONTINUE n” will continue the search for a solution for another “n” trials with the status of all links held fixed at their current settings. The simulation will be continued at this point with a message issued about whether convergence was achieved or not. The default choice is “STOP”.
PATTERN provides the ID label of a default demand pattern to be applied to all junctions where no demand pattern was specified. If no such pattern exists in the [PATTERNS] section then by default the pattern consists of a single multiplier equal to 1.0. If this option is not used, then the global default demand pattern has a label of “1”.
DEMAND MULTIPLIER is used to adjust the values of baseline demands for all junctions and all demand categories. For example, a value of 2 doubles all baseline demands, while a value of 0.5 would halve them. The default value is 1.0.
DEMAND MODEL determines nodal demand model – Demand Driven Analysis (DDA) or Pressure Driven Analysis (PDA). DDA assumes a nodal demand at a given point in time is a fixed value \(D\). This sometimes results in hydraulic solutions with negative pressures (a physical impossibility). PDA assumes the demand delivered, \(d\), is a function of nodal pressure, \(p\), as follows:
\[d = D \left[ \frac{p - P_{min}}{P_{req} - P_{min}} \right]^{Pexp}\]where \(D\) is the full demand required, \(Pmin\) is the pressure below which demand is zero, \(Preq\) is the pressure required to deliver the full required demand and \(Pexp\) is an exponent. The units of the pressures are psi (US) or meters (SI). When \(p < Pmin\) demand is 0 and when \(p > Preq\) demand equals \(D\). The default value is DDA.
MINIMUM PRESSURE specifies the value for \(Pmin\). Default value is 0.0.
REQUIRED PRESSURE specifies the value for \(Preq\). Default value is 0.1.
PRESSURE EXPONENT specifies the value for \(Pexp\). Default value is 0.5.
EMITTER EXPONENT specifies the power to which the pressure at a junction is raised when computing the flow issuing from an emitter. The default is 0.5.
MAP is used to supply the name of a file containing coordinates of the network’s nodes so that a map of the network can be drawn. It is not used for any hydraulic or water quality computations.
TOLERANCE is the difference in water quality level below which one can say that one parcel of water is essentially the same as another. The default is 0.01 for all types of quality analyses (chemical, age (measured in hours), or source tracing (measured in percent)).
Remarks:
- All options assume their default values if not explicitly specified in this section.
- Items offset by slashes (/) indicate allowable choices.
Example:
[OPTIONS]
UNITS CFS
HEADLOSS D-W
QUALITY TRACE Tank23
UNBALANCED CONTINUE 10
[PATTERNS]¶
Purpose:
Defines time patterns.
Format:
One or more lines for each pattern containing:
- Pattern ID label
- One or more multipliers
Remarks:
Multipliers define how some base quantity (e.g., demand) is adjusted for each time period.
- All patterns share the same time period interval as defined in the [TIMES] section.
- Each pattern can have a different number of time periods.
- When the simulation time exceeds the pattern length the pattern wraps around to its first period.
- Use as many lines as it takes to include all multipliers for each pattern.
Example:
[PATTERNS]
;Pattern P1
P1 1.1 1.4 0.9 0.7
P1 0.6 0.5 0.8 1.0
;Pattern P2
P2 1 1 1 1
P2 0 0 1
[PIPES]¶
Purpose:
Defines all pipe links contained in the network.
Format:
One line for each pipe containing:
- ID label of pipe
- ID of start node
- ID of end node
- Length, ft (m)
- Diameter, inches (mm)
- Roughness coefficient
- Minor loss coefficient
- Status (OPEN, CLOSED, or CV)
Remarks:
- Roughness coefficient is unitless for the Hazen-Williams and Chezy-Manning head loss formulas and has units of millifeet (mm) for the Darcy-Weisbach formula. Choice of head loss formula is supplied in the [OPTIONS] section.
- Setting status to CV means that the pipe contains a check valve restricting flow to one direction.
- If minor loss coefficient is 0 and pipe is OPEN then these two items can be dropped form the input line.
Example:
[PIPES]
;ID Node1 Node2 Length Diam. Roughness Mloss Status
;-------------------------------------------------------------
P1 J1 J2 1200 12 120 0.2 OPEN
P2 J3 J2 600 6 110 0 CV
P3 J1 J10 1000 12 120
[PUMPS]¶
Purpose:
Defines all pump links contained in the network.
Format:
One line for each pump containing:
- ID label of pump
- ID of start node
- ID of end node
- Keyword and Value (can be repeated)
Remarks:
Keywords consists of:
POWER – power value for constant energy pump, hp (kW)HEAD - ID of curve that describes head versus flow for the pumpSPEED - relative speed setting (normal speed is 1.0, 0 means pump is off)PATTERN - ID of time pattern that describes how speed setting varies with timeEither POWER or HEAD must be supplied for each pump. The other keywords are optional.
Example:
[PUMPS]
;ID Node1 Node2 Properties
;---------------------------------------------
Pump1 N12 N32 HEAD Curve1
Pump2 N121 N55 HEAD Curve1 SPEED 1.2
Pump3 N22 N23 POWER 100
[QUALITY]¶
Purpose:
Defines initial water quality at nodes.
Format:
One line per node containing:
- Node ID label
- Initial quality
Remarks:
- Quality is assumed to be zero for nodes not listed.
- Quality represents concentration for chemicals, hours for water age, or percent for source tracing.
- The [QUALITY] section is optional.
[REACTIONS]¶
Purpose:
Defines parameters related to chemical reactions occurring in the network.
Format:
ORDER BULK/WALL/TANK value GLOBAL BULK/WALL value BULK/WALL/TANK pipeID value LIMITING POTENTIAL value ROUGHNESS CORRELATION value
Definitions:
ORDER is used to set the order of reactions occurring in the bulk fluid, at the pipe wall, or in tanks, respectively. Values for wall reactions must be either 0 or 1. If not supplied the default reaction order is 1.0.
GLOBAL is used to set a global value for all bulk reaction coefficients (pipes and tanks) or for all pipe wall coefficients. The default value is zero.
BULK, WALL, and TANK are used to override the global reaction coefficients for specific pipes and tanks.
LIMITING POTENTIAL specifies that reaction rates are proportional to the difference between the current concentration and some limiting potential value.
ROUGHNESS CORRELATION will make all default pipe wall reaction coefficients be related to pipe roughness in the following manner:
Head Loss Equation Roughness Correlation Hazen-Williams \(F / C\) Darcy-Weisbach \(F / log(e/D)\) Chezy-Manning \(F*n\) where \(F\) = roughness correlation, \(C\) = Hazen-Williams C-factor, \(e\) = Darcy-Weisbach roughness, \(D\) = pipe diameter, and \(n\) = Chezy-Manning roughness coefficient. The default value computed this way can be overridden for any pipe by using the WALL format to supply a specific value for the pipe.
Remarks:
- Remember to use positive numbers for growth reaction coefficients and negative numbers for decay coefficients.
- The time units for all reaction coefficients are 1/days.
- All entries in this section are optional. Items offset by slashes (/) indicate allowable choices.
Example:
[REACTIONS]
ORDER WALL 0 ;Wall reactions are zero-order
GLOBAL BULK -0.5 ;Global bulk decay coeff.
GLOBAL WALL -1.0 ;Global wall decay coeff.
WALL P220 -0.5 ;Pipe-specific wall coeffs.
WALL P244 -0.7
[REPORT]¶
Purpose:
Describes the contents of the output report produced from a simulation.
Format:
PAGESIZE value FILE filename STATUS YES/NO/FULL SUMMARY YES/NO ENERGY YES/NO NODES NONE/ALL//node1 node2 … LINKS NONE/ALL//link1 link2 … parameter YES/NO parameter BELOW/ABOVE/PRECISION value
Definitions:
PAGESIZE sets the number of lines written per page of the output report. The default is 0, meaning that no line limit per page is in effect.
FILE supplies the name of a file to which the output report will be written (ignored by the Windows version of EPANET).
STATUS determines whether a hydraulic status report should be generated. If YES is selected the report will identify all network components that change status during each time step of the simulation. If FULL is selected, then the status report will also include information from each trial of each hydraulic analysis. This level of detail is only useful for de-bugging networks that become hydraulically unbalanced. The default is NO.
SUMMARY determines whether a summary table of number of network components and key analysis options is generated. The default is YES.
ENERGY determines if a table reporting average energy usage and cost for each pump is provided. The default is NO.
NODES identifies which nodes will be reported on. You can either list individual node ID labels or use the keywords NONE or ALL. Additional NODES lines can be used to continue the list. The default is NONE.
LINKS identifies which links will be reported on. You can either list individual link ID labels or use the keywords NONE or ALL. Additional LINKS lines can be used to continue the list. The default is NONE.
The “parameter” reporting option is used to identify which quantities are reported on, how many decimal places are displayed, and what kind of filtering should be used to limit output reporting. Node parameters that can be reported on include:
- Elevation
- Demand
- Head
- Pressure
- Quality.
Link parameters include:
- Length
- Diameter
- Flow
- Velocity
- Headloss
- Position (same as status – open, active, closed)
- Setting (Roughness for pipes, speed for pumps, pressure/flow setting for valves)
- Reaction (reaction rate)
- F-Factor (friction factor).
The default quantities reported are Demand, Head, Pressure, and Quality for nodes and Flow, Velocity, and Headloss for links. The default precision is two decimal places.
Remarks:
- All options assume their default values if not explicitly specified in this section.
- Items offset by slashes (/) indicate allowable choices.
- The default is to not report on any nodes or links, so a NODES or LINKS option must be supplied if you wish to report results for these items.
- For the Windows version of EPANET, the only [REPORT] option recognized is STATUS. All others are ignored.
Example:
The following example reports on nodes N1, N2, N3, and N17 and all links with velocity above 3.0. The standard node parameters (Demand, Head, Pressure, and Quality) are reported on while only Flow, Velocity, and F-Factor (friction factor) are displayed for links.
[REPORT]
NODES N1 N2 N3 N17
LINKS ALL
FLOW YES
VELOCITY PRECISION 4
F-FACTOR PRECISION 4
VELOCITY ABOVE 3.0
[RESERVOIRS]¶
Purpose:
Defines all reservoir nodes contained in the network.
Format:
One line for each reservoir containing:
- ID label
- Head, ft (m)
- Head pattern ID (optional)
Remarks:
- Head is the hydraulic head (elevation + pressure head) of water in the reservoir.
- A head pattern can be used to make the reservoir head vary with time.
- At least one reservoir or tank must be contained in the network.
Example:
[RESERVOIRS]
;ID Head Pattern
;---------------------
R1 512 ;Head stays constant
R2 120 Pat1 ;Head varies with time
[RULES]¶
Purpose:
Defines rule-based controls that modify links based on a combination of conditions.
Format:
Each rule is a series of statements of the form:
RULE ruleID IF condition_1 AND condition_2 OR condition_3 AND condition_4 etc. THEN action_1 AND action_2 etc. ELSE action_3 AND action_4 etc. PRIORITY value
- where:
ruleID = an ID label assigned to the ruleconditon_n = a condition clauseaction_n = an action clausePriority = a priority value (e.g., a number from 1 to 5)
Condition Clause Format:
A condition clause in a Rule-Based Control takes the form of:
object id attribute relation value
- where:
object = a category of network objectid = the object’s ID labelattribute = an attribute or property of the objectrelation = a relational operatorvalue = an attribute valueSome example conditional clauses are:
JUNCTION 23 PRESSURE > 20 TANK T200 FILLTIME BELOW 3.5 LINK 44 STATUS IS OPEN SYSTEM DEMAND >= 1500 SYSTEM CLOCKTIME = 7:30 AM
The Object keyword can be any of the following:
NODE LINK SYSTEM JUNCTION PIPE RESERVOIR PUMP TANK VALVE
When SYSTEM is used in a condition no ID is supplied.
The following attributes can be used with Node-type objects:
- DEMAND
- HEAD
- PRESSURE
The following attributes can be used with Tanks:
- LEVEL
- FILLTIME (hours needed to fill a tank)
- DRAINTIME (hours needed to empty a tank)
These attributes can be used with Link-Type objects:
- FLOW
- STATUS (OPEN, CLOSED, or ACTIVE)
- SETTING (pump speed or valve setting)
The SYSTEM object can use the following attributes:
- DEMAND (total system demand)
- TIME (hours from the start of the simulation expressed either as a decimal number or in hours:minutes format)
- CLOCKTIME (24-hour clock time with AM or PM appended)
Relation operators consist of the following:
= IS <> NOT < BELOW > ABOVE <= >=
Action Clause Format:
An action clause in a Rule-Based Control takes the form of:
object id STATUS/SETTING IS value where:
object = LINK, PIPE, PUMP, or VALVE keywordid = the object’s ID labelvalue = a status condition (OPEN or CLOSED), pump speed setting, or valvesettingSome example action clauses are:
LINK 23 STATUS IS CLOSED PUMP P100 SETTING IS 1.5 VALVE 123 SETTING IS 90
Remarks:
Only the RULE, IF and THEN portions of a rule are required; the other portions are optional.
When mixing AND and OR clauses, the OR operator has higher precedence than AND, i.e.,
IF A or B and Cis equivalent to
IF (A or B) and C.If the interpretation was meant to be
IF A or (B and C)then this can be expressed using two rules as in
IF A THEN ... IF B and C THEN ...The PRIORITY value is used to determine which rule applies when two or more rules require that conflicting actions be taken on a link. A rule without a priority value always has a lower priority than one with a value. For two rules with the same priority value, the rule that appears first is given the higher priority.
Example:
[RULES]
RULE 1
IF TANK 1 LEVEL ABOVE 19.1
THEN PUMP 335 STATUS IS CLOSED
AND PIPE 330 STATUS IS OPEN
RULE 2
IF SYSTEM CLOCKTIME >= 8 AM
AND SYSTEM CLOCKTIME < 6 PM
AND TANK 1 LEVEL BELOW 12
THEN PUMP 335 STATUS IS OPEN
RULE 3
IF SYSTEM CLOCKTIME >= 6 PM
OR SYSTEM CLOCKTIME < 8 AM
AND TANK 1 LEVEL BELOW 14
THEN PUMP 335 STATUS IS OPEN
[SOURCES]¶
Purpose:
Defines locations of water quality sources.
Format:
One line for each water quality source containing:
- Node ID label
- Source type (CONCEN, MASS, FLOWPACED, or SETPOINT)
- Baseline source strength
- Time pattern ID (optional)
Remarks:
For MASS type sources, strength is measured in mass flow per minute. All other types measure source strength in concentration units.
Source strength can be made to vary over time by specifying a time pattern.
A CONCEN source:
- represents the concentration of any external source inflow to the node
- applies only when the node has a net negative demand (water enters the network at the node)
- if the node is a junction, reported concentration is the result of mixing the source flow and inflow from the rest of the network
- if the node is a reservoir, the reported concentration is the source concentration
- if the node is a tank, the reported concentration is the internal concentration of the tank
- is best used for nodes that represent source water supplies or treatment works (e.g., reservoirs or nodes assigned a negative demand)
- should not be used at storage tanks with simultaneous inflow/outflow.
A MASS, FLOWPACED, or SETPOINT source:
- represents a booster source, where the substance is injected directly into the network irregardless of what the demand at the node is
- affects water leaving the node to the rest of the network in the following way:
- A MASS booster adds a fixed mass flow to that resulting from inflow to the node
- A FLOWPACED booster adds a fixed concentration to the resultant inflow concentration at the node
- A SETPOINT booster fixes the concentration of any flow leaving the node (as long as the concentration resulting from the inflows is below the setpoint)
- the reported concentration at a junction or reservoir booster source is the concentration that results after the boosting is applied; the reported concentration for a tank with a booster source is the internal concentration of the tank
- is best used to model direct injection of a tracer or disinfectant into the network or to model a contaminant intrusion.
A [SOURCES] section is not needed for simulating water age or source tracing.
Example:
[SOURCES]
;Node Type Strength Pattern
;--------------------------------
N1 CONCEN 1.2 Pat1 ;Concentration varies with time
N44 MASS 12 ;Constant mass injection
[STATUS]¶
Purpose:
Defines initial status of selected links at the start of a simulation.
Format:
One line per link being controlled containing:
- Link ID label
- Status or setting
Remarks:
- Links not listed in this section have a default status of OPEN (for pipes and pumps) or ACTIVE (for valves).
- The status value can be OPEN or CLOSED. For control valves (e.g., PRVs, FCVs, etc.) this means that the valve is either fully opened or closed, not active at its control setting.
- The setting value can be a speed setting for pumps or valve setting for valves.
- The initial status of pipes can also be set in the [PIPES] section.
- Check valves cannot have their status be preset.
- Use [CONTROLS] or [RULES] to change status or setting at some future point in the simulation.
- If a CLOSED or OPEN control valve is to become ACTIVE again, then its pressure or flow setting must be specified in the control or rule that re-activates it.
Example:
[STATUS]
; Link Status/Setting
;----------------------
L22 CLOSED ;Link L22 is closed
P14 1.5 ;Speed for pump P14
PRV1 OPEN ;PRV1 forced open
;(overrides normal operation)
[TAGS]¶
Purpose:
Associates category labels (tags) with specific nodes and links.
Format:
One line for each node and link with a tag containing
- the keyword NODE or LINK
- the node or link ID label
- the text of the tag label (with no spaces)
Remarks:
- Tags can be useful for assigning nodes to different pressure zones or for classifying pipes by material or age.
- If a node or link’s tag is not identified in this section then it is assumed to be blank.
- The [TAGS] section is optional and has no effect on the hydraulic or water quality calculations.
Example:
[TAGS]
;Object ID Tag
;------------------------------
NODE 1001 Zone_A
NODE 1002 Zone_A
NODE 45 Zone_B
LINK 201 UNCI-1960
LINK 202 PVC-1985
[TANKS]¶
Purpose:
Defines all tank nodes contained in the network.
Format:
One line for each tank containing:
- ID label
- Bottom elevation, ft (m)
- Initial water level, ft (m)
- Minimum water level, ft (m)
- Maximum water level, ft (m)
- Nominal diameter, ft (m)
- Minimum volume, cubic ft (cubic meters)
- Volume curve ID (optional)
Remarks:
- Water surface elevation equals bottom elevation plus water level.
- Non-cylindrical tanks can be modeled by specifying a curve of volume versus water depth in the [CURVES] section.
- If a volume curve is supplied the diameter value can be any non-zero number
- Minimum volume (tank volume at minimum water level) can be zero for a cylindrical tank or if a volume curve is supplied.
- A network must contain at least one tank or reservoir.
Example:
[TANKS]
;ID Elev. InitLvl MinLvl MaxLvl Diam MinVol VolCurve
;-----------------------------------------------------------
;Cylindrical tank
T1 100 15 5 25 120 0
;Non-cylindrical tank with arbitrary diameter
T2 100 15 5 25 1 0 VC1
[TIMES]¶
Purpose:
Defines various time step parameters used in the simulation.
Format:
DURATION Value (units) HYDRAULIC TIMESTEP Value (units) QUALITY TIMESTEP Value (units) RULE TIMESTEP Value (units) PATTERN TIMESTEP Value (units) PATTERN START Value (units) REPORT TIMESTEP Value (units) REPORT START Value (units) START CLOCKTIME Value (AM/PM) STATISTIC NONE/AVERAGED/MINIMUM/MAXIMUM/RANGE
Definitions:
DURATION is the duration of the simulation. Use 0 to run a single period snapshot analysis. The default is 0.
HYDRAULIC TIMESTEP determines how often a new hydraulic state of the network is computed. If greater than either the PATTERN or REPORT time step it will be automatically reduced. The default is 1 hour.
QUALITY TIMESTEP is the time step used to track changes in water quality throughout the network. The default is 1/10 of the hydraulic time step.
RULE TIMESTEP is the time step used to check for changes in system status due to activation of rule-based controls between hydraulic time steps. The default is 1/10 of the hydraulic time step.
PATTERN TIMESTEP is the interval between time periods in all time patterns. The default is 1 hour.
PATTERN START is the time offset at which all patterns will start. For example, a value of 6 hours would start the simulation with each pattern in the time period that corresponds to hour 6. The default is 0.
REPORT TIMESTEP sets the time interval between which output results are reported. The default is 1 hour.
REPORT START is the length of time into the simulation at which output results begin to be reported. The default is 0.
START CLOCKTIME is the time of day (e.g., 3:00 PM) at which the simulation begins. The default is 12:00 AM midnight.
STATISTIC determines what kind of statistical post-processing should be done on the time series of simulation results generated. AVERAGED reports a set of time-averaged results, MINIMUM reports only the minimum values, MAXIMUM the maximum values, and RANGE reports the difference between the minimum and maximum values. NONE reports the full time series for all quantities for all nodes and links and is the default.
Remarks:
- Units can be SECONDS (SEC), MINUTES (MIN), HOURS, or DAYS. The default is hours.
- If units are not supplied, then time values can be entered as decimal hours or in hours:minutes notation.
- All entries in the [TIMES] section are optional. Items offset by slashes (/) indicate allowable choices.
Example:
[TIMES]
DURATION 240 HOURS
QUALITY TIMESTEP 3 MIN
REPORT START 120
STATISTIC AVERAGED
START CLOCKTIME 6:00 AM
[TITLE]¶
Purpose:
Attaches a descriptive title to the network being analyzed.
Format:
Any number of lines of text.
Remarks:
The [TITLE] section is optional.
[VALVES]¶
Purpose:
Defines all control valve links contained in the network.
Format:
One line for each valve containing:
- ID label of valve
- ID of start node
- ID of end node
- Diameter, inches (mm)
- Valve type
- Valve setting
- Minor loss coefficient
Remarks:
- Valve types and settings include:
Valve Type Setting PRV (pressure reducing valve) Pressure, psi (m) PSV (pressure sustaining valve) Pressure, psi (m) PBV (pressure breaker valve) Pressure, psi (m) FCV (flow control valve) Flow (flow units) TCV (throttle control valve) Loss Coefficient GPV (general purpose valve) ID of head loss curve
- Shutoff valves and check valves are considered to be part of a pipe, not a separate control valve component (see [PIPES]).
[VERTICES]¶
Purpose:
Assigns interior vertex points to network links.
Format:
One line for each point in each link containing such points that includes:
- Link ID label
- X-coordinate
- Y-coordinate
Remarks:
- Vertex points allow links to be drawn as polylines instead of simple straight-lines between their end nodes.
- The coordinates refer to the same coordinate system used for node and label coordinates.
- A [VERTICES] section is optional and is not used at all when EPANET is run as a console application.
Example:
[VERTICES]
;Link X-Coord. Y-Coord
;-------------------------------
1 10023 128
2 10056 95
Report File Format¶
Statements supplied to the [REPORT] section of the input file control the contents of the report file generated from a command-line run of EPANET. A portion of the report generated from the input file of Listing 1 is shown in Listing 2. In general a report can contain the following sections:
- Status Section
- Energy Section
- Nodes Section
- Links Section
****************************************************************** * E P A N E T * * Hydraulic and Water Quality * * Analysis for Pipe Networks * * Version 2.2 * ****************************************************************** EPANET TUTORIAL Input Data File ................... docs\tutorial.inp Number of Junctions................ 5 Number of Reservoirs............... 1 Number of Tanks ................... 1 Number of Pipes ................... 6 Number of Pumps ................... 1 Number of Valves .................. 0 Headloss Formula .................. Hazen-Williams Nodal Demand Model ................ DDA Hydraulic Timestep ................ 1.00 hrs Hydraulic Accuracy ................ 0.001000 Status Check Frequency ............ 2 Maximum Trials Checked ............ 10 Damping Limit Threshold ........... 0.000000 Maximum Trials .................... 200 Quality Analysis .................. Chlorine Water Quality Time Step ........... 5.00 min Water Quality Tolerance ........... 0.01 mg/L Specific Gravity .................. 1.00 Relative Kinematic Viscosity ...... 1.00 Relative Chemical Diffusivity ..... 1.00 Demand Multiplier ................. 1.00 Total Duration .................... 24.00 hrs Reporting Criteria: All Nodes All Links Energy Usage: ---------------------------------------------------------------- Usage Avg. Kw-hr Avg. Peak Cost Pump Factor Effic. /Mgal Kw Kw /day ---------------------------------------------------------------- 7 100.00 75.00 745.97 51.35 51.59 0.00 ---------------------------------------------------------------- Demand Charge: 0.00 Total Cost: 0.00 Node Results at 0:00:00 hrs: -------------------------------------------------------- Demand Head Pressure Chlorine Node gpm ft psi mg/L -------------------------------------------------------- 2 0.00 893.19 387.02 0.00 3 325.00 879.67 73.52 0.00 4 75.00 874.36 75.55 0.00 5 100.00 872.62 76.96 0.00 6 75.00 872.65 74.81 0.00 1 -1049.81 700.00 0.00 1.00 Reservoir 7 474.81 855.00 2.17 0.00 Tank Link Results at 0:00:00 hrs: ---------------------------------------------- Flow Velocity Headloss Link gpm fps /1000ft ---------------------------------------------- 1 1049.81 2.98 4.51 2 559.25 1.59 1.40 3 165.56 1.06 1.06 4 90.56 0.58 0.35 5 -9.44 0.06 0.01 6 474.81 1.94 2.52 7 1049.81 0.00 -193.19 Pump Node Results at 1:00:00 hrs: -------------------------------------------------------- Demand Head Pressure Chlorine Node gpm ft psi mg/L -------------------------------------------------------- 2 0.00 893.74 387.26 1.00 3 325.00 880.31 73.80 0.99 4 75.00 875.05 75.85 0.00 5 100.00 873.33 77.27 0.00 6 75.00 873.36 75.12 0.00 1 -1045.87 700.00 0.00 1.00 Reservoir 7 470.87 855.99 2.60 0.00 Tank
Status Section¶
The Status Section of the output report lists the initial status of all reservoirs, tanks, pumps, valves, and closed pipes as well as any changes in the status of these components as they occur over time in an extended period simulation. The status of reservoirs and tanks indicates whether they are filling or emptying. The status of links indicates whether they are open or closed and includes the relative speed setting for pumps and the pressure/flow setting for control valves. To include a Status Section in the report use the command STATUS YES in the [REPORT] section of the input file.
Using STATUS FULL will also produce a full listing of the convergence results for all iterations of each hydraulic analysis made during a simulation. This listing will also show which components are changing status during the iterations. This level of detail is only useful when one is trying to debug a run that fails to converge because a component’s status is cycling.
Energy Section¶
The Energy Section of the output report lists overall energy consumption and cost for each pump in the network. The items listed for each pump include:
- Percent Utilization (percent of the time that the pump is on-line)
- Average Efficiency
- Kilowatt-hours consumed per million gallons (or cubic meters) pumped
- Average Kilowatts consumed
- Peak Kilowatts used
- Average cost per day
Also listed is the total cost per day for pumping and the total demand charge (cost based on the peak energy usage) incurred. To include an Energy Section in the report the command ENERGY YES must appear in the [REPORT] section of the input file.
Nodes Section¶
The Nodes Section of the output report lists simulation results for those nodes and parameters identified in the [REPORT] section of the input file. Results are listed for each reporting time step of an extended period simulation. The reporting time step is specified in the [TIMES] section of the input file. Results at intermediate times when certain hydraulic events occur, such as pumps turning on or off or tanks closing because they become empty or full, are not reported.
To have nodal results reported the [REPORT] section of the input file must contain the keyword NODES followed by a listing of the ID labels of the nodes to be included in the report. There can be several such NODES lines in the file. To report results for all nodes use the command NODES ALL.
The default set of reported quantities for nodes includes Demand, Head, Pressure, and Water Quality. You can specify how many decimal places to use when listing results for a parameter by using commands such as PRESSURE PRECISION 3 in the input file (i.e., use 3 decimal places when reporting results for pressure). The default precision is 2 decimal places for all quantities. You can filter the report to list only the occurrences of values below or above a certain value by adding statements of the form PRESSURE BELOW 20 to the input file.
Links Section¶
The Links Section of the output report lists simulation results for those links and parameters identified in the [REPORT] section of the input file. The reporting times follow the same convention as was described for nodes in the previous section.
As with nodes, to have any results for links reported you must include the keyword LINKS followed by a list of link ID labels in the [REPORT] section of the input file. Use the command LINKS ALL to report results for all links.
The default parameters reported on for links includes Flow, Velocity, and Headloss. Diameter, Length, Water Quality, Status, Setting, Reaction Rate, and Friction Factor can be added to these by using commands such as DIAMETER YES or DIAMETER PRECISION 0. The same conventions used with node parameters for specifying reporting precision and filters also applies to links.
Binary Output File Format¶
If a third file name is supplied to the command line that runs EPANET then the results for all parameters for all nodes and links for all reporting time periods will be saved to this file in a special binary format. This file can be used for special post- processing purposes. Data written to the file are 4-byte integers, 4-byte floats, or fixed-size strings whose size is a multiple of 4 bytes. This allows the file to be divided conveniently into 4-byte records. The file consists of four sections listed in Table 4.
SECTION | SIZE in BYTES |
---|---|
Prolog | 852 + 20*Nnodes + 36*Nlinks + 8*Ntanks |
Energy Use | 28*Npumps + 4 |
Extended Period | (16*Nnodes + 32*Nlinks)*Nperiods |
Epilog | 28 |
where
Nnodes = number of nodes (junctions + reservoirs + tanks) Nlinks = number of links (pipes + pumps + valves) Ntanks = number of tanks and reservoirs
Npumps = number of pumps
Nperiods = number of reporting periods
and all of these counts are themselves written to the file’s Prolog or Epilog sections.
Prolog Section¶
The prolog section of the binary output file contains the following data listed in Table 5.
ITEM | TYPE | NUMBER of BYTES |
---|---|---|
Magic Number ( = 516114521) | Integer | 4 |
Version (= 200) | Integer | 4 |
Number of Nodes (Junctions + Reservoirs + Tanks) | Integer | 4 |
Number of Reservoirs & Tanks | Integer | 4 |
Number of Links (Pipes + Pumps + Valves) | Integer | 4 |
Number of Pumps | Integer | 4 |
Number of Valves | Integer | 4 |
Water Quality Option
|
Integer | 4 |
Index of Node for Source Tracing | Integer | 4 |
Flow Units Option
|
Integer | 4 |
Pressure Units Option
|
Integer | 4 |
Statistics Flag
|
Integer | 4 |
Reporting Start Time (seconds) | Integer | 4 |
Reporting Time Step (seconds) | Integer | 4 |
Simulation Duration (seconds) | Integer | 4 |
Problem Title (1st line) | Char | 80 |
Problem Title (2nd line) | Char | 80 |
Problem Title (3rd line) | Char | 80 |
Name of Input File | Char | 260 |
Name of Report File | Char | 260 |
Name of Chemical | Char | 16 |
Chemical Concentration Units | Char | 16 |
ID Label of Each Node | Char | 16 |
ID Label of Each Link | Char | 16 |
Index of Start Node of Each Link | Integer | 4*Nlinks |
Index of End Node of Each Link | Integer | 4*Nlinks |
Type Code of Each Link
|
Integer | 4*Nlinks |
Node Index of Each Tank | Integer | 4*Ntanks |
Cross-Sectional Area of Each Tank | Float | 4*Ntanks |
Elevation of Each Node | Float | 4*Nnodes |
Length of Each Link | Float | 4*Nlinks |
Diameter of Each Link | Float | 4*Nlinks |
There is a one-to-one correspondence between the order in which the ID labels for nodes and links are written to the file and the index numbers of these components. Also, reservoirs are distinguished from tanks by having their cross-sectional area set to zero.
Energy Use Section¶
The energy use section of the binary output file immediately follows the prolog section. It contains the data listed in Table 6.
ITEM | TYPE | NUMBER of BYTES |
---|---|---|
|
Float
Float
Float
Float
Float
Float
|
4
4
4
4
4
4
|
Overall Peak Energy Usage | Float | 4 |
The statistics reported in this section refer to the period of time between the start of the output reporting period and the end of the simulation.
Extended Period Section¶
The extended period section of the binary output file contains simulation results for each reporting period of an analysis (the reporting start time and time step are written to the output file’s prolog section and the number of steps is written to the epilog section). For each reporting period Table 7 lists the values that are written to the file.
ITEM | TYPE | SIZE in BYTES |
---|---|---|
Demand at Each Node | Float | 4*Nnodes |
Hydraulic Head at Each Node | Float | 4*Nnodes |
Pressure at Each Node | Float | 4*Nnodes |
Water Quality at Each Node | Float | 4*Nnodes |
Flow in Each Link (negative for reverse flow) | Float | 4*Nlinks |
Velocity in Each Link | Float | 4*Nlinks |
Headloss per 1000 Units of Length for Each Link (Negative of head gain for pumps and total head loss for valves) | Float | 4*Nlinks |
Average Water Quality in Each Link | Float | 4*Nlinks |
Status Code for Each Link
|
Float | 4*Nlinks |
Setting for Each Link:
|
Float | 4*Nlinks |
Reaction Rate for Each Link (mass/L/day) | Float | 4*Nlinks |
Friction Factor for Each Link Each Link | Float | 4*Nlinks |
Epilogue Section¶
The epilogue section of the binary output file contains the following data listed in Table 8.
ITEM | TYPE | NUMBER of BYTES |
---|---|---|
Average bulk reaction rate (mass/hr) | Float | 4 |
Average wall reaction rate (mass/hr) | Float | 4 |
Average tank reaction rate (mass/hr) | Float | 4 |
Average source inflow rate (mass/hr) | Float | 4 |
Number of Reporting Periods | Integer | 4 |
Warning Flag:
|
Integer | 4 |
Magic Number ( = 516114521) | Integer | 4 |
The mass units of the reaction rates both here and in the Extended Period output depend on the concentration units assigned to the chemical being modeled. The reaction rates listed in this section refer to the average of the rates seen in all pipes (or all tanks) over the entire reporting period of the simulation.