Nutrient Removal in Sequential Batch Polishing Ponds

: One of the main problems of waste stabilization ponds (WSP) is that they cannot remove nutrients when treating wastewater. Polishing ponds (PP) can efﬁciently remove nitrogen and phosphorus from efﬂuents after efﬁcient anaerobic pretreatment. It shown that the feasibility of nutrient removal is directly related to the pH that is established in the ponds. WSP normally operate at near neutral pH, but the biological processes that develop in PP tend to cause an elevation of pH and this, in turn, triggers the mechanisms of nutrient removal in ponds. In PP oxygen production by photosynthesis predominates over the oxidation of organic material. The net oxygen production has an equivalent CO 2 consumption and this induces an increase in pH. The mechanism for nitrogen removal was identiﬁed as the desorption of ammonia from the liquid phase of the ponds. It was established that in ponds with a uniform concentration proﬁle in the liquid phase the process developed in accordance with Fick’s law. The governing mechanism of phosphorus removal was precipitation with ions present in the wastewater, presumably calcium and magnesium. Polishing ponds can be operated with two different hydrodynamic regimes: ﬂow-through (FTPP) and sequential batch (SBPP) ponds. The SBPP have the advantage that the pH elevation is more rapid, and that the ﬁnal pH is higher.


Introduction
One of the problems of waste stabilization ponds (WSP) is that nutrients cannot be removed from these treatment systems. The impossibility of removing nutrients is due to the criteria that govern WSP design (Parker et al. [1]; Mara [2]). The most important criteria are: (i) WSP are subdivided into anaerobic, facultative and maturation ponds and (ii) the facultative pond must be at least partially in an aerobic environment (van Haandel and Van der Lubbe [3]). For this reason, the oxygen production rate must be sufficient to supply oxygen for the oxidation of organic material and to maintain dissolved oxygen in these ponds. Since there is an equilibrium between oxygen production and oxygen consumption there are only small changes in the concentrations of dissolved oxygen and therefore of carbon dioxide. This leads to small changes in the pH and therefore nutrients are not removed. Many research works have tried to remove nutrients in ponds, but the results showed that nitrogen removal is at best partial (Pano and Middlebrooks [4], Bastos et al [5], Zimmo et al [6], and Camargo Valero and Mara [7]) and phosphorus removal is poor (Gomez et al.) [8].
A different situation emerges when polishing ponds (PPs) are applied after efficient anaerobic pretreatment [3]. Polishing ponds are used for post-treatment after efficient anaerobic wastewater digestion. Under these conditions photosynthesis in the pond is enhanced because of the greater transparency, due to the removal of the colloids in the pretreatment. On the other hand, the demand for oxygen for the oxidation of organic material is reduced because its concentration is low. The predominance of photosynthesis over oxidation has an important aspect: CO 2 is consumed in the processes, while dissolved oxygen (DO) is produced. The CO 2 consumption reduces the acidity and therefore will increase the pH. The higher pH may trigger the removal of nitrogen and phosphorus.
The mechanisms regarding nitrogen removal in stabilization pond systems have been a matter of controversy in the technical literature. The main mechanisms are: incorporation in the algal biomass, nitrification-denitrification and desorption. Nitrogen removal in WSP is poor because none of the three mechanisms can develop efficiently. Incorporation in the algal biomass can only develop to a very limited extent because the algae production in WSP is usually less than 100 mgVSS·L −1 and the mass fraction of nitrogen in algae is less than 5% [9]. Additionally, nitrification cannot develop because there is no nitrifying biomass in the influent and the retention time is too short for this sludge to develop in the pond. Thus, the only mechanism for nitrogen removal in in PP and WSP is the desorption of ammonia, but this process will only develop at a high rate, when the pH in the pond rises to a value where the NH 3 concentration becomes considerable. However, the main design criterion of WSP is that the facultative and maturation ponds must be partially aerobic, so that equilibrium exists between oxygen generation by photosynthesis and the oxidation of organic material. Since oxygen production in ponds accompanied by a stoichiometric CO 2 consumption, there is no net CO 2 consumption if there is no net oxygen production. As a result, the pH in WSPs has a value near the neutral point and desorption can take place only at a very low rate. By contrast, nitrogen removal in polishing ponds (PPs) has been shown to be efficient [10].
Phosphorus removal by incorporation in the algal mass is insignificant in SBPP because the algae production is low (mg·L −1 ) and the P fraction in the algae is small (mgP/mgVSS). Phosphate may be removed by the addition of cations forming phosphates with a low solubility or by increasing the pH, thus shifting the dissociation towards phosphate ion (PO 4 3− ), which can precipitate when combining with cations in the wastewater (Kube et al. [11], Cai et al. [8,12]). Several phosphates have a very low solubility, although the apparent solubility constant may be much larger than the thermodynamic value [13]. Phosphate removal with external ion addition is normally combined with clarification whereby after coagulation, flocculation and settling almost all suspended solids are removed. This operation has advantages and disadvantages when compared with removal by pH increase. The advantages are that a high quality final effluent is obtained with low suspended solids (<10 mg·L −1 ) and total P concentrations (<0.1 mgP·L −1 ) and a considerable reduction in the required retention time, and hence pond area, since the pH only needs to be risen to effect nitrogen removal. The disadvantages are the introduction of anions and the formation of sludge, as well as increased operational and investment costs.
Today polishing ponds are invariably operated as flow-through units (FTPP), but Albuquerque et al. [14] have shown that these ponds are in fact more efficient when they are operated as sequencing batch units (SBPP): dissolved oxygen (DO) concentration and pH increase rose more rapidly, and the removal of nitrogen and phosphorus required a shorter retention time. Virtually complete P removal was obtained in SBPP, but it was only partial in FTPP. The results of [14] are in stark contrast with the results of research investigating the feasibility of removing nutrients from WSP.
In this paper the feasibility of nutrient removal in polishing ponds is demonstrated experimentally at pilot scale. Models for the increase in pH and nitrogen and phosphorus removal are developed. This removal is only possible if the pH increases, so that the composition of ammonium and phosphate in the PP are changed. At the neutral pH ammonia and phosphate are predominantly present as NH 4 + and H 2 PO 4 2− ions, but these forms must be changed, at least partially, to NH 3 and PO 4 3− , respectively.

