Sewage treatment efficiencies estimation for urban areas located in the River Pardo’s watershed by associating nonlinear programming and water quality modeling

Estimating efficiencies required for sewage treatment plants within a river watershed, where there are usually multiple sewage discharges and water withdrawals points in watercourses, presenting different quality conditions and sewage assimilation capacities, is a complex task. In this context, combined optimization techniques and water quality modeling can be important tools to support sewage treatment efficiencies appropriation processes. In the present paper, QUAL-UFMG water quality model and Nonlinear Programming (NLP) are jointly applied to sewage treatment levels selection for the river Pardo’s (watercourse located in Espírito Santo State, Southern region, Brazil) watershed different urban areas. Four different optimization models were tested for estimating the minimum organic matter removal efficiencies. The results indicate strong dependence between the estimated minimum organic matter removal efficiencies within the watershed and equity measures incorporated in the optimization models.


Sewage treatment efficiencies estimation for urban areas located in the River Pardo's watershed by associating nonlinear programming and water quality modeling
Estimativa de eficiências de tratamento de esgotos para os núcleos urbanos da bacia hidrográfica do Rio Pardo a partir da associação de programação não linear e modelagem de qualidade de água

Introduction
In the last century, the world population has grown rapidly in a disorderly manner, resulting in agglomerations without infrastructure and quality of public services. Most Brazilian cities still release their sewage directly into watercourses, causing significant impacts on the receiving water bodies and imbalances to local ecology, posing risks to human health (CHO et al., 2013).
Sewage treatment systems processes choice should be based on technical, economic, and environmental criteria analysis, considering each treatment system alternative characteristics (VON SPERLING, 2005). Usually, the main considered factors are treatment systems installation land costs, systems' operational costs, load of raw effluents and water quality standards to be attended by effluents (SOUZA, 1998). Other important environmental factors in the effluent treatment systems selection process are related to the receiving water bodies capacities. Proper water bodies organic matter assimilation capacities consideration allows selection of simpler (constructively and operationally) and treatment plants which are economically more viable. Minimum pollutant removal efficiencies determination is the starting point for sewage treatment systems selection processes.
Sewage treatment efficiencies estimation, when observed from the watershed point of view, is often complex, due to numerous discharge points, with different loads in water bodies presenting varied assimilation capacities and water quality conditions (REIS; VALORY; MENDONÇA, 2015). In this context, water quality simulation models can help in water resources management and sewage treatment systems selection processes (TEIXEIRA; PORTO, 2008;CALMON, 2015;ARRUDA;RIZZI;MIRANDA, 2015;MATEUS et al., 2015;CORRÊA et al., 2019;MESQUITA;LIMA NETO, 2019;FORTUNATO et al., 2020).
However, water quality mathematical simulation does not, necessarily, involve the analysis of the ideal solution to sewage treatment efficiencies within a watershed estimation problem, because the multiple releases may require very large sewage treatment efficiencies combinations analysis. In this context, the association between water quality models and optimization techniques can allow the determination of the optimal treatment efficiencies combination to be adopted within a watershed (ANDRADE; MAURI; MENDONÇA, 2013). In this research line, different studies (VALORY et al., 2013;MANSHADI;NIKSOKHAN;ARDESTANI, 2015;SANTORO;MENDONÇA, 2016;FANTIN;MENDONÇA, 2017;BRINGER;MEN-DONÇA, 2018;AGHASIAN et al., 2019;SÁ et al., 2019) have prioritized the association between water quality models and Genetic Algorithm (GA) metaheuristic optimization technique. According to Lacerda and Carvalho (1999), GAs have been employed in complicated problems (where other optimization methods fail) and have several advantages, such as the possibility to work both with continuous and discrete parameters (or a combination of them), several optimization variables, and complex optimization functions.
These authors note that GAs are not efficient for many problems and can be quite slow depending on values assumed for the initial population and options assumed for operators.
The present study's main objective is to estimate minimum sewage treatment efficiencies within a watershed, with water quality mathematical modeling and conventional Nonlinear Programming (NLP) optimization technique combination. According to Cirilo (2002), the main advantage of NLP is its comprehensiveness, given that once the mathematical model that describes the system to be optimized is elaborated generally, no formulation simplification is needed, increasing the accuracy of obtained results. Cirilo (2002) notes that the uncertainty about obtaining the optimal solution weighs against NLP (possibility of determining local optimal solutions values instead of the global optimum).
What is relevant to note in the present study is that water quality modeling and NLP are conducted in a Microsoft Excel ® spreadsheet environment, a popular software usually more accessible than other software available for applying metaheuristic optimization techniques such as GA. Water quality mathematical model QUAL-UFMG, whose use has been popularized in Brazil, is employed and was introduced in an expeditious procedure, which aims to overcome, without significant computational demands, the difficulty arising from eventual optimal solutions appropriations.

