ningshuxia
20 小时以前 71c12ff40d58c3dbdde6867396dd99224e57fc32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
/*
 ******************************************************************************
 Project:      OWA HYDRAULIC
 Version:      2.2
 Module:       text.h
 Description:  string constants used throughout HYDRAULIC
 Authors:      see AUTHORS
 Copyright:    see AUTHORS
 License:      see LICENSE
 Last Updated: 07/15/2019
 ******************************************************************************
*/
 
#ifndef TEXT_H
#define TEXT_H
 
//------- Keyword Dictionary ------------------------------
 
#define   w_USE         "USE"
#define   w_SAVE        "SAVE"
 
#define   w_NONE        "NONE"
#define   w_ALL         "ALL"
 
#define   w_CHEM        "CHEM"
#define   w_AGE         "AGE"
#define   w_TRACE       "TRACE"
 
#define   w_SYSTEM      "SYSTEM"
#define   w_JUNC        "Junc"
#define   w_RESERV      "Reser"
#define   w_TANK        "Tank"
#define   w_CV          "CV"
#define   w_PIPE        "Pipe"
#define   w_PUMP        "Pump"
#define   w_VALVE       "Valve"
#define   w_PRV         "PRV"
#define   w_PSV         "PSV"
#define   w_PBV         "PBV"
#define   w_FCV         "FCV"
#define   w_TCV         "TCV"
#define   w_GPV         "GPV"
 
#define   w_OPEN        "OPEN"
#define   w_CLOSED      "CLOSED"
#define   w_ACTIVE      "ACTIVE"
#define   w_TIME        "TIME"
#define   w_ABOVE       "ABOVE"
#define   w_BELOW       "BELOW"
#define   w_PRECISION   "PREC"
#define   w_IS          "IS"
#define   w_NOT         "NOT"
 
#define   w_ADD         "ADD"
#define   w_MULTIPLY    "MULT"
 
#define   w_LIMITING    "LIMIT"
#define   w_ORDER       "ORDER"
#define   w_GLOBAL      "GLOB"
#define   w_BULK        "BULK"
#define   w_WALL        "WALL"
 
#define   w_PAGE        "PAGE"
#define   w_STATUS      "STATUS"
#define   w_SUMMARY     "SUMM"
#define   w_MESSAGES    "MESS"
#define   w_ENERGY      "ENER"
#define   w_NODE        "NODE"
#define   w_LINK        "LINK"
#define   w_FILE        "FILE"
#define   w_YES         "YES"
#define   w_NO          "NO"
#define   w_FULL        "FULL"
 
#define   w_HW          "H-W"
#define   w_DW          "D-W"
#define   w_CM          "C-M"
 
#define   w_CFS         "CFS"
#define   w_GPM         "GPM"
#define   w_MGD         "MGD"
#define   w_IMGD        "IMGD"
#define   w_AFD         "AFD"
#define   w_LPS         "LPS"
#define   w_LPM         "LPM"
#define   w_MLD         "MLD"
#define   w_CMH         "CMH"
#define   w_CMD         "CMD"
#define   w_SI          "SI"
 
#define   w_PSI         "PSI"
#define   w_KPA         "KPA"
#define   w_METERS      "METERS"
 
#define   w_ELEV        "ELEV"
#define   w_DEMAND      "DEMAND"
#define   w_HEAD        "HEAD"
#define   w_PRESSURE    "PRESSURE"
#define   w_QUALITY     "QUAL"
 
#define   w_DIAM        "DIAM"
#define   w_FLOW        "FLOW"
#define   w_ROUGHNESS   "ROUG"
#define   w_VELOCITY    "VELO"
#define   w_HEADLOSS    "HEADL"
#define   w_SETTING     "SETTING"
#define   w_POWER       "POWER"
#define   w_VOLUME      "VOLU"
#define   w_CLOCKTIME   "CLOCKTIME"
#define   w_FILLTIME    "FILLTIME"
#define   w_DRAINTIME   "DRAINTIME"
#define   w_GRADE       "GRADE"
#define   w_LEVEL       "LEVEL"
 
#define   w_DURATION    "DURA"
#define   w_HYDRAULIC   "HYDR"
#define   w_MINIMUM     "MINI"
#define   w_PATTERN     "PATT"
#define   w_REPORT      "REPO"
#define   w_START       "STAR"
 
