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