Study area
The study area considered in research is the river Pardo's watershed ( Figure 1). This river is an important tributary of Itapemirim River. Itapemirim is the main watercourse located in the Southern region of Espírito Santo State. The river Pardo's watershed drainage area is approximately 611 km², distributed in the Ibatiba, Irupi, Iúna and Muniz Freire, all located in Espírito Santo State, and Lajinha, in Minas Gerais State.
The river Pardo's watershed presents three cities (Ibatiba, Iúna, and Irupi), and two villages (Santíssima Trindade and Nossa Senhora das Graças). The watershed does not have any sewage treatment plants being operated. Although the cities and towns in the hydrographic basin that are the focus of the present study may have unitary treatment systems and final effluent disposal, reducing the organic load released into the water bodies, the authors chose to consider that the entire organic load produced in the basin reaches the water bodies, modeling the most critical scenario. The river Pardo is the main raw domestic effluents recipient, receiving the sewage produced in Ibatiba and Iúna Cities. The river Pardinho and Ribeirão da Perdição stream are two tributaries of the river Pardo that also receive sewage discharges. The river Pardinho receives the sewage produced in Irupi City. Ribeirão da Perdição stream receives the sewage produced in Santíssima Trindade and Nossa Senhora das Graças villages. Ribeirão São José constitutes a Pardo's tributary that does not receive any sewage.

Water quality model
QUAL-UFMG water quality computational-simulation model, developed in the Microsoft Excel ® spreadsheet computational environment, was applied to the studied water system. In the present paper, water quality was described exclusively as a function of biochemical oxygen demand (BOD 5,20 ) and dissolved oxygen (DO) parameters modeling. These parameters are usually used for water bodies qualitative characterization after sewage discharges. For simulating these parameters spatial variation, first order differential equations were considered, covering deoxygenation and atmospheric reaeration phenomena. The equations that describe DO and BOD 5,20 parameters variations, considering deoxygenation and reaeration phenomena, are presented in detail by Von Sperling (2007).

Kinetic constants, hydrodynamic, and water quality information
The kinetic constants, hydrodynamic data, and water quality parameters adopted in this paper were obtained from research conducted by Calmon et al. (2016), when analyzing the use of water quality permanence curves to support the definition of water quality classes of the river Pardo's watershed rivers.
In their study, Calmon et al. (2016) determined kinetic constants and hydrodynamic variables values for the river Pardo from the records available for Terra Corrida Montante fluviometric station, installed and operated on the river Pardo by the Brazilian Water Agency (Agência Nacional de Águas -ANA).
Due to the small drainage areas associated to the springs of water courses located in the study area, the flow rates of the first segments of the water courses considered in the modeling were zero. Calmon et al. (2016) estimated the incremental (diffuse) flows to Pardo river watershed watercourses by mass balance, considering the differences between the flows in the final simulated section and the respective headwater flows. Simulations performed in the river Pardo's watershed assumed incremental flow of 3.53 Ls -1 km -1 , and DO and BOD 5.20 concentrations of 5 and 2 mgL -1 , respectively. These DO and BOD 5,20 concentration values were assumed from Von Sperling (2007) propositions.
The functional relations between flow (Q, m 3 s -1 ), velocity (U, ms -1 ), and depth (H, m), potential functions in the QUAL-UFMG model, were established from flow measurement records carried out at the cited fluviometric station. Equations 1 and 2, established by Calmon et al. (2016), made it possible to estimate watercourses velocities and depths as functions of flows. (1) H = 0.6076.Q 0,2566 (2) The average domestic effluents flow rates relative to the river Pardo's watershed urban population and the corresponding organic loads are presented in Table 1.
For urban domestic sewage, a concentration of 400 mgL -1 for BOD 5,20 was adopted, as well as 145 Lhab -1 d -1 per capita yield, and return coefficient of 0.8. The adopted BOD 5,20 concentration corresponds to the upper limit for the raw domestic sewage concentration range indicated by Von Sperling (2005), and Jordão and Pessôa (2009). Raw domestic effluents DO concentrations were considered null.
Zero concentration for DO in raw and treated sewage was adopted in order to simulate discharges under more conservative conditions, by ignoring that certain sewage treatment systems may incorporate some DO in the treated sewage.