#define   w_UNITS       "UNIT"
#define   w_MAP         "MAP"
#define   w_VERIFY      "VERI"
#define   w_VISCOSITY   "VISC"
#define   w_DIFFUSIVITY "DIFF"
#define   w_SPECGRAV    "SPEC"
#define   w_TRIALS      "TRIAL"
#define   w_ACCURACY    "ACCU"
#define   w_SEGMENTS    "SEGM"
#define   w_TOLERANCE   "TOLER"
#define   w_EMITTER     "EMIT"
 
#define   w_PRICE       "PRICE"
#define   w_DMNDCHARGE  "DEMAN"
 
#define   w_HTOL        "HTOL"
#define   w_QTOL        "QTOL"
#define   w_RQTOL       "RQTOL"
#define   w_CHECKFREQ   "CHECKFREQ"
#define   w_MAXCHECK    "MAXCHECK"
#define   w_DAMPLIMIT   "DAMPLIMIT"
 
#define   w_FLOWCHANGE  "FLOWCHANGE"
#define   w_HEADERROR   "HEADERROR"
 
#define   w_MODEL       "MODEL"
#define   w_DDA         "DDA"
#define   w_PDA         "PDA"
#define   w_REQUIRED    "REQ"
#define   w_EXPONENT    "EXP"
 
#define   w_SECONDS     "SEC"
#define   w_MINUTES     "MIN"
#define   w_HOURS       "HOU"
#define   w_DAYS        "DAY"
#define   w_AM          "AM"
#define   w_PM          "PM"
 
#define   w_CONCEN      "CONCEN"
#define   w_MASS        "MASS"
#define   w_SETPOINT    "SETPOINT"
#define   w_FLOWPACED   "FLOWPACED"
 
#define   w_PATTERN     "PATT"
#define   w_CURVE       "CURV"
 
#define   w_EFFIC       "EFFI"
#define   w_HEAD        "HEAD"
#define   w_POWER       "POWER"
#define   w_SPEED       "SPEE"
 
#define   w_MIXED       "MIXED"
#define   w_2COMP       "2COMP"
#define   w_FIFO        "FIFO"
#define   w_LIFO        "LIFO"
 
#define   w_STATISTIC   "STAT"
#define   w_AVG         "AVERAGE"
#define   w_MIN         "MINIMUM"
#define   w_MAX         "MAXIMUM"
#define   w_RANGE       "RANGE"
 
#define   w_UNBALANCED  "UNBA"
#define   w_STOP        "STOP"
#define   w_CONTINUE    "CONT"
 
#define   w_RULE        "RULE"
#define   w_IF          "IF"
#define   w_AND         "AND"
#define   w_OR          "OR"
#define   w_THEN        "THEN"
#define   w_ELSE        "ELSE"
#define   w_PRIORITY    "PRIO"
 
// ------ Input File Section Names ------------------------
 
#define   s_TITLE       "[TITLE]"
#define   s_JUNCTIONS   "[JUNCTIONS]"
#define   s_RESERVOIRS  "[RESERVOIRS]"
#define   s_TANKS       "[TANKS]"
#define   s_PIPES       "[PIPES]"
#define   s_PUMPS       "[PUMPS]"
#define   s_VALVES      "[VALVES]"
#define   s_CONTROLS    "[CONTROLS]"
#define   s_RULES       "[RULES]"
#define   s_DEMANDS     "[DEMANDS]"
#define   s_SOURCES     "[SOURCES]"
#define   s_EMITTERS    "[EMITTERS]"
#define   s_PATTERNS    "[PATTERNS]"
#define   s_CURVES      "[CURVES]"
#define   s_QUALITY     "[QUALITY]"
#define   s_STATUS      "[STATUS]"
#define   s_ROUGHNESS   "[ROUGHNESS]"
#define   s_ENERGY      "[ENERGY]"
#define   s_REACTIONS   "[REACTIONS]"
#define   s_MIXING      "[MIXING]"
#define   s_REPORT      "[REPORT]"
#define   s_TIMES       "[TIMES]"
#define   s_OPTIONS     "[OPTIONS]"
#define   s_COORDS      "[COORDINATES]"
#define   s_VERTICES    "[VERTICES]"
#define   s_LABELS      "[LABELS]"
#define   s_BACKDROP    "[BACKDROP]"
#define   s_TAGS        "[TAGS]"
#define   s_END         "[END]"
 
