Long-Term Anaerobic Structured Fixed-Bed Reactor Operation for Domestic Sewage Treatment: Performance and Metal Dynamics

: To achieve optimal performance, anaerobic digestion (AD) requires well-balanced operation conditions, steady physical–chemical conditions, and adequate nutrient concentrations. The use of anaerobic structured-bed reactor (ASTBR) presents these conditions. However, several additional investigations are required to elucidate robustness to treat domestic sewage (DS). This pioneering study investigated the performance of an ASTBR in treating DS across four decreasing hydraulic retention times (HRTs) (12, 8, 6, and 5 h). The study aimed to assess organic matter removal, the influence on physical–chemical parameters, and the monitoring of trace metals (TMs) during long-term operation (614 days). Overall, the results underscore the viability of employing ASTBR for DS treatment, achieving an average chemical oxygen demand (COD) removal efficiency of 70%. The system demonstrated consistent long-term operation over 614 days, maintaining stability even with decreasing hydraulic retention times (HRTs). The average effluent concentration of volatile fatty acids (VFAs) was 20.4 ± 3.3 mg L − 1 , with a pH value averaging 7.2 ± 0.1. TM concentrations at an HRT of 12 h exhibited higher levels in the effluent compared to the influent, gradually decreasing over the course of operation and ultimately stabilizing at levels similar to those observed in the influent. The concentrations of metals, including Ba, Cr, Fe, Mn, Ni, Pb, Se, and Zn, monitored in the effluent samples adhered to the allowable discharge thresholds as stipulated by Brazilian regulations.


Introduction
According to the National Water Agency [1], there are 3668 domestic sewage (DS) treatment plants in operation in Brazil, which are distributed in 2007 cities.The majority (1373 plants) are anaerobic reactors with different configurations.Anaerobic treatment is an advantageous and sustainable alternative to DS treatment, mainly due to its potential for bioenergy generation, which contributes to sustainable development goals (SDGs) [2,3].Brazil leads in applying anaerobic technology for DS treatment and effluent posttreatment.The use of anaerobic bioreactors has proven effective in countries with warm climates, such as Brazil, other Latin American countries, African regions, and India.Upflow anaerobic sludge blanket (UASB) reactors are the most widespread and frequent anaerobic reactor configurations applied to DS treatment [3].
The ASTBR consists of sludge that is vertically immobilized on inert materials, which are fixed and positioned along the reactor to form a biofilm.This arrangement prevents common hydrodynamic problems due to continuous sludge growth in the interstices, which results in shorter hydraulic retention times, preferential paths, hydraulic short-circuit zones and increased resistance to gas transfer [8,9].The ASTBR was proposed by Mockaitis et al., who studied the toxic effects of cadmium on anaerobic sludge in a continuous anaerobic bioreactor with a fixed-structured bed feed synthetic medium similar to organic complex wastewater [10].Mockaitis et al. used an ASTBR for the treatment of low-strength complex synthetic wastewater [5], and Camiloti et al. used an ASTBR for the treatment of complex synthetic wastewater to reduce sulfates and oxidize organic matter [11].The main advantages of the ASTBR are easy solid separation and sedimentation, a high concentration of sludge [12], high performance and stability at low hydraulic retention times (HRTs), and low contents of suspended solid effluent [4,5].
Studies have been carried out with an ASTBR for brewery wastewater treatment with a high volumetric organic loading rate (OLR) [12], for the production of hydrogen from synthetic wastewater [13], for the treatment of sugarcane vinasse [8,14,15], for the removal of antibiotics from synthetic DS [6,7,9], and for sulfate reduction and organic matter removal from synthetic complex wastewater.According to Carneiro et al., ASTBR is a promising technology for the removal of recalcitrant compounds with high efficiency and can be used for DS treatment [6].However, despite recent developments with this reactor configuration, several additional investigations are required to elucidate its robustness under diverse operating conditions [16] and with different substrates, such as real DS.While the use of synthetic wastewater facilitates the creation of controlled experimental scenarios, it does not allow for the consideration of the complexity and variability of real wastewater.
Many support materials for ASTBRs have been studied, including polyurethane foam, polypropylene, polyethene, polyethene terephthalate (PET) rings, plastic plates, and ceramic matrices [12].The support material influences the sludge adhesion and reactor hydrodynamics, affecting the overall system performance.According to de Araujo et al., a polyurethane foam formed gradient substrate concentrations and electron donors to establish the microorganism community needed to complete anaerobic digestion [12].It is currently well established that anaerobic digestion requires well-balanced operating conditions, steady physicochemical conditions, and macro-(N, P, Mg and K) and micronutrient (trace metals) concentrations to achieve optimal performance.
Considerable attention has been given to N and P in DS treatment plants and organic matter due to their effects on treatment systems and effluent discharge; however, K, Mg, and trace metals (TMs) are usually not monitored throughout the operation of wastewater treatment systems or even characterized in the influent, requiring appropriate management and monitoring.
Due to the environmental relevance of TMs and their effects on the microbial metabolism in the AD process, monitoring and quantification in wastewaters are essential.
The failure to monitor TMs in DS treatment facilities can be attributed to several factors.First, there may be varying levels of concern regarding the quality of the discharged effluent, leading to different standards across facilities [17].Additionally, the absence of specific laws addressing TM, potassium (K), and magnesium (Mg) parameters enables this oversight.Moreover, inadequate inspection practices and facilities lacking sufficient equipment to handle large volumes of nonbiodegradable waste exacerbate this situation, as there is less incentive to improve processes and quality standards [18].Finally, the diverse chemical, physical, and biological characteristics of domestic sewage make it challenging to develop comprehensive guidelines for TM monitoring and management.
To the best of the authors' knowledge, this study represents the first investigation of the use of an ASTBR for treating DS.This study involved assessing the system performance across four decreasing HRTs (12,8,6, and 5 h).The primary objectives were to evaluate the efficiency of organic matter removal, assess the impacts of physicochemical parameters, and monitor TMs over a long-term operational period spanning 614 days.