Materials and Methods
Having established that SBPP are more efficient than FTPP, an experimental investigation was carried out at pilot scale to evaluate the feasibility of removing pathogens, residual BOD and nutrients in SBPP. Figure 1 is a flow sheet of the employed system and a photo of a series of four pilot scale ponds. The experimental investigation was carried out in Campina Grande, Brazil, using municipal raw wastewater as influent of a UASB reactor, operated at a retention time of 6 h. Shallow ponds were used because [10] showed that these operated at a high rate. These pond models were operated with very gentle superficial stirring with a shallow (1 cm) metal bar attached to a small motor (6 rpm) in order resuspend any algae, floated by bubbles of dissolved oxygen, evolving from the ponds when these were supersaturated with DO. At the same time the agitation served to even out stratification in the liquid phase. Additional research was carried out, simultaneously operating ponds with and without stirring. These experiments showed that that the slow stirring had no measurable effect on the performance of the ponds. In practice this gentle agitation may not be necessary in full-scale ponds because factors such as wind and sun-based thermal mixing could introduce enough mixing for a uniform liquid phase. The experiments were carried out four in glass fiber cylinders with a diameter of 0.5 m and depths of 0.2; 0.4; 0.6 and 1.0 m. All pond models were operated in sequencing batch mode.

Materials and Methods
Having established that SBPP are more efficient than FTPP, an experimental investigation was carried out at pilot scale to evaluate the feasibility of removing pathogens, residual BOD and nutrients in SBPP. Figure 1 is a flow sheet of the employed system and a photo of a series of four pilot scale ponds. The experimental investigation was carried out in Campina Grande, Brazil, using municipal raw wastewater as influent of a UASB reactor, operated at a retention time of 6 h. Shallow ponds were used because [10] showed that these operated at a high rate. These pond models were operated with very gentle superficial stirring with a shallow (1 cm) metal bar attached to a small motor (6 rpm) in order resuspend any algae, floated by bubbles of dissolved oxygen, evolving from the ponds when these were supersaturated with DO. At the same time the agitation served to even out stratification in the liquid phase. Additional research was carried out, simultaneously operating ponds with and without stirring. These experiments showed that that the slow stirring had no measurable effect on the performance of the ponds. In practice this gentle agitation may not be necessary in full-scale ponds because factors such as wind and sun-based thermal mixing could introduce enough mixing for a uniform liquid phase. The experiments were carried out four in glass fiber cylinders with a diameter of 0.5 m and depths of 0.2; 0.4; 0.6 and 1.0 m. All pond models were operated in sequencing batch mode.  The experiments were carried out in the open air over a period of nine months: during summer (6 months) and winter periods (3 months). In Campina Grande there is abundant sunshine and the wastewater temperature is always 25 • C, but in "winter" there is more rainfall.
It was checked that due to the slow stirring, the liquid phase in the ponds was uniform, and daily grab samples were taken for tests to determine the water's composition. Tests for dissolved oxygen, pH, alkalinity, chemical oxygen demand, nitrogen and phosphorus were carried out, following Standard Methods procedures [15]). Distilled water was used to compensate losses due to evaporation (0.5-1 L·d −1 ) and sampling (0.1 L·d −1 . The tests were stopped when the pH reached a value of 9.7 or when the maximum retention time of 30 d was exceeded. A total of 16 tests were carried out. For measurements of DO, temperature and pH a multiparameter instrument was used (Hanna, model HI 98196, Nusfalau, Romania).