//------- Units -------------------------------------------
 
#define   u_CFS         "cfs"
#define   u_GPM         "gpm"
#define   u_AFD         "a-f/d"
#define   u_MGD         "mgd"
#define   u_IMGD        "Imgd"
#define   u_LPS         "L/s"
#define   u_LPM         "Lpm"
#define   u_CMH         "m3/h"
#define   u_CMD         "m3/d"
#define   u_MLD         "ML/d"
#define   u_MGperL      "mg/L"
#define   u_UGperL      "ug/L"
#define   u_HOURS       "hrs"
#define   u_MINUTES     "min"
#define   u_PERCENT     "% from"
#define   u_METERS      "m"
#define   u_MMETERS     "mm"
#define   u_MperSEC     "m/s"
#define   u_SQMperSEC   "sq m/sec"
#define   u_per1000M    "/1000m"
#define   u_KW          "kw"
#define   u_FEET        "ft"
#define   u_INCHES      "in"
#define   u_PSI         "psi"
#define   u_KPA         "kPa"
#define   u_FTperSEC    "fps"
#define   u_SQFTperSEC  "sq ft/sec"
#define   u_per1000FT   "/1000ft"
#define   u_HP          "hp"
 
//------- Curve Types ------------------------------------- 
 
#define   c_HEADLOSS    "HEADLOSS"
#define   c_PUMP        "PUMP"
#define   c_EFFIC       "EFFIC"
#define   c_VOLUME      "VOLUME"
 
//------- Text Phrases ------------------------------------
 
#define   t_ABOVE       "above"
#define   t_BELOW       "below"
#define   t_HW          "Hazen-Williams"
#define   t_DW          "Darcy-Weisbach"
#define   t_CM          "Chezy-Manning"
#define   t_CHEMICAL    "Chemical"
#define   t_XHEAD       "closed because cannot deliver head"
#define   t_TEMPCLOSED  "temporarily closed"
#define   t_CLOSED      "closed"
#define   t_OPEN        "open"
#define   t_ACTIVE      "active"
#define   t_XFLOW       "open but exceeds maximum flow"
#define   t_XFCV        "open but cannot deliver flow"
#define   t_XPRESSURE   "open but cannot deliver pressure"
#define   t_FILLING     "filling"
#define   t_EMPTYING    "emptying"
#define   t_OVERFLOWING "overflowing"
 
#define   t_ELEV        "Elevation"
#define   t_DEMAND      "Demand"
#define   t_HEAD        "Head"
#define   t_PRESSURE    "Pressure"
#define   t_QUALITY     "Quality"
#define   t_LENGTH      "Length"
#define   t_DIAM        "Diameter"
#define   t_FLOW        "Flow"
#define   t_VELOCITY    "Velocity"
#define   t_HEADLOSS    "Headloss"
#define   t_LINKQUAL    "Quality"
#define   t_LINKSTATUS  "State"
#define   t_SETTING     "Setting"
#define   t_REACTRATE   "Reaction"
#define   t_FRICTION    "F-Factor"
 
#define   t_NODEID      "Node"
#define   t_LINKID      "Link"
#define   t_PERDAY      "/day"
 
#define   t_JUNCTION    "Junction"
#define   t_RESERVOIR   "Reservoir"
#define   t_TANK        "Tank"
#define   t_PIPE        "Pipe"
#define   t_PUMP        "Pump"
#define   t_VALVE       "Valve"
#define   t_CONTROL     "Control"
#define   t_RULE        "Rule"
#define   t_DEMANDFOR   "Demand for Node"
#define   t_SOURCE      "Source"
#define   t_EMITTER     "Emitter"
#define   t_PATTERN     "Pattern"
#define   t_CURVE       "Curve"
#define   t_STATUS      "Status"
#define   t_ROUGHNESS   "Roughness"
#define   t_ENERGY      "Energy"
#define   t_REACTION    "Reaction"
#define   t_MIXING      "Mixing"
#define   t_REPORT      "Report"
#define   t_TIME        "Times"
#define   t_OPTION      "Options"
#define   t_RULES_SECT  "[RULES] section"
#define   t_HALTED      " EXECUTION HALTED."
#define   t_FUNCCALL    "function call"
#define   t_CONTINUED   " (continued)"
#define   t_perM3       "  /m3"
#define   t_perMGAL     "/Mgal"
#define   t_DIFFER      "DIFFERENTIAL"
#define   t_FIXED       "Fixed Demands"
#define   t_POWER       "Power Function"
#define   t_ORIFICE     "Orifice Flow"
 
 
//----- Summary Report Format Strings ---------------------
 