Experimental Results
Even with substantial variations in total chemical oxygen demand (COD) and total suspended solid (TSS) influent concentrations, the ASTBR maintained steady concentrations in the effluent during most of the operation time at different OLRs (Figure 1A,B,E).
To the best of the authors' knowledge, this study represents the first investigation of the use of an ASTBR for treating DS.This study involved assessing the system performance across four decreasing HRTs (12, 8, 6, and 5 h).The primary objectives were to evaluate the efficiency of organic matter removal, assess the impacts of physicochemical parameters, and monitor TMs over a long-term operational period spanning 614 days.

Experimental Results
Even with substantial variations in total chemical oxygen demand (COD) and total suspended solid (TSS) influent concentrations, the ASTBR maintained steady concentrations in the effluent during most of the operation time at different OLRs (Figure 1A,B,E).
However, an abrupt increase in effluent TSS concentrations occurred during the 77th to 87th days (HRT of 12 h), from an average value of 35 ± 19 mg L −1 (1st to 76th day) to 104 ± 26 mg L −1 (Figure 1B).There was no increase in the TSS concentration in the influent during the same period.However, an abrupt increase in effluent TSS concentrations occurred during the 77th to 87th days (HRT of 12 h), from an average value of 35 ± 19 mg L −1 (1st to 76th day) to 104 ± 26 mg L −1 (Figure 1B).There was no increase in the TSS concentration in the influent during the same period.
Methane 2024, 3 The upward velocities applied to the ASTBR at each HRT were 0.07 m h −1 (HRT of 12 h), 0.10 m h −1 (HRT of 8 h), 0.14 m h −1 (HRT of 6 h), and 0.17 m h −1 (HRT of 5 h), with no oscillation due to constant flow rate control.Mockaitis et al. operated with an upward velocity of 0.06 m h −1 , without a total washout of solids [5].Moussavi et al. noted that particles with settling velocities that exceeded the upward velocity were retained in the reactor, but increases in the influent upward velocity into the reactor expanded and disrupted the sludge bed in addition to the suspension and subsequent washout of small solids and colloids [19].However, the upward velocity applied at the HRT of 12 h (0.07 m h −1 ) was consistent with that of Mockaitis et al., and the washout of the sludge was not verified even at higher values (up to 0.17 m h −1 ).In this case, the upward velocity was not considered the cause of the solid washout [5].
During the startup period (HRT of 12 h), the COD removal efficiency remained under 60% most of the time, and then increased to 71% after 55 days of operation (Figure 1C).A lower COD removal efficiency at the beginning of operation is expected.The microbial consortium obtained from the inoculum adapted to the new carbon source, with a much lower COD concentration than that of poultry slaughterhouse wastewater.This may have caused the washout of solids from Days 77 to 87.In addition, substantial changes in the substrates, with much lower concentrations according to the OLR (Figure 1E), and different characteristics contributed to adaptation by the microbial consortium.
Pareboom et al. reported that a large microbial consortium released particles (microorganisms) during adaptation and new community formation [20].These suspended microorganisms attached themselves and formed a new community or were lost in washouts.According to Ike et al., startup is the most critical point in the operation of an anaerobic digestion process [21].The inoculation and start-up phases lead to the development of an active microbial sludge [22] that has adapted to the new conditions, as observed in this study.
After the HRT decreased from 12 h to 8 h, the reactor performance decreased (from the 126th day to the 250th day), and the TSS effluent concentration did not increase.The COD removal efficiency decreased from 85% (Day 122) to an average value of 68 ± 11% (Days 126 to 250) at HRTs of 12 and 8.After this period, from the 256th to 315th days, the reactor recovered stability, and the COD removal efficiency reached an average of 78 ± 4%.The same behavior occurred when the HRT decreased from 8 to 6 and from 6 to 5.After reducing the HRT to 6 h, the ASTBR presented an average COD removal efficiency of 54 ± 13%, increasing to 75 ± 4% after Day 387 (Figure 1C).After the HRT decreased to 5 h, the COD removal efficiency decreased from 78% (Day 476) to 64% (Day 485), increasing to 73% on Day 516, with an average COD removal efficiency of 72 ± 4% until the end of the operation.
According to a statistical analysis of the COD removal efficiency among the tested HRTs, the normal distribution of the data revealed a significant difference between the HRTs of 8 and 5 h according to a one-way ANOVA/Tukey's test with unequal variance.After each HRT change, the reactor recovered the COD removal efficiency, with stable values between Days 56 and 122 (HRT of 12 h), Days 256 and 315 (HRT of 8 h), Days 388 and 425 (HRT of 6 h), and Days 521 and 555 (HRT of 5 h).It should be noted that the recovery time of the system decreased with increasing HRT, suggesting the stability and robustness of the system, as well as the adaptability of the microbial consortium.
Mockaitis et al. evaluated the ASTBR performance and kinetics in treating synthetic DS with a low solids content [5].Their reactor achieved an average organic matter removal rate of 78 ± 5% (HRT of 12 h) with an influent COD concentration of 404.4 mg L −1 in a bench-scale anaerobic fixed-structure bed reactor with a working volume of 4.77 L. The ASTBR did not show instability during operation, and they concluded that the ASTBR was a developing and suitable alternative technology for the treatment of complex wastewater.As the authors used synthetic wastewater with low concentrations of solids, they emphasized the necessity of additional studies with different conditions and real wastewater.According to the results of the present work, the ASTBR fulfilled its role in the treatment of DS.
The ASTBR showed stable influent pH values, without critical oscillations, during the 614 days of operation (Figure 1D), with averages of 7.16 ± 0.16 in the influent and 7.23 ± 0.16 in the effluent.During the HRT decrease, the reactor did not show drastic changes in pH values and remained stable.
During the startup period and at the beginning of the 12 h HRT (days 18 to 48), the influent total volatile fatty acid (VFA) values increased from 34.1 to 78.2 mg L −1 (Figure S1).During the same period, the pH decreased from 7.22 to 6.75.The VFA concentrations in the effluent during this period (Days 18 to 48) remained stable, between 13.3 and 22.4 mg L −1 .This demonstrated the adaptation of the reactor during the startup period.Even with fluctuations in the influent VFA values, at an HRT of 12 h, the system buffered and achieved stable pH values within the operation time, which is very important for the methanogenic consortia.
The intermediate alkalinity/partial alkalinity (IA/PA) ratio reinforced the stability of the process (Figure S2).According to Ripley et al., an IA/PA ratio greater than 0.3 indicates disturbances in the process of anaerobic digestion [23].However, Foresti claimed that the closer the ratio is to 0.3, the more stable the system is, but the system stability can increase even for values higher than 0.3 if the variations during operation are discrete [24].The average IA/PA ratios in the effluent at each HRT were 0.22 ± 0.05 (HRT of 12 h), 0.24 ± 0.08 (HRT of 8 h), 0.21 ± 0.08 (HRT of 6 h), and 0.23 ± 0.09 (HRT of 5 h).Thus, the average IA/PA ratio remained close to or below the value indicated in the literature.The observed values above 0.3 for an HRT of 8 h (days 246 to 308) and an HRT of 6 h (days 364 to 371) did not represent the destabilization of the system.

