|
3 | 3 | //
|
4 | 4 | // Project: EPA SWMM5
|
5 | 5 | // Version: 5.2
|
6 |
| -// Date: 06/01/22 (Build 5.2.1) |
| 6 | +// Date: 10/08/22 (Build 5.2.2) |
7 | 7 | // Author: L. Rossman
|
8 | 8 | //
|
9 | 9 | // Street/Channel Inlet Functions
|
|
16 | 16 | //
|
17 | 17 | // Build 5.2.1:
|
18 | 18 | // - Substitutes the constant BIG for HUGE.
|
| 19 | +// Build 5.2.2: |
| 20 | +// - Additional statistics added to Street Flow Summary table. |
19 | 21 | //-----------------------------------------------------------------------------
|
20 | 22 | #define _CRT_SECURE_NO_DEPRECATE
|
21 | 23 |
|
@@ -68,38 +70,7 @@ typedef struct
|
68 | 70 | } TInletDesign;
|
69 | 71 |
|
70 | 72 |
|
71 |
| -// Inlet performance statistics |
72 |
| -typedef struct |
73 |
| -{ |
74 |
| - int flowPeriods; // # periods with approach flow |
75 |
| - int capturePeriods; // # periods with captured flow |
76 |
| - int backflowPeriods; // # periods with backflow |
77 |
| - double peakFlow; // peak flow seen by inlet (cfs) |
78 |
| - double peakFlowCapture; // capture efficiency at peak flow |
79 |
| - double avgFlowCapture; // average capture efficiency |
80 |
| - double bypassFreq; // frequency of bypass flow |
81 |
| -} TInletStats; |
82 |
| - |
83 |
| -// Inlet list object |
84 |
| -struct TInlet |
85 |
| -{ |
86 |
| - int linkIndex; // index of conduit link with the inlet |
87 |
| - int designIndex; // index of inlet's design |
88 |
| - int nodeIndex; // index of node receiving captured flow |
89 |
| - int numInlets; // # inlets on each side of street or in channel |
90 |
| - int placement; // whether inlet is on-grade or on-sag |
91 |
| - double clogFactor; // fractional degree of inlet clogging |
92 |
| - double flowLimit; // inlet flow restriction (cfs) |
93 |
| - double localDepress; // local gutter depression (ft) |
94 |
| - double localWidth; // local depression width (ft) |
95 |
| - |
96 |
| - double flowFactor; // flow = flowFactor * (flow spread)^2.67 |
97 |
| - double flowCapture; // captured flow rate (cfs) |
98 |
| - double backflow; // backflow from capture node (cfs) |
99 |
| - double backflowRatio; // inlet backflow / capture node overflow |
100 |
| - TInletStats stats; // inlet performance statistics |
101 |
| - TInlet * nextInlet; // next inlet in list |
102 |
| -}; |
| 73 | +// OWA EDIT - TInlet and TInletStats struct defs moved to inlet.h to be shared by toolkit.c |
103 | 74 |
|
104 | 75 | // Shared inlet variables
|
105 | 76 | TInletDesign * InletDesigns; // array of available inlet designs
|
@@ -1030,17 +1001,18 @@ void writeStreetStatsHeader()
|
1030 | 1001 | report_writeLine("*******************");
|
1031 | 1002 | report_writeLine("");
|
1032 | 1003 | fprintf(Frpt.file,
|
1033 |
| -"\n ----------------------------------------------------------------------------------------------------------------------" |
1034 |
| -"\n Peak Maximum Maximum Peak Flow Average Bypass BackFlow" |
1035 |
| -"\n Flow Spread Depth Inlet Inlet Capture Capture Frequency Frequency"); |
| 1004 | +"\n ---------------------------------------------------------------------------------------------------------------------------------------" |
| 1005 | +"\n Peak Avg. Bypass Back Peak Peak" |
| 1006 | +"\n Peak Maximum Maximum Flow Flow Flow Flow Capture Bypass" |
| 1007 | +"\n Flow Spread Depth Inlet Inlet Inlet Capture Capture Freq Freq / Inlet Flow"); |
1036 | 1008 | if (UnitSystem == US) fprintf(Frpt.file,
|
1037 |
| -"\n Street Conduit %3s ft ft Design Location %% %% %% %%", |
1038 |
| - FlowUnitWords[FlowUnits]); |
| 1009 | +"\n Street Conduit %3s ft ft Design Location Count Pcnt Pcnt Pcnt Pcnt %3s %3s", |
| 1010 | + FlowUnitWords[FlowUnits], FlowUnitWords[FlowUnits], FlowUnitWords[FlowUnits]); |
1039 | 1011 | else fprintf(Frpt.file,
|
1040 |
| -"\n Street Conduit %3s m m Design Location %% %% %% %%", |
1041 |
| - FlowUnitWords[FlowUnits]); |
| 1012 | +"\n Street Conduit %3s m m Design Location Pcnt Pcnt Pcnt Pcnt %3s %3s", |
| 1013 | + FlowUnitWords[FlowUnits], FlowUnitWords[FlowUnits], FlowUnitWords[FlowUnits]); |
1042 | 1014 | fprintf(Frpt.file,
|
1043 |
| -"\n ----------------------------------------------------------------------------------------------------------------------"); |
| 1015 | +"\n ---------------------------------------------------------------------------------------------------------------------------------------"); |
1044 | 1016 | }
|
1045 | 1017 |
|
1046 | 1018 | //=============================================================================
|
@@ -1095,19 +1067,24 @@ void writeStreetStats(int link)
|
1095 | 1067 | fprintf(Frpt.file, " ON-GRADE");
|
1096 | 1068 | else
|
1097 | 1069 | fprintf(Frpt.file, " ON-SAG ");
|
| 1070 | + fprintf(Frpt.file, " %5d", inlet->numInlets); |
1098 | 1071 | fp = inlet->stats.flowPeriods / 100.0;
|
1099 | 1072 | if (fp > 0.0)
|
1100 | 1073 | {
|
1101 | 1074 | cp = inlet->stats.capturePeriods / 100.0;
|
1102 |
| - fprintf(Frpt.file, " %9.2f", inlet->stats.peakFlowCapture); |
| 1075 | + fprintf(Frpt.file, " %7.2f", inlet->stats.peakFlowCapture); |
1103 | 1076 | if (cp > 0.0)
|
1104 | 1077 | {
|
1105 | 1078 | afc = inlet->stats.avgFlowCapture / cp;
|
1106 | 1079 | bpf = inlet->stats.bypassFreq / cp;
|
1107 | 1080 | }
|
1108 |
| - fprintf(Frpt.file, " %9.2f", afc); |
1109 |
| - fprintf(Frpt.file, " %9.2f", bpf); |
1110 |
| - fprintf(Frpt.file, " %9.2f", inlet->stats.backflowPeriods / fp); |
| 1081 | + fprintf(Frpt.file, " %7.2f", afc); |
| 1082 | + fprintf(Frpt.file, " %7.2f", bpf); |
| 1083 | + fprintf(Frpt.file, " %7.2f", inlet->stats.backflowPeriods / fp); |
| 1084 | + fprintf(Frpt.file, " %7.2f", (maxFlow / Street[t].sides) * UCF(FLOW) * |
| 1085 | + 0.01 * inlet->stats.peakFlowCapture / inlet->numInlets); |
| 1086 | + fprintf(Frpt.file, " %7.2f", maxFlow * UCF(FLOW) * 0.01 * |
| 1087 | + (100.0 - inlet->stats.peakFlowCapture)); |
1111 | 1088 | }
|
1112 | 1089 | }
|
1113 | 1090 | }
|
|
0 commit comments