#define LOGO1  \
"******************************************************************"
#define LOGO2  \
""
//"*                           Hraulic                     *"
#define LOGO3  \
"*                   Ë®Á¦ºÍË®ÖÊ·ÖÎöÈí¼þ                  *"
#define LOGO4  \
"*                   ¹ÜÍøË®Á¦ºÍË®ÖÊ·ÖÎö¹¤¾ß              *"
#define LOGO5  \
""
//"*                         Version %d.%d                 *"
#define LOGO6  \
"******************************************************************"
#define FMT02  "\n  o Retrieving network data"
#define FMT04  "\n    Cannot use duplicate file names."
#define FMT05  "\n    Cannot open input file "
#define FMT06  "\n    Cannot open report file "
#define FMT07  "\n    Cannot open output file "
#define FMT08  "\n    Cannot open temporary output file"
#define FMT14  "\n  o Computing hydraulics at hour "
#define FMT15  "\n  o Computing water quality at hour "
#define FMT16  "\n  o Transferring results to file"
#define FMT17  "\n  o Writing output report to "
#define FMT18  "  Page 1                                    "
#define FMT19  "    Input Data File ................... %s"
#define FMT20  "    Number of Junctions................ %-d"
#define FMT21a "    Number of Reservoirs............... %-d"
#define FMT21b "    Number of Tanks ................... %-d"
#define FMT22  "    Number of Pipes ................... %-d"
#define FMT23  "    Number of Pumps ................... %-d"
#define FMT24  "    Number of Valves .................. %-d"
#define FMT25  "    Headloss Formula .................. %s"
#define FMT25a "    Nodal Demand Model ................ %s"
#define FMT26  "    Hydraulic Timestep ................ %-.2f %s"
#define FMT27  "    Hydraulic Accuracy ................ %-.6f"
 
#define FMT27a "    Status Check Frequency ............ %-d"                   
#define FMT27b "    Maximum Trials Checked ............ %-d"                   
#define FMT27c "    Damping Limit Threshold ........... %-.6f"
 
#define FMT27d "    Headloss Error Limit .............. %-.6f %s"
#define FMT27e "    Flow Change Limit ................. %-.6f %s"
 
#define FMT28  "    Maximum Trials .................... %-d"
#define FMT29  "    Quality Analysis .................. None"
#define FMT30  "    Quality Analysis .................. %s"
#define FMT31  "    Quality Analysis .................. Trace From Node %s"
#define FMT32  "    Quality Analysis .................. Age"
#define FMT33  "    Water Quality Time Step ........... %-.2f min"
#define FMT34  "    Water Quality Tolerance ........... %-.2f %s"
#define FMT36  "    Specific Gravity .................. %-.2f"
#define FMT37a "    Relative Kinematic Viscosity ...... %-.2f"
#define FMT37b "    Relative Chemical Diffusivity ..... %-.2f"
#define FMT38  "    Demand Multiplier ................. %-.2f"
#define FMT39  "    Total Duration .................... %-.2f %s"
#define FMT40  "    Reporting Criteria:"
#define FMT41  "       No Nodes"
#define FMT42  "       All Nodes"
#define FMT43  "       Selected Nodes"
#define FMT44  "       No Links"
#define FMT45  "       All Links"
#define FMT46  "       Selected Links"
#define FMT47  "       with %s below %-.2f %s"
#define FMT48  "       with %s above %-.2f %s"
 
//----- Status Report Format Strings ----------------------
 