Evaluation of the Sludge Specific Methanogenic Activity (SMA)
The batch assay carried out with sludge attached to foam from the ASTBR at the end of operation showed a final COD concentration of 90.0 ± 0.7 mg L −1 , with a 77.5 ± 0.1% removal efficiency.The modified Gompertz equation was used to fit the accumulated CH 4 data, and the maximum SMA of the sludge was 122.2 ± 6.8 mg COD•CH 4 •g TVS −1 d −1 , which was reached in 13.4 days, and the R 2 was 0.9972.
Souza et al. studied the SMA of sewage sludge from a UASB reactor with different concentrations of linear alkylbenzene sulfonate (LAS), a key anionic surfactant widely used by manufacturers of cleaning products [25].Six anaerobic flask reactors with a total volume of 1 L were inoculated with anaerobic sludge (2 g VSS −1 ) and assayed for 42 days using volatile fatty acids and nutrients as substrates, corresponding to a COD of 3 g L −1 .The control group (0 mg L −1 LAS) showed a maximum SMA of 70 mg COD•CH 4 •g VSS −1 d −1 sludge, which was approximately 60% less than that of the sludge used in this study.
Braga et al. evaluated six different samples of UASB sludge obtained from different full-scale sewage treatment plants (STPs) located in the states of São Paulo and Minas Gerais in Brazil [26].The authors used acetic acid (1 g L −1 ) and macronutrients (N, P, and K) as the substrates for the sludge SMA tests, which reached maximum values of 33 to 103 mg COD-CH 4 •g TVS −1 d −1 .The authors attributed the different values obtained to factors such as substrate adaptation and the inoculum composition.
Silva et al. evaluated the methane production from DS (335 mg COD L −1 ) digestion by adding six different concentrations of Fe (0, 40, 80, 120, 160, and 200 mg L −1 ) in a biomethane potential test using UASB sludge, and the SMA of the sludge in the control group (0 mg L −1 of Fe) was 56 mg COD-CH 4 g TVS −1 d −1 [27].The SMA values found in the present study (122.2 ± 6.8 mg COD-CH 4 •g TVS −1 d −1 ) showed the capacity of the ASTBR to sustain methane-forming microorganisms, resulting in values comparable to or greater than those reported by Souza et al. [25], Braga et al. [26], and Silva et al. [27].
The volume of CH 4 generated by DS treatment systems is highly important since it is an option for the conversion of organic residues to renewable energy, and DS treatment plants are influencing the development toward energy sustainability [28], since DS is an inexpensive fuel for power generation [29].
The CH 4 yield (LCH4•g COD remov −1 ) calculated for the sludge of the ASTBR in the SMA assay was 0.21 LCH4•g COD remov −1 .Carneiro et al. [9] monitored the CH 4 produced in an ASTBR with a working volume of 2.69 L during operation under five different conditions and substrates.With Condition 5, when the reactor was fed DS (approximately 450 mg COD L −1 ) and operated at an HRT of 12 h, the authors obtained an average CH 4 yield of 0.15 L CH 4 •gCOD remov −1 .In this case, the ASTBR showed an adequate CH 4 yield.

