epanet-plus 0.0.1__cp312-cp312-macosx_10_13_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of epanet-plus might be problematic. Click here for more details.
- docs/conf.py +67 -0
- epanet-msx-src/dispersion.h +27 -0
- epanet-msx-src/hash.c +107 -0
- epanet-msx-src/hash.h +28 -0
- epanet-msx-src/include/epanetmsx.h +104 -0
- epanet-msx-src/include/epanetmsx_export.h +42 -0
- epanet-msx-src/mathexpr.c +937 -0
- epanet-msx-src/mathexpr.h +39 -0
- epanet-msx-src/mempool.c +204 -0
- epanet-msx-src/mempool.h +24 -0
- epanet-msx-src/msxchem.c +1285 -0
- epanet-msx-src/msxcompiler.c +368 -0
- epanet-msx-src/msxdict.h +42 -0
- epanet-msx-src/msxdispersion.c +586 -0
- epanet-msx-src/msxerr.c +116 -0
- epanet-msx-src/msxfile.c +260 -0
- epanet-msx-src/msxfuncs.c +175 -0
- epanet-msx-src/msxfuncs.h +35 -0
- epanet-msx-src/msxinp.c +1504 -0
- epanet-msx-src/msxout.c +398 -0
- epanet-msx-src/msxproj.c +791 -0
- epanet-msx-src/msxqual.c +2011 -0
- epanet-msx-src/msxrpt.c +400 -0
- epanet-msx-src/msxtank.c +422 -0
- epanet-msx-src/msxtoolkit.c +1164 -0
- epanet-msx-src/msxtypes.h +551 -0
- epanet-msx-src/msxutils.c +524 -0
- epanet-msx-src/msxutils.h +56 -0
- epanet-msx-src/newton.c +158 -0
- epanet-msx-src/newton.h +34 -0
- epanet-msx-src/rk5.c +287 -0
- epanet-msx-src/rk5.h +39 -0
- epanet-msx-src/ros2.c +293 -0
- epanet-msx-src/ros2.h +35 -0
- epanet-msx-src/smatrix.c +816 -0
- epanet-msx-src/smatrix.h +29 -0
- epanet-src/AUTHORS +60 -0
- epanet-src/LICENSE +21 -0
- epanet-src/enumstxt.h +151 -0
- epanet-src/epanet.c +5937 -0
- epanet-src/epanet2.c +961 -0
- epanet-src/epanet2.def +131 -0
- epanet-src/errors.dat +79 -0
- epanet-src/flowbalance.c +186 -0
- epanet-src/funcs.h +219 -0
- epanet-src/genmmd.c +1000 -0
- epanet-src/hash.c +177 -0
- epanet-src/hash.h +28 -0
- epanet-src/hydcoeffs.c +1303 -0
- epanet-src/hydraul.c +1164 -0
- epanet-src/hydsolver.c +781 -0
- epanet-src/hydstatus.c +442 -0
- epanet-src/include/epanet2.h +466 -0
- epanet-src/include/epanet2_2.h +1962 -0
- epanet-src/include/epanet2_enums.h +518 -0
- epanet-src/inpfile.c +884 -0
- epanet-src/input1.c +672 -0
- epanet-src/input2.c +970 -0
- epanet-src/input3.c +2265 -0
- epanet-src/leakage.c +527 -0
- epanet-src/mempool.c +146 -0
- epanet-src/mempool.h +24 -0
- epanet-src/output.c +853 -0
- epanet-src/project.c +1691 -0
- epanet-src/quality.c +695 -0
- epanet-src/qualreact.c +800 -0
- epanet-src/qualroute.c +696 -0
- epanet-src/report.c +1559 -0
- epanet-src/rules.c +1500 -0
- epanet-src/smatrix.c +871 -0
- epanet-src/text.h +508 -0
- epanet-src/types.h +928 -0
- epanet-src/util/cstr_helper.c +59 -0
- epanet-src/util/cstr_helper.h +38 -0
- epanet-src/util/errormanager.c +92 -0
- epanet-src/util/errormanager.h +39 -0
- epanet-src/util/filemanager.c +212 -0
- epanet-src/util/filemanager.h +81 -0
- epanet-src/validate.c +408 -0
- epanet.cpython-312-darwin.so +0 -0
- epanet_plus/VERSION +1 -0
- epanet_plus/__init__.py +8 -0
- epanet_plus/epanet_plus.c +118 -0
- epanet_plus/epanet_toolkit.py +2730 -0
- epanet_plus/epanet_wrapper.py +2414 -0
- epanet_plus/include/epanet_plus.h +9 -0
- epanet_plus-0.0.1.dist-info/METADATA +152 -0
- epanet_plus-0.0.1.dist-info/RECORD +105 -0
- epanet_plus-0.0.1.dist-info/WHEEL +6 -0
- epanet_plus-0.0.1.dist-info/licenses/LICENSE +21 -0
- epanet_plus-0.0.1.dist-info/top_level.txt +11 -0
- examples/basic_usage.py +35 -0
- python-extension/ext.c +344 -0
- python-extension/pyepanet.c +2133 -0
- python-extension/pyepanet.h +143 -0
- python-extension/pyepanet2.c +1823 -0
- python-extension/pyepanet2.h +141 -0
- python-extension/pyepanet_plus.c +37 -0
- python-extension/pyepanet_plus.h +4 -0
- python-extension/pyepanetmsx.c +388 -0
- python-extension/pyepanetmsx.h +35 -0
- tests/test_epanet.py +16 -0
- tests/test_epanetmsx.py +36 -0
- tests/test_epyt.py +114 -0
- tests/test_load_inp_from_buffer.py +18 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
/** @file epanet2_enums.h
|
|
2
|
+
*/
|
|
3
|
+
/*
|
|
4
|
+
******************************************************************************
|
|
5
|
+
Project: OWA EPANET
|
|
6
|
+
Version: 2.3
|
|
7
|
+
Module: epanet2_enums.h
|
|
8
|
+
Description: enumerations of symbolic constants used by the API functions
|
|
9
|
+
Authors: see AUTHORS
|
|
10
|
+
Copyright: see AUTHORS
|
|
11
|
+
License: see LICENSE
|
|
12
|
+
Last Updated: 04/23/2025
|
|
13
|
+
******************************************************************************
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#ifndef EPANET2_ENUMS_H
|
|
18
|
+
#define EPANET2_ENUMS_H
|
|
19
|
+
|
|
20
|
+
// --- Define the EPANET toolkit constants
|
|
21
|
+
/// Character array size limits
|
|
22
|
+
/*! \enum EN_SizeLimits
|
|
23
|
+
* Limits on the size of character arrays used to store ID names
|
|
24
|
+
* and text messages.
|
|
25
|
+
*/
|
|
26
|
+
typedef enum {
|
|
27
|
+
EN_MAXID = 31, //!< Max. # characters in ID name
|
|
28
|
+
EN_MAXMSG = 255 //!< Max. # characters in message text
|
|
29
|
+
} EN_SizeLimits;
|
|
30
|
+
|
|
31
|
+
/// Node properties
|
|
32
|
+
/*! \enum EN_NodeProperty
|
|
33
|
+
* These node properties are used with @ref EN_getnodevalue and @ref EN_setnodevalue.
|
|
34
|
+
* Those marked as read only are computed values that can only be retrieved.
|
|
35
|
+
*/
|
|
36
|
+
typedef enum {
|
|
37
|
+
EN_ELEVATION = 0, //!< Elevation
|
|
38
|
+
EN_BASEDEMAND = 1, //!< Primary demand baseline value
|
|
39
|
+
EN_PATTERN = 2, //!< Primary demand time pattern index
|
|
40
|
+
EN_EMITTER = 3, //!< Emitter flow coefficient
|
|
41
|
+
EN_INITQUAL = 4, //!< Initial quality
|
|
42
|
+
EN_SOURCEQUAL = 5, //!< Quality source strength
|
|
43
|
+
EN_SOURCEPAT = 6, //!< Quality source pattern index
|
|
44
|
+
EN_SOURCETYPE = 7, //!< Quality source type (see @ref EN_SourceType)
|
|
45
|
+
EN_TANKLEVEL = 8, //!< Current computed tank water level (read only)
|
|
46
|
+
EN_DEMAND = 9, //!< Current computed demand (read only)
|
|
47
|
+
EN_HEAD = 10, //!< Current computed hydraulic head (read only)
|
|
48
|
+
EN_PRESSURE = 11, //!< Current computed pressure (read only)
|
|
49
|
+
EN_QUALITY = 12, //!< Current computed quality (read only)
|
|
50
|
+
EN_SOURCEMASS = 13, //!< Current computed quality source mass inflow (read only)
|
|
51
|
+
EN_INITVOLUME = 14, //!< Tank initial volume (read only)
|
|
52
|
+
EN_MIXMODEL = 15, //!< Tank mixing model (see @ref EN_MixingModel)
|
|
53
|
+
EN_MIXZONEVOL = 16, //!< Tank mixing zone volume (read only)
|
|
54
|
+
EN_TANKDIAM = 17, //!< Tank diameter
|
|
55
|
+
EN_MINVOLUME = 18, //!< Tank minimum volume
|
|
56
|
+
EN_VOLCURVE = 19, //!< Tank volume curve index
|
|
57
|
+
EN_MINLEVEL = 20, //!< Tank minimum level
|
|
58
|
+
EN_MAXLEVEL = 21, //!< Tank maximum level
|
|
59
|
+
EN_MIXFRACTION = 22, //!< Tank mixing fraction
|
|
60
|
+
EN_TANK_KBULK = 23, //!< Tank bulk decay coefficient
|
|
61
|
+
EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
|
|
62
|
+
EN_MAXVOLUME = 25, //!< Tank maximum volume (read only)
|
|
63
|
+
EN_CANOVERFLOW = 26, //!< `EN_TRUE` (= 1) if the Tank can overflow, `EN_FALSE` (= 0) if it cannot
|
|
64
|
+
EN_DEMANDDEFICIT = 27,//!< Amount that full demand is reduced under PDA (read only)
|
|
65
|
+
EN_NODE_INCONTROL = 28, //!< `EN_TRUE` (= 1) if the node appears in any control, `EN_FALSE` (= 0) if not
|
|
66
|
+
EN_EMITTERFLOW = 29, //!< Current emitter flow (read only)
|
|
67
|
+
EN_LEAKAGEFLOW = 30, //!< Current leakage flow (read only)
|
|
68
|
+
EN_DEMANDFLOW = 31, //!< Current consumer demand delivered (read only)
|
|
69
|
+
EN_FULLDEMAND = 32 //!< Current consumer demand requested (read only)
|
|
70
|
+
} EN_NodeProperty;
|
|
71
|
+
|
|
72
|
+
/// Link properties
|
|
73
|
+
/**
|
|
74
|
+
These link properties are used with @ref EN_getlinkvalue and @ref EN_setlinkvalue.
|
|
75
|
+
Those marked as read only are computed values that can only be retrieved.
|
|
76
|
+
*/
|
|
77
|
+
typedef enum {
|
|
78
|
+
EN_DIAMETER = 0, //!< Pipe/valve diameter
|
|
79
|
+
EN_LENGTH = 1, //!< Pipe length
|
|
80
|
+
EN_ROUGHNESS = 2, //!< Pipe roughness coefficient
|
|
81
|
+
EN_MINORLOSS = 3, //!< Pipe/valve minor loss coefficient
|
|
82
|
+
EN_INITSTATUS = 4, //!< Initial status (see @ref EN_LinkStatusType)
|
|
83
|
+
EN_INITSETTING = 5, //!< Initial pump speed or valve setting
|
|
84
|
+
EN_KBULK = 6, //!< Bulk flow chemical reaction coefficient
|
|
85
|
+
EN_KWALL = 7, //!< Pipe wall chemical reaction coefficient
|
|
86
|
+
EN_FLOW = 8, //!< Current computed flow rate (read only)
|
|
87
|
+
EN_VELOCITY = 9, //!< Current computed flow velocity (read only)
|
|
88
|
+
EN_HEADLOSS = 10, //!< Current computed head loss (read only)
|
|
89
|
+
EN_STATUS = 11, //!< Current link status (see @ref EN_LinkStatusType)
|
|
90
|
+
EN_SETTING = 12, //!< Current link setting
|
|
91
|
+
EN_ENERGY = 13, //!< Current computed pump energy usage (read only)
|
|
92
|
+
EN_LINKQUAL = 14, //!< Current computed link quality (read only)
|
|
93
|
+
EN_LINKPATTERN = 15, //!< Pump speed time pattern index
|
|
94
|
+
EN_PUMP_STATE = 16, //!< Current computed pump state (read only) (see @ref EN_PumpStateType)
|
|
95
|
+
EN_PUMP_EFFIC = 17, //!< Current computed pump efficiency (read only)
|
|
96
|
+
EN_PUMP_POWER = 18, //!< Pump constant power rating
|
|
97
|
+
EN_PUMP_HCURVE = 19, //!< Pump head v. flow curve index
|
|
98
|
+
EN_PUMP_ECURVE = 20, //!< Pump efficiency v. flow curve index
|
|
99
|
+
EN_PUMP_ECOST = 21, //!< Pump average energy price
|
|
100
|
+
EN_PUMP_EPAT = 22, //!< Pump energy price time pattern index
|
|
101
|
+
EN_LINK_INCONTROL = 23, //!< Is present in any simple or rule-based control (= 1) or not (= 0)
|
|
102
|
+
EN_GPV_CURVE = 24, //!< GPV head loss v. flow curve index
|
|
103
|
+
EN_PCV_CURVE = 25, //!< PCV characteristic curve index
|
|
104
|
+
EN_LEAK_AREA = 26, //!< Pipe leak area (sq mm per 100 length units)
|
|
105
|
+
EN_LEAK_EXPAN = 27, //!< Leak expansion rate (sq mm per unit of pressure head)
|
|
106
|
+
EN_LINK_LEAKAGE = 28, //!< Current leakage rate (read only)
|
|
107
|
+
EN_VALVE_TYPE = 29 //!< Type of valve (see @ref EN_LinkType)
|
|
108
|
+
} EN_LinkProperty;
|
|
109
|
+
|
|
110
|
+
/// Time parameters
|
|
111
|
+
/**
|
|
112
|
+
These time-related options are used with @ref EN_gettimeparam and@ref EN_settimeparam.
|
|
113
|
+
All times are expressed in seconds The parameters marked as read only are
|
|
114
|
+
computed values that can only be retrieved.
|
|
115
|
+
*/
|
|
116
|
+
typedef enum {
|
|
117
|
+
EN_DURATION = 0, //!< Total simulation duration
|
|
118
|
+
EN_HYDSTEP = 1, //!< Hydraulic time step
|
|
119
|
+
EN_QUALSTEP = 2, //!< Water quality time step
|
|
120
|
+
EN_PATTERNSTEP = 3, //!< Time pattern period
|
|
121
|
+
EN_PATTERNSTART = 4, //!< Time when time patterns begin
|
|
122
|
+
EN_REPORTSTEP = 5, //!< Reporting time step
|
|
123
|
+
EN_REPORTSTART = 6, //!< Time when reporting starts
|
|
124
|
+
EN_RULESTEP = 7, //!< Rule-based control evaluation time step
|
|
125
|
+
EN_STATISTIC = 8, //!< Reporting statistic code (see @ref EN_StatisticType)
|
|
126
|
+
EN_PERIODS = 9, //!< Number of reporting time periods (read only)
|
|
127
|
+
EN_STARTTIME = 10, //!< Simulation starting time of day
|
|
128
|
+
EN_HTIME = 11, //!< Elapsed time of current hydraulic solution (read only)
|
|
129
|
+
EN_QTIME = 12, //!< Elapsed time of current quality solution (read only)
|
|
130
|
+
EN_HALTFLAG = 13, //!< Flag indicating if the simulation was halted (read only)
|
|
131
|
+
EN_NEXTEVENT = 14, //!< Shortest time until a tank becomes empty or full (read only)
|
|
132
|
+
EN_NEXTEVENTTANK = 15 //!< Index of tank with shortest time to become empty or full (read only)
|
|
133
|
+
} EN_TimeParameter;
|
|
134
|
+
|
|
135
|
+
/// Time step events
|
|
136
|
+
/**
|
|
137
|
+
These are the types of events that can cause a new time step to be taken.
|
|
138
|
+
**/
|
|
139
|
+
typedef enum {
|
|
140
|
+
EN_STEP_REPORT = 0, //!< A reporting time step has ended
|
|
141
|
+
EN_STEP_HYD = 1, //!< A hydraulic time step has ended
|
|
142
|
+
EN_STEP_WQ = 2, //!< A water quality time step has ended
|
|
143
|
+
EN_STEP_TANKEVENT = 3, //!< A tank has become empty or full
|
|
144
|
+
EN_STEP_CONTROLEVENT = 4 //!< A link control needs to be activated
|
|
145
|
+
} EN_TimestepEvent;
|
|
146
|
+
|
|
147
|
+
/// Analysis convergence statistics
|
|
148
|
+
/**
|
|
149
|
+
These statistics report the convergence criteria for the most current hydraulic analysis
|
|
150
|
+
and the cumulative water quality mass balance error at the current simulation time. They
|
|
151
|
+
can be retrieved with @ref EN_getstatistic.
|
|
152
|
+
*/
|
|
153
|
+
typedef enum {
|
|
154
|
+
EN_ITERATIONS = 0, //!< Number of hydraulic iterations taken
|
|
155
|
+
EN_RELATIVEERROR = 1, //!< Sum of link flow changes / sum of link flows
|
|
156
|
+
EN_MAXHEADERROR = 2, //!< Largest head loss error for links
|
|
157
|
+
EN_MAXFLOWCHANGE = 3, //!< Largest flow change in links
|
|
158
|
+
EN_MASSBALANCE = 4, //!< Cumulative water quality mass balance ratio
|
|
159
|
+
EN_DEFICIENTNODES = 5, //!< Number of pressure deficient nodes
|
|
160
|
+
EN_DEMANDREDUCTION = 6, //!< % demand reduction at pressure deficient nodes
|
|
161
|
+
EN_LEAKAGELOSS = 7 //!< % flow lost to system leakage
|
|
162
|
+
} EN_AnalysisStatistic;
|
|
163
|
+
|
|
164
|
+
/// Types of network objects
|
|
165
|
+
/**
|
|
166
|
+
The types of objects that comprise a network model.
|
|
167
|
+
*/
|
|
168
|
+
typedef enum {
|
|
169
|
+
EN_NODE = 0, //!< Nodes
|
|
170
|
+
EN_LINK = 1, //!< Links
|
|
171
|
+
EN_TIMEPAT = 2, //!< Time patterns
|
|
172
|
+
EN_CURVE = 3, //!< Data curves
|
|
173
|
+
EN_CONTROL = 4, //!< Simple controls
|
|
174
|
+
EN_RULE = 5 //!< Control rules
|
|
175
|
+
} EN_ObjectType;
|
|
176
|
+
|
|
177
|
+
/// Types of objects to count
|
|
178
|
+
/**
|
|
179
|
+
These options tell @ref EN_getcount which type of object to count.
|
|
180
|
+
*/
|
|
181
|
+
typedef enum {
|
|
182
|
+
EN_NODECOUNT = 0, //!< Number of nodes (junctions + tanks + reservoirs)
|
|
183
|
+
EN_TANKCOUNT = 1, //!< Number of tanks and reservoirs
|
|
184
|
+
EN_LINKCOUNT = 2, //!< Number of links (pipes + pumps + valves)
|
|
185
|
+
EN_PATCOUNT = 3, //!< Number of time patterns
|
|
186
|
+
EN_CURVECOUNT = 4, //!< Number of data curves
|
|
187
|
+
EN_CONTROLCOUNT = 5, //!< Number of simple controls
|
|
188
|
+
EN_RULECOUNT = 6 //!< Number of rule-based controls
|
|
189
|
+
} EN_CountType;
|
|
190
|
+
|
|
191
|
+
/// Node Types
|
|
192
|
+
/**
|
|
193
|
+
These are the different types of nodes that can be returned by calling @ref EN_getnodetype.
|
|
194
|
+
*/
|
|
195
|
+
typedef enum {
|
|
196
|
+
EN_JUNCTION = 0, //!< Junction node
|
|
197
|
+
EN_RESERVOIR = 1, //!< Reservoir node
|
|
198
|
+
EN_TANK = 2 //!< Storage tank node
|
|
199
|
+
} EN_NodeType;
|
|
200
|
+
|
|
201
|
+
/// Link types
|
|
202
|
+
/**
|
|
203
|
+
These are the different types of links that can be returned by calling @ref EN_getlinktype.
|
|
204
|
+
*/
|
|
205
|
+
typedef enum {
|
|
206
|
+
EN_CVPIPE = 0, //!< Pipe with check valve
|
|
207
|
+
EN_PIPE = 1, //!< Pipe
|
|
208
|
+
EN_PUMP = 2, //!< Pump
|
|
209
|
+
EN_PRV = 3, //!< Pressure reducing valve
|
|
210
|
+
EN_PSV = 4, //!< Pressure sustaining valve
|
|
211
|
+
EN_PBV = 5, //!< Pressure breaker valve
|
|
212
|
+
EN_FCV = 6, //!< Flow control valve
|
|
213
|
+
EN_TCV = 7, //!< Throttle control valve
|
|
214
|
+
EN_GPV = 8, //!< General purpose valve
|
|
215
|
+
EN_PCV = 9 //!< Positional control valve
|
|
216
|
+
} EN_LinkType;
|
|
217
|
+
|
|
218
|
+
/// Link status
|
|
219
|
+
/**
|
|
220
|
+
One of these values is returned when @ref EN_getlinkvalue is used to retrieve a link's
|
|
221
|
+
initial status (`EN_INITSTATUS`) or its current status (`EN_STATUS`). These options are
|
|
222
|
+
also used with @ref EN_setlinkvalue to set values for these same properties.
|
|
223
|
+
*/
|
|
224
|
+
typedef enum {
|
|
225
|
+
EN_CLOSED = 0, //!< Link is closed and cannot convey any flow
|
|
226
|
+
EN_OPEN = 1 //!< Link is open and is able to convey flow
|
|
227
|
+
} EN_LinkStatusType;
|
|
228
|
+
|
|
229
|
+
/// Pump states
|
|
230
|
+
/**
|
|
231
|
+
One of these codes is returned when @ref EN_getlinkvalue is used to retrieve a pump's
|
|
232
|
+
current operating state (`EN_PUMP_STATE`). `EN_PUMP_XHEAD` indicates that the pump has been
|
|
233
|
+
shut down because it is being asked to deliver more than its shutoff head. `EN_PUMP_XFLOW`
|
|
234
|
+
indicates that the pump is being asked to deliver more than its maximum flow.
|
|
235
|
+
*/
|
|
236
|
+
typedef enum {
|
|
237
|
+
EN_PUMP_XHEAD = 0, //!< Pump closed - cannot supply head
|
|
238
|
+
EN_PUMP_CLOSED = 2, //!< Pump closed
|
|
239
|
+
EN_PUMP_OPEN = 3, //!< Pump open
|
|
240
|
+
EN_PUMP_XFLOW = 5 //!< Pump open - cannot supply flow
|
|
241
|
+
} EN_PumpStateType;
|
|
242
|
+
|
|
243
|
+
/// Types of water quality analyses
|
|
244
|
+
/**
|
|
245
|
+
These are the different types of water quality analyses that EPANET can run. They
|
|
246
|
+
are used with @ref EN_getqualinfo, @ref EN_getqualtype, and @ref EN_setqualtype.
|
|
247
|
+
*/
|
|
248
|
+
typedef enum {
|
|
249
|
+
EN_NONE = 0, //!< No quality analysis
|
|
250
|
+
EN_CHEM = 1, //!< Chemical fate and transport
|
|
251
|
+
EN_AGE = 2, //!< Water age analysis
|
|
252
|
+
EN_TRACE = 3 //!< Source tracing analysis
|
|
253
|
+
} EN_QualityType;
|
|
254
|
+
|
|
255
|
+
/// Water quality source types
|
|
256
|
+
/**
|
|
257
|
+
These are the different types of external water quality sources that can be assigned
|
|
258
|
+
to a node's `EN_SOURCETYPE` property as used by @ref EN_getnodevalue and @ref EN_setnodevalue.
|
|
259
|
+
*/
|
|
260
|
+
typedef enum {
|
|
261
|
+
EN_CONCEN = 0, //!< Sets the concentration of external inflow entering a node
|
|
262
|
+
EN_MASS = 1, //!< Injects a given mass/minute into a node
|
|
263
|
+
EN_SETPOINT = 2, //!< Sets the concentration leaving a node to a given value
|
|
264
|
+
EN_FLOWPACED = 3 //!< Adds a given value to the concentration leaving a node
|
|
265
|
+
} EN_SourceType;
|
|
266
|
+
|
|
267
|
+
/// Head loss formulas
|
|
268
|
+
/**
|
|
269
|
+
The available choices for the `EN_HEADLOSSFORM` option in @ref EN_getoption and
|
|
270
|
+
@ref EN_setoption. They are also used for the head loss type argument in @ref EN_init.
|
|
271
|
+
Each head loss formula uses a different type of roughness coefficient (`EN_ROUGHNESS`)
|
|
272
|
+
that can be set with @ref EN_setlinkvalue.
|
|
273
|
+
*/
|
|
274
|
+
typedef enum {
|
|
275
|
+
EN_HW = 0, //!< Hazen-Williams
|
|
276
|
+
EN_DW = 1, //!< Darcy-Weisbach
|
|
277
|
+
EN_CM = 2 //!< Chezy-Manning
|
|
278
|
+
} EN_HeadLossType;
|
|
279
|
+
|
|
280
|
+
/// Flow units
|
|
281
|
+
/**
|
|
282
|
+
These choices for flow units are used with @ref EN_getflowunits and @ref EN_setflowunits.
|
|
283
|
+
They are also used for the flow units type argument in @ref EN_init. If flow units are
|
|
284
|
+
expressed in US Customary units (`EN_CFS` through `EN_AFD`) then all other quantities are
|
|
285
|
+
in US Customary units. Otherwise they are in metric units.
|
|
286
|
+
*/
|
|
287
|
+
typedef enum {
|
|
288
|
+
EN_CFS = 0, //!< Cubic feet per second
|
|
289
|
+
EN_GPM = 1, //!< Gallons per minute
|
|
290
|
+
EN_MGD = 2, //!< Million gallons per day
|
|
291
|
+
EN_IMGD = 3, //!< Imperial million gallons per day
|
|
292
|
+
EN_AFD = 4, //!< Acre-feet per day
|
|
293
|
+
EN_LPS = 5, //!< Liters per second
|
|
294
|
+
EN_LPM = 6, //!< Liters per minute
|
|
295
|
+
EN_MLD = 7, //!< Million liters per day
|
|
296
|
+
EN_CMH = 8, //!< Cubic meters per hour
|
|
297
|
+
EN_CMD = 9, //!< Cubic meters per day
|
|
298
|
+
EN_CMS = 10 //!< Cubic meters per second
|
|
299
|
+
} EN_FlowUnits;
|
|
300
|
+
|
|
301
|
+
/// Pressure units
|
|
302
|
+
/**
|
|
303
|
+
The available choices for pressure units for the `EN_PRESS_UNITS` option in @ref EN_getoption
|
|
304
|
+
and @ref EN_setoption.
|
|
305
|
+
*/
|
|
306
|
+
typedef enum {
|
|
307
|
+
EN_PSI = 0, //!< Pounds per square inch
|
|
308
|
+
EN_KPA = 1, //!< Kilopascals
|
|
309
|
+
EN_METERS = 2, //!< Meters
|
|
310
|
+
EN_BAR = 3, //!< Bar
|
|
311
|
+
EN_FEET = 4 //!< Feet
|
|
312
|
+
} EN_PressUnits;
|
|
313
|
+
|
|
314
|
+
/// Demand models
|
|
315
|
+
/**
|
|
316
|
+
These choices for modeling consumer demands are used with @ref EN_getdemandmodel
|
|
317
|
+
and @ref EN_setdemandmodel.
|
|
318
|
+
|
|
319
|
+
A demand driven analysis requires that a junction's full demand be supplied
|
|
320
|
+
in each time period independent of how much pressure is available. A pressure
|
|
321
|
+
driven analysis makes demand be a power function of pressure, up to the point
|
|
322
|
+
where the full demand is met.
|
|
323
|
+
*/
|
|
324
|
+
typedef enum {
|
|
325
|
+
EN_DDA = 0, //!< Demand driven analysis
|
|
326
|
+
EN_PDA = 1 //!< Pressure driven analysis
|
|
327
|
+
} EN_DemandModel;
|
|
328
|
+
|
|
329
|
+
/// Simulation options
|
|
330
|
+
/**
|
|
331
|
+
These constants identify the hydraulic and water quality simulation options
|
|
332
|
+
that are applied on a network-wide basis. They are accessed using the
|
|
333
|
+
@ref EN_getoption and @ref EN_setoption functions.
|
|
334
|
+
*/
|
|
335
|
+
typedef enum {
|
|
336
|
+
EN_TRIALS = 0, //!< Maximum trials allowed for hydraulic convergence
|
|
337
|
+
EN_ACCURACY = 1, //!< Total normalized flow change for hydraulic convergence
|
|
338
|
+
EN_TOLERANCE = 2, //!< Water quality tolerance
|
|
339
|
+
EN_EMITEXPON = 3, //!< Exponent in emitter discharge formula
|
|
340
|
+
EN_DEMANDMULT = 4, //!< Global demand multiplier
|
|
341
|
+
EN_HEADERROR = 5, //!< Maximum head loss error for hydraulic convergence
|
|
342
|
+
EN_FLOWCHANGE = 6, //!< Maximum flow change for hydraulic convergence
|
|
343
|
+
EN_HEADLOSSFORM = 7, //!< Head loss formula (see @ref EN_HeadLossType)
|
|
344
|
+
EN_GLOBALEFFIC = 8, //!< Global pump efficiency (percent)
|
|
345
|
+
EN_GLOBALPRICE = 9, //!< Global energy price per KWH
|
|
346
|
+
EN_GLOBALPATTERN = 10, //!< Index of a global energy price pattern
|
|
347
|
+
EN_DEMANDCHARGE = 11, //!< Energy charge per max. KW usage
|
|
348
|
+
EN_SP_GRAVITY = 12, //!< Specific gravity
|
|
349
|
+
EN_SP_VISCOS = 13, //!< Specific viscosity (relative to water at 20 deg C)
|
|
350
|
+
EN_UNBALANCED = 14, //!< Extra trials allowed if hydraulics don't converge
|
|
351
|
+
EN_CHECKFREQ = 15, //!< Frequency of hydraulic status checks
|
|
352
|
+
EN_MAXCHECK = 16, //!< Maximum trials for status checking
|
|
353
|
+
EN_DAMPLIMIT = 17, //!< Accuracy level where solution damping begins
|
|
354
|
+
EN_SP_DIFFUS = 18, //!< Specific diffusivity (relative to chlorine at 20 deg C)
|
|
355
|
+
EN_BULKORDER = 19, //!< Bulk water reaction order for pipes
|
|
356
|
+
EN_WALLORDER = 20, //!< Wall reaction order for pipes (either 0 or 1)
|
|
357
|
+
EN_TANKORDER = 21, //!< Bulk water reaction order for tanks
|
|
358
|
+
EN_CONCENLIMIT = 22, //!< Limiting concentration for growth reactions
|
|
359
|
+
EN_DEMANDPATTERN = 23, //!< Name of default demand pattern
|
|
360
|
+
EN_EMITBACKFLOW = 24, //!< `EN_TRUE` (= 1) if emitters can backflow, `EN_FALSE` (= 0) if not
|
|
361
|
+
EN_PRESS_UNITS = 25, //!< Pressure units (see @ref EN_PressUnits)
|
|
362
|
+
EN_STATUS_REPORT = 26 //!< Type of status report to produce (see @ref EN_StatusReport)
|
|
363
|
+
} EN_Option;
|
|
364
|
+
|
|
365
|
+
/// Simple control types
|
|
366
|
+
/**
|
|
367
|
+
These are the different types of simple (single statement) controls that can be applied
|
|
368
|
+
to network links. They are used as an argument to @ref EN_addcontrol,@ref EN_getcontrol,
|
|
369
|
+
and @ref EN_setcontrol.
|
|
370
|
+
*/
|
|
371
|
+
typedef enum {
|
|
372
|
+
EN_LOWLEVEL = 0, //!< Act when pressure or tank level drops below a setpoint
|
|
373
|
+
EN_HILEVEL = 1, //!< Act when pressure or tank level rises above a setpoint
|
|
374
|
+
EN_TIMER = 2, //!< Act at a prescribed elapsed amount of time
|
|
375
|
+
EN_TIMEOFDAY = 3 //!< Act at a particular time of day
|
|
376
|
+
} EN_ControlType;
|
|
377
|
+
|
|
378
|
+
/// Reporting statistic choices
|
|
379
|
+
/**
|
|
380
|
+
These options determine what kind of statistical post-processing should be done on
|
|
381
|
+
the time series of simulation results before they are reported using @ref EN_report
|
|
382
|
+
or saved to the project's binary output file. These options are used in the
|
|
383
|
+
@ref EN_gettimeparam and @ref EN_settimeparam functions when `EN_STATISTIC` is the
|
|
384
|
+
time parameter being set or retrieved.
|
|
385
|
+
*/
|
|
386
|
+
typedef enum {
|
|
387
|
+
EN_SERIES = 0, //!< Report all time series points
|
|
388
|
+
EN_AVERAGE = 1, //!< Report average value over simulation period
|
|
389
|
+
EN_MINIMUM = 2, //!< Report minimum value over simulation period
|
|
390
|
+
EN_MAXIMUM = 3, //!< Report maximum value over simulation period
|
|
391
|
+
EN_RANGE = 4 //!< Report maximum - minimum over simulation period
|
|
392
|
+
} EN_StatisticType;
|
|
393
|
+
|
|
394
|
+
/// Tank mixing models
|
|
395
|
+
/**
|
|
396
|
+
These are the different types of models that describe water quality mixing in storage tanks.
|
|
397
|
+
The choice of model is accessed with the `EN_MIXMODEL` property of a Tank node using
|
|
398
|
+
@ref EN_getnodevalue and @ref EN_setnodevalue.
|
|
399
|
+
*/
|
|
400
|
+
typedef enum {
|
|
401
|
+
EN_MIX1 = 0, //!< Complete mix model
|
|
402
|
+
EN_MIX2 = 1, //!< 2-compartment model
|
|
403
|
+
EN_FIFO = 2, //!< First in, first out model
|
|
404
|
+
EN_LIFO = 3 //!< Last in, first out model
|
|
405
|
+
} EN_MixingModel;
|
|
406
|
+
|
|
407
|
+
/// Hydraulic initialization options
|
|
408
|
+
/**
|
|
409
|
+
These options are used to initialize a new hydraulic analysis when @ref EN_initH is called.
|
|
410
|
+
*/
|
|
411
|
+
typedef enum {
|
|
412
|
+
EN_NOSAVE = 0, //!< Don't save hydraulics; don't re-initialize flows
|
|
413
|
+
EN_SAVE = 1, //!< Save hydraulics to file, don't re-initialize flows
|
|
414
|
+
EN_INITFLOW = 10, //!< Don't save hydraulics; re-initialize flows
|
|
415
|
+
EN_SAVE_AND_INIT = 11 //!< Save hydraulics; re-initialize flows
|
|
416
|
+
} EN_InitHydOption;
|
|
417
|
+
|
|
418
|
+
/// Types of pump curves
|
|
419
|
+
/**
|
|
420
|
+
@ref EN_getpumptype returns one of these values when it is called.
|
|
421
|
+
*/
|
|
422
|
+
typedef enum {
|
|
423
|
+
EN_CONST_HP = 0, //!< Constant horsepower
|
|
424
|
+
EN_POWER_FUNC = 1, //!< Power function
|
|
425
|
+
EN_CUSTOM = 2, //!< User-defined custom curve
|
|
426
|
+
EN_NOCURVE = 3 //!< No curve
|
|
427
|
+
} EN_PumpType;
|
|
428
|
+
|
|
429
|
+
/// Types of data curves
|
|
430
|
+
/**
|
|
431
|
+
These are the different types of physical relationships that a data curve can
|
|
432
|
+
represent as returned by calling @ref EN_getcurvetype.
|
|
433
|
+
*/
|
|
434
|
+
typedef enum {
|
|
435
|
+
EN_VOLUME_CURVE = 0, //!< Tank volume v. depth curve
|
|
436
|
+
EN_PUMP_CURVE = 1, //!< Pump head v. flow curve
|
|
437
|
+
EN_EFFIC_CURVE = 2, //!< Pump efficiency v. flow curve
|
|
438
|
+
EN_HLOSS_CURVE = 3, //!< Valve head loss v. flow curve
|
|
439
|
+
EN_GENERIC_CURVE = 4, //!< Generic curve
|
|
440
|
+
EN_VALVE_CURVE = 5 //!< % of fully open flow v. % open
|
|
441
|
+
} EN_CurveType;
|
|
442
|
+
|
|
443
|
+
/// Deletion action codes
|
|
444
|
+
/**
|
|
445
|
+
These codes are used in @ref EN_deletenode and @ref EN_deletelink to indicate what action
|
|
446
|
+
should be taken if the node or link being deleted appears in any simple or rule-based
|
|
447
|
+
controls or if a deleted node has any links connected to it.
|
|
448
|
+
*/
|
|
449
|
+
typedef enum {
|
|
450
|
+
EN_UNCONDITIONAL = 0, //!< Delete all controls and connecting links
|
|
451
|
+
EN_CONDITIONAL = 1 //!< Cancel object deletion if it appears in controls or has connecting links
|
|
452
|
+
} EN_ActionCodeType;
|
|
453
|
+
|
|
454
|
+
/// Status reporting levels
|
|
455
|
+
/**
|
|
456
|
+
These choices specify the level of status reporting written to a project's report
|
|
457
|
+
file during a hydraulic analysis. The level is set using the @ref EN_setstatusreport
|
|
458
|
+
or the @ref EN_setoption functions.
|
|
459
|
+
*/
|
|
460
|
+
typedef enum {
|
|
461
|
+
EN_NO_REPORT = 0, //!< No status reporting
|
|
462
|
+
EN_NORMAL_REPORT = 1, //!< Normal level of status reporting
|
|
463
|
+
EN_FULL_REPORT = 2 //!< Full level of status reporting
|
|
464
|
+
} EN_StatusReport;
|
|
465
|
+
|
|
466
|
+
/// Network objects used in rule-based controls
|
|
467
|
+
typedef enum {
|
|
468
|
+
EN_R_NODE = 6, //!< Clause refers to a node
|
|
469
|
+
EN_R_LINK = 7, //!< Clause refers to a link
|
|
470
|
+
EN_R_SYSTEM = 8 //!< Clause refers to a system parameter (e.g., time)
|
|
471
|
+
} EN_RuleObject;
|
|
472
|
+
|
|
473
|
+
/// Object variables used in rule-based controls
|
|
474
|
+
typedef enum {
|
|
475
|
+
EN_R_DEMAND = 0, //!< Nodal demand
|
|
476
|
+
EN_R_HEAD = 1, //!< Nodal hydraulic head
|
|
477
|
+
EN_R_GRADE = 2, //!< Nodal hydraulic grade
|
|
478
|
+
EN_R_LEVEL = 3, //!< Tank water level
|
|
479
|
+
EN_R_PRESSURE = 4, //!< Nodal pressure
|
|
480
|
+
EN_R_FLOW = 5, //!< Link flow rate
|
|
481
|
+
EN_R_STATUS = 6, //!< Link status
|
|
482
|
+
EN_R_SETTING = 7, //!< Link setting
|
|
483
|
+
EN_R_POWER = 8, //!< Pump power output
|
|
484
|
+
EN_R_TIME = 9, //!< Elapsed simulation time
|
|
485
|
+
EN_R_CLOCKTIME = 10, //!< Time of day
|
|
486
|
+
EN_R_FILLTIME = 11, //!< Time to fill a tank
|
|
487
|
+
EN_R_DRAINTIME = 12 //!< Time to drain a tank
|
|
488
|
+
} EN_RuleVariable;
|
|
489
|
+
|
|
490
|
+
/// Comparison operators used in rule-based controls
|
|
491
|
+
typedef enum {
|
|
492
|
+
EN_R_EQ = 0, //!< Equal to
|
|
493
|
+
EN_R_NE = 1, //!< Not equal
|
|
494
|
+
EN_R_LE = 2, //!< Less than or equal to
|
|
495
|
+
EN_R_GE = 3, //!< Greater than or equal to
|
|
496
|
+
EN_R_LT = 4, //!< Less than
|
|
497
|
+
EN_R_GT = 5, //!< Greater than
|
|
498
|
+
EN_R_IS = 6, //!< Is equal to
|
|
499
|
+
EN_R_NOT = 7, //!< Is not equal to
|
|
500
|
+
EN_R_BELOW = 8, //!< Is below
|
|
501
|
+
EN_R_ABOVE = 9 //!< Is above
|
|
502
|
+
} EN_RuleOperator;
|
|
503
|
+
|
|
504
|
+
/// Link status codes used in rule-based controls
|
|
505
|
+
typedef enum {
|
|
506
|
+
EN_R_IS_OPEN = 1, //!< Link is open
|
|
507
|
+
EN_R_IS_CLOSED = 2, //!< Link is closed
|
|
508
|
+
EN_R_IS_ACTIVE = 3 //!< Control valve is active
|
|
509
|
+
} EN_RuleStatus;
|
|
510
|
+
|
|
511
|
+
#define EN_MISSING -1.E10 //!< Missing value indicator
|
|
512
|
+
#define EN_SET_CLOSED -1.E10 //!< Link set closed indicator
|
|
513
|
+
#define EN_SET_OPEN 1.E10 //!< Link set open indicator
|
|
514
|
+
|
|
515
|
+
#define EN_FALSE 0 //!< boolean false
|
|
516
|
+
#define EN_TRUE 1 //!< boolean true
|
|
517
|
+
|
|
518
|
+
#endif //EPANET2_ENUMS_H
|