Systematic Design, Optimization, and Sustainability Assessment for Generation of Efficient Wastewater Treatment Networks

Due to population growth and economic development, there has been an increase in global wastewater (WW) generation footprint. There are different technologies associated with the wastewater treatment (WWT) process. The challenge is to select technologies that minimize the cost of treatment, as well as meet purity requirements. Further, there is a need to integrate sustainability analysis to facilitate a holistic decision. With the application of systems engineering, sustainable and cost-effective solutions can be achieved. In this work, we apply systems engineering to generate a sustainable and cost-effective solution. A superstructure was generated by categorizing technologies into four treatment stages. After modeling all functional equations for each technology, an optimization problem was formulated to determine the best path for the treatment process. Mixed-integer non-linear programming (MINLP), which implements a 0–1 binary integer constraint for active/inactive technologies at each stage was used. Sustainability analysis was performed for each representative case study (municipal and pharmaceutical WWT) using the sustainable process index (SPI). The total cost of municipal WWT is 1.92 USD/m3, while that for the pharmaceutical WWT is 3.44 USD/m3. With the treatment of WW, there is a reduction of over 90% ecological burden based on the SPI metric.


Introduction
One of the primary concerns for pollution prevention is the minimization of wastewater (WW) generation. WW streams generated usually contain various hazardous pollutants that need to be reduced to acceptable limits or concentrations before disposal. Since there are no substitutes for water, there is the need to treat WW for reuse, proper disposal, or recycling. Scientists in the past two decades have explored the systematic design and optimization of wastewater treatment (WWT) plants or networks [1][2][3][4][5][6][7]. However, there is still a lack of a holistic approach for designing efficient WWT networks [8]. WWT cost (economic reasons) [1] has been the primary driving force in decision-making by many industries, which might not be the best criteria if evaluated from the view of long-term sustainability and continued treatment efficacy.
In the field of WWT, many researchers have conducted work involving process design and optimization. Galan and Grossmann (1998) [9] used an optimization-based approach to address wastewater treatment network (WWTN) problems. Yang et al. (2000) [10] developed an optimal WWTN using a superstructure based approach by minimizing the WW generated from cleaning and rinsing processes. Rigopoulos and Linke (2002) [11] and Vidal et al. (2002) [12] later extended the research by solving the WWTN problem for either a given treatment process or a limited alternative design. Zeng et al. (2007) [13] used the analytic hierarchy process and grey relational analysis to provide WWT alternative selection. WWTN synthesis problems have been modeled as mixed-integer non-linear programming (MINLP) [2,4], which were solved using global optimization solvers. Through the implementation of a multi-objective optimization model, Zhang et al. (2014) [5] developed a framework for WW reuse. They developed Pareto fronts for cost minimization, BOD 5 reduction maximization, and wastewater reuse volume maximization using the genetic algorithm for the solution of the nonlinear optimization problem. Bozkurt et al. (2009) [14] used a more generic process model to develop a superstructure-based optimization methodology for WWT. Ku-Pineda and Tan (2006) [15] used the sustainable process index (SPI) as a means of measuring the environmental impact. However, in their work, they only concentrated on the retrofitting of WWNs. Optimizing the cost of treatment as well as sustainability assessment has been given some attention in recent years [5]. However, few studies focus on sustainability assessment using ecological footprints. Therefore, this work uses a superstructure-based approach to minimize the cost of WWT through an MINLP formulation and optimization, as well as employs the sustainable process index (SPI), which is an ecological footprint indicator, as the sustainability assessment metric.
In the following sub-sections, we explore the stages and categories in WWT, available treatment technologies and their models, WW contaminants and their classification, superstructure synthesis approaches to WWTNs, optimization approach (computational), and sustainability assessment of WWTNs.

Stages and Categories in WW Treatment
Typically, there are three main categories for WWT, as shown in Figure 1, namely: physical, biological, and chemical [16]. Due to this categorization, WWT is commonly performed in stages, namely: pretreatment, primary, secondary, and tertiary to effectively remove contaminants based on their physical, biological, and chemical properties [17,18]. The pretreatment stage typically consists of a screening unit to remove large solids such as rags, cans, bottles, or anything that could clog pumps or pipes downstream [17][18][19][20][21]. Another conventional process at the pretreatment stage is the addition of flocculants, which helps suspended solid contaminants to coalesce together and form heavier solids within the WW stream. After the pretreatment stage, the water flows to the primary stage, where contaminants are generally removed using physical means. Sedimentation and filtration are conventional technologies used at the primary stage to remove solid contaminants. Most bacteria and microorganism treatment methods are found at the secondary stage. The secondary stage is typically used to remove biological contaminants. The tertiary stage is usually used to adjust the pH and remove further, contaminants that are still not within the desired standards [6,7]. Mostly, the primary stage involves physical treatment processes, while the secondary and tertiary stages include biological and chemical treatment processes.