Metal Concentrations in the DS
The metal concentrations in the DS were divided into dry and wet seasons and compared with those in different cities of São Paulo State, Brazil (Table 1).Therefore, it was possible to evaluate the differences in the concentrations of metals in the influent by considering rainfall variations.As, Cd, Co, Cr, Cu, Ni, and Se were not detected in the 25 samples collected during the wet season and 26 collected during the dry season.K and Mg had the highest concentrations, followed by Al, Fe, Zn, Mn, Ba, and Pb.
A comparison of the seasons revealed that the concentration of Zn was significantly greater in the wet season than in the dry season (p value = 0.01 and t value = 2.66).Usually, contaminants are more concentrated during the dry season.The concentrations may increase due to irregular industrial discharge, slag waste, mine tailings, and the discharge of chemical products.
Oliveira et al. investigated the Cd, Cr, Cu, Mn, Pb, and Zn concentrations in the DS of a WWTP located in Ribeirão Preto, São Paulo State, Brazil, but did not consider seasonality in their study [30].Compared with the present study, it is noteworthy that the authors found much higher concentrations of the investigated metals in the DS (Table 1).
Souza et al. investigated the Cr, Ni, Cu, Zn, and Pb concentrations in the DSs of two WWTPs located in large urban cities in São Paulo State, Brazil (Campinas and Jaguariuna) [31].The authors also divided the samples into dry and wet seasons.Unlike in the present study, Souza et al. found Cr, Ni, and Cu in the DSs from both cities.An analysis of the DS from the city of Jaguariuna showed the same Zn levels as those in this study [31].The concentration in the wet season (1.562 ± 0.010 mg L −1 ) was greater than that in the dry season (1.554 ± 0.010 mg L −1 ).The authors relate this to the prevalence of illegal rainwater connections that facilitated the transfer of materials from streets and rooftops during the rainy season or possibly from illegal industry.
Concentrations similar to those in the present study were found by Pipi et al. [32].The authors analyzed samples of raw and treated DS from two WWTPs, Candeia (Bauru, São Paulo, Brazil) and Tibiriça (Tibiriça, São Paulo, Brazil), with no seasonal divisions.The authors investigated the levels of Ba, Mn, Cu, Fe, and Al, and these TMs were found in the DS in both WWTPs.
These results (Table 1) illustrate how variable the TM concentrations in the DS may be.The TMs in the DS vary with the size of the city, the economic activities in operation, such as industry, agriculture, or cattle raising, and whether environmental laws are observed.
Table 2 shows the average metal concentrations found in the inoculated foam (foam with sludge + clean foam) and in the end-of-operation foam (foam with sludge).The average concentrations found in the effluent are also shown.The effluent concentrations of Ba, Fe, Mn, Pb, and Zn were consistent with Brazilian Resolution CONAMA no.430, 2011 [34], which set the standard maximum metal values allowed for effluent discharge; this meant that, with these metals, the effluent treated by the ASTBR could be discharged into water bodies.
Anaerobic digestion produces much less sludge than aerobic digestion, but it still requires the proper management of the disposal and possible uses.There are opportunities and challenges for the sustainable treatment and reuse of sewage sludge.
Commonly employed routes for the safe treatment and disposal of sewage sludge include incineration, pyrolysis [35], and substrate application for soil fertilization and remediation.
The use of sewage sludge as a fertilizer has the potential to reduce greenhouse gas emissions and improve soil conditions.Moreover, the application of sewage sludge as a fertilizer has economic potential, with lower costs than traditional fertilization.Sewage sludge reuse requires careful management for the removal of pathogens and other substances, including inorganics and contaminants [36].
The Brazilian Resolution (BR) CONAMA-Environmental Sanitation Company no.498, 2020 [33] standards indicate the maximum metal concentrations allowed for sewage sludge disposed in the soil.Based on the results of this research (Table 2), the Cu con-centrations limited the reuse of this sludge.Cu was found with concentrations above the limits allowed by Brazilian legislation both in the inoculum and the sludge at the end of operation; however, it was not detected in the effluent treated by the ASTBR.At the end of operation, however, it was not identified in the effluent treated by the ASTBR.