#define FMT49  "Hydraulic Status:"
#define FMT50  "%10s: Tank %s is %s at %-.2f %s"
#define FMT51  "%10s: Reservoir %s is %s"
#define FMT52  "%10s: %s %s %s"
#define FMT53  "%10s: %s %s changed from %s to %s"
#define FMT54  "%10s: %s %s changed by %s %s control"
#define FMT55  "%10s: %s %s changed by timer control"
#define FMT56  "            %s %s setting changed to %-.2f"
#define FMT57  "            %s %s switched from %s to %s"
#define FMT58  "%10s: Balanced after %-d trials"
#define FMT59  "%10s: Unbalanced after %-d trials (flow change = %-.6f)"
 
#define FMT60a "            Max. flow imbalance is %.4f %s at Node %s"         
#define FMT60b "            Max. head imbalance is %.4f %s at Link %s"         
 
#define FMT61  "%10s: Valve %s caused ill-conditioning"
#define FMT62  "%10s: System ill-conditioned at node %s"
#define FMT63  "%10s: %s %s changed by rule %s"
#define FMT64  "%10s: Balancing the network:\n"
#define FMT65  "            Trial %2d: relative flow change = %-.6f"
#define FMT66  "                      maximum  flow change = %.4f for Link %s"
#define FMT67  "                      maximum  flow change = %.4f for Node %s"
#define FMT68  "                      maximum  head error  = %.4f for Link %s\n"
#define FMT69a "            1 node had its demand reduced by a total of %.2f%%"
#define FMT69b "            %-d nodes had demands reduced by a total of %.2f%%"
 
//----- Energy Report Table -------------------------------
 
#define FMT71  "Energy Usage:"
#define FMT72  \
        "           Usage   Avg.     Kw-hr      Avg.      Peak      Cost"
#define FMT73  \
        "Pump      Factor Effic.     %s        Kw        Kw      /day"
#define FMT74  "%38s Demand Charge: %9.2f"
#define FMT75  "%38s Total Cost:    %9.2f"
 
//----- Node Report Table ---------------------------------
 
#define FMT76  "%s Node Results:"
#define FMT77  "Node Results:"
#define FMT78  "Node Results at %s hrs:"
 
//----- Link Report Table ---------------------------------
 
#define FMT79  "%s Link Results:"
#define FMT80  "Link Results:"
#define FMT81  "Link Results at %s hrs:"
#define FMT82  "\n\f\n  Page %-d    %60.60s\n"
 
//----- Progress Messages ---------------------------------
 
#define FMT100 "    Retrieving network data ...                   "
#define FMT101 "    Computing hydraulics at hour %-10s       "
#define FMT102 "    Computing water quality at hour %-10s    "
#define FMT103 "    Writing output report ...                     "
#define FMT106 "    Transferring results to file ...              "
#define FMT104 "Analysis begun %s"
#define FMT105 "Analysis ended %s"
 
//----- Rule Error Messages -------------------------------
 
#define R_ERR201 "Input Error 201: syntax error in following line of "
#define R_ERR202 "Input Error 202: illegal numeric value in following line of "
#define R_ERR203 "Input Error 203: undefined node in following line of "
#define R_ERR204 "Input Error 204: undefined link in following line of "
#define R_ERR207 "Input Error 207: attempt to control a CV in following line of "
#define R_ERR221 "Input Error 221: mis-placed clause in following line of "
 
//----- Specific Warning Messages -------------------------
 
#define WARN01 "WARNING: System unbalanced at %s hrs."
#define WARN02 \
"WARNING: Maximum trials exceeded at %s hrs. System may be unstable."
#define WARN03a "WARNING: Node %s disconnected at %s hrs"
#define WARN03b "WARNING: %d additional nodes disconnected at %s hrs"
#define WARN03c "WARNING: System disconnected because of Link %s" 
#define WARN04  "WARNING: Pump %s %s at %s hrs."
#define WARN05  "WARNING: %s %s %s at %s hrs."
#define WARN06  "WARNING: Negative pressures at %s hrs."
 
//----- General Warning Messages --------------------------
 
#define WARN1 "WARNING: System hydraulically unbalanced."
#define WARN2 "WARNING: System may be hydraulically unstable."
#define WARN3 "WARNING: System disconnected."
#define WARN4 "WARNING: Pumps cannot deliver enough flow or head."
#define WARN5 "WARNING: Valves cannot deliver enough flow."
#define WARN6 "WARNING: System has negative pressures."
 
#endif