WW Treatment Technologies
The technology selected at each stage of the treatment process is dependent on the contaminants present, and the efficiency, as well as the driving force. These technologies are grouped into the pretreatment, primary, secondary, and tertiary stages. The next section provides descriptions of the various technologies.

Pretreatment Technologies
Flocculation (Flc) Flocculation is where a substance (flocculants) is added to a mixture that causes particles to cluster together to form bigger lumps [17,22]. Particles mostly become destabilized after the addition of flocculants. This destabilization of particles is termed coagulation [17]. Flocculation causes the suspended solids to cluster together, thereby forming rapid settling flocs which are removed at the primary treatment stage [23,24].

Primary Treatment Technologies
Sedimentation (Sdm) Sedimentation is a technology where the difference in density between components of a liquid mixture causes the less dense species to tend towards the top of the mixture and the heavier components to sink to the bottom [17,18,21]. Sedimentation occurs over a settling period, where the mixture is left alone so that it naturally separates due to gravity. Sedimentation is usually a primary step in the treatment process that removes large solid particles or flocs formed in flocculation [25].
Filtration (Granular) (Ftt) This method removes suspended solids (SS) during WWT. Particle size for SS ranges from 10-100 microns. Flocculation often takes place before feeding the WW to the filtration unit. Granular filtration involves the filter media being in bed layers. SS with bigger particle sizes is removed at the top layer while those with smaller sizes get removed at the bottom layer [17,26,27]. The removal efficiency is reliant on the type of filter media, the velocity of filtration, the particle concentration, as well as the physicochemical characteristics of the SS [28]. Different types of media used for this process include gravel, coarse, and fine sand [29].

Secondary Treatment Technologies
Adsorption (Ads) Adsorption is a process by which a stream (adsorbate) flows through a solid (adsorbent) and then deposits and accumulates onto the adsorbent [30]. Adsorbents used in this process are activated carbon, synthetic polymers, and silica-based adsorbents. Activated carbon is commonly used because it is cheap and responds relatively well to thermal regeneration after use [17].
Disinfection (Dis) Disinfection is used to kill bacteria and hazardous compounds that are found in WW. There are three main disinfection techniques; chemical, physical, and radiation [31]. Chemical techniques include chlorination, ozonation, and acid and alkaline treatment [32]. Physical techniques involve heating, UV irradiation, filtration, and settling [33]. Radiation techniques involve electromagnetics and acoustics [34]. Chlorine is the most common chemical used for disinfection. Light/heat disinfection is also conventional, but it becomes exorbitant when large quantities of WW are to be treated [35,36].
Rotating Biological Contactors (RBC) Rotating biological contactor (RBC) is a biological process that consists of basins in which large circular disks mounted on horizontal shafts rotate slowly through WW streams. Mostly they are divided into various compartments by baffles in a single basin or reservoir. Mounted on the shaft is a series of closely spaced, large-diameter rotating discs [37,38]. The speed of rotation and disc diameter control the efficacy of biomass removal. Rbc typically removes biological oxygen demand (BOD), phosphorus, and nitrates, and some suspended solids during the treatment process [38].
Membrane Bioreactor (Mbrt) This treatment technology consists of a bioreactor with immersed membranes. The membrane consists of different plastic and ceramic materials. In order to scour the membrane, compressed air is passed through the system. Organic carbon and other nutrients get removed through this technology [39,40]. An increase in aeration rate helps to reduce the formation of biofilms on the surfaces of the immersed membranes [41]. The operation of membrane bioreactors mimics that of activated sludge, except that there is no need for a secondary clarification unit. It is one of the benign treatment technologies and promising one due to high effluent quality [42].
Constructed Wetlands (Cwl) Constructed wetlands exploit the idea of naturally using vegetation, soil, and microorganisms to treat WW. The vegetation converts inorganics within the WW into organics. Nitrates and other nutrients are taken up from the WW by plant roots [43]. There is a little bit of sedimentation, as well as filtration, as the WW passes through soil layers [25]. The selection of a plant species is critical to the performance of a constructed wetland [44,45]. Constructed wetlands can be used in small and remote areas, as there are no high operating costs associated with them [46].
Microbial Fuel Cells (Mfc) In microbial fuel cell technology, the substrates in WW get degraded by the action of microbes. Microbes oxidize these organic substrates at the anode chamber, and by doing so, generate electricity due to the transport of electrons to the cathode chamber of the cell. Hydrogen ions pass through a semi-permeable membrane to the cathode chamber, where they combine with supplied oxygen to form purified water [47,48]. Using WW as fuel provides the benefit of water purification and electricity generation simultaneously in the microbial fuel cells. However, the high capital cost associated with this technology is the main barrier in their commercialization [49].
Activated Sludge (Asl) Activated sludge is a process used mainly for the treatment of biological contaminants. It is used to transform biodegradable organics into more stable substances. The classical treatment implemented with regards to activated sludge is the suspended growth process which can be either aerobic or anaerobic [17,18]. Activated sludge process usually consists of three basic components namely: a reactor for microorganism suspension, a liquidsolid separation chamber, and a recycle system [50]. The activated sludge technology has been implemented by various utility and industrial companies to treat their wastewater streams [51][52][53].