pH Value and Variation in Treatment Systems
The pH value and its stability in wastewater treatment plants are determined almost entirely by the carbonic system. If the carbonic system is to be evaluated, the definitions of alkalinity and acidity [16,17] are important: The pH variation in the treatment systems is due to variations in alkalinity and acidity, which in turn are affected by the physical, chemical and biological processes that develop in these systems. To analyze the pH variation, the Deffeyes [16] diagram, improved by Loewenthal and Marais in [17], is very useful. It shows that there is a linear relationship between alkalinity and acidity for any pH. By using the dissociation equations for the carbonic system, Equations (1) and (2) can be used to relate three variables: alkalinity, acidity and pH: In fact, if the pH is in the neutral range (5 < pH < 9) the influence of the carbonic system is decisive and the influence of the ions H + and OH − can be neglected, so Equation (3) is simplified to: Alk ≈ Ac [1 + 2.10 (pH−pK2) ]/[1 + 2.10 (pK1−pH) ] (5 < pH < 9) (4) Figure 2 is a Deffeyes diagram, drawn from Equation (2). In the diagram, two values of the three variables-(i) alkalinity, (ii) acidity or (iii) pH-define the ionic equilibrium point, which characterizes the condition of the liquid phase. Figure 2 shows how the ionic equilibrium point moves, when adding to or removing materials from the liquid phase. Thus, according to Equation (2), the alkalinity does not change upon CO 2 removal, but the acidity decreases by 2 eq·mol −1 . For example, if the effluent from a UASB reactor has a pH = 7.0 and an alkalinity of 8 meq·L −1 , (point A), the acidity will be about 12 meq·L −1 .
When it is known which processes develop in the treatment system and what is the effect of these processes on the alkalinity and acidity, then it is possible to establish the variation of alkalinity and acidity and determine the pH in the treatment system and in the effluent. For example, when it is known that in the treatment system the alkalinity decreases by 3 meq·L −1 (with a final alkalinity of 5 meq·L −1 ) and a final pH = 9.6 is desired, then B is the final ionic equilibrium point, with an acidity of 3.4 meq·L 1 . For this to happen the acidity is to decrease from 12 to 0.6 or 11.8 meq·L −1 . Such a decrease comes from the desorption or biological consumption of carbon dioxide. In polishing ponds, the main biological, chemical and physical processes that can alter alkalinity and/or acidity and therefore the pH are: (1) the biological or physical removal of CO2; (2) the physical removal of NH3 by desorption, which is equivalent to the addition of a strong acid. Although at high pH the liquid phase may be supersaturated with calcium carbonate, precipitation of CaCO3 does not take place in ponds. With the help of Figure 2, it is possible to predict the effect of varying the concentration of carbon dioxide and ammonia on the value of alkalinity, acidity and pH, as shown in Table 1. In the practice of operating ponds, it is very important that there is the possibility of increasing the pH, as this is the only way to remove nutrients. This opens the possibility of producing a final effluent quality compatible with legislation. Such removal is not possible if the pH does not increase appreciably as is the case in conventional stabilization ponds. Table 1. Effect of the different processes on alkalinity and acidity and, consequently, the pH in polishing ponds.

Process
Reaction The removal of CO2 in polishing ponds occurs through two distinct mechanisms: (1) desorption or transfer to the atmosphere and (2) biological consumption, due to photosynthesis carried out by the algae. Concomitantly, there is also CO2 production due to oxidation and anaerobic digestion. According to the definition of alkalinity and acidity (Equations (1) and (2)) the removal of CO2 does not affect the alkalinity but decreases the acidity. Since only acidity is reduced, it can be seen in the Deffeyes diagram ( Figure 2) that the ionic equilibrium point moves down vertically, establishing a higher pH value. On the A C B Figure 2. Deffeyes diagram (temperature of 25 • C: pK 1 = 6.33, pK 2 = 10.33, pK w = 14).
In polishing ponds, the main biological, chemical and physical processes that can alter alkalinity and/or acidity and therefore the pH are: (1) the biological or physical removal of CO 2 ; (2) the physical removal of NH 3 by desorption, which is equivalent to the addition of a strong acid. Although at high pH the liquid phase may be supersaturated with calcium carbonate, precipitation of CaCO 3 does not take place in ponds. With the help of Figure 2, it is possible to predict the effect of varying the concentration of carbon dioxide and ammonia on the value of alkalinity, acidity and pH, as shown in Table 1. In the practice of operating ponds, it is very important that there is the possibility of increasing the pH, as this is the only way to remove nutrients. This opens the possibility of producing a final effluent quality compatible with legislation. Such removal is not possible if the pH does not increase appreciably as is the case in conventional stabilization ponds. Table 1. Effect of the different processes on alkalinity and acidity and, consequently, the pH in polishing ponds.

Process
Reaction The removal of CO 2 in polishing ponds occurs through two distinct mechanisms: (1) desorption or transfer to the atmosphere and (2) biological consumption, due to photosynthesis carried out by the algae. Concomitantly, there is also CO 2 production due to oxidation and anaerobic digestion. According to the definition of alkalinity and acidity (Equations (1) and (2)) the removal of CO 2 does not affect the alkalinity but decreases the acidity. Since only acidity is reduced, it can be seen in the Deffeyes diagram ( Figure 2) that the ionic equilibrium point moves down vertically, establishing a higher pH value.
On the other hand, if there is more biological oxidation than photosynthesis, there will be an increase in the CO 2 concentration and, consequently, a decrease in pH, since the effect is the reverse of removal.