Effluent disposal scenario
In the river Pardo's watershed watercourses, the point sources are composed by the river Pardo's tributaries (Ribeirão São José, Pardinho, and Ribeirão da Perdição, presenting extensions of 17.5, 19.9 and 18.5 km, respectively) and domestic effluents from five urban areas (Ibatiba, Irupi and Iúna cities, and Santíssima Trindade and Nossa Senhora das Graças villages). The distributed sources are composed by incremental flows and BOD 5,20 loads from the sewage produced by the rural population located in the river Pardo's watershed, evenly distributed throughout the water system.

Optimization models
The objective functions employed to estimate minimum sewage treatment efficiencies for the river Pardo's watershed were selected from the study developed by Santoro, Reis and Mendonça (2016), and considered the following aspects: • BOD 5,20 removal efficiencies sum minimization referring to the different treatment systems proposed for the river watershed; • inequity minimization between different proposed treatment systems, imposing higher BOD 5,20 removal levels for those receiving higher organic loads; • conformity with environmental quality standards Considering the above guidelines, the following optimization models were used: • Model 1, originally proposed by Valory, , seeks to minimize the sum of efficiencies (Ei) within the watershed (Equation 6); • Model 2 introduces an equity measure in the objective function (Equation 7), as established by Mulligan (1991), seeking to ensure that the efficiency in each station is proportional to its raw organic load (load lanc ); • Model 3 employs an objective function that enforces an inequity between treatment systems measure minimization (Equation 8), as originally established by Marsh and Schilling (1994); • Model 4 uses an objective function that imposes another inequity between treatment systems measure minimization (Equation 9), as proposed by Burn and Yuliant (2001).

