Abstract
Water resource recovery facilities (WRRFs) face growing pressures to balance compliance, sustainability, and cost while adapting to evolving treatment needs. To support research, development, and deployment (RD&D) of innovative technological solutions, we developed an open-access benchmarking framework comprised of 18 plant-wide simulation models. Implemented in QSDsan, the framework is validated against GPS-X™ simulations while capturing distinct system behaviors, treatment performance, energy demand, and operational costs across diverse designs. It offers a rigorous and transparent foundation for comparative technology evaluations, guiding RD&D decision-making and advancing sustainable water management.
Introduction
Water resource recovery facilities (WRRFs) are undergoing a paradigm shift from pollution control to active participation in the circular economy1,2,3. In addition to meeting more stringent effluent limits and adapting to climate variability and urban expansion, WRRFs are increasingly expected to improve energy efficiency, reduce greenhouse gas emissions, and recover valuable resources. These growing and sometimes competing demands call for innovative technological solutions. Robust and transparent evaluation frameworks are therefore essential to accelerate the research, development, and deployment (RD&D) of emerging technologies and to support informed decision-making during planning, design, and operation of modern WRRFs.
Industry standard process models, such as activated sludge models (ASM1, ASM2d, ASM3)4 and anaerobic digestion models (e.g., ADM15), have long supported process design and operation by formulating mechanistic insights into the most prevalent physical, chemical, and biological processes in wastewater systems. Building on these foundations, WRRF benchmark simulation models (e.g., BSM16 and BSM27) have been developed as a platform-independent, standardized baseline for research on system-wide process control and optimization8. However, the BSMs only represent a small fraction of the system configurations encountered in practice and modifying their open-source implementations (e.g., MATLAB/Simulink9) is difficult without in-depth understanding and experience with the programming language. On the other hand, models implemented using commercial software (e.g., GPS-X™10, BioWin11) are more user-friendly but have limited transparency, accessibility, and scalability due to the proprietary nature of the simulation platforms, creating barriers to wider applications among the research community. Moreover, existing simulation tools often lack the flexibility to incorporate new process models as they emerge, limiting their utility in early-stage RD&D.
To address this gap, we developed and launched an open-access benchmarking framework for wastewater resource recovery technologies, comprising 18 plant-wide simulation models covering representative WRRF configurations in the United States. In this communication, we will introduce the methodological foundation for the benchmarking framework, present its simulation performance under baseline assumptions, and discuss its validation against established GPS-XTM models. By assembling a diverse portfolio of liquid and solids treatment trains, the framework captures the breadth of design options most encountered in practice and reproduces their distinct system behaviors, treatment performances, electricity consumption, and operational costs, offering a set of rigorous, modular, and practical benchmarks for evaluating emerging technologies, guiding design and operational decisions, and accelerating RD&D for sustainable water management.
Benchmark WRRF models
The agile benchmarking framework for water resource recovery technologies is comprised of a portfolio of plant-wide simulation models of centralized WRRFs implemented using QSDsan12, an open-source Python-based computational platform that integrates process modeling, system simulation, and sustainability assessment (i.e., technoeconomic analysis [TEA] and life cycle assessment [LCA]) under uncertainty. Leveraging previous definitions of representative WRRF configurations by Tarallo et al. to guide the transition toward net-zero energy at WRRFs13, we selected and developed process models for 18 benchmark combinations of liquid and solid treatment trains, which cover over 70% of the total treatment capacity of publicly owned treatment works (POTWs) in the Contiguous United States (Fig. 1c)14,15,16,17,18. Each configuration is referred to with a unique alphanumeric code (Fig. 1a, b). Plant-wide simulation models are now available for the highlighted WRRF configurations in Fig. 1c. These models, along with functions for operational cost and energy analysis, are made open access within Github repository EXPOsan (exposition of sanitation and resource recovery systems)19,20.
a, b Distinguishing features of benchmark WRRF configurations and c their distribution in the Contiguous United States. A WRRF configuration is referred to as a unique combination of a liquid code (a) and a solid code (b) as defined in Tarallo et al.13. Plot c is adapted based on publicly available survey data on US POTWs18, among which plant-wide process simulation models are available for the highlighted configurations. The full range of liquid treatment trains span a variety of treatment targets (i.e., rBOD, NIT, BNR, ENR) defined by the effluent concentrations of key contaminants13. “-P” for “prime” in the liquid code is a suffix indicating a variation on the mainstream process, unrelated to the standalone “P” liquid treatment train.
Along with the fully assembled benchmark WRRF models, simple instructions to load the module, perform plant-wide simulations, and access simulation results are provided on the front page of the EXPOsan “werf” module19. All WRRF configurations are implemented as System objects in QSDsan, allowing users to adjust model parameters (e.g., aeration zone volume, waste activated sludge [WAS] flow rate, dissolved oxygen [DO] setpoints, nitrifier yield) by accessing the corresponding Component, WasteStream, Processes, or SanUnit object in the Python console without editing the source code.
We have performed plant-wide simulations for each WRRF model over a 300-day time span and confirmed convergence to steady states by inspecting the time-series data of key model outputs as well as their evaluated time derivatives at the end of the simulations. Initial conditions verified for convergence are provided with each configuration. Simulation time depends on the configuration and the hardware. On a personal computer with an Intel Core i9-12900HK CPU@2500 MHz and 64.0 GB RAM, it took 7 s to 3 min to load the system model, initialize system state, and perform a 300-day plant-wide simulation of a WRRF configuration with a constant influent stream.
Time-series data of the state variables across the treatment units can be tracked and retrieved upon completion of the simulation. Steady-state mass flows and composite properties of any stream in a system are stored and accessible as attributes of the corresponding WasteStream object. All WasteStream and SanUnit objects in a system model can be accessed through the system flowsheet by their unique IDs, which are displayed in the system diagram (Fig. S1 shows an example).
Process simulation
Our implementation with QSDsan reliably captures effluent quality outcomes across a representative range of WRRF designs. Across the portfolio of WRRF models, effluent concentrations at steady state generally track the design treatment targets of each configuration (Fig. 2). All configurations sufficiently remove organics (>85% COD and > 90% BOD; Fig. 2a, b) and solids (>85% TSS; Fig. 2c) from influent wastewater, with more advanced systems (BNR; from G1 to N2) consistently producing lower residual nutrients (Fig. 2d, f) than conventional secondary treatment (rBOD [B1–C3] or NIT [E2–F1]). Our simulations reproduced the overall magnitude and variability in treatment performance observed across configurations in previous GPS-XTM models13. Effluent TSS concentrations most closely match between the two simulation platforms, which we found to be predominantly driven by the value of “maximum non-settleable solids [mg-TSS·L−1]” in the final clarifier model or the solids removal efficiency of membrane units, wherever a membrane bioreactor (MBR) is used.
Vertical bars represent simulations with QSDsan (this study). Diamond markers represent simulations with the original GPS-XTM models, which are unavailable for certain configurations13. The target effluent concentrations based on each configuration’s design treatment level are taken from Tarallo et al.13 and indicated by a red dash line wherever applicable. Panels show effluent concentrations of a COD – chemical oxygen demand, b BOD – biochemical oxygen demand, c TSS – total suspended solids, d TN – total nitrogen, e NH4+-N – ammonia nitrogen, f TP – total phosphorus,; and g Ortho-P – orthophosphate. Design treatment levels: rBOD – basic BOD removal; NIT – nitrification; BNR – biological nutrient removal.
The largest deviation is in effluent ammonia (NH4+-N) concentrations for rBOD systems (i.e., 4.2 mg-N·L−1 in QSDsan versus 30.3 mg-N·L−1 in GPS-XTM for B1 configuration; Fig. 2e). With similar SRTs or sludge wasting rates, B1 in QSDsan simulations already presents an effective level of nitrification, removing over 80% of influent NH4+-N, whereas nitrifiers are completely washed out in the corresponding GPS-XTM model. This can be attributed to the inherently different assumptions for nitrification processes—most notably, GPS-XTM models two-step rather than one-step nitrification (Table S10) and uses a lower maximum growth rate and a higher decay rate for ammonia-oxidizers than default ASM2d assumptions at 20 °C. The GPS-XTM models also assumed a lower liquid temperature (15.6 °C)13, which contributes to reduced organics and nitrogen removal relative to QSDsan simulations. It is worth noting that the GPS-XTM models adopted different values for several nitrification and denitrification kinetic parameters between advanced (BNR and ENR) and conventional treatment (rBOD and NIT) configurations. We assumed a consistent set of parameter values across all configurations for the demonstration of this benchmarking framework so that all evaluated performance differences can be attributed to the differences in system design and operation settings.
The relative phosphorus removal performance across configurations simulated by QSDsan are in general agreement with the GPS-XTM results (Fig. 2f, g). With negligible PAO activities, phosphorus removal is limited in rBOD and NIT configurations. Most BNR configurations reduced effluent TP below the discharge limit (2 mg-P·L−1), demonstrating effective enhanced biological phosphorus removal (EBPR) or chemical phosphorus removal (i.e., H1 configuration). The only exception is the I2 configuration, which employs a 5-stage Bardenpho process21 and aerobic sludge digestion without primary treatment or external carbon source addition. Consistent with the GPS-XTM results, I2 failed to meet the effluent TP target despite the presence of PAOs. However, I3 was able to meet all effluent targets with an identical liquid treatment process. A contributing factor could be the excessive orthophosphate (OP) in the returning sidestream due to significant release and lysis of polyphosphate in sludge digesters, which are present in I1 and I2 but absent in I3. Specifically, I2’s returning sidestream contains 141 kg-P·d−1 of OP, equivalent to 74.6% of the OP mass flow in the raw wastewater. This percentage is 61.7% for I1 and merely 0.3% for I3. To prevent nitrifier washout in I3, the default volume of the anaerobic zone was reduced compared to the GPS-XTM model, with a corresponding increase in the aerobic zone volumes to maintain the total HRT. The exact design and operation parameter values can be found in Table S11 for all configurations.
The magnitude and variability of simulated biogas generation are generally consistent with the original GPS-XTM simulations. Biogas production rates tend to be lower in our simulations (Fig. 3), despite the identical design and operation settings of the anaerobic digesters between the two implementations. The relative error for daily methane production rate ranges from −6.8% to −15.0%. The simulated biogas methane content is also lower than GPS-XTM estimates by an absolute value of 2.4–7.6%. This deviation is, in part, because the underlying process model in our framework (ADM1p; an adaptation from the original ADM1) is different from the “mantis3” model in GPS-XTM in terms of state variables and individual biological processes considered (Table S10). Multiple kinetic parameters also differ between the QSDsan implementation and the original GPS-XTM models for the same process. For instance, the propionate half saturation coefficient for acetogenic biomass growth in the GPS-XTM is 1/10 of the default value in ADM1 or ADM1p. Across configurations, the impact of organic loading rate on biogas production is revealed in our simulations. C1 and I1 configurations produced significantly less biogas than B1 and F1, despite identical dimensions and operation of the anaerobic digesters, because C1 and I1 did not have primary sludge settling upstream and thus routed all influent organic carbon through the mainline biological treatment process, resulting in less COD routed to the anaerobic digesters.
Vertical bars represent simulations with QSDsan (this study). Diamond markers represent simulations with the original GPS-XTM models by Tarallo et al., which are unavailable for certain configurations13. Methane production rates are indicated by bars and diamonds on the left (teal). Biogas methane contents are on the right (orange).
Energy analysis and costing
The benchmark portfolio captures the key operational distinctions among representative WRRF process designs. Estimated variable operating expenses (OPEX) ranges from 0.055 to 0.389 USD·m−3 across the benchmark configurations (Fig. 4), which is consistent with the reported range for secondary or advanced U.S. treatment facilities operating at 70–110% design capacity (roughly 0.054–0.311 USD·m−3 after adjusting for inflation and accounting for the same cost contributors: power utility, chemicals other than disinfectant, and contractual expenditures like sludge disposal)22.
The stacked bars show the QSDsan-simulated contributions of different expenditure to OPEX, including power utility (aeration, pumping, mechanical mixing), chemicals (carbon, coagulant, lime), and sludge disposal. WRRF configurations are categorized by their design treatment level as indicated by the acronyms at the top of the graph (rBOD, NIT, BNR).
rBOD and NIT configurations tend to have lower OPEX than more advanced processes (BNR), where substantial chemical costs (coagulant and/or carbon) are incurred to achieve more stringent nutrient removal targets (e.g., G, H, and N configurations). Leveraging the influent organics for biological nutrient removal by eliminating primary settling, I1–I3 configurations effectively reduced the OPEX, but at the risk of violating the TP discharge limit due to insufficient EBPR as seen above (Fig. 2f). This reveals the trade-off between treatment reliability and operational cost savings. The absence of primary clarifiers tends to increase aeration costs for the same secondary treatment process (e.g., B versus C configurations). While the MBR design in N1 and N2 configurations can reliably remove solids at exceptional efficiency (Fig. 2c), it also significantly increases the energy consumption for internal recirculation, permeate pumping, and crossflow aeration, additional to costs for membrane cleaning and replacement. The higher MLSS concentration and the smaller physical footprint of N1 and N2 also come at a cost of elevated carbon dosage.
The simulations highlight the OPEX trade-offs across solids treatment options. Given the same liquid treatment process, configurations with aerobic sludge digestion (e.g., B2, C2, G2, I2) tend to have the lowest sludge disposal cost, because aerobic digestion is most effective at sludge volume reduction (followed by anaerobic digestion; solid code 1). However, the additional aeration demand largely offsets the cost saving from sludge disposal given the default assumptions on electricity and sludge disposal prices. Biogas generation from anaerobic digestion may also partly or fully offset fuel purchases or potentially generate revenue for the WRRF. This will be included in OPEX accounting in future work and will depend on the availability and type of energy recovery equipment (e.g., boiler, generator) on premises.
As a dominant contributor to operational electricity consumption, aeration cost is closely related to biochemical processes and key operational settings. All configurations, except N1 and N2, uniformly adopted a DO setpoint of 2 mg·L−1 for their aerated zones in secondary treatment. N1 and N2 (5-stage Bardenpho MBR) targeted a DO of 3 mg·L−1 in the first aerobic stage and 2 mg·L−1 for the second stage by default. Aeration flowrates derived from the DO setpoints and the simulated oxygen uptake rate (OUR) at steady state generally align with GPS-XTM estimates (Fig. 5a), with an average relative error of 9.7% across NIT and BNR configurations between two platforms. A notable exception was the B1 configuration with a 2-day solids residence time (SRT), where nitrifiers were washed out in GPS-XTM simulations but not in QSDsan simulations; this difference resulted in an increased OUR and higher airflow (relative error of 224%) required to maintain DO in the activated sludge reactors. When the WAS flow was increased in QSDsan simulations to shorten the SRT to 1.7 days, the predicted airflow demand dropped to 3.17 × 105 m3·d−1, reducing the relative error to 52.8%. At this SRT, nitrifiers were completely washed out, but the system still achieved lower effluent BOD (9.4 mg·L−1) than in the GPS-XTM model (Fig. 2b, c), partially contributing to the remaining difference in evaluated OURs.
Panels show (a) aeration flowrate and b aeration energy. Vertical bars represent simulations with QSDsan (this study). Diamond markers represent simulations with the original GPS-XTM models by Tarallo et al.13.
With consistent blower and diffuser assumptions across configurations, our model produced parallel trends between aeration flowrate and aeration energy consumption (Fig. 5b), indicating that discrepancies in energy estimates relative to GPS-X™ largely reflect differences in aeration flowrate predictions between the two platforms. The N1 and N2 configurations, however, deviate from this pattern: although aeration flowrates only differ from GPS-X™ estimates by −0.4–5.1%, the predicted aeration energy consumptions in QSDsan are lower by 37.1–40.4%. This suggests the GPS-XTM models likely applied different assumptions when calculating blower power for process diffused aeration versus membrane cleaning aeration. While the exact source of divergence is unclear, users could reconcile results by calibrating blower-motor efficiency separately for crossflow aeration in MBRs.
Methods
Benchmark configurations
All liquid treatment trains—except “O”, “D”, “P”, “L”, and “M” (Fig. 1a)—as well as all solid treatment trains (Fig. 1b) have been fully implemented using combinations of unit operations and process models in QSDsan, enabling plant-wide simulation of the following WRRF configurations (Fig. 1c): B1, B1E, B2, B3, B4, B5, B6, C1, C1E, C2, C3, C5, C6, E2, E2P, F1, F1E, G1, G1E, G2, G3, G5, G6, H1, H1E, I1, I1E, I2, I3, I5, I6, N1, N1E, and N2.
For liquid treatment, preliminary screening, grit removal, and post-treatment disinfection are universally applied across all benchmark WRRF configurations and are not explicitly modeled. Most configurations also involve primary treatment, which typically entails solid settling in primary clarifiers and optionally chemical phosphorus removal. Secondary treatment processes are designed based on the target effluent quality of the WRRFs. The conventional plug-flow activated sludge process (ASP) is the most common secondary treatment train for basic BOD removal (rBOD) or nitrification (NIT) targets, but longer hydraulic retention time (HRT) and solids residence time (SRT) are required for NIT than for rBOD. Although WRRFs designed for biological nutrient removal (BNR) and enhanced nutrient removal (ENR) account for a small share (<15%) of U.S. total treatment capacity, a diverse portfolio of secondary treatment trains was identified to achieve nitrification/denitrification and EBPR, including the Johannesburg process and variations of the Bardenpho process. Tertiary treatment using denitrification filters is often needed after secondary BNR processes to meet the stringent effluent limits for ENR configurations.
For biosolids management, anaerobic digestion is the most common sludge stabilization method, producing biogas and enabling energy recovery in the form of facility heating, direct thermal drying of dewatered solids, or combined heat and power generation. Other sludge stabilization methods include aerobic digestion, lime stabilization, and incineration. Anaerobic and aerobic digestion are typically carried out prior to dewatering, whereas lime addition or incineration, the latter of which requires fuel input, are applied only to dewatered sludge.
To enable direct comparisons between any two configurations, we followed the modeling practice in Tarallo et al. and adopted the same baseline assumptions for wastewater influent to all configurations—raw domestic wastewater with a constant flow rate of 10 MGD and concentrations as shown in Table 113.
Process models
To enable plant-wide simulation of a variety of WRRFs, we have developed a series of process models applicable to common unit operations for centralized wastewater treatment and biosolids management. While preliminary treatment and disinfection cannot be overlooked in plant-wide operation and costing, they do not affect the key composite measurements (Table 1) of wastewater effluents. Therefore, they are inactive in benchmark plant-wide simulation models. Design and operational parameter values were defaulted to those used in the corresponding GPS-XTM models by Tarallo et al.13 as much as possible. Coagulant and carbon dosages were lowered if the default values were found in simulation to be excessive relative to the design treatment targets. Sludge wasting rates were adjusted to match the SRTs and to meet the treatment targets (Fig. S2). All design and operation parameters are compiled in Table S11, with the adjusted values highlighted in red.
Primary treatment
We developed a SanUnit subclass in QSDsan, PrimaryClarifier, to represent the settling process of suspended solids in primary clarifiers. We assume the primary clarifier is volumeless and any changes in the influent composition are reflected instantaneously in its effluents. An ideal settling process is assumed for suspended solids. The mass balance of the primary clarifier can be described by Eqs. 1–4.
where \(Q\) indicates volumetric flows, \(X\) is the concentration of any particulate component (e.g., inert particulate organic materials), and \(S\) represents the concentration of any non-settleable component (e.g., OP). Subscripts \({in}\), \({pe}\), and \({ps}\) represent, respectively, the influent to the primary clarifier, primary effluent, and primary sludge. The concentration-based suspended solid removal efficiency \({e}_{{removal}}\) and the primary sludge flowrate \({Q}_{{ps}}\) must be specified by users. Another primary clarifier subclass based on the Otterpohl model, PrimaryClarifierBSM2, is also available in QSDsan and compatible for plant-wide simulations23.
Optionally, ferric or aluminum coagulants can be dosed in-line with the primary influent to precipitate OP and enhance COD removal in the primary clarifier. A SanUnit subclass, MetalDosage, was developed in QSDsan to model this process. Both the chemical phosphorus precipitation process and the coagulation processes (i.e., the transformation of soluble organic materials to their particulate counterparts) are assumed to reach equilibria instantaneously. The resulting component concentrations are calculated by solving a system of algebraic equations (Eqs. 5–8). These algorithms implemented in QSDsan are consistent with the GPS-XTM “metaladd” model10.
where \({Me}\) and \({OP}\) indicate the equilibrium concentrations of metal and orthophosphate, respectively. \(M{e}_{{in}}\) and \(O{P}_{{in}}\) are the influent concentrations. \(i\) and \(j\) are the mass-based stoichiometric coefficients for the precipitation reaction, which are derived from the molar-based stoichiometry \(a\) and \(b\) as well as the molecular weights \(M{W}_{{Me}}\) and \(M{W}_{{OP}}\). \({K}_{{sp},{M}{e}_{a}{\left(P{O}_{4}\right)}_{b}}\) represents the apparent solubility product constant of the corresponding metal phosphate salt. The dissociation factor of PO43-, \(\alpha\), is estimated based on the solution pH and the dissociation coefficients (i.e., \(p{k}_{a}\)) of orthophosphate. pH is assumed to be 7 unless specified by users. \({P}_{{Me}}\) is a user input representing the amount of metal coagulant dosed per unit volume of influent wastewater.
where \({S}_{{in}}\) and \(S\) indicate the influent and equilibrium concentrations of a soluble organic component subjected to coagulation. \({X}_{{in}}\) and \(X\) represent the influent and equilibrium concentrations of the corresponding particulate (i.e., coagulated) component. By default, it is assumed that soluble inert materials and a fraction of soluble fermentable substrates are “colloidal” and removable by coagulation and flocculation. Both the components and their removable fractions can be specified by users according to the state variables used in the plant-wide model. \({F}_{\min }\) and \({F}_{\max }\) are the minimum and maximum required metal dose to coagulate a unit of soluble component. \({k}_{a}\) is a component-specific parameter indicating the component’s affinity for coagulation. Default values of these model parameters can be found in the corresponding module documentation as well as Table S2.
Secondary treatment
Secondary treatment trains in all benchmark configurations can be modeled using arrangements of suspended-growth bioreactors. For instance, conventional plug-flow ASP can be modeled as identical continuous stirred tank reactors (CSTRs) in series, followed by a final clarifier with settled activated sludge partially returning to the first CSTR (as return activated sludge, RAS). BNR processes can simply be modeled by modifying tank volumes, aeration settings, influent distributions, and internal recirculation of individual CSTRs as well as clarifier settings. In place of the final clarifier, a membrane unit can be deployed in tank for biosolid retention and separation, constituting an MBR. Therefore, four distinct SanUnit subclasses—CSTR, PFR, CompletelyMixedMBR, and FlatBottomCircularClarifier—have been developed in QSDsan to model secondary treatment.
The FlatBottomCircularClarifier subclass implements the Takács 1-dimensional settling process model24. All biochemical processes are assumed to be inactive in this unit. Key user inputs include dimensions of the clarifier, mixed liquor influent location, and RAS and WAS flowrates.
The mass balance of any wastewater component \(j\) in a CSTR at any time \(t\) can be described as follows (Eqs. 9–11):
where \(Q\) and \({C}_{j}\) indicate the total volumetric flowrate and component \(j\)’s concentration in the CSTR at time \(t\). \({Q}_{i}\) and \({C}_{{ij}}\) represent those for influent \(i\). Volume of the CSTR, \(V\), is specified by the user and stays constant throughout the simulation. \({r}_{j}\) is the production rate (negative for consumption) of component \(j\) per unit volume of the mixture as an aggregated result of all the physical, chemical, and biological processes in the CSTR. For each individual process \(k\), \({\rho }_{k}\) indicates the reaction rate and \({a}_{{jk}}\) represents component \(j\)’s stoichiometry. The PFR (i.e., plug-flow reactor) subclass offers a convenient equivalent to multiple CSTRs in series, allowing users to specify design and operational assumptions (e.g., influent distribution, individual zone volumes, dissolved oxygen [DO] setpoints, internal recirculation) in batch.
The CompletelyMixedMBR subclass is implemented as a CSTR with ideal membrane filtration at the outlet. Therefore, the mass balance for soluble components follows exactly those in a CSTR (Eqs. 9–11) but the mass balance of particulate components is dependent on parameters specific to the membrane unit (Eqs. 12–14), including solids capture rate \({f}_{{rtn}}\) and mixed liquor pumped flowrate \({Q}_{{pumped}}\).
where \({Q}_{{filtrate}}\) and \({X}_{j,{filtrate}}\) indicate the volumetric flowrate and particulate component \(j\)’s concentration in the filtrate, respectively. Pumped flow has the same composition as the mixed liquor in the MBR and can be split and partially returned to the front end of the secondary treatment process. For simplicity, the current implementation does not consider effects of transmembrane pressure or cake formation on the membrane, assuming a constant liquid volume and ideal solids capture. A constant membrane cleaning air flowrate may be specified to account for the effects of crossflow aeration on biological activities in the bulk liquid.
To model \({r}_{j}\) (i.e., the aggregation of physical, chemical, and biological processes) in an activated sludge reactor, we have implemented a modified version of the Activated Sludge Model no. 2 d (ASM2d) as a Processes subclass, mASM2d25. Compared to the original ASM2d26, biomass decay rates in this implementation are dependent on concentrations of electron acceptors (DO or NO3−). State variable SALK (i.e., alkalinity) is replaced by SIC [mg-C·L−1], which measures the total concentration of all carbonic species, including CO2 (aq), H2CO3, HCO3−, and CO32−. The Monod-type growth inhibition term defined with SALK in the process rate equations are omitted. Potassium (SK) and magnesium (SMg) are modeled explicitly as new state variables, and the stoichiometry of the formation and release of polyphosphates (XPP) are modified accordingly. In place of ASM2d’s metal phosphate (XMeP) precipitation and redissolution processes, precipitations of AlPO4 (XAlPO4) and FePO4 (XFePO4) are modeled separately with similar kinetic rate expressions. A detailed description of the mASM2d can be found in Tables S3–S5.
Aeration in a suspended growth reactor can be specified in one of the following three ways: (i) specify a DO setpoint; (ii) specify the O2 mass transfer coefficient at field condition \({k}_{L}a\); or (iii) specify the air flowrate at field condition \({Q}_{{air}}\). If users specify a DO setpoint, aeration control in steady-state simulations is assumed to be ideal, i.e., DO is fixed at the specified setpoint rather than modeled explicitly with a controller. Otherwise, the oxygen transfer rate (\({\rho }_{{aer}}\), in mg-O2·L-1·d-1) is modeled as follows (Eq. 15):
where \(D{O}_{{sat}}\) is the DO saturation concentration at field condition, and \({k}_{L}a\) can be calculated as a function of \({Q}_{{air}}\) if not specified. To establish a mechanistic connection between \({k}_{L}a\) and \({Q}_{{air}}\), a Process subclass, DiffusedAeration, is implemented in QSDsan, taking into consideration the effects of impurities in water, diffuser fouling, temperature, diffuser submergence depth, elevation, and liquid volume (Supplementary Information).
In addition to oxygen transfer, stripping of CO2 and N2 from liquid phase to gas phase is also modeled in all suspended growth reactors. The liquid-gas transfer coefficients \({k}_{L}a\) for CO2 and N2 are linearly correlated with their diffusivities in wastewater as well as the \({k}_{L}a\) for oxygen due to active aeration, unless specified otherwise by users. A default gas stripping coefficient \({k}_{L}a\) of 3.0 d−1 is assumed for anaerobic and anoxic zones. The CO2 or N2 stripping rate (\({\rho }_{{stripping}}\), in mg-gas·L−1·d-1) can then be expressed as Eq. 16:
where \({K}_{H,{gas}}\) is the Henry’s Law constant, and \({p}_{{atm},{gas}}\) is the partial pressure of the gas in the air, assuming the reactors are open basins directly exposed to the atmosphere. \({S}_{{gas}}\) is the dissolved concentration, which is estimated as a function of solution pH for CO2.
For consistency, the composition of raw wastewater influent should be described in forms of mASM2d state variables (Table S3) prior to simulation. Therefore, a convenient waste stream fractionation model compatible with mASM2d has been developed in QSDsan. Key user inputs include concentrations of COD, NH4+-N, and OP, and fractionation of total COD into different organic variables. Default assumptions on the fractionation are consistent with raw wastewater in the GPS-XTM influent model (Table S1)10.
Solids treatment
Sludge thickening and dewatering processes were modeled using the same algorithm as PrimaryClarifier. The thickened or dewatered sludge flowrate is calibrated to match the solid percentage of concentrated sludge based on the influent sludge types. Since there is no sidestream returning to liquid treatment trains beyond sludge dewatering, solid treatment trains 1E and 4 can be effectively represented by the process model for train 1 (Fig. 1b). Solid trains 5 and 6 can also share the same process simulation model as train 3. Therefore, mainly two new SanUnit subclasses—AnaerobicCSTR and AerobicDigester—are developed in QSDsan to model the variety of solid treatment options.
AerobicDigester is modeled as a subclass of CSTR, compatible with the mASM2d process model and other activated sludge models. The key difference between AerobicDigester and an activated sludge reactor lies in an additional biochemical process: Particulate inert organic materials (XI in mASM2d state variable) can undergo first-order hydrolysis and transform into slowly biodegradable substrate (XS) in an aerobic digester. The stoichiometry and kinetic rate expression of this process are described below (Eqs. 17, 18).
where \({a}_{C}\), \({a}_{N}\), and \({a}_{P}\) are stoichiometric coefficients accounting for the differences in carbon, nitrogen, and phosphorus contents between XI and XS. \({k}_{{hyd}}\) is the first-order hydrolysis rate constant and set to 0.04 d−1 by default10.
AnaerobicCSTR is also modeled as a CSTR subclass, but with a gas-phase headspace. Our implementation strictly follows the approach described by Rosen et al., with the option to switch between DAE1 and DAE2 methods27. AnaerobicCSTR is compatible with all variations of ADM15 implemented in QSDsan. To enable plant-wide modeling of phosphorus transformations in WRRFs, one of the variations we implemented and used for benchmark simulation models is the ADM1p model. ADM1p extends the original ADM1 with several biological processes mediated by polyphosphate-accumulating organisms (PAOs)28. It introduces orthophosphate (SIP) as a new state variable and considers its effect as a nutrient on biomass growth. In addition to XAlPO4 and XFePO4 in mASM2d, precipitations of another five common minerals, namely calcite (XCaCO3), struvite (Xstruv), newberyite (Xnewb), amorphous calcium phosphate (XACP), and magnesite (XMgCO3), are also included in ADM1p. The precipitation kinetics follows Kazadi Mbamba et al. by default29,30,31, with the option to switch to a kinetic expression by Musvoto et al.32,33, or to modify the precipitation rate constants and the apparent solubility product constants. To enable communications between mASM2d and ADM1p in plant-wide simulations, two interface models were implemented as Junction subclasses. Detailed descriptions of ADM1p and the interface models can be found in Tables S6–S9.
Operational energy and costs
A series of utility functions is developed along with the benchmark models to enable agile operational energy analysis and costing. In the current development, variable OPEX items (i.e., the operating expenses sensitive to operational decision making) are prioritized over fixed ones, such as labor, building heating, or routine mechanical operations (e.g., moving arms, bridges).
Aeration
To estimate steady-state aeration energy demands for benchmark configurations, we implemented the same algorithm as GPS-XTM10, where blower power [kW] is estimated as a function of aeration air flowrate \({Q}_{{air}}\) [m3·d−1] (Eq. 19).
where \({T}_{{air}}\) is air temperature in K. \({P}_{{atm}}\), \({P}_{{loss},{inlet}}\), and \({P}_{{loss},{outlet}}\) are atmospheric pressure, pressure drop at blower inlet, and head loss in piping and diffusers, respectively, in kPa. \({d}_{{sub}}\) [m] represents diffuser submergence depth and \({\eta }_{{bm}}\) [-] represents the combined blower and motor efficiency. In cases where a DO setpoint instead of \({Q}_{{air}}\) or \({k}_{L}a\) is specified, an effective \({k}_{L}a\) to maintain DO at the setpoint is first derived from reactor mass balance at steady state (Eq. 20). Then \({Q}_{{air}}\) is calculated as a function of \({k}_{L}a\) (Supplementary Information) and applied to Eq. 19 for blower power estimation.
where \(Q\) and \({S}_{{O}_{2}}\) indicate the liquid volumetric flowrate [m3·d−1] and the dissolved oxygen concentration [mg·L−1], respectively. Subscripts \({in}\) and \(e\) represent influent to and effluent from the control volume \(V\) [m3]. \({r}_{{O}_{2}}\) is the oxygen uptake rate [mg·L−1·d−1] output by a biological process model (e.g., mASM2d). \({\rho }_{{aer}}\) is a function of \({k}_{L}a\) as presented in Eq.15.
Pumping and mechanical mixing
For pumping energy analysis, we leverage the Pump class in the BioSTEAM package34,35, which implements detailed pump selection, design, and costing algorithms from Seider et al.36. Key user inputs include the specific stream to pump, the hydraulic head, and any head loss. Pump power, along with the selected pump type, materials, and efficiency, are model outputs. For mechanical mixing, energy demand is simply estimated as the product of a user-specified mixing intensity in W·m−3 and the reactor volume. By default, anaerobic digesters and non-aerated zones in the activated sludge reactor are assumed to require mechanical mixing. Operational costs of equipment (including blower, pump, mixer etc.) are then calculated as the products of the estimated equipment power and a universal electricity price (7.82 cents/kWh by default), which can be specified by users through the PowerUtility object.
Chemicals
Coagulant for primary treatment or chemical phosphorus removal, external carbon for biological nutrient removal, and lime for class B sludge stabilization are included in variable OPEX accounting. Coagulant or carbon dosage is considered model input in steady-state simulations. The resulting cost is estimated based on the dosed chemical type and its corresponding price. While in the mASM2d model, ferric hydroxide (XFeOH) or aluminum hydroxide (XAlOH) are used as proxy state variables for coagulants, users can choose from common coagulants for costing, including ferric chloride, ferric sulfate, poly aluminum chloride (PAC), aluminum sulfate, and sodium aluminate. For lime stabilization, the required dosage is estimated as an empirical function of sludge solid content (Eq. 21)37.
where \({D}_{{CaO}}\) is the dose in lb pure CaO per wet ton sludge. \({TS}\) [%] is the sludge percent solid, which is a model output from the upstream dewatering unit.
Sludge disposal
Sludge disposal cost is simply estimated as the product of steady-state sludge production rate (i.e., the simulated mass flow rate of sludge cake) and the disposal price. A default price of $68.5 per wet ton is assumed for land application based on national data38 and can be modified by users without editing the source code.
Simulation platform
All benchmark WRRF configurations were assembled from the process models described above using an open-source simulation platform, QSDsan12. Critical algorithms for plant-wide dynamic simulations in QSDsan, including those for calculation of stream composite properties, unit conversions, numerical integration, and solving algebraic equations, have all been tested and verified against published MATLAB/Simulink implementations of benchmark simulation models (BSM1 and BSM2)8. Using the default settings for system design, operation, and process models, all simulated effluents and internal state variables at steady state (e.g., concentrations in activated sludge reactors and anaerobic digesters, TSS concentrations in each layer of the final clarifier) matched the reported values with <1% relative error. These steady-state simulations of BSM1 and BSM2 are included in the automatic code tests for continuous development and integration of QSDsan and EXPOsan20.
Developed following the object-oriented programming (OOP) paradigm, QSDsan offers unique benefits for the development and application of this agile benchmarking framework. Users are provided with full transparency of the algorithms and complete control over design and operational settings, as well as model parameters. In addition to a variety of built-in process models in QSDsan (e.g., ASM1, ASM2d, ADM1, and their interfaces), the OOP architecture provides users with the flexibility to model new processes (e.g., N2O production or Anammox) as a subclass of Process or Processes that is compatible with existing reactor models. Similarly, models of emerging treatment units (e.g., new reactor design or materials) can be implemented as a SanUnit subclass on the QSDsan platform and inserted upstream, within, downstream, or partially in place of existing configurations for plant-wide simulations. Work is underway to develop algorithms in QSDsan for costing and inventory analysis of the common unit operations above, which will enable streamlined CAPEX (i.e., capital expenditure) accounting and life cycle environmental impact assessments (including carbon intensity) for WRRFs by leveraging QSDsan’s existing TEA and LCA modules. QSDsan’s Model class and “stats” module also provide convenient features for batch simulations, uncertainty and sensitivity analyses, and model calibration. QSDsan’s capability for integrated system design, simulation, and sustainability assessment has been demonstrated with a variety of sanitation and resource recovery systems39,40,41,42.
Data availability
The datasets generated and/or analyzed during the current study are available in the EXPOsan repository, https://github.com/QSD-Group/EXPOsan/tree/main/exposan/werf/publication_data.
Code availability
The underlying code for this study is available on Github and can be accessed via this link: https://github.com/QSD-Group/EXPOsan/tree/main/exposan/werf.
References
McCarty, P. L., Bae, J. & Kim, J. Domestic wastewater treatment as a net energy producer–can this be achieved?. Environ. Sci. Technol. 45, 7100–7106 (2011).
Guest, J. S. et al. A new planning and design paradigm to achieve sustainable resource recovery from wastewater. Environ. Sci. Technol. 43, 6126–6130 (2009).
Larsen, T. A., Alder, A. C., Eggen, R. I. L., Maurer, M. & Lienert, J. Source separation: will we see a paradigm shift in wastewater handling?. Environ. Sci. Technol. 43, 6121–6125 (2009).
Henze, M., Gujer, W., Mino, T. & van Loosedrecht, M. Activated sludge models ASM1, ASM2, ASM2d and ASM3. https://doi.org/10.2166/9781780402369 (IWA Publishing, 2006).
Batstone, D. J. et al. The IWA anaerobic digestion model No 1 (ADM1). Water Sci. Technol. 45, 65–73 (2002).
Alex, J. et al. Benchmark simulation model no. 1 (BSM1). Rep. IWA Taskgroup Benchmarking Control Strateg. WWTPs 1, (2008).
Jeppsson, U. et al. Benchmark simulation model no 2: general protocol and exploratory case studies. Water Sci. Technol. 56, 67–78 (2007).
Gernaey, K. V., Jeppsson, U., Vanrolleghem, P. A. & Copp, J. B. Benchmarking of Control Strategies for Wastewater Treatment Plants. https://doi.org/10.2166/9781780401171 (IWA Publishing,2014).
wwtmodels. wwtmodels/Benchmark-Simulation-Models. (2025).
Hydromantis. GPS-X Technical Reference - v8.0. https://www.hydromantis.com/help/GPS-X/docs/8.0/Technical/index.html#CHAPTER%2012.
Products – EnviroSim. https://envirosim.com/products.
Li, Y. et al. QSDsan: an integrated platform for quantitative sustainable design of sanitation and resource recovery systems. Environ. Sci. Water Res. Technol. 8, 2289–2303 (2022).
Tarallo, S., Shaw, A., Kohl, P. & Eschborn, R. A Guide to Net-Zero Energy Solutions for Water Resource Recovery Facilities. https://iwaponline.com/ebooks/book/293/ (2015).
US EPA. Clean Watersheds Needs Survey (CWNS) – 2004 Report and Data (2015).
US EPA. Clean Watersheds Needs Survey (CWNS) – 2008 Report and Data (2015).
US EPA. Clean Watersheds Needs Survey (CWNS) – 2012 Report and Data (2015).
US EPA. Clean Watersheds Needs Survey (CWNS) – 2022 Report and Data (2024).
El Abbadi, S. H. et al. Benchmarking greenhouse gas emissions from U.S. wastewater treatment for targeted reduction. Nat. Water (In press) (2025).
Q. S. D. Group. werf: Benchmark Models for Water Resource Recovery Facilities (WRRF) in the US. EXPOsan https://github.com/QSD-Group/EXPOsan/tree/werf/exposan/werf (2025).
QSD Group. EXPOsan—EXPOsition of sanitation and resource recovery systems.
Metcalf & Eddy, Inc. Wastewater Engineering: Treatment and Resource Recovery (McGraw-Hill Higher Education, 2013).
US EPA. Analysis of Operations & Maintenance Costs for Municipal Wastewater Treatment Systems. (1978).
Otterpohl, R. & Freund, M. Dynamic models for clarifiers of activated sludge plants with dry and wet weather flows. Water Sci. Technol. 26, 1391–1400 (1992).
Takács, I., Patry, G. G. & Nolasco, D. A dynamic model of the clarification-thickening process. Water Res. 25, 1263–1271 (1991).
Solon, K. et al. Plant-wide modelling of phosphorus transformations in wastewater treatment systems: Impacts of control and operational strategies. Water Res. 113, 97–110 (2017).
Henze, M. et al. Activated sludge model No.2d, ASM2. D. Water Sci. Technol. 39, 165–182 (1999).
Rosen, C., Vrecko, D., Gernaey, K. V., Pons, M. N. & Jeppsson, U. Implementing ADM1 for plant-wide benchmark simulations in Matlab/Simulink. Water Sci. Technol. 54, 11–19 (2006).
Flores-Alsina, X. et al. Modelling phosphorus (P), sulfur (S) and iron (Fe) interactions for dynamic simulations of anaerobic digestion processes. Water Res. 95, 370–382 (2016).
Kazadi Mbamba, C., Batstone, D. J., Flores-Alsina, X. & Tait, S. A generalised chemical precipitation modelling approach in wastewater treatment applied to calcite. Water Res. 68, 342–353 (2015).
Kazadi Mbamba, C., Tait, S., Flores-Alsina, X. & Batstone, D. J. A systematic study of multiple minerals precipitation modelling in wastewater treatment. Water Res 85, 359–370 (2015).
Kazadi Mbamba, C. et al. Precipitation and dissolution. in Generalised Physicochemical Model (PCM) for Wastewater Processes (IWA Publishing, 2022).
Musvoto, E. Integrated chemical–physical processes modelling—I. Development of a kinetic-based model for mixed weak acid/base systems. Water Res. 34, 1857–1867 (2000).
Musvoto, E. V., Wentzel, M. C. & Ekama, G. A. Integrated chemical–physical processes modelling—II. simulating aeration treatment of anaerobic digester supernatants. Water Res. 34, 1868–1880 (2000).
Cortes-Peña, Y., Kumar, D., Singh, V. & Guest, J. S. BioSTEAM: a fast and flexible platform for the design, simulation, and techno-economic analysis of biorefineries under uncertainty. ACS Sustain. Chem. Eng. 8, 3302–3310 (2020).
BioSTEAM Development Group. BioSTEAM: the biorefinery simulation and techno-economic analysis modules. https://github.com/BioSTEAMDevelopmentGroup/biosteam (2023).
Seider, W. D. et al. Cost accounting and capital cost estimation. In Product and Process Design Principles 426–485 (Wiley, 2017).
Williams, M. J., Bizier, P., Groman, J. & Tippetts, R. Alkaline stabilization. in Design of Water Resource Recovery Facilities (MOP8) (ed. The Water Environment Federation (WEF)) (McGraw-Hill Education, 2018).
Beecher, N. et al. National U. S. Biosolids Data – FINAL REPORT: Advancing Understanding of Biosolids Management 30 Years after 40 CFR Part 503 and in the Early Stages of PFAS Concerns. https://www.biosolidsdata.org (2023).
Rowles, L. S. et al. Financial viability and environmental sustainability of fecal sludge treatment with pyrolysis omni processors. ACS Environ. Au 2, 455–466 (2022).
Watabe, S. et al. Advancing the economic and environmental sustainability of the newgenerator nonsewered sanitation system. ACS Environ. Au 3, 209–222 (2023).
Feng, J., Li, Y., Strathmann, T. J. & Guest, J. S. Characterizing the opportunity space for sustainable hydrothermal valorization of wet organic wastes. Environ. Sci. Technol. 58, 2528–2541 (2024).
Zhang, X., Arnold, W. A., Wright, N., Novak, P. J. & Guest, J. S. Prioritization of early-stage research and development of a hydrogel-encapsulated anaerobic technology for distributed treatment of high strength organic wastewater. Environ. Sci. Technol. 58, 19651–19665 (2024).
Acknowledgements
We thank Prof. Peter A. Vanrolleghem (Université Laval) for providing valuable insights and advice on wastewater process modeling and plant-wide simulation platform development. We also thank Jianan Feng (University of Illinois Urbana-Champaign) for sharing compiled data on wastewater treatment process characterization for U.S. facilities. This study was funded by the U.S. Department of Energy Industrial Technologies Office. The views expressed in the article do not necessarily represent the views of DOE or the U.S. Government. The publisher, by accepting the article to publication, acknowledges that U.S. Government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this work, or allow others to do so, for U.S. Government purposes.
Author information
Authors and Affiliations
Contributions
Conceptualization: X.Z., Y.L. and J.S.G.; Funding acquisition: J.S.G.; Methodology: X.Z.; Software: X.Z., Y.L. and S.R.; Validation: Z.W.; Visualization: X.Z. and Y.L.; Manuscript writing: X.Z., S.R. and Z.W. in collaboration with all authors.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Zhang, X., Rai, S., Wang, Z. et al. An agile benchmarking framework for wastewater resource recovery technologies. npj Clean Water 9, 4 (2026). https://doi.org/10.1038/s41545-025-00537-4
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41545-025-00537-4