Tertiary Treatment Technologies
Advanced Oxidation Processes (Aop) In advanced oxidation processes, oxidizing agents oxidize contaminants in the WW. Some advanced oxidation processes are hydroxyl radical-based and sulfate radical-based [54]. The hydroxyl or sulfate radicals react with organics within the WW, thereby decomposing them [55]. Some advanced oxidation processes are Fenton, photo-assisted Fenton, catalytic ozonation, photocatalysis, a combination of hydrogen peroxide, and ozone, and a combination of hydrogen peroxide and [56][57][58].
Membrane Processes (Mbr) These are pressure-based filtration technologies that employ particle sizes and a semi-permeable membrane for separation. The leading technologies are microfiltration, ultrafiltration, nanofiltration, reverse osmosis, dialysis, and electrodialysis [59]. Membranes technologies with smaller pore sizes tend to be costlier. These WW treatment systems can achieve an efficiency of about 99% [17,[60][61][62].
Bleaching (Blc) Bleaching is a technology in the WWT process that removes impurities to improve the color of the treated WW. It occurs at the final stage of the treatment (tertiary). The typical WW streams that mostly require bleaching are the ones from the pulp-and-paper indus-try [63,64]. The bleaching technology typically uses chlorine, in the form of hypochlorite, and ozone.
The design of WWTP presents a systems problem due to the different types of technologies available for the treatment and the contaminant characteristics. Therefore, the treatment process is performed in stages as depicted by Figure 2. The classification of the treatment technologies into stages is primarily based on the efficiency, the driving force for separation, and the contaminant being removed. The primary stage typically comprises technologies with lower efficiencies as they are mainly for the removal of solid contaminants. The secondary stage comprises typically of technologies that are able to remove biological and chemical contaminants. The tertiary stage typically contains technologies with the highest efficiencies, compared to the primary and secondary stages. However, in some scenarios, the tertiary stage can be neglected when purity requirements are not stringent. Figure 2 shows the stage-wise WWT and some conventional technologies involved in each stage. In the diagram, three-letter names abbreviate the technologies. Henceforth, we shall use these in our process flow diagrams and superstructure representations.

WW Contaminants and Their Classification
There are different ways to treat a WW stream; as such, there is the need to characterize the stream to apply the appropriate treatment technologies. Typical WW streams contain contaminants like total suspended solids (TSS), total dissolved solids (TDS), pH, phosphates, nitrates, oil, and grease contents, heavy metals, and others [8,18,20,65,66]. Some contaminants are often classified as either a biological or chemical oxygen demanding component. Biological oxygen demand, known as BOD, is an indicator given to components such as fatty acids, proteins, alcohols, and sugars [17,19,21]. The biological oxygen demand (BOD) is a measure of how much oxygen is needed for the microorganisms to remove the contaminants. Chemical oxygen demand, known as COD, is an indicator to help contain all types of chemically treated contaminants and typically includes substances that require BOD as well [67]. A ratio between the COD and BOD can help determine the total amount of oxygen needed to oxidize contaminants to acceptable concentration levels in the WW.

WW Treatment Using Superstructure and Optimization Approach
Selecting a specific technology for each of the different stages of treatment to meet purity requirements, and at the same time, minimize the overall cost of treatment is a vital decision-making opportunity. Thus, the complex nature of design necessitates the application of systems engineering tools to help in deciding which of the technologies would be suitable for a given WW stream, with emphasis on purity and cost minimization. One of the ways to go about this problem is by using the superstructure generation and optimization approach [4,[68][69][70]. This aids in the selection of optimal pathways for WWT. Superstructure models have been implemented not only in WWT, but also in the biobased industry [68,69] and the pharmaceutical industry [71]. Ahmetovic and Grossman (2011) [72] worked on a global optimization for integrated process water networks where they used a mixed-integer approach to obtain optimal solutions for different optimal paths using a superstructure model. Furthermore, through a superstructure representation, mixed-integer non-linear programming (MINLP) was developed to solve an optimization problem of a river that served as both source and sink from different sectors [73]. Moreover, an optimal path for WWTN with dynamic influent was designed, which employed disjunctive programming and mixed-integer non-linear programming using a superstructure model approach [4]. Superstructures are very effective ways of representing WWT technology selection.

Sustainability Assessment
Sustainable development (SD) has become an essential objective for policymakers. As such, sustainability should be one of the paramount factors to consider in deciding on a suitable WWT and disposal method [8]. One of the ways to help in achieving a sustainable ecosystem is to treat WW for reuse. Direct disposal of WW into sinks has proved damaging to the goal of achieving sustainability. It is, therefore, imperative to consider sustainability in the overall design and implementation of the WWT practices [74][75][76]. One of the ways to quantify sustainability is to perform a life cycle assessment (LCA) of the optimal pathways predicted via the superstructure optimization approaches [77,78].
An alternative to LCA for quantifying the sustainability of WWTNs is the sustainable process index (SPI). The SPI, developed by Narodoslawsky and Krotscheck [79], is an ecological footprint that quantifies the area needed to provide goods and services. The core of the SPI evaluation is the calculations of the area needed to embed a process entirely into the biosphere [80]. It has been widely applied in the measurement of ecological performance in production systems [81]. SPI uses material and energy balances for evaluation purposes. It describes the relevant ecological pressures of a process, including the supply chain, product usage, and disposal. There are seven footprints, quantified by area, which are calculated using the SPI methodology. These footprints are the area needed for raw material production, the area needed for the energy production, the area needed for installation of equipment, the area needed for staff, and the area needed for embedding water, soil, and air emissions sustainably into the ecosystem. The sum of these partial areas gives the total arable area needed for that process. There are other sustainability assessment methodologies and the work by Singh et al [82] provides an in-depth analysis of these various methodologies.
Thus, in this work, we present a framework for designing efficient WWTN using the superstructure optimization approach and then support our results by providing a complete sustainability assessment via the sustainable process index (SPI). In section two, we focus on the development of our models and the generation of the superstructure. We also present the optimization technique employed. We present our results and discuss some key findings from our work in section three. Finally, we provide a conclusion of the work in its entirety.

Methodology
In this section, we present the technology modeling, the separation networks synthesis, superstructure generation, and optimization strategies.

Model Building
WWT is commonly implemented in stages. These treatment stages usually consist, typically of pretreatment, primary, secondary, and tertiary stages, as depicted by Figure 2. Each stage consists of multiple technologies. Depending on the efficiencies of the technologies, the characteristics of the WW stream, the desired level of contaminant removal, certain stages can be bypassed. Information was gathered and analyzed to build mathematical models that best simulate the treatment process required.
In building the mathematical models for each technology, we considered mass and energy balances, design capacity, constraints, capital cost, and operating cost. The mass balances include all the WW constituents and other materials entering the processes. For example, disinfection utilizes ozone while bleaching uses hypochlorite. Energy balance consists mainly of the power needed to operate each technology, heating, and cooling utilities. The volume or area required by each technology (as deemed appropriate) comprises the design capacity equations. WW purity constraints and capacity constraints for each technology constitute the constraint equations (see Supplementary Materials for detailed equations for each technology).
The total cost of treatment is made up of capital and operating costs. The capital cost was annualized over a plant life of 30 years using a capital recovery factor of 0.11. The operating cost constitutes five categories: materials, labor, utilities, consumables, and other costs. Material cost includes the purchase cost of ozone, flocculants, and sodium hypochlorite added in respective technologies. Labor cost is based on a 330-day working period per year at a rate of USD 30 per hour. Utilities are made up primarily of the power required by each treatment technology. Consumable cost constitutes the cost of membranes for technologies that require membrane and granulated activated carbon (GAC) for the adsorption technology. The other cost is made up of overhead costs for project management.

Generation of Superstructure and Optimization Technique
Superstructures are a powerful way of representing a process synthesis problem. It considers all of the possible technologies that can be used in the treatment process and thus enables the capturing of the overall complexity of the problem [2,3,70,83,84]. To this end, in this work, we present a specific superstructure for the two case studies comprising all possible connections from the inlet WW stream to the final treated water and includes all the possible treatment technologies and the ability to bypass a treatment stage, if not required.
The first stage in the superstructure is the pretreatment stage, which is made up of a flocculation (Flc) unit. The second stage is made up of primary treatment technologies, specifically, granular filtration (Ftt), and sedimentation (Sdm). Adsorption (Ads), activated sludge (Asl), rotating biological contactors (Rbc), membrane bioreactor (Mbrt), and disinfection (Dis) are the technologies for the secondary stage. The tertiary stage is made up of advanced oxidation processes (Aop), bleaching (Blc), and membrane processes (Mbr).
Depending on the optimization, the optimal path may or may not include a stage. The bypass (Byp) stream allows for that option. Figure 3 shows the overall superstructure for WWT. Each stage of the treatment process is linked to the next stage by mixers (Mxr) and splitters (Splt).
MINLP (which comprised stream flows, technology models, and purity constraints) problem is formulated to minimize the overall cost of treatment while meeting the purity constraints. The binary variable approach is adopted, where a technology selected is assigned a value of "1", while those not selected are assigned a value of "0". A value of "1" signifies that a treatment technology is active, while a "0" value indicates an inactive technology. The optimization problem is formulated in the General Algebraic Modeling System (GAMS) software (v 30.2.0). The Branch and Bound Navigator (BARON) [85] solver, which is a global optimization solver, was used for the solution.

Sustainability Assessment Using the Sustainable Process Index (SPI) Methodology
The SPI is part of the ecological footprint family and uses square meters of land as the ecological indicator. SPI helps in a comprehensive evaluation of all relevant emissions and resources. Furthermore, the basis of assessment is the natural flow of mass and energy.
Additionally, it is a well-tested and proven method for assessing the ecological footprints of processes [15]. The use of SPI strongly emphasizes the regional context of the evaluation process. This feature helps to obtain more accurate results. The underlying assumption upon which SPI centers is that in a sustainable economy, solar energy provides the only real resource input. The amount of solar energy to be used is bound to the earth's surface. Since the earth's surface is finite, the area is also finite in a sustainable economy. By considering the dual function of the area as a recipient of solar energy and as a production factor, the SPI can measure the ecological impact of a process. Equation (1) gives the basic equation for calculating SPI values.
where A R is the area needed for raw material production, A E is the area needed for energy consumption, A I is the area needed for installation of equipment, A S is the area needed for staff, and A P is the area needed to dissipate the products sustainably into the ecosystem. A R takes into account the area needed to provide both renewable and non-renewable raw materials. Equation (2) gives the area needed for renewable raw material production, A RR .
The flow of renewable raw material F RR (kg/y), in this case, is WW. The annual yield of rainfall, y RR (kg/m 2 y), is estimated using average precipitation rate (from the year 2009 to 2019) data from the United States' National Oceanic and Atmospheric Administration (NOAA) website [86]. This value is 0.8105 m/y (31.91 in/y). The precipitation rate is multiplied by the density of water and a seeping ratio of 0.3 to give a value of 243.2 kg/m 2 y. The area needed to supply non-renewable raw material, as shown by Equation (3), is estimated by using the energy demand to supply one kilogram of the material in question, and the mean industrial energy supply. F RN (kg/y) is the flow rate of the non-renewable raw material used in the WW treatment. E D,RN (kWh/kg), which is the energy demand, is estimated using Equation (4). C N (USD/kg) is the price of the material excluding taxes, while C E (USD/kWh) is the price of one kilowatt-hour of energy. The annual non-renewable raw material yield is given by y RN (kWh/m 2 y).
A E takes into account the area needed to provide energy for the WWT. In estimating this area, any energy carrier, such as coal, oil, and biomass, is treated as a raw material. Equation (5) is used to estimate the area needed to provide energy for the process. F E (kWh/y) is the energy used in the process, and y E (kWh/m 2 y) is the energy yield. Narodoslawsky and Krotscheck (1995) [80], gave a value of 43 kWh/m 2 y for electricity.
A I depicts the area needed to provide direct and indirect installation. Direct installation includes the area needed to install the various technologies, while the indirect area accounts for the area needed for other installations, such as pipelines and valves. The direct installation area is derived from the optimization problem. Similar to using the energy demand in estimating the area needed for non-renewable raw material, Equation (6) estimates the area needed for indirect installation. E D,II (kWh/y) is the energy demand while y I (kWh/m 2 y) is the energy yield.
where A C is the cross-sectional area of the technologies and A II is the indirect area. The energy demand is estimated using Equation (7). C I (USD) is the cost of the installation, while LS (y) is the life span of the process. The 'other cost' category is used for C I , with plant life of 30 years assumed for LS.
A S is the area needed to accommodate the number of workers or staff at the treatment plant. The total number of workers, N S (cap/y), and the staff yield, y S (cap/m 2 y), are used to estimate the staff area, as shown by Equation (8).
A P is the area needed to dissipate the exit product stream from the process into the environmental compartments air, water, and soil. The dissipation is related to the rate of natural regeneration of the environmental compartment. The area needed to dissipate the products is evaluated using the rate of renewal of compartment c (R C kg/m 2 y), the allowable concentration of substance m into the compartment c (C m,C , kg m /kg), and the product flow, F m,C (kg m /y), of substance m into compartment c. The rate of compost regeneration depicts the rate of soil regeneration. The rate of soil renewal in the United States averages 0.00022 m/y. Assuming the soil is loamy with a 50% pore space, the bulk density is 1300 kg/m 3 . Multiplying the density by the rate of soil renewal gives a R soil value of 0.2926 kg/m 2 y. The precipitation rate and seeping ratio used for estimating the yield of water in Equation (2) was used for the rate of regeneration of the water compartment. This value corresponds to the renewable resource yield, y RR . Shown by Equations (9)-(12) are the equations for calculating the area for dissipation, where A Pc is the flow of substance m in compartment c, and A PS,c is the flow of substance m from stream s into compartment c.

Framework for Optimal Design Evaluation
Below is the systematic framework for the evaluation of WWT: Step 1: determine technology parameters, the inlet stream composition, and outlet stream specifications Step 2: build mathematical models for all treatment technologies based on material balances, energy balances, capacity equations, and cost.
Step 3: generate a superstructure that identifies and considers parallel technologies at every stage of the treatment process.
Step 4: formulate an MINLP problem to minimize the cost of treatment while meeting the outlet stream specifications.
Step 5: perform a sustainability assessment of the selected treatment pathway using the SPI metric. Perform a comparative assessment of the ecological burden incurred with and without treatment of the WW.

Municipal (Regional) Case Study
A case study of municipal WWT for irrigation was implemented to test the robustness of our superstructure and SPI analysis. We characterized the WW streams by grouping various contaminants into three main categories: solids, metals, and chemicals. The solid contaminants comprised mainly of settleable and suspended solids. The metals category included heavy metals commonly found in WW, such as lead, zinc, and copper. The chemical contaminants included chlorides, acids, organics, and inorganic compounds. Municipal WW typically contains higher concentrations of BOD and COD due to the presence of higher concentrations of organic compounds. Table 1 shows some types of contaminants found in municipal WW streams, while Table 2 gives the different categorization of the contaminants which were implemented in the optimization problem. Table 1. Types of contaminants found in municipal WW (References: [8,[17][18][19]62,84]).

Contaminant Concentration Units
Acids  Table 2. Municipal case study contaminants and purity constraints for GAMS modeling.

Contaminants Inlet Concentrations (g/m 3 ) Outlet Specifications (mg/m 3 )
Solids (settleable) 200 ≤2 Metals (Pb, Cu, Zn, Ni) 0.1 ≤0.005 Chemicals (acids, chlorides, organics, and inorganics) 1 ≤0.001 Table 3 gives the GAMS solution statistics of the optimization problem. The number of equations involve the detailed technology models, binary and logical constraints, overall costing equations, as well as SPI evaluations. The detailed equations are provided in the Supplementary Materials.  Figure 4 shows the optimal network path (pretreatment: flocculation (Flc); primary treatment: sedimentation (Sdm); secondary treatment: adsorption (Ads); tertiary treatment: bleaching (Blc)) for the treatment process through GAMS. It also shows the cost contributions from each stage. The adsorption unit has a capacity of 24.31 m 3 with a purchase cost of USD 46,522, while the bleaching process has a capacity of 190.45 m 3 with an equipment purchase cost of USD 52,377. The purchase cost was annualized for a 30-year plant life. Since the concentration of the solids for the municipal WW is high, the process first selected a primary stage to remove the appreciable amount of the solid contaminants.
The mass of flocculant required by the flocculation unit for the purification process is 796,356 kg/y, while the mass of sodium hypochlorite needed for the bleaching process is 1,307,164 kg/y. The mass of granulated activated carbon (GAC) required, as a consumable, for the adsorption unit is 275,436 kg/y. This value is high because there is no regeneration of the GAC. By regenerating the GAC, the annual amount needed could be reduced, and hence the cost. Furthermore, the replacement time of 30 days for GAC plays a significant role in determining the amount needed per annum.
The flocculant and sodium hypochlorite are the materials needed for the treatment process, with an annual cost of USD 597,270 and USD 457,510, respectively. The cost of flocculant is high because there is a higher concentration of solids in the WW stream. Another significant factor contributing to the high flocculant cost is the unit cost. The secondary stage contributed a total consumable cost of USD 19,832. The tertiary stage contributes USD 45,251, being the highest in the cost of labor with a percentage value of 78.3%. This is because sodium hypochlorite poses both human and environmental hazards. Therefore, constant supervision is needed to make sure the equipment is running as required. The pretreatment and primary stages contribute a total of 1.7% to the total labor cost. The total labor cost is USD 57,800.
The utility cost was calculated based on the power required for each technology. The tertiary stage contributed the highest percentage, 89.6%, to the utility cost. The pretreatment and primary stages contributed a combined 0.03% to the utility cost since the technologies selected for these stages are not energy-intensive. The last category of the cost analysis is other costs. This cost constitutes overhead and supervisory costs (Peters et al., 2008). Moreover, 65.6% of this cost is associated with the tertiary stage. The primary and secondary stages contribute 16.7% and 16.8%, respectively, with the pretreatment stage contributing to the remaining 1%. The total cost of the other cost is USD 122,715.
The pretreatment stage contributes a total of 82% to the total treatment cost. The next highest contributor with a percentage of 14% is the tertiary stage. The secondary stage contributed a total percentage of 2.1%, with the primary stage contributing 1.7%, being the least contributor to the total cost. Figure 5 gives the percentage distribution for the cost category at each stage of the purification process.
The annual cost of purification of WW treated, for a 7920-h of yearly operation is 1.92 USD/m 3 . Out of this cost, the total operating cost (material cost, consumable cost, labor cost, utility cost, and other costs) of WW treated is 1.65 USD/m 3 . Table 4 gives a summary of the second and third best treatment networks. Figure 5. Percentage stage-wise cost for municipal WWT. TC is the total treatment cost. It can be noted that the material cost contributes the highest cost to the total treatment cost. Therefore, other alternatives can be used to lower the cost contribution of the materials. SPI is the area that is exclusively utilized within 1 year. The smaller the SPI, the lower the impact of the process on the ecosphere. The area needed to embed soil emissions sustainably into the ecosystem has the highest percentage contribution of 77.7% for municipal WWT. This is due to the low allowable concentration of metals dissipated into the soil compartment. Since there are different metals in the WW stream, we used Pb to quantify this category. This is because Pb has the lowest yearly allowable concentration in the soil compartment. Therefore, the area using Pb takes care of the other metal contaminants. This assumption of using the contaminant with the highest area is consistent with that made by Narodowslawsy and Krotscheck (1995) [80].
The raw material area is the next highest percentage contributor (14.3%) to the total SPI value. However, this value strongly depends on the amount of WW treated annually. Interestingly, the area needed for installation contributes least to the total SPI value. By comparing the total SPI area needed for WWT to direct disposal (i.e., without any treatment), the SPI increases by 99.8%. Thus, it is environmentally favorable to treat WW before disposal. In estimating the area needed for direct disposal, only the area needed to embed the WW into the soil, and water compartments were considered. This assumption is reasonable since other categories of the SPI become significant only when there is a treatment process.

Pharmaceutical WW Case Study
WW generated from pharmaceutical industries vary not only in composition but also in quantity, by plant, season, and even time, depending on raw materials used in the manufacturing process [68,87]. A second case study was implemented for the treatment of WW effluent from the manufacturing process of the 'Tylenol Cold + Flu Severe" drug. Various contaminants are encountered in the manufacturing process, which end up in the WW stream. More importantly, the WW stream typically contains active pharmaceutical ingredients (APIs). Table 5 gives some active pharmaceutical ingredient (API) contaminants present in the WW stream after production. The production plant is assumed to dispose of 100 m 3 /h of WW, and the treatment is for irrigation purposes. Table 5. Some APIs found in the WW Stream (References: [88,89]).

Contaminants
Concentration ( The contaminants are grouped into solids, metals, chemicals, and APIs. Table 6 gives the inlet and outlet stream specification for the pharmaceutical WWT case study  Table 7 gives a summary of the GAMS statistics for the pharmaceutical WWT case study. Figure 6 shows the optimal network path for this case study as well. The optimal path for the pharmaceutical WWT case study is flocculation (Flc), filtration (Ftt), adsorption (Ads), and bypass (Byp4). The area required for the granular filtration unit is 494.63 m 2 , with a purchase cost of USD 130,330. This was the highest contributor to the total purchase cost. The mass of flocculants required is 215,464 kg/y, while that for granular activated carbon (GAC) is 280,207 kg/y. The only material cost associated with the pharmaceutical WWT is flocculants cost. Filtration and adsorption contributed to the total cost of consumables. The primary stage dominates the labor cost with a percentage contribution of 30.5%.  Figure 7 shows the percentage stage-wise cost breakdown for the optimal path of the pharmaceutical WWT process. The total cost of treatment for a 7920-hour annual operation is 3.44 USD/m 3 , while that of the operating cost for the treatment process is 3.16 USD/m 3 . Table 8 presents a summary of the second and third best treatment networks for this case study. Other costs from the primary stage dominated the overall cost of treatment. Table 8. The second and third best treatment options for pharmaceutical WWT. There is a 53.8% increase in the second-best option, and 83.5% increase in the third-best option concerning the optimal treatment option.

Treatment Treatment Network Pathway Cost (USD/m 3 WW)
First best (optimal treatment option) The dissipation of chemical contaminants into the water compartment of the ecosystem contributes highest to the SPI value. This is because of the smaller yearly allowable concentration, and the higher chemical contaminant flowrate to the water compartment. The area needed for installation contributed least to the overall SPI value. Thus, the treatment pathway has a low environmental impact on the overall sustainability evaluation. Reducing contaminant concentration from source is the best way of reducing the ecosystem impact for pharmaceutical WWT since the dissipation of contaminants to the various ecosystem compartments contributed 93.9% to the overall SPI value. Without any treatment, the area needed to dissipate the WW sustainably into the ecosystem increases with a percentage of 91.7%. Thus, it is 91.7% environmentally costly to dispose of pharmaceutical WW into the ecosystem without any treatment. Figure 8 shows the SPI values for the case studies. It can be seen that even with the treatment of pharmaceutical WW, the SPI value is higher than the direct disposal of municipal WW. It is, therefore, important to reduce the amount of API that gets into waste streams as this was the cause of an increase in the SPI value for pharmaceutical WWT. There is about a 44% increase in the treatment of pharmaceutical WW compared to municipal WW. This significant difference is due to the fact that pharmaceutical WW contains API. Moreover, filtration which has a higher technological cost was preferred to sedimentation in the case of pharmaceutical WWT. Flocculation and adsorption were selected in each case due to higher solid and chemical concentrations.

Conclusions
Studies on WWT using a superstructure model approach were conducted, and two case studies, pharmaceutical and municipal WW streams, were presented. These case studies included most of the technologies associated with WW treatment.
In our first study, we treated a municipal WW stream based on our superstructure model. In this study, we found out that the capital cost contribution was 13.80% of the overall cost, while the remaining 86.2% accounted for the operating cost. The highest contributing operating cost category was material cost, which accounted for 80.5% of the total operating cost. Without treating the WW, there would be an extra ecological burden of 99.8% incurred based on the SPI metric to embed the WW into the ecosphere sustainably. In our second case study, we applied our superstructure to a pharmaceutical WW stream. 8.2% of the total cost was due to capital cost, while the remaining 91.8% was due to operating costs. Out of this 91.8%, other cost contributed the highest percentage with a value of 53.2%, while the least cost contributor was utility (1.8%). The SPI value for direct disposal without treatment dwindles that of treatment by 90.8%. For the same flow rate of 100 m 3 /h, the cost of WWT for municipal WW supersedes the pharmaceutical WW by~44%. This is because they both have different contaminant characterization and concentrations. Moreover, different technologies were selected at the primary stage treatment process. Based on the sustainability analysis, WWT for reuse proved a better alternative to direct disposal into the environment.
Most of the technologies included are common in the field of WWT; therefore, the costs generated, and the sustainability assessment are reliable insights into making a holistic decision for designing WWT networks. Our superstructure based approach integrated with the sustainability evaluation presented here can be a general guide in the selection of technologies for WWTNs.
Supplementary Materials: The following are available online at https://www.mdpi.com/article/10 .3390/w13091326/s1, Mathematical models, parameters, and variables for each technology, cost and sustainability models.