Metal Loading Rate in the ASTBR Influent and Effluent
The TM levels found in the ASTBR influent and effluent are presented in Figure 2. As, Cd, Co, Cr, Cu, Ni, and Se were not detected in the collected samples.
Methane 2024, 3, FOR PEER REVIEW 9 using appropriate strategies such as pulse or constant addition should be verified with a bioavailability study. of the influent and effluent, along the ASTBR operation.Legend: ■ Influent; ◻ Effluent.

Hydrodynamic Assays
The exit age distribution (E) or residence time distribution (RTD) curve of a tracer represents the distribution of the times for the fluid output of the ASTBR (Figure S3).The results show that the concentration peak of the tracer occurred at 300 min (5 h).Thus, the For the TM concentrations at an HRT of 12 h, all eight metals detected showed higher concentrations in the effluent than in the influent, decreasing throughout the operation, and remained similar to the influent concentrations (Figure 2).The higher values in the effluent were related to the loss of metals present in the sludge used for inoculation, as the total metal content in the sample of the sludge attached to the foam at the end of the reactor operation was lower than the initial values (Table 2).Additionally, it is worth noting that the sludge used as inoculum initially contained high concentrations of metals (Table 2), and over the course of the operation, these metals were likely washed out of the system, while the sludge adapted to the new influent with a lower metal concentration.
It was also observed (Figure 2) that the effluent concentrations had decreased after a certain period, more specifically, those of Mg and Zn around the 100th day of operation; that of Fe around the 200th day; those of Mn, Pb, and Ba around the 170th day; and those of K and Al around the 240th day.This may indicate that the TMs started to accumulate in the sludge or were absorbed by microorganisms.
The results of the sludge assays show that the concentrations of TMs at the end of operation were lower than those in the sludge from the inoculum, which indicates that there was a loss of metals and that in the overall balance at the end, the sludge lost more than it absorbed.However, as Figure 2 indicates, this loss was large initially, and after a certain time, some TMs had lower concentrations in the effluent than in the influent, but as the concentrations in the DS were low, they were not enough to return to the same initial concentrations.
It is inferred that the simple addition of the metals through the influent may not have been enough to influence the sludge and consequently the reactor performance; thus, a strategy to ensure the fixation/permanence of the TMs in the reactor, in the case of supplementation, should be taken into account instead of simply adding the TMs to the influent.
Zitomer et al. reported that even when the total metal content was sufficient, the metals may not be present in bioavailable forms that can be utilized by the microorganisms [37].
The metals in the substrate must be retained by the sludge to prevent losses in the effluent and to be available for the sludge [38].In this case, the supplementation of metals using appropriate strategies such as pulse or constant addition should be verified with a bioavailability study.

