MEASUR-Tools-Suite v1.0.11
The MEASUR Tools Suite is a collection of industrial efficiency calculations written in C++ and with bindings for compilation to WebAssembly.
Loading...
Searching...
No Matches
WasteWater_Treatment.h
Go to the documentation of this file.
1
13#ifndef TOOLS_SUITE_WASTEWATER_TREATMENT_H
14#define TOOLS_SUITE_WASTEWATER_TREATMENT_H
15
16#include <vector>
17
19 public:
21 CalculationsTable(double Se, double HeterBio, double CellDeb, double InterVes, double MLVSS, double MLSS,
22 double BiomassProd, double SludgeProd, double SolidProd, double Effluent, double IntentWaste,
23 double OxygenRqd, double FlowMgd, double NRemoved, double NRemovedMgl, double NitO2Dem,
24 double O2Reqd, double EffNH3N, double EffNo3N, double TotalO2Rqd, double WAS,
25 double EstimatedEff, double EstimRas, double FmRatio, double Diff_MLSS, double SRT)
26 : Se(Se), HeterBio(HeterBio), CellDeb(CellDeb), InterVes(InterVes), MLVSS(MLVSS), MLSS(MLSS),
27 BiomassProd(BiomassProd), SludgeProd(SludgeProd), SolidProd(SolidProd), Effluent(Effluent),
28 IntentWaste(IntentWaste), OxygenRqd(OxygenRqd), FlowMgd(FlowMgd), NRemoved(NRemoved),
29 NRemovedMgl(NRemovedMgl), NitO2Dem(NitO2Dem), O2Reqd(O2Reqd), EffNH3N(EffNH3N), EffNo3N(EffNo3N),
30 TotalO2Rqd(TotalO2Rqd), WAS(WAS), EstimatedEff(EstimatedEff), EstimRas(EstimRas), FmRatio(FmRatio),
31 Diff_MLSS(Diff_MLSS), SRT(SRT) {}
32 CalculationsTable() = default;
33 double Se;
34 double HeterBio;
35 double CellDeb;
36 double InterVes;
37 double MLVSS;
38 double MLSS;
39 double BiomassProd;
40 double SludgeProd;
41 double SolidProd;
42 double Effluent;
43 double IntentWaste;
44 double OxygenRqd;
45 double FlowMgd;
46 double NRemoved;
47 double NRemovedMgl;
48 double NitO2Dem;
49 double O2Reqd;
50 double EffNH3N;
51 double EffNo3N;
52 double TotalO2Rqd;
53 double WAS;
54 double EstimatedEff;
55 double EstimRas;
56 double FmRatio;
57 double Diff_MLSS;
58 double SRT;
59
60 std::vector<double> getArray() {
61 std::vector<double> array {Se, HeterBio, CellDeb, InterVes, MLVSS, MLSS,
62 BiomassProd, SludgeProd, SolidProd, Effluent, IntentWaste, OxygenRqd,
63 FlowMgd, NRemoved, NRemovedMgl, NitO2Dem, O2Reqd, EffNH3N,
64 EffNo3N, TotalO2Rqd, WAS, EstimatedEff, EstimRas, FmRatio,
65 Diff_MLSS, SRT};
66 return array;
67 };
68 };
69
70 public:
71 struct Output {
72 Output(double TotalAverageDailyFlowRate, double VolumeInService, double InfluentBOD5Concentration,
73 double InfluentBOD5MassLoading, double SecWWOxidNLoad, double SecWWTSSLoad, double FM_ratio,
74 double SolidsRetentionTime, double MLSS, double MLVSS, double TSSSludgeProduction,
75 double TSSInActivatedSludgeEffluent, double TotalOxygenRequirements, double TotalOxygenReqWDenit,
76 double TotalOxygenSupplied, double MixingIntensityInReactor, double RASFlowRate,
77 double RASRecyclePercentage, double WASFlowRate, double RASTSSConcentration,
78 double TotalSludgeProduction, double ReactorDetentionTime, double VOLR, double EffluentCBOD5,
79 double EffluentTSS, double EffluentAmmonia_N, double EffluentNO3_N, double EffluentNO3_N_W_Denit,
80
81 double AeEnergy, double AeCost, double FieldOTR, std::vector<CalculationsTable> calculationsTable)
82 : TotalAverageDailyFlowRate(TotalAverageDailyFlowRate), VolumeInService(VolumeInService),
83 InfluentBOD5Concentration(InfluentBOD5Concentration), InfluentBOD5MassLoading(InfluentBOD5MassLoading),
84 SecWWOxidNLoad(SecWWOxidNLoad), SecWWTSSLoad(SecWWTSSLoad), FM_ratio(FM_ratio),
85 SolidsRetentionTime(SolidsRetentionTime), MLSS(MLSS), MLVSS(MLVSS),
86 TSSSludgeProduction(TSSSludgeProduction), TSSInActivatedSludgeEffluent(TSSInActivatedSludgeEffluent),
87 TotalOxygenRequirements(TotalOxygenRequirements), TotalOxygenReqWDenit(TotalOxygenReqWDenit),
88 TotalOxygenSupplied(TotalOxygenSupplied), MixingIntensityInReactor(MixingIntensityInReactor),
89 RASFlowRate(RASFlowRate), RASRecyclePercentage(RASRecyclePercentage), WASFlowRate(WASFlowRate),
90 RASTSSConcentration(RASTSSConcentration), TotalSludgeProduction(TotalSludgeProduction),
91 ReactorDetentionTime(ReactorDetentionTime), VOLR(VOLR), EffluentCBOD5(EffluentCBOD5),
92 EffluentTSS(EffluentTSS), EffluentAmmonia_N(EffluentAmmonia_N), EffluentNO3_N(EffluentNO3_N),
93 EffluentNO3_N_W_Denit(EffluentNO3_N_W_Denit), AeEnergy(AeEnergy), AeCost(AeCost), FieldOTR(FieldOTR),
94 calculationsTable(calculationsTable) {}
95 Output() = default;
96 double TotalAverageDailyFlowRate;
97 double VolumeInService;
98 double InfluentBOD5Concentration;
99 double InfluentBOD5MassLoading;
100 double SecWWOxidNLoad;
101 double SecWWTSSLoad;
102 double FM_ratio;
103 double SolidsRetentionTime;
104 double MLSS;
105 double MLVSS;
106 double TSSSludgeProduction;
107 double TSSInActivatedSludgeEffluent;
108 double TotalOxygenRequirements;
109 double TotalOxygenReqWDenit;
110 double TotalOxygenSupplied;
111 double MixingIntensityInReactor;
112 double RASFlowRate;
113 double RASRecyclePercentage;
114 double WASFlowRate;
115 double RASTSSConcentration;
116 double TotalSludgeProduction;
117 double ReactorDetentionTime;
118 double VOLR;
119 double EffluentCBOD5;
120 double EffluentTSS;
121 double EffluentAmmonia_N;
122 double EffluentNO3_N;
123 double EffluentNO3_N_W_Denit;
124
125 double AeEnergy;
126 double AeCost;
127 double FieldOTR;
128 std::vector<CalculationsTable> calculationsTable;
129 };
130
131 public:
133 OutputWithoutTable(double TotalAverageDailyFlowRate, double VolumeInService, double InfluentBOD5Concentration,
134 double InfluentBOD5MassLoading, double SecWWOxidNLoad, double SecWWTSSLoad, double FM_ratio,
135 double SolidsRetentionTime, double MLSS, double MLVSS, double TSSSludgeProduction,
136 double TSSInActivatedSludgeEffluent, double TotalOxygenRequirements,
137 double TotalOxygenReqWDenit, double TotalOxygenSupplied, double MixingIntensityInReactor,
138 double RASFlowRate, double RASRecyclePercentage, double WASFlowRate,
139 double RASTSSConcentration, double TotalSludgeProduction, double ReactorDetentionTime,
140 double VOLR, double EffluentCBOD5, double EffluentTSS, double EffluentAmmonia_N,
141 double EffluentNO3_N, double EffluentNO3_N_W_Denit,
142
143 double AeEnergy, double AeCost, double FieldOTR)
144 : TotalAverageDailyFlowRate(TotalAverageDailyFlowRate), VolumeInService(VolumeInService),
145 InfluentBOD5Concentration(InfluentBOD5Concentration), InfluentBOD5MassLoading(InfluentBOD5MassLoading),
146 SecWWOxidNLoad(SecWWOxidNLoad), SecWWTSSLoad(SecWWTSSLoad), FM_ratio(FM_ratio),
147 SolidsRetentionTime(SolidsRetentionTime), MLSS(MLSS), MLVSS(MLVSS),
148 TSSSludgeProduction(TSSSludgeProduction), TSSInActivatedSludgeEffluent(TSSInActivatedSludgeEffluent),
149 TotalOxygenRequirements(TotalOxygenRequirements), TotalOxygenReqWDenit(TotalOxygenReqWDenit),
150 TotalOxygenSupplied(TotalOxygenSupplied), MixingIntensityInReactor(MixingIntensityInReactor),
151 RASFlowRate(RASFlowRate), RASRecyclePercentage(RASRecyclePercentage), WASFlowRate(WASFlowRate),
152 RASTSSConcentration(RASTSSConcentration), TotalSludgeProduction(TotalSludgeProduction),
153 ReactorDetentionTime(ReactorDetentionTime), VOLR(VOLR), EffluentCBOD5(EffluentCBOD5),
154 EffluentTSS(EffluentTSS), EffluentAmmonia_N(EffluentAmmonia_N), EffluentNO3_N(EffluentNO3_N),
155 EffluentNO3_N_W_Denit(EffluentNO3_N_W_Denit), AeEnergy(AeEnergy), AeCost(AeCost), FieldOTR(FieldOTR) {}
156 OutputWithoutTable() = default;
157 double TotalAverageDailyFlowRate;
158 double VolumeInService;
159 double InfluentBOD5Concentration;
160 double InfluentBOD5MassLoading;
161 double SecWWOxidNLoad;
162 double SecWWTSSLoad;
163 double FM_ratio;
164 double SolidsRetentionTime;
165 double MLSS;
166 double MLVSS;
167 double TSSSludgeProduction;
168 double TSSInActivatedSludgeEffluent;
169 double TotalOxygenRequirements;
170 double TotalOxygenReqWDenit;
171 double TotalOxygenSupplied;
172 double MixingIntensityInReactor;
173 double RASFlowRate;
174 double RASRecyclePercentage;
175 double WASFlowRate;
176 double RASTSSConcentration;
177 double TotalSludgeProduction;
178 double ReactorDetentionTime;
179 double VOLR;
180 double EffluentCBOD5;
181 double EffluentTSS;
182 double EffluentAmmonia_N;
183 double EffluentNO3_N;
184 double EffluentNO3_N_W_Denit;
185
186 double AeEnergy;
187 double AeCost;
188 double FieldOTR;
189 };
190
223 public:
224 WasteWater_Treatment(double Temperature, double So, double Volume, double FlowRate, double InertVSS,
225 double OxidizableN, double Biomass, double InfluentTSS, double InertInOrgTSS,
226 double EffluentTSS, double RASTSS, double MLSSpar, double FractionBiomass, double BiomassYeild,
227 double HalfSaturation, double MicrobialDecay, double MaxUtilizationRate, double MaxDays,
228 double TimeIncrement, double OperatingDO, double Alpha, double Beta, double SOTR,
229 double Aeration, double Elevation, double OperatingTime, int TypeAerators, double Speed,
230 double EnergyCostUnit, double DefinedSRT = 1)
231 : Temperature(Temperature), So(So), Volume(Volume), FlowRate(FlowRate), InertVSS(InertVSS),
232 OxidizableN(OxidizableN), Biomass(Biomass), InfluentTSS(InfluentTSS), InertInOrgTSS(InertInOrgTSS),
233 EffluentTSS(EffluentTSS), RASTSS(RASTSS), MLSSpar(MLSSpar), FractionBiomass(FractionBiomass),
234 BiomassYeild(BiomassYeild), HalfSaturation(HalfSaturation), MicrobialDecay(MicrobialDecay),
235 MaxUtilizationRate(MaxUtilizationRate), MaxDays(MaxDays), TimeIncrement(TimeIncrement),
236 OperatingDO(OperatingDO), Alpha(Alpha), Beta(Beta), SOTR(SOTR), Aeration(Aeration), Elevation(Elevation),
237 OperatingTime(OperatingTime), TypeAerators(TypeAerators), Speed(Speed), EnergyCostUnit(EnergyCostUnit),
238 DefinedSRT(DefinedSRT) {};
239
240 Output calculate();
241 OutputWithoutTable calculateGivenSRT();
242
243 private:
244 double Temperature;
245 double So;
246 double Volume;
247 double FlowRate;
248 double InertVSS;
249 double OxidizableN;
250 double Biomass;
251 double InfluentTSS;
252 double InertInOrgTSS;
253 double EffluentTSS;
254 double RASTSS;
255 double MLSSpar;
256 double FractionBiomass;
257 double BiomassYeild;
258 double HalfSaturation;
259 double MicrobialDecay;
260 double MaxUtilizationRate;
261 double MaxDays;
262 double TimeIncrement;
263
264 double OperatingDO;
265 double Alpha;
266 double Beta;
267 double SOTR;
268 double Aeration;
269 double Elevation;
270 double OperatingTime;
271 int TypeAerators;
272 double Speed;
273 double EnergyCostUnit;
274 double DefinedSRT;
275};
276#endif // TOOLS_SUITE_WASTEWATER_TREATMENT_H
WasteWater_Treatment(double Temperature, double So, double Volume, double FlowRate, double InertVSS, double OxidizableN, double Biomass, double InfluentTSS, double InertInOrgTSS, double EffluentTSS, double RASTSS, double MLSSpar, double FractionBiomass, double BiomassYeild, double HalfSaturation, double MicrobialDecay, double MaxUtilizationRate, double MaxDays, double TimeIncrement, double OperatingDO, double Alpha, double Beta, double SOTR, double Aeration, double Elevation, double OperatingTime, int TypeAerators, double Speed, double EnergyCostUnit, double DefinedSRT=1)