Physical CO 2 Removal
CO 2 removal in a polishing pond occurs when the water is supersaturated in relation to the air in contact with the pond's content. In the case of anaerobic pretreatment, this situation invariably exists: in the reactor the liquid phase is in equilibrium with the biogas, which has a relatively high concentration of CO 2 (5 to 20% [3]). When the effluent leaves the UASB reactor, it has a much higher concentration of dissolved CO 2 than the equilibrium concentration between the effluent of the pond and the air. For this reason, desorption will occur until the air-water equilibrium is established. In Figure 2, the CO 2 equilibrium curve is drawn. Loewenthal and Marais [17] derived expressions relating the saturation concentration to alkalinity and acidity: where: [CO 2 ] s = saturation concentration of dissolved CO 2 in contact with air; p CO2 = partial CO 2 pressure of carbon dioxide in the air (0.031%); K H = Henry constant for CO 2 = 0.034 at 25 • C pK H = 1.12 + 0.0138t 0 < t < 35 • C, Capri and Marais [13] Now, for any pH, the alkalinity and acidity can be calculated and the equilibrium curve can be drawn. In Figure 2 the CO 2 equilibrium curve is drawn for CO 2s = 0.034 * 0.00031 = 10 −5 mol·L −1 = 0.5 mg·L −1 . Now, for any ionic equilibrium point, it can readily be seen on the Deffeyes diagram if desorption is going to occur and how much CO 2 can be released. For example, in Figure 2, if the water is characterized by a pH = 7.0 and an alkalinity Alk = 8 meq·L −1 (point A), then the water is supersaturated with CO 2 and desorption will occur. The maximum amount of desorption that can occur is given by the difference in acidity at point A (Ac = 11.4 meq·L −1 ) and the equilibrium value found at the intersection of Alk = 8 meq·L −1 with the equilibrium curve of CO 2 -that is, when the acidity is Ac = 7.0 meq·L −1 . Therefore, in the example of Figure 2, the maximum desorption causes a decrease in acidity of 11.4-7.0 = 4.6 meq·L −1 or 2.2 mmol·L −1 of CO 2 can be released from the liquid phase. However, in practice, desorption becomes very slow when the pH is above pH ≈ 7.5 and the maximum release of CO 2 may not materialize.

Biological CO 2 Removal
Biological CO 2 removal occurs as long as the CO 2 removal rate due to photosynthesis is greater than the production rate due to oxidation. The photosynthesis and oxidation processes are complementary processes in the sense that the reactants of one process are the products of the other, as it appears from the reaction equations, which in their simplest form can be expressed as: Oxidation: Therefore, if equilibrium exists between the production and consumption of dissolved oxygen in the pond, there will also be equilibrium between the production and biological consumption of carbon dioxide. However, in polishing ponds that do not treat raw wastewater, but effluent from an anaerobic pretreatment system, the situation is different. In this case the photosynthesis rate tends to be high due to the greater transparency of the liquid phase and the oxidation rate will be low because there is less organic material to be Water 2021, 13, 1584 7 of 17 oxidized. As a result, there will be a tendency for the concentration of dissolved oxygen (DO) to increase and carbon dioxide to decrease.
The association of favorable environmental factors (radiation, temperature) with the typical characteristics of effluents from efficient UASB reactors (low turbidity, low concentration of organic matter) favors photosynthesis, so that the rate of photosynthetic consumption of CO 2 in polishing ponds prevails over production by biological oxidation. The rate of CO 2 consumption by photosynthesis and production of this gas by biological oxidation can be assessed from the rate of change in the concentration of dissolved oxygen DO, as can be seen in Equations (7) and (8). From the stoichiometry of the two reactions, it can be concluded that for the production of 1 mmol of DO, in polishing ponds, there will be a consumption of 1 mmol of CO 2 and vice versa. The consumption of 1 mmol·L −1 of CO 2 corresponds to a consumption of 2 meq·L −1 of acidity and the production of 32mg DO-that is, there is a production of 16 mg DO per meq of acidity consumed. In this way, the variation in acidity due to photosynthesis can be calculated as: where, ∆Ac f = acidity variation due to photosynthesis (mEquationL −1 ) ∆DO = DO variation due to dissolved oxygen production in the pond (mg L −1 ).