Hydrodynamic Assays
The exit age distribution (E) or residence time distribution (RTD) curve of a tracer represents the distribution of the times for the fluid output of the ASTBR (Figure S3).The results show that the concentration peak of the tracer occurred at 300 min (5 h).Thus, the expected theoretical HRT coincided with the actual HRT obtained by the hydrodynamic assay at the end of the operation, which indicated the absence of anomalies in the flow pattern of the reactor with a polyurethane foam.Fitting with the dispersion model indicated a coefficient of 1.5 × 10 −5 , which was consistent with the model of 0.995, demonstrating that the flow pattern through the reactor was plug-flow.According to Levenspiel [39], low dispersion coefficients are lower than 0.01 [40], and Carneiro et al. considered the flow pattern to be plug-flow for an ASTBR with polyurethane foam, corroborating the results of the present work [9].
For the FeCl 2 solution (120 mg Fe L −1 ), the tracer concentration peaked at 231 min (3.85 h) (Figure S4).In this case, the expected theoretical HRT of 5 h did not coincide with the actual HRT obtained by the hydrodynamic assay with the FeCl 2 solution, which indicated the presence of anomalies in the flow pattern.Fitting with the dispersion model presented a coefficient of 4.1 × 10 −3 , with a correlation coefficient of 0.995.This coefficient was still considered to indicate low dispersion, similar to a plug-flow pattern, according to Levenspiel [39].The anomaly found in the hydrodynamic assay with the FeCl 2 solution may be related to stagnant areas or preferred paths inside the reactor, perhaps caused by the characteristics of the tracer.
The addition of Fe to the reactor during the hydrodynamic assay resulted in a significant improvement (p value of 0.05) in the COD removal efficiency from 73.5 ± 4.5% to 78.5 ± 2.0% (Table 3).This improvement was also reported by Silva et al. when 120 mg Fe L −1 was added [27] for 34 days of exposure to the metal, which corroborated the observed improvements in removal rates.

Experimental Setup
An ASTBR made of acrylic with a total working volume of 5.2 L, discounting the support material, was operated with a continuous upflow process (Figure 3).The stems for sludge immobilization were composed of 9 fixed strips of polyurethane foam with internal plastic rods.Each polyurethane foam strip was 380 mm long, with a cubic shape of 10 × 10 mm, and was fixed to the upper part of the reactor by a metallic grid.The porosity of the bed was 98.4%.
Methane 2024, 3, FOR PEER REVIEW 11 of 10 × 10 mm, and was fixed to the upper part of the reactor by a metallic grid.The porosity of the bed was 98.4%.

Reactor Startup and Operation
The granules were crushed for 2 min in a blender.Then, the polyurethane strips (ASTBR bed) were immersed in the crushed granules for 2 h for sludge attachment.After this period, the strips were fixed inside the reactor filled with the DS and allowed to rest

Reactor Startup and Operation
The granules were crushed for 2 min in a blender.Then, the polyurethane strips (ASTBR bed) were immersed in the crushed granules for 2 h for sludge attachment.After this period, the strips were fixed inside the reactor filled with the DS and allowed to rest for 12 h [5].Then, continuous operation started at an HRT of 12 h and a mesophilic ambient temperature (23 ± 3 to 28 ± 2 • C).
The ASTBR was operated for 614 days at decreasing HRTs, i.e., 12, 8, 6, and 5 h (Table 4).The influent flow rate was controlled using a diaphragm pump.The HRT changes were based on steady-state periods.The ASTBR was fed DS collected from a sewer line built at São Paulo University (São Carlos, SP, Brazil), which deviated from the São Carlos municipal sewage network flow.Every 24 h, a sufficient volume to feed the ASTBR was transferred to a storage tank and sieved (0.5 mm).The influent samples were collected in a storage tank at point 1 (Figure 3) to verify any physical or chemical interference at the ASTBR entrance.The sludge used as inoculum (66.3 g.L −1 TS and 53.9 g.L −1 TVS) was collected from a wastewater treatment system at a poultry slaughterhouse located in Tietê, São Paulo State (Brazil) [41].