Cities and Villages
(8) All optimization models incorporate, as restrictions, the environmental quality standards set for DO and BOD 5,20 (minimum DO 5 mgL -1 and maximum BOD 5,20 5 mgL -1 ) for class 2 rivers. Class quality 2 as assumed for the Pardo river watershed watercourses due to legal framework absence, according to the guidelines established by CONAMA Resolution No. 357/2005(BRASIL, 2005. Additional restrictions aimed at ensuring efficiencies non-negativity (Ei ≥ 1%) and the establishment of a limit for BOD 5,20 removal by treatment systems (Ei ≤ 95%).

Nonlinear Programming application
NLP is suitable for problems that have nonlinearity in their objective function or constraints. The solution, in general, is a vector of decision variables that optimizes the nonlinear objective function subject to nonlinear constraints (CIRILO, 2002). NLP is characterized by not presenting a general method for solving all problems. In the present study, for obtaining treatment efficiencies from the different optimization models selected, the Generalized Reduced Gradients Method (GRG), available in the Microsoft Excel ® spreadsheet Solver macro, was employed. The GRG Method, originally proposed by Lasdon et al. (1978), deals with the solution of nonlinear optimization problems, in which the objective function and constraints can present nonlinearities if the function is differentiable.
According to Cirilo (2002) and Albertin, Mauad and Daniel (2006), the main limitation in applying NLP to water management problems is that the technique does not necessarily provide the overall optimum, often reaching a partial optimum value. In research, seeking to circumvent this limitation and maximize global optimum obtaining chances, a total of 150 initial efficiencies sets was randomly generated for each optimization model. These efficiencies set established the initial values from which the established NLP search process was conducted. The search process operationalization occurred with the implementation of a computer program developed in Visual Basic for Applications (VBA) in the Microsoft Excel ® spreadsheet environment, the code integrated with the Solver macro and the QUAL-UFMG model. This integration allowed search process automation.

Control scenario: raw effluent discharges
This section presents the results from raw effluents final disposal in the different river Pardo's watershed watercourses simulations. Considering the river Pardo's watershed does not present any sewage treatment plants installed and in operation, the results gathered in this section represent the currently expected condition for the watershed, establishing a control scenario for subsequent discussions.
Ribeirão Perdição stream receives domestic effluents discharges from Santíssima Trindade and Nossa Senhora das Graças villages (with discharge rates of 0.3 and 0.6 Ls -1 , respectively). These discharges are small and have little impact on Ribeirão Perdição water quality. In this watercourse, DO and BOD 5,20 concentrations invariably respect the limits established by environmental quality standards. Figure 2 shows the DO and BOD 5,20 profiles for the river Pardinho river, which receives in kilometer 5 the domestic effluents from Irupi City. Although not among the largest organic loads produced in the river Pardo's watershed, Irupi City domestic effluents disposal effect is relevant due to the river Pardinho's low flow (0.18 m³s -1 ) in the final disposal point. This condition gives the river Pardinho low organic loads assimilation capacity, leading to non-compliance with the BOD 5,20 environmental quality standard downstream effluent discharge point.
Along the Pardo river, the largest watershed cities (Ibatiba and Iúna) are located. Consequently, it is in this water system portion where the highest DO and BOD 5,20 concentrations variability occurs (Figure 3). The large parameters variation observed in kilometer 16 of the river Pardo is due to Ibatiba City's domestic effluent final disposal (corresponding to the largest pollutant load in the watershed, with 24.3 Ls -1 raw sewage discharge rate), and the limited river flow at the discharge point (0.60 m³s -1 ). Thus, BOD 5,20 concentration exceeds the environmental quality standard imposed for class-two rivers, reaching a 18.1 mgL -1 peak.
Ribeirão São José stream flows into the river Pardo approximately 7 km downstream Ibatiba and provides a 0.62 m³s -1 flow increase to this river, improving water quality downstream the affluence point. This affluence increases the main river dilution capacity for the remainder of its course, decreasing its BOD 5,20 concentration, attenuating Ibatiba effluent final disposal impact. The same happens for the river Pardinho, which flows into the river Pardo at km 30, with a 0.71 m³s -1 flow. Although this flow increase is greater than the corresponding to São José stream, the reduction in BOD 5,20 concentration for the river Pardo is smaller due to the higher main river flow on the river Pardinho's affluence and the higher river Pardinho's BOD 5.20 concentration (4.9 mgL -1 ) when compared to the corresponding Ribeirão São José stream (2 mgL -1 ).   At the kilometer 35 of the river Pardo, Iúna City's domestic effluent is discharged, increasing BOD 5,20 concentration to a maximum value of 9.5 mgL -1 , and reducing DO levels to a minimum value of 6.77 mgL -1 . Downstream Iúna, Ribeirão Perdição stream flows into the river Pardo, and as it happens for the other tributaries, main river water quality conditions improvement occurs.

Minimum sewage treatment efficiencies
Optimization Model 1 (Equation 6) seeks exclusively to comply with watercourses environmental quality standards and minimize the treatment efficiencies sum within the watershed. The main purpose of its application was to evaluate the difference between the estimat-ed efficiencies considering models with and without equity measures incorporation.
The lack of an equity measure in the pursuit of sewage treatment systems efficiencies, within the watershed sum minimization, may mean that users located in the watershed downstream stretches need to treat their effluents with higher efficiencies, because the river Pardo's water reaches their disposal locations with lower quality, as a result from upstream discharges. There is also the possibility that the river presents much higher flow downstream than upstream, due to incremental flow and tributary affluences. Consequently, sewage produced closer to headwater would require higher treatment efficiency even if its discharge load is like that discharged downstream (ALBERTIN, 2008).
Primary sewage treatment systems present minimal BOD removal efficiency, usually of 25% (VON SPERLING, 2007). From this perspective, all estimated efficiencies with values lower than 25% are shown in parentheses in the following tables, next to the symbol < 25. Table 2 shows the estimated minimum BOD 5,20 removal efficiencies values for the treatment systems associated to the river Pardo's watershed urban areas, according to optimization Model 1.
Effluent discharges from Irupi City occurs near the river Pardinho's headwater, where flow is still low. Hence, a more rigorous treatment for this effluent than the necessary for similar organic loads is required. The BOD 5,20 peak concentration, when the treated effluent is discharged, reaches the limit value acceptable for class-two rivers. In this context, treatment efficiency was 73% (Table 2), defined for Irupi effluent, which is the minimum required to maintain the river Pardinho's water quality parameters respecting class-two rivers limits under the boundary conditions that conformed the simulations performed.
Considering that effluent discharges from Santíssima Trindade and Nossa Senhora das Graças villages in Ribeirão Perdição stream are small, they can be assimilated by the river without affecting maintenance of quality standards even if disposed without treatment (minimum allowable efficiency of 1%, imposed to guarantee non-negativity).
Ibatiba effluent is released into a river Pardo's section that presents low flow, a condition that imposes high treatment efficiency to the city effluents (95%, according to Table 3). For Iúna City, where Pardo river presents higher flow, the required efficiency is considerably lower than that imposed for Ibatiba effluent (approximately 13%, according to Table 3), allowing simpler sewage treatment systems adoption.
Optimization Model 2 (Equation 7) sought to minimize the difference that point organic loads and estimated efficiencies for treatment systems present among themselves. Table 3 presents the five best results related to optimization Model 2.
Optimization Model 3 (Equation 8) aimed to minimize inequities between adjacent discharge points, so that the relation of organic load over efficiency ratio between two adjacent points would be as close as possible, seeking to establish a common efficiency that was related not only to the organic load, but also consistent with its neighborhood, where the discharged effluent presents greatest influence. These results are summarized in Table 4.
The results of Model 3 indicate that the inequity measure proposed by the model established a pattern similar to that obtained previously, with the urban areas that produce largest organic loads charged with applying the highest efficiencies in their effluents treatment.  In this model, however, greater rigor was observed for urban areas that contribute with higher loads, reducing the variations observed for optimization Model 2. BOD 5,20 high removal levels suggested for Iúna effluent treatment was due to the fact that the inequity measure associated with optimization Model 3 considers discharges in the vicinity. By the fact that Iuna presents higher sewage load than the adjacent urban areas (Irupi and Nossa Senhora das Graças villages), NLP sought to minimize the ratio between loads discharges and treatment efficiencies for these locations, increasing Iuna treatment efficiency.
Model 4 (Equation 9) aimed to minimize the relation between organic load and efficiency for each discharge point in relation to the ratio between average load and efficiency in the watershed. The results from the application of this model are presented in Table 5.
The DO and BOD 5,20 profiles produced considering the efficiencies estimated with optimization Model 4 help are presented in Figures 4 (the river Pardinho), 5 (Ribeirão Perdição stream), and 6 (the river Pardo), and were conformed with the use of efficiencies referred to the solution presenting lowest efficiencies sum. These figures exemplify the profiles produced from the incorporation of efficiencies estimated by the optimization model. Similar figures were produced considering efficiencies estimated by other optimization models. Regardless of the efficiencies set for their production, these profiles present DO and BOD 5,20 parameters variations that are established in accordance with the environmental quality standards, since the environmental quality standards constituted optimization models restrictions.
When comparing only the efficiencies sum obtained by the different optimization models, optimization Model 1 produced the lowest BOD 5,20 removal efficiencies sum for the watershed. Optimization Models 2, 3, and 4, however, usually imposed considerably more efficient treatments than those established with the aid of optimization Model 1.
Recurrently, sewage treatment efficiencies associated to the smaller urban areas (Nossa Senhora das Graças and Santíssima Trindade villages) were not significant, being lower than the efficiencies normally achieved by primary sewage treatment systems. Ibatiba and Irupi Cities, regardless of the optimization model employed, demanded higher    treatment efficiencies, compatible with secondary or higher-level treatment systems. These urban areas are substantially more populous than Santíssima Trindade and Nossa Senhora das Graças villages, making their final sewage disposal in the upper portion of the rivers Pardo (Ibatiba) and Pardinho (Irupi) stretches, in sections that present low flow rates for sewage dilution. Model 2, among the optimization models that incorporated equity measures in the objective functions, was the only one to present efficiencies sums close to those established by optimization Model 1.
The results achieved in the present study are similar to those found in Santoro, , Fantin, Reis and Mendonça (2017), and Bringer (2017), who used GA as an optimization tool to determine minimum sewage treatment efficiencies for the river Pardo's watershed. In this context, NLP has produced consistent and similar results to those obtained from the use of a metaheuristic optimization technique, which usually requires higher computational demands.

Conclusion
qUAL-UFMG water quality mathematical model and NLP combined use is a versatile alternative for minimum sewage treatment efficiencies within a watershed determination, allowing different optimization models and agile results.
The estimated efficiencies for the river Pardo's watershed with the aid of NLP were similar to those obtained with the use of the Genetic RBCIAMB | v.56 | n.1 | Mar 2021 | 65-75 -ISSN 2176-9478 Algorithm, a metaheuristic optimization technique that usually requires computational demands substantially higher than those associated to conventional optimization techniques use.
The estimated minimum organic matter removal efficiencies within the river Pardo's watershed were highly dependent on the incorporation of inequity measures into the optimization models. Sewage treat-ment efficiencies associated to Nossa Senhora das Graças and Santíssima Trindade villages were not significant, and were usually lower than primary sewage treatment systems organic matter removal efficiencies. Estimated efficiencies for Ibatiba and Irupi cities were usually high, regardless of the optimization model employed. These efficiencies are compatible with secondary or higher-level treatment systems.