Ammonium Removal
There are basically three means of nitrogen removal from waste waters: ammonia can be removed by desorption or incorporation into the aquatic biomass or transformed to nitrite or nitrate in the nitrification process and subsequently be converted into nitrogen gas by heterotrophic or autotrophic denitrification. In sequencing batch polishing ponds by far the most important process is ammonia desorption. Incorporation into algal mass does occur but to a very limited extent (1-2 mgN/L) and nitrification cannot take place because there are no nitrifiers in the anaerobic UASB effluent.
The ammonium ion (NH 4 + ) and the ammonia gas (NH 3 ) are in equilibrium in the water according to the reaction of Equation (10): where, pK a = −logK a = 0.09018 + 2729.92/T |(Emerson et al. [18]) T = temperature in Kelvin. It can be seen in Equation (10) that the removal of ammonia by desorption is equivalent to the removal of a strong base or the addition of a strong acid: the production of 1 mmol H + results in the removal of 1 meq of alkalinity and the production of 1 meq of acidity per meq of NH 3 removed. The removal of alkalinity and the equivalent addition of acidity causes the equilibrium point to shift at an angle of 135 • to the horizontal (see Figure 2).
In the example in Figure 2, the decrease in acidity of 3 meq·L −1 can be attributed to ammonia desorption. Therefore, in the example there is desorption of 3 meq·L −1 or 42 mg·L −1 . If a final pH of 9.6 is desired as in Figure 2, then the final acidity will be 3.4 meq·L −1 (Point B). This is only possible if there is biological CO 2 consumption in the pond. The minimum consumption can be calculated as the difference between the maximum acidity after desorption (7 meq·L −1 ) and the final acidity (0.6 meq·L −1 ) i.e., 7.2-0.6 = 6.6 meq·L −1 , but in practice the consumption of CO 2 will have to be greater because the desorption of CO 2 virtually stops before the maximum desorption occurs. Table 1 shows the way that the abovementioned processes effect alkalinity and acidity and consequently pH in polishing ponds. Only CO 2 removal causes an increase in the pH value. The variation of alkalinity and acidity can be calculated as: (12) ∆Ac = 2∆CO 2 , des + 2∆DO/32 + ∆N/14 (13) where, ∆Alk = variation of the alkalinity in meq·L −1 ; ∆Ac = variation of the acidity in meq·L −1 ; ∆N = observed variation of the ammonia concentration in mg·L −1 ; ∆CO 2 , des = variation of the CO 2 concentration due to desorption in mmol·L 1 ∆DO = net DO production (photosynthesis-oxidation) in mg L −1 . Now the pH variation can be calculated from the alkalinity and acidity changes. Considering that H + and OH − concentrations are small and do not influence the alkalinity and acidity, one has: This is an implicit quadratic expression and can be solved for [H + ], resulting in: Since pH = −log [H + ] one has: pH = −log{(0.5(k 1 (Ac 1 /Alk 1 −1)/2 + ((k 1 (Ac 1 /Alk 1 /2) 2 − 4k 1 k 2 ) 1/2 )} (16)  It is important to note that the profiles of Figure 3 are all influenced by the climate so that under different circumstances the result will be different. Ideally for any particular project an experimental investigation should be carried out.

Experimental Results
With the aid of the data in Figure 3, models were developed that could foresee the values of pH, nitrogen and phosphorus in time. The following sections show the derivation of these models.

Model for pH Variation and Nitrogen Removal in Sequential Batch Polishing Ponds
In the previous section, the magnitude of the pH variation was determined as a result of changes in alkalinity and acidity. In order to know the time required for a particular pH variation, it is necessary to take into account the kinetics of the relevant processes. The desorption/absorption processes can be described in terms of Fick's law, which says that the rate of a process is proportional to the inductive force of that process (Morais et al. [19]). In the case of volatile components (CO2 and NH3) the inductive force is the difference between the saturation concentration and the actual concentration, so that:

DO Profile
From the fact that The DO concentration increased in all SBPP from the first day onwards, it is concluded that in all cases photosynthesis prevailed over the oxidation of organic matter. The rate of increase depended heavily on the depth of the pond. Very high DO concentration (>20 mg/L) tended to lead to instability, possibly due to decreasing oxygen production at high pH values.
3.1.2. pH Increase pH increased with time in all reactors, but at very different rates depending on the pond depth. Very high pH values (pH > 11) could not be sustained in the ponds, probably due to reduced photosynthetic CO 2 consumption.

Nitrogen Removal
Nitrogen removal was feasible in all ponds, but the required retention time was longer during rainy periods when there was less sunshine. The pond depth had a very strong influence on the time required for total nitrogen removal, varying from 4 to 14 d at an initial concentration of about 80 mg/L. A pH of 8.5 was sufficient to remove nitrogen.

Phosphorus Removal
Efficient phosphate removal was possible all ponds, but the retention time varied strongly with depth (6 to 24 d for depths of 0.2 to 1.0 m). The residual phosphorus concentration was small when a pH of 9.5-9.7 was obtained in the liquid phase.
It is important to note that the profiles of Figure 3 are all influenced by the climate so that under different circumstances the result will be different. Ideally for any particular project an experimental investigation should be carried out.
With the aid of the data in Figure 3, models were developed that could foresee the values of pH, nitrogen and phosphorus in time. The following sections show the derivation of these models.

Model for pH Variation and Nitrogen Removal in Sequential Batch Polishing Ponds
In the previous section, the magnitude of the pH variation was determined as a result of changes in alkalinity and acidity. In order to know the time required for a particular pH variation, it is necessary to take into account the kinetics of the relevant processes. The desorption/absorption processes can be described in terms of Fick's law, which says that the rate of a process is proportional to the inductive force of that process (Morais et al. [19]). In the case of volatile components (CO 2 and NH 3 ) the inductive force is the difference between the saturation concentration and the actual concentration, so that: For NH 3 (17) and (18) are integrated, expressions are found for CO 2 and NH 3 as functions of time, so that the values of the constants can be determined experimentally: where: subscript 0 means initial value. Morais et al. [19] determined the values of the transfer constants as functions of temperature and pond depth: The rate of CO 2 consumption can be determined conveniently from the oxygen production rate in the pond by considering that if 1 mol of oxygen is produced 1 mol of CO 2 is consumed. The rate of oxygen production can be expressed as: where: OPR = (dO 2 /dt) p = DO production rate in the pond (molO 2 ·L −1 d −1 ) = photosynthesis rate-DO consumption rate = biological CO 2 consumption rate (molCO 2 ·L −1 d −1 ) Equation (23), together with Equations (12) and (13), forms the basis for calculation of pH variation and ammonia removal in sequential batch polishing ponds. Since these equations cannot be solved analytically, they must be solved numerically. The differential equations must be written in terms of finite time elements that will cause finite changes in the concentrations of CO 2 and NH 3 , as in Equations (24) and (25): These variations, in turn, result in alkalinity and acidity changes as well as ammonia concentration variations, which can be expressed as: Now the basis of a model is developed that will describe the variations in pH, alkalinity, acidity and ammonium concentration as functions of time in ponds operated in batch mode. The model is a set of differential equations defined in Table 2. For a specific depth and temperature (which define the values of k dc and k dn ), the only process that is not yet defined in Table 2 is the rate of CO 2 consumption or oxygen production (OPR), but this can be measured as the rate of change in the DO concentration (Equation (23)).
The DO concentration profile should preferably be determined online with equipment that allows DO data storage. There seems to be no expression that links the rate of this process to the operational conditions, the characteristics of the wastewater and the climate, so that it must be determined experimentally or estimated from previous experiments in similar ponds.
The model of Table 2 can be used to calculate the values of the alkalinity, acidity, pH, carbon dioxide and total nitrogen as functions of time in SBPP. The simulated curves thus generated can then be compared to the experimental values obtained in experiments with sequencing bated polishing ponds. In Figures 4 and 5 the experimental values of pH and nitrogen of Figure 3 and the simulated curves calculated from Table 2 are presented for the four investigated depths. There is a good correlation between the experimental and simulated values for all depths. The correlation for pH is sometimes not good for high pH values. That can probably be attributed to the fact that at very high pH values the rate of photosynthesis decreases, so that the rate of pH increase diminishes and may even become negative, and this is not built into the model of Table 2.  The DO concentration profile should preferably be determined online with equipment that allows DO data storage. There seems to be no expression that links the rate of this process to the operational conditions, the characteristics of the wastewater and the climate, so that it must be determined experimentally or estimated from previous experiments in similar ponds.
The model of Table 2 can be used to calculate the values of the alkalinity, acidity, pH, carbon dioxide and total nitrogen as functions of time in SBPP. The simulated curves thus generated can then be compared to the experimental values obtained in experiments with sequencing bated polishing ponds. In Figures 4 and 5 the experimental values of pH and nitrogen of Figure 3 and the simulated curves calculated from Table 2 are presented for the four investigated depths. There is a good correlation between the experimental and simulated values for all depths. The correlation for pH is sometimes not good for high pH values. That can probably be attributed to the fact that at very high pH values the rate of photosynthesis decreases, so that the rate of pH increase diminishes and may even become negative, and this is not built into the model of Table 2.   The pH curves show that there are three phases of pH change: (1) a rapid initial change due to CO2 desorption; (2) a slower intermediate rate of pH change due to acidity production by ammonium desorption; and (3) a rapid final change due to the completion of the removal of the ammonia. Similarly, ammonia removal also has three phases: (1) a slow initial phase because the pH is still low; (2) a higher rate of ammonia removal when the NH3 concentration is high; and (3) a final low rate because the ammonium concentration is low because the total N concentration is low, even if the pH is high  The pH curves show that there are three phases of pH change: (1) a rapid initial change due to CO2 desorption; (2) a slower intermediate rate of pH change due to acidity production by ammonium desorption; and (3) a rapid final change due to the completion of the removal of the ammonia. Similarly, ammonia removal also has three phases: (1) a slow initial phase because the pH is still low; (2) a higher rate of ammonia removal when the NH3 concentration is high; and (3) a final low rate because the ammonium concentration is low because the total N concentration is low, even if the pH is high

Model for Phosphorus Removal in Sequential Batch Polishing Ponds
To model the P concentration in polishing pond is difficult because there are several compounds that interact. Not only are there different phosphorus compounds that may precipitate but there are also several cations present in the liquid phase. Therefore, instead of trying to develop a model with a theoretical solution, an empirical solution is given.
In Figure 6 the experimental data of Figure 3 were used to plot the experimental values of the logarithm of the total phosphate concentration, log(Ct), in the SBPP with depths varying from 0.2 to 1.0 m as a function of pH. The result of the experimental investigation is that for any pH and pond depth the data plot in good approximation as a straight line with an average slope of 0.43. The experimental results also indicate that the pH for a final P concentration of Ct = 1 mg·L −1 or log(Ct) = 0 is in good approximation 9.7 for all depths, The pH curves show that there are three phases of pH change: (1) a rapid initial change due to CO 2 desorption; (2) a slower intermediate rate of pH change due to acidity production by ammonium desorption; and (3) a rapid final change due to the completion of the removal of the ammonia. Similarly, ammonia removal also has three phases: (1) a slow initial phase because the pH is still low; (2) a higher rate of ammonia removal when the NH 3 concentration is high; and (3) a final low rate because the ammonium concentration is low because the total N concentration is low, even if the pH is high.

Model for Phosphorus Removal in Sequential Batch Polishing Ponds
To model the P concentration in polishing pond is difficult because there are several compounds that interact. Not only are there different phosphorus compounds that may precipitate but there are also several cations present in the liquid phase. Therefore, instead of trying to develop a model with a theoretical solution, an empirical solution is given.
In Figure 6 the experimental data of Figure 3 were used to plot the experimental values of the logarithm of the total phosphate concentration, log(C t ), in the SBPP with depths varying from 0.2 to 1.0 m as a function of pH. The result of the experimental investigation is that for any pH and pond depth the data plot in good approximation as a straight line with an average slope of 0.43. The experimental results also indicate that the pH for a final P concentration of C t = 1 mg·L −1 or log(C t ) = 0 is in good approximation 9.7 for all depths, so that the average of the data lead to a linear equation

Model for Phosphorus Removal in Sequential Batch Polishing Ponds
To model the P concentration in polishing pond is difficult because there are several compounds that interact. Not only are there different phosphorus compounds that may precipitate but there are also several cations present in the liquid phase. Therefore, instead of trying to develop a model with a theoretical solution, an empirical solution is given.
In Figure 6 the experimental data of Figure 3 were used to plot the experimental values of the logarithm of the total phosphate concentration, log(Ct), in the SBPP with depths varying from 0.2 to 1.0 m as a function of pH. The result of the experimental investigation is that for any pH and pond depth the data plot in good approximation as a straight line with an average slope of 0.43. The experimental results also indicate that the pH for a final P concentration of Ct = 1 mg·L −1 or log(Ct) = 0 is in good approximation 9.7 for all depths, so that the average of the data lead to a linear equation Now the required pH for any final P concentration can be calculated. For example, the pH necessary for a final P concentration of 2 mg/L can be calculated as follows:

2.
For an effluent P concentration of 2 mg·L −1 : logCt = log 2 = 0.32; The straight line with a slope of 0.43 and passing C t = 1 or logC t = 0 has a pH value of 9.2 for C t = 2 or logC t = 0.32. Figure 7 is a graphical representation of Equation (29), from which the residual phosphate concentration can be read off for any pH, or, conversely, where the required pH can be read off for any desired residual phosphate concentration.
for a pond depth of 0.6 m, (d): Experimental profiles of the logarithm of the total phosphorus concentration as a function of pH for a pond depth of 1.0 m.

1.
Log(Ct) = −0.43pH + 4.29 (29) Now the required pH for any final P concentration can be calculated. For example, the pH necessary for a final P concentration of 2 mg/L can be calculated as follows: 2. For an effluent P concentration of 2 mg·L −1 : logCt = log 2 = 0.32; The straight line with a slope of 0.43 and passing Ct = 1 or logCt = 0 has a pH value of 9.2 for Ct = 2 or logCt = 0.32. Figure 7 is a graphical representation of Equation (29), from which the residual phosphate concentration can be read off for any pH, or, conversely, where the required pH can be read off for any desired residual phosphate concentration.
The retention time necessary to acquire the required pH for particular residual phosphorus concentration can be determined by the pH-nitrogen model presented in Table 2. The retention time necessary to acquire the required pH for particular residual phosphorus concentration can be determined by the pH-nitrogen model presented in Table 2.

Per Capita Area
Having determined the relevant constants to simulate nitrogen and phosphorus removal in the SBPP, the next step is to optimize the SBPP design. The variable of greatest interest for the design optimization is not the retention time, but the area per capita. This variable is related to depth. The area required for the construction of polishing ponds can be calculated by considering that the retention time is the ratio between the volume of the pond and the applied daily flow, so that the area per capita can be expressed as: where: A ie = area required for SBPP (m 2 per inhabitant equivalent); HRT = hydraulic retention time (days); Q ie = daily contribution por inhabitant flow (m 3 ·ie −1 ·day −1 ); H = pond depth in m.
Using the data in Figure 3, Table 3 shows the observed HRT for a final effluent with a concentration with <1 mgN·L −1 and <1 mgP·L −1 in ponds with different depths (Columns 2 and 3). Columns 4 and 5 show the values of the area per capita for the residual concentrations of 1 mgN·L −1 and 1 mgP·L −1 , calculated with Equation (29) for a contribution per capita of 0.1 m 3 ·d −1 . In Figure 8 the values of the per capita areas have been plotted as a function of the pond depth. It can be seen that in shallow ponds not only is it feasible to obtain a very low nutrient concentration in SBPP, but also that the required area is much smaller than the area of conventional WSP systems, where the area per capita is of the order of 3 m 2 ·IE −1 , but where the removal of nutrients is not possible. The figure can be easily adapted for other per capita contributions. trations of 1 mgN·L −1 and 1 mgP·L −1 , calculated with Equation (29) for a contribution per capita of 0.1 m 3 ·d −1 . In Figure 8 the values of the per capita areas have been plotted as a function of the pond depth. It can be seen that in shallow ponds not only is it feasible to obtain a very low nutrient concentration in SBPP, but also that the required area is much smaller than the area of conventional WSP systems, where the area per capita is of the order of 3 m 2 ·IE −1 , but where the removal of nutrients is not possible. The figure can be easily adapted for other per capita contributions.   Figure 8 shows the following aspects: 1.
The experimental data show that over the range of 0.2 to 1.0 m there is little influence of the pond depth on the pond area. The optimal pond depth is about 0.5 m, which is very much smaller than the depth of maturation ponds in WSP where the depth is usually in the range of 1.0 to 1.2 m. The shallow depth of the pond is an important factor in the reduction of construction costs.

2.
The area of shallow ponds is much smaller than 3 m 2 per inhabitant equivalent, normally used for design of conventional WSP, where nutrient removal does not occur.

3.
The area required for P removal is about double the value for N removal.
It is important to note that nutrient removal should be the goal of post-treatment only when the final effluent is not used in agriculture. For industrial reuse or discharge of the final effluent onto surface water, nutrient removal is required. When wastewater is treated for industrial reuse, it is also necessary to remove the algae that grew during the posttreatment in SBPP. One possibility is clarification (coagulation-flocculation-sedimentationfiltration) of SBPP effluent. In this case the use of a coagulant (usually polyaluminum chloride or aluminum sulphate) will automatically remove the phosphate, so in that case its removal in SBPP is not required. Figure 9 shows the flowchart of a treatment system that can produce high quality water for industry. The time required for each treatment step is also indicated. the additional processes of clarification and reverse osmosis will lead to an increase in the treatment costs and will normally be applied only if there is a specific demand for high quality water.
An additional advantage of the application of clarification is that the pH need not be 9,7: a pH of 8.5 to 9.0 is sufficient to remove nitrogen. By Brazilian standats, a pH of 9.0 is the is the maximum value that can be discharged onto surface water in Brazil (CONAMA [20]. Figure 9. Flow sheet to produce water for industry for general use or to produce demi water for special applications.

Conclusions
The pH in polishing ponds tends to rise because there is net oxygen production and consequently an equal net carbon dioxide consumption, which results in a decrease in acidity. At high pH nutrients can readily be removed from the liquid phase: ammonia by  Figure 9. Flow sheet to produce water for industry for general use or to produce demi water for special applications.
The same figure further shows that it is possible to treat the effluent after clarification to remove dissolved salts by applying reverse osmosis, possibly preceded by micro-or ultrafiltration. This demineralized water may be required in special industrial applications, such as water for refrigeration, as well as a source for public water supply. Clearly, the additional processes of clarification and reverse osmosis will lead to an increase in the treatment costs and will normally be applied only if there is a specific demand for high quality water.
An additional advantage of the application of clarification is that the pH need not be 9.7: a pH of 8.5 to 9.0 is sufficient to remove nitrogen. By Brazilian standats, a pH of 9.0 is the is the maximum value that can be discharged onto surface water in Brazil (CONAMA) [20].

Conclusions
The pH in polishing ponds tends to rise because there is net oxygen production and consequently an equal net carbon dioxide consumption, which results in a decrease in acidity. At high pH nutrients can readily be removed from the liquid phase: ammonia by desorption and phosphate by precipitation. The required pH is 8.5 to 9.0 for ammonia removal and 9.5 to 9.7 for phosphorus removal.
On the basis of the data obtained in an experimental investigation, a theoretical model was developed that describes the variation of pH and ammonium concentration as a function of time, so that the retention time and the pH for virtually complete N removal could be calculated. There was a close correlation between the experimental data for pond depths of 0.2 to 1.0 m and the simulated data of the model.
With respect to phosphorus removal, an empirical model was developed for the relationship of the logarithm of the phosphorus concentration and the pH in polishing ponds, which can be used to calculate the required pH for any required residual phosphate concentration.
The required pH for ammonia removal is readily obtained in shallow ponds operated either as flow-through units or as sequencing batch units, but flow-through units require a longer retention time. The pH for efficient phosphorus removal can only be obtained in sequencing batch polishing ponds. In flow-through ponds pH cannot reach the required value for efficient P removal (9.7).
The depth of the polishing ponds can be used as a variable to control the nutrient removal efficiency: shallow for efficient nutrient removal and deep for nutrient conservation.
An alternative for biological P removal is physical chemical P removal, which can also be used for the removal of suspended solids from the liquid phase. Institutional Review Board Statement: Not applicable study did not involve humans or animals.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data presented in this study is available on request from the corresponding author.