Performance Assessment: Analytical and Statistical Analysis
The organic matter concentrations were measured with the total chemical oxygen demand (COD) and total and volatile suspended solids (TSSs, VSSs) in the influent and effluent following the Standard Methods for Examination of Water and Wastewater [42].
The COD and COD removal efficiencies for each change in HRT were tested for normality using the Kolmogorov-Smirnov test (K-S).Outliers and extremes were not found among the data.The parameters were statistically analyzed using one-way ANOVA, followed by Tukey's honestly significant difference (HSD) test, to verify whether the HRT had a statistically significant effect on the COD concentration and COD removal efficiency at the 90% confidence level with Statistica 10 software (Stat Soft, Inc., Tulsa, OK, USA).
At the end of reactor operation, the sludge specific methanogenic activity (SMA) of the soil attached to the polyurethane foam was evaluated.SMA is a useful tool for determining the methane-producing capability of sludge for a specific substrate at a concentration level at which substrate availability is not a limiting factor [43].The amount of active methanogenic population in an anaerobic reactor is critical for achieving efficient wastewater treatment.Thus, the SMA test can be used to outline the operating conditions and parameters of the system to assess the performance and understand the system performance and stability.
A batch assay was performed using 100 mL glass flasks kept in a chamber at a controlled mesophilic temperature (32.6 ± 0.4 • C) in triplicate for 25 days until biogas production stabilized.The foam sticks with sludge attached were cut (approximately 1.6 cm) and added to ensure a concentration of 0.08 ± 0.21 mg TVS L −1 in each bottle.The substrate was the DS influent of the ASTBR system, which was added to each bottle at a concentration of 356 mg COD L −1 .The working volumes of the flasks were 58 mL, with headspaces of 42 mL.Before the assay started, the flasks were flushed for 3 min with N 2 :CO 2 (70:30%) to ensure anaerobic conditions.The pressure of each bottle was monitored once a day using a TPR-18 pressure transducer coupled to a BS 2200 interface (Desing Instruments, Barcelona, Spain.ESP), and the biogas composition in the headspace was monitored by gas chromatography (GC 2014, Shimadzu ® , Kyoto, Japan) with a thermal conductivity detector (GC-TCD), hydrogen as the carrier gas, and an HP-PLOT/Q-column (30 m, 0.53 mm, 40 µm) [44].The accumulated volume of CH 4 (mL) was obtained from the pressure and composition data of the biogas [26].The modified Gompertz equation was adjusted to the CH 4 accumulated volume (mL) raw data versus time using Statistica 10 software (Stat Soft, Inc., Tulsa, OK, USA).Therefore, the maximum velocity of biogas production (Rmax-mLCH 4 d −1 ), maximum potential biogas production (P-mLCH 4 ), and lag phase (L-d) were obtained [45].
The SMA (mg COD-CH 4 • TVS −1 d −1 ) values were obtained from the fitted Rmax (data obtained from the modified Gompertz equation) fitted to Equation (1) [46]: where fc stp = conversion factor used to convert the volume of CH 4 (L) at standard temperature and pressure (0 • C and 1 atm) to COD-CH 4 (2855 g COD-CH 4 L-CH 4 −1 ); C TVS = concentration of sludge (gTVS L −1 ) added to the bottles as sludge seed per working volume.

Operational Stability Measurements
The stability of an anaerobic reactor was assessed by monitoring parameters such as temperature (liquid and ambient), pH, alkalinity, total volatile fatty acids (VFAs), and biogas [47].
For pH measurements, a calibrated pH meter (DM 20-DIGIMED) was used according to the Standard Methods for Examination of Water and Wastewater [42].For alkalinity, the titration method was used to determine the total, partial, and intermediate alkalinity (TA, PA, and IA) and the IA/PA ratio [23].For the analysis of the VFAs, the titration method was used according to [48].The biogas composition (CO 2 , CH 4 , and H 2 S) was monitored by gas chromatography (GC 2014, Shimadzu ® , Kyoto, Japan).
The estimated CH 4 production (LCH 4 d −1 ) was calculated from the COD load removal (COD rem − gCOD d −1 ) of the ASTBR and the P (LCH 4 ) and COD removal (COD rem − gCOD) obtained for the reactor sludge in the SMA batch assay.

Metal Assessment in the ASTBR
The metal concentrations in the clean foam, in samples of inoculated foam before the startup procedure and at the end of the operation, and in the DS (42 samples of influent and effluent) were assessed.The DS samples were divided into wet and dry seasons.The wet season was from August 2017 to January 2018 and from September to December 2018.The dry season was from February to August 2018 and from January to April 2019.These classifications were based on the São Carlos forecast and average precipitation [49].The metals in each season were compared statistically with a T test at the 95% confidence level using Statistica 10 software (Stat Soft, Inc., Tulsa, OK, USA).
To carry out the sludge metal analyses, the samples were subjected to pretreatment prior to microwave digestion as follows: 0.25 g of foam from each sampling point was soaked for 30 h in a solution of 7.5 mL of 16 N HNO 3 and 2.5% H 2 O 2 , according to Dillner et al. [50].
The concentrations of metals in the sludge were calculated by considering the foam mass in the reactor and total solids of the sludge attached, expressed in mg gTS −1 .The metal loading rate (mg L −1 d −1 ) calculations took into account the ASTBR volume, influent flow, and metal concentration and were calculated as mg L −1 d −1 , and the retention percentage was calculated from the difference between the influent and effluent metal concentrations.

ASTBR Hydrodynamic Assays
Hydrodynamic assays were carried out to assess the flow patterns, and the real HRT was applied to the reactor at the end of system operation when the sludge had accumulated within the structured beds.For the assays, the reactor was continuously fed DS supplemented with NaCl (10 mg L −1 ) for 15 h, equivalent to 3 times the theoretical HRT (5 h).The NaCl concentrations were monitored online using a conductivity probe (Model CON-BTA, Vernier Software & Technology, Beaverton, OR, USA) coupled to an interface for data acquisition (Model CBL 2, Texas Instruments Inc., Dallas, TX, USA).The experimental data were stored using Logger Lite 1.9.4 software for further analysis.
The stored data were analyzed through residence time distribution curves using the dispersion model of Levenspiel [39].The data were processed using R Studio version 1.3.1093.
At the end of the operation, the Fe was supplemented (120 mg Fe L −1 ) for 15 h (a period equivalent to 3 times the final HRT operated-3 × 5 h) to investigate the hydrodynamic behavior of the ASTBR with respect to the TMs.Notably, FeCl 2 •4H 2 O was utilized for supplementation, although the concentrations considered were solely those of Fe.The use of Fe was selected based on Silva et al. [27], who studied the effects of trace metals on methane production from the DS, and supplementation with 120 mg.L −1 Fe had the greatest effect.During the supplementation assay, liquid samples of the effluent were collected every 75 min for 15 h, 3 h after the end of the experiment and 36 h after the end of the experiment.The samples were analyzed following the procedures described in Sections 3.3 and 3.5 to verify the Fe concentrations over time.

Conclusions
The findings underscore the remarkable efficacy of the ASTBR in treating domestic sewage and showed its ability to achieve significant organic matter removal, which peaked at 81.6% during an 8-hour HRT, and stable operation was maintained for an impressive duration of 614 days.Despite variations in the COD removal efficiencies observed across different HRT periods, the ASTBR exhibited a remarkable ability to adapt and recover, which was particularly evident in its ability to stabilize performance even after temporary decreases in efficiency, notably up to an HRT of 5 h.
The analyses revealed the presence of various metals in both the raw and treated DS, with Al, Ba, Fe, K, Mn, Mg, Pb, and Zn detected.Additionally, metals such as Al, Ba, Co, Cr, Cu, Fe, K, Mg, Mn, Ni, Pb, Se, and Zn were found in the inoculum and sludge at the end of the operation.Notably, the concentrations of metals standardized in Brazilian legislation, including Ba, Cr, Fe, Mn, Ni, Pb, Se, and Zn, were within permissible limits in the ASTBR effluent samples.
However, the investigation of the metal loading rates revealed that the sludge did not outwardly adsorb the metals, suggesting that a simple addition of the metals through the influent may not significantly impact the reactor performance.Consequently, further research is warranted to explore metal supplementation strategies, including pulsed or constant addition, with a focus on optimizing the bioavailability for microbial uptake.This could involve conducting bioavailability studies under varying conditions, utilizing metal fractionation extraction techniques to ensure that adequate amounts of metals are present in the bioavailable fraction for microbial utilization.
In essence, the ASTBR is a groundbreaking solution for domestic sewage treatment, boasting not only long-term stability and adaptability but also robust performance in

Table 1 .
Average metal concentrations in DS in the present study, compared with those of different cities of São Paulo State/Brazil.

Table 2 .
Average total metal content in the inoculation foam (foam with sludge + clean foam) and end-of-operation foam, from ASTBR treating DS.

Table 3 .
COD results (concentrations in the influent and effluent and removal efficiency) for the last days of operation and during the hydrodynamic assay for Fe.