Energy Integration in Wastewater Treatment Plants by Anaerobic Digestion of Urban Waste : A Process Design and Simulation Study

)e process simulation performed in the present study aimed at investigating energetically self-sufficient wastewater treatment plant of 500,000 population equivalents. To implement this, three different scenarios were evaluated using computational tools named GPS-X® and SuperPro®. )ey were designed based on municipal wastes recovery to energy generation and its utilisation within the facility. An anaerobic/anoxic/oxic process for biological treatment of wastewater was considered and mesophilic anaerobic digestion at different scenarios (1) primary sludge (PS) with waste activated sludge (WAS), (2) PS with thermally hydrolysedWAS, and (3) PS withWAS and organic fractions derived frommunicipal solid waste.)e results from scenario 1 and scenario 2 showed only enough thermal energy to meet their demand (they reach only 44 and 52% of electrical self-sufficiency, respectively), while positive net thermal and electrical energy result in scenario 3 from codigestion of sewage sludge and the organic fraction of municipal solid waste. )e main limitation of tools used is their lack of sensitivity to economies of scale and their dependence on real data used for process design to obtain more accurate results.


Introduction
Globally in every urban centre, two major types of waste are sewage sludge and municipal solid waste.e first one results from the wastewater treatment, and it is composed by primary sludge (PS) and waste activated sludge (WAS); depending on the plant configuration, they are generated in a large amount [1], and their disposal represents a growing concern from a technoeconomic and environmental point of view.On the other hand, municipal solid waste, particularly the organic fraction (OFMSW), can be source-separated from larger inorganic fractions in urban centres prior to disposal, enabling reduction of problems associated with either highcost management or avoiding hazardous techniques (e.g., pyrolysis and incineration) and storage as landfills.
Altogether, the above mentioned wastes, PS, WAS, and OFMSW, are characterised by (easily) biodegradable compounds with high moisture content that requires a waste stabilisation step.Traditionally, anaerobic digestion (AD) of solid and semisolid substrates is most promising and economical at full-scale plants due to the following benefits: dewaterability of sludge, reduction of pathogens and odour, and reduction of dry solids [2,3].At the same time, AD has been used as a net energy producer since the first energy crisis in the 1970s, and now it is a mature technology to consider wastes as renewable energy sources in the form of methane (CH 4 ) [4] and mitigating the greenhouse gas emissions [5,6].
In parallel to the benefits offered by the AD, it is necessary to highlight the importance of the raw materials in the efficiency of the process.us, WAS requires special attention because it is composed of microbial flocs that are not accessible for microbial hydrolysis during the AD process in contrast to PS [7].For instance, PS contributes to biomethane production up to 400 Nm 3 per ton of dry organic matter in comparison to WAS, i.e., up to 240 Nm 3 per ton of dry organic matter under optimal conditions [8].erefore, to make it more accessible and to enhance biomethane yield, many pretreatment techniques have been assessed [9][10][11], and among them, thermal hydrolytic pretreatment (TH) was found to be efficient to treat WAS [12][13][14][15][16][17][18][19][20].TH is performed to breakdown solid structures of the cell walls (i.e., mostly proteins and their subsequent solubilisation) to increase rate and volume of biomethane yield [7,21,22].
Regarding the TH technology itself, different alternatives have been extrapolated from laboratory or pilot scale to industrial scale and are operative in different WWTPs; the Cambi process is the configuration most adopted in commercial processes; nevertheless, many other companies have recently commercialized their own technologies and others are under development to treat a wide variety of wastes [23].Although it could improve the plant-wide performance, its implementation increases the energy consumption of the plant.
us, anaerobic codigestion is presented as an alternative capable of overcoming such limitation.In addition to sewage sludge, other organic fractions can also be combined to enhance the biomethane production and overcome substrates deficiencies.In this context, a mixture of sewage sludge and OFMSW is an interesting approach to obtain net benefits in waste management [4].
Most of the above process can be designed and modelled by powerful informatics tools for mathematical simulation that combined with adequate data, and advanced procedures for optimization are indispensable for sustainable water and wastewater infrastructure [24].ey also enable comparison of process alternatives on a consistent basis to synthesize conceptual knowledge and analyse interactively in a short time and at low cost and risk.Between different methods to model and simulate wastewater treatment plants in particular and physicochemical and biological processes in general, programming languages such as MATLAB ® , PHYTHON ® , FORTRAN ® , etc., are used to develop complex models to solve specific problems, while professional simulation software was implemented for general understanding of diverse systems of particular interest.Independently on what programming language they use, they offer a user friendly interface to make simulation more simple for a conceptual framework, for instance, WEST ® , BIOWIN ® , AQUASIM ® , EFOR ® , GPS-X ® , etc., are the most implemented for water- related issues [25,26].Among them, GPS-X ® is the most advanced tool available in market for the mathematical modelling, control, optimization, and management of wastewater treatment plants; it offers a user-friendly, robust, customizable, high-speed platform with, nutrient libraries, calibrated models, and the most comprehensive suite of unit processes [27].Schütze et al. [24] made a comparative evaluation of four commercially available treatment plant simulation tools and concluded that out of the four programs under investigation (BIOWIN ® , ESP ® , GPS-X ® , and STOAT ® ), GPS-X ® was the one most closely meeting the requirements defined by the water company.Apart from its implementation in real-scale plants for optimization and control purposes, it has been widely used as a tool for analysis of the performance of wastewater treatment plants in a number of published papers that demonstrate the potential use of this software [27] to simulate nutrient removal processes in WWTP [25,[28][29][30], as well as to simulate anaerobic digestion [31][32][33][34].However, for energetic and economic considerations, a more generalized software called SuperPro ® v.2.7 [35] was successfully implemented in a wide range of industries such as biopharmaceutical [36,37], cellulosic ethanol [38], biodiesel [39], and bioenergy systems [40,41]; thus, it was selected for energetic calculations of the scenarios studied in the present work.
e solid-waste facilities and WWTPs are operated independently in developed countries [42].In contrast, this situation either does not exist or low-cost waste management was practised in developing countries.In both situations, waste stabilisation requires reconsideration of their system design from a sustainable point of view and to mitigate the environmental impact of growing waste generation in urban centres.In this respect, it is important to recall that urban waste management is a complex system to handle with, and as a consequence, an appropriate waste-to-energy system must contemplate gradual transition.For that reason, OFMSW integration was studied by adding 80% of the global production as first step to reach energetically self-sufficiency.
erefore, the objective of this present study was to assess the electrical energy production by AD (PS, WAS, and THWAS) and codigestion of sewage sludge with OFMSW. is was done to support energy consumption of the WWTP.In order to implement this, GPS-X ® and SuperPro ® were used to construct a theoretical framework for utilisation of urban solid wastes as renewable by-products source in the near future and to understand energy consumption in WWTPs.

Materials and Methods
Figure 1 shows a sketch of the WWTP with anaerobic, anoxic, and oxic process to a 500,000 population equivalent (PE, i.e., 1 PE � 0.2 m 3 /d of wastewater).
e sludge production during the wastewater treatment was obtained by simulation of the water line.
e composition of typical wastewater is shown in Table 1.For calculations, daily water consumption of 0.25 m 3 /PE with a rejection rate of 0.8 was assumed [44].
e sludge samples were obtained from simulation of the water line (i.e., PS from primary settling and WAS from biological process) including the effect of recycled water from solid line.ese results were used to design the solid line of every scenario.Figure 2 shows the different scenarios designed for the solid line of the WWTP and the energy integration of the biogas generated by mesophilic AD (35 °C) at a hydraulic retention time of 20 days.
In scenario 1 (Figure 2(a)), the produced sludge in water line was conditioned (i.e., thickening) to feed the AD.According to the amounts generated in the water line simulation, the feed was composed of PS (50%, g volatile solids (VS)) and WAS (50%, g VS) with total solid content (TS) of 6%.
is contributed to an organic loading rate (i.e., added per reactor volume) of 2 kgVS/m 3 d.
In scenario 2 (Figure 2(b)), WAS subjected to TH.Since the Cambi process is the configuration most adopted in commercial processes [45], it was here taken into account for calculations.Fdz-Polanco et al. [15] found the optimal procedure implemented in two ways: (1) heating to relatively high temperatures (170 °C) for a moderate time (30 min) and 2 International Journal of Chemical Engineering (2) steam explosion (i.e., sudden pressurization (4-10 bar) and depressurization) and this is in agreement with typical ranges of temperature and pressures ranges published in [46].In this case, PS was thickened up to TS of 6-7% and WAS with TS of 17% to perform TH calculations.THWAS was diluted to reach a final composition of 50% PS (gVS) and 50% THWAS (g•VS) and fed to the digester at TS of 6%.
To make a gradual transition between digestion and codigestion, in scenario 3 (Figure 2(c)), the scenario 1 was combined with 80% of the total OFMSW produced by 500,000 PE in an urban centre (i.e., the PSWAS : OFMSW ratio is 40 : 60 in VS terms) to evaluate codigestion.e amount was estimated based on a daily average production of municipal solid waste of 1 kg/PE, which was composed of 50% of organic fractions in Argentina (i.e., 0.5 kg of MSW/ PE) [47].However, a slightly higher daily production of municipal solid waste can be found in developed countries like Spain (i.e., >1.2 kg/PE) [48].e characterisation of the OFMSW was obtained from Cano et al. [45]; calculations were based on a pulped synthetic mixture of organic food fractions in an appropriate proportion as their presence in household waste.OFMSW was characterised by daily COD of 75 g/PE with other following parameters: TS: 109.9 g/kg; VS: 105.1 g/kg; COD: 150.0 g/kg; soluble COD: 91.8 g/kg; TKN: 3.79 gN/kg; and TAN: 0.82 gN/kg [45].

Informatics Tools.
All scenarios were constructed using the simulation package GPS-X ® v6.0.2 [49] and SuperPro Designer ® v.2.7 [35].e first one was implemented for specific physical and biochemical processes from wastewater treatment and the second one for energy considerations.Both programs are windows based, and they have user friendly interfaces that speak the language of process engineers; they are available and have been used in the working group during at least 7 years.
GPS-X ® constitutes a modular multipurpose modelling environment developed by Hydromantis in Canada [27].It has different libraries and within them diverse physicochemical and biological models for primary and secondary clarification, aerobic and anaerobic biological treatment as well as modules for hydraulic components (equalisation basins, splitting devices, and pumps), chlorination, filtration, and chemical phosphorus removal.In this case, CNPLib library (carbon, nitrogen, and phosphorus library) was implemented to simulate the liquid and solid line of the WWTP at stationary state without modifying flow and weather.Activated Sludge Model No. 2d (ASM2d) was the biological model adopted for simulation of the liquid line, and for the solid line, a simplified Anaerobic Digestion Model No. 1 (ADM1), called MantisAD, was selected.e ASM2d model structure, default values, and all other model aspects follow their developers [50]. is model is an extension of Activated Sludge Model No. 1 primarily to handle biological phosphorus removal systems.For the model matrix with the nomenclature used in the GPS-X implementation can be consulted in reference [51].
On the other hand, the MantisAD model was implemented to simplify the modelling of anaerobic digestion.
is new model borrows much of its structure (and approach) from ADM1, but differs substantially from it in  International Journal of Chemical Engineering many ways [52].Taking advantage of these similarities, hydrolytic parameters were modified to consider different substrates.Parameters for conventional mesophilic AD of sewage sludge were provided by Batstone et al. [53]; for THWAS, they were provided by Souza et al. [54]; and in the case of codigestion of sewage sludge with OFMSW, it was provided by Derbal et al. [55].When available, parameters of Valladolid WWTP were implemented, i.e., disintegration and hydrolysis coefficients from the real plant were included.Finally, SuperPro Designer is the most widely used simulator by pharmaceutical, biotech, specialty chemical, food, consumer product, mineral processing, and related companies; it also handles water purification, wastewater treatment, and air pollution control processes.More than 350 companies around the world have already included SuperPro in their arsenal of everyday tools to design and analyse their unit operations, and it is extremely versatile and exhibits many of the desirable attributes required for educational applications, thus is a popular teaching tool used in more than 400 colleges and universities around the world [56].
It can be considered narrow in focus because it allows the user to analyse individual basic unit operations, yet has the flexibility of combining these unit operations for a holistic and integrated analysis of a complex treatment facility.Different types of reaction kinetics and removal mechanisms can be simulated, making it possible to study various process configurations.Visual impact is provided primarily by flow schematics produced by the user on a worksheet.e software allows for comprehensive documentation of results that could be produced from a template of four categories: stream report, economic evaluation report, environmental impact assessment report, and input data report [57].

Energy Considerations.
Energy consumption of the whole plant was performed using SuperPro Designer ® (v.2.7.).e production of methane was obtained by simulation of three different scenarios (Figure 2).Methane was burned in a combined heat and power system (CHP) for the following objectives: (i) Electrical energy (EE): to meet the energy demand of the WWTP and/or to be sold to the natural grid, providing net benefits.(ii) Hot exhaust gases (EG) (typically over 400 °C): EG can be recovered in a boiler to produce steam for the TH (i.e., scenario 2).In addition to this, it can be used to dry the solid waste after digestion if it was necessary.(iii) Hot water (HW): HW can also be produced from the EG.us, it can be used for any lowtemperature heat requirement in the plant; for instance, heating the digester or district heating.erefore, it is not considered for the energy calculations in the study.4 International Journal of Chemical Engineering e energy calculations were performed according to Cano et al. [45], to determine energy balance during TH with a steam explosion (i.e., thermal transfer efficiency of 90% in boilers).
In the CHP, electrical efficiency and thermal efficiency were set to 33% and 55% (25% EG and 30% HW) with an overall efficiency of 88%, according to typical values of commercial engines [45].e calorific value of methane was set at 11 kWh/Nm 3 [58].Initially, all raw substrates and water temperature were considered to be 20 °C, and their specific heat capacity was set equivalent to water (i.e., 4.18 kJ/ kg/K).
e equation of specific heat was used to estimate the HW consumption during mesophilic AD.For calculations, initial and final water temperature at 20 °C and 35 °C, respectively.
e mass to energy factor was obtained from SuperPro database (9.9904 kcal/kg•HW).
Finally, according to ecoinvent database [59], a diesel consumption of 0.0375 kg diesel/tkm using a freight lorry was considered to estimate the transport of the OFMSW from the municipal solid waste facility to the WWTP.us, the calculation was made considering a total daily distance of 20 km and a diesel density and lower calorific value of 880 kg/m 3 and 10,000 kcal/kg, respectively [60].

Statistical Treatment.
Total energy production of the three different scenarios was used to determine if there are differences between them and if those differences are statistical significative, Y 1 , Y 2 , and Y 3 being the total thermal (HW and EG) and electrical energy (EE) production from the scenarios 1, 2, and 3, respectively.A test of hypothesis for observed means difference in samples (each sample has 30 observations) is which depends on the observed mean of the samples.Since the samples size are relatively small, Student's t-test was used a under H 0 .

Substrates Characterisation.
e two types of municipal sewage sludge, PS and WAS, were obtained from ASM2dbased simulation from the water line simulation.Table 2 shows the characterisation of the PS and WAS in three scenarios after sludge thickening process.
e mass ratio of CODs to COD in scenario 2 (0.3) showed an increase in comparison to scenario 1 (0.1), which reflects the presence of highly nondegradable organic compounds in the WAS.In addition, TH had a positive effect on solubilisation of the WAS.However, the mass ratio in scenario 3 (0.4) was slightly higher in comparison to scenario 2 due to concentrated organic fractions of the municipal solid waste.As a consequence, a higher biogas yield during the digestion of AD of scenario 2 and 3 was expected due to the availability of easily degradable substrates.Furthermore, the main issue of codigestion in scenario 3 lies on balancing the C to N ratio on OFMSW to avoid the inhibition due to ammonium.Benabdallah El Hadj et al. [5] report ammonium inhibition of at 3,860 mgNH 4 -N/L during the mesophilic digestion of OFMSW.Further, TAN concentration was lower than shocking load of 500 mg/L to cause ammonia inhibition with different scenarios (Table 2) [61].
is was also in agreement with the COD/N ratios of 22, 22, and 30; the different scenarios 1, 2, and 3 where the process cessation starts when the ratio is close enough to 50 [61].erefore, the inhibition due to ammonium was not considered in this study due to dilution of the OFMSW.
Besides the C/N ratio balance, common limiting factors when trying to implement co-digesting solid wastes with sewage sludge in full-scale plants (scenario 3) are the undesirable accumulation of degradation intermediate products and risk of bulking of the sludge due to an increase in viscosity, and it may result in problems with foaming and inadequate mixing [62] and many other major problems as well as blocking pipes.However, high-cost due to longdistance transport cost of the co-substrate from the generation point to the AD plant is the main limitation and thus this is the first selection criteria [4].
Based on the substrate characterisation, the addition of OFMSW in AD from the urban centre was intended for positive net energy production, so that it can be planned gradually while extending the infrastructure of WWTP.In that case, PS and WAS energy-intensive thickening and TH could be omitted (or less effective).However, it is well known that, for digestate usage, further analysis and/or treatment are required.
According to Romero-Güiza et al. [63], the first step is the solid-liquid separation.
e solid fraction can subsequently be applied as a fertilizer in agriculture with or without any further treatment, or composted or dried for intermediate storage and enhanced transportability.Widely implemented composting and stockpiling are the simplest and lower-cost techniques and provide good results in terms of stabilisation.However, pelletized technology is rapidly expanding between other industrial purposes such as production of composite materials, biorefinery processes, or incineration for energy production.On the other hand, the liquid fraction generates greater interest, since it contains most nitrogen and potassium.It can also be used to dilute high solid feedstock and refed to the digester and/or applied as irrigation water.Nevertheless, nitrogen content is currently a problem, and AD plants are focusing their efforts on reducing nitrogen content by either removal (as nitrogen gas with electrical and chemical energy demand) or recovery technologies (as ammonium fixation and concentration on liquid or solid medium that are potentially reusable as agricultural fertilizer or chemical reagent).

Energy Balance.
Plant-wide energy balance was performed for each scenario; Table 3 shows electrical and thermal consumption and its production, while Figure 3(a) presents net values in kWh.

International Journal of Chemical Engineering
Negative values in Table 3 show WWTP EE consumption.It was mainly due to oxidation of organic matter and nitrification in the expense of aeration and agitation during the biological aerobic treatment of wastewater.However, it also includes pretreatment, primary and secondary settling, sludge thickening and dewatering, agitation of the anaerobic digester, and recirculation to the head stream of the plant.
ermal energy consumption is also presented as negative values: HW was required for mesophilic AD, i.e., to maintain temperature of the digesters at 35 °C.Finally, steam was only used for TH within scenario 2 (see forth column in Table 3).On the other hand, the positive values in Table 3 represent the electrical and thermal generation through daily methane used in the CHP system providing three main streams: EE, HW, and EG to produce steam.

Scenario 1.
AD simulation of the mixed PS and WAS resulted in specific methane production in terms of reactor volume of 0.39 m 3 CH 4 /m 3 and over 46% COD removal.Similar results were achieved by Souza et al. [54] with a specific methane production of 0.4 m 3 CH 4 /m 3 , and over 45% COD removal during the digestion of mixed PS and WAS which is between typical values in conventional mesophilic anaerobic digestion at 20 days of HRT [9,64].Subsequently, the methane produced was utilised in CHP system for producing heat and electricity.However, the generated EE was found to be insufficient to satisfy energy requirements of the WWTP (Table 3).In addition to this, with the extra steam production from EG (476 kg/h), a sludge drying step can be incorporated to reduce its volume and consequently its cost handling; however, it is likely that this surplus will not be enough to cover the demand.A simple calculation, using SuperPro Designer software [35], shows that 2,000 kg/h approximately is required during the sludge drying from 20% to 80% TS.Another alternative could be used to sell that extra steam providing extra benefits in scenarios 1 and 3.

Scenario 2.
In scenario 2, WAS must be thickened with an extra polymer consumption to over TS of 17% before TH.erefore, thickening was performed separately.Water separated in PS thickening was returned to the head stream of the WWTP, and part of the water separated in WAS thickening is needed after TH to dilute the THWAS.e resulting combination PS: THWAS (50 : 50%) was used for AD.
e methane production showed over 20% increase in comparison to scenario 1 by TH of WAS.However, the requirement of electrical energy was higher in comparison to scenario 1 due to thickening and pumping.In addition to this, additional EG can also be used to meet the energy requirement of TH.Souza et al. [54] report an increase in methane production of 17% with THWAS during mesophilic AD (i.e., 0.49 m 3 CH 4 /m 3 with 53% COD removal).
e increase may appear low at first, but it must be considered that TH was applied only to the WAS fraction.
Since variability of results is highly dependent on experimental/operational conditions, results found in the present work are comparable with those obtained by Souza et al. [54] and Cano et al. [45].Under similar operative conditions, other studies obtained increases in CH 4 production of 50-65% [14,17,65,66], 20-30% when treating mixed sludge [67,68], although there are reports of lower increases in the range of 10-20% [65,69].
Furthermore, Perez-Elvira et al. [70] studied the sludge concentration of the biological sludge was the key parameter to satisfy the energy balances and make the process energetically efficient.In this way, higher VS content (at least 110 g/kg) would lead to positive benefits as it is presented in Cano et al. [45].International Journal of Chemical Engineering 3.5.Scenario 3. In scenario 3, addition of OFMSW to the sewage sludge combination (i.e.PS and WAS) was performed prior to AD. e resulting mixture contributed to a TS of 8% which produced daily methane of 8,976 m 3 CH 4 .is contributed to a specific methane production of 0.35 m 3 CH 4 /kgCOD removed , which is in accordance with theoretical values.Furthermore, production of 0.26 m 3 CH 4 / kgVS in in VS agrees with Dai et al. [71] and Elango et al. [72] reported methane yield of 0.33 and 0.36 m 3 CH 4 /kgVS in , respectively, at high organic loading rate (>2 kgVS in /m 3 d) during the mesophilic AD simulation.
e literature on anaerobic codigestion of sewage sludge and OFMSW at mesophilic conditions shows considerable variation in the results reported as a consequence of its dependence on substrate characteristics and operational conditions, for instance, Derbal et al. [55] found an average biogas production rate of 0.296 m 3 /m 3 R d considering an OLR of 1 kgVS in /m 3 d and an hydraulic retention time of 27 days; Bolzonella et al. [73] observed a biogas production rate of 0.32 m 3 /m 3 R d and a methane yield of 0.17 m 3 CH 4 / kgVS in with an OLR of 1.2 kgVS in /m 3 d and 20 days; Mata-Alvarez et al. [74] reported methane yield of 0.365 and 0.404 m 3 CH 4 /kgVS in with an OLR of 2.8 and 3.9 kgVS in / m 3 d, respectively, at 15 days of hydraulic retention time; Björn et al. [62] reported a daily biogas production of 3.8 m 3 / m 3 R d and a specific methane yield of 0.420 m 3 CH 4 /kgVS in working with an OLR of 5 kgVS in /m 3 d; finally, Heo et al. [75] found a daily biogas production of 1.24 m 3 /m 3 R d and a specific methane yield of 0.321 m 3 CH 4 /kgVS in with an OLR of 2.43 kgVS in /m 3 d at 13 days working with single-stage anaerobic codigestion of food waste with waste activated sludge as an optimal operating condition.
In comparison to scenarios 1 and 2, methane produced in scenario 3 showed net benefits during the energy balance.erefore, excess steam produced in CHP (1,237 kg/h) could be either used as part of the steam requirement (3,800 kg/h approximately) during digestate drying (i.e., from 20% to 80% TS) or might be used to hydrolyse part of the WAS to further increase the methane yield.Overall, the energy consideration can be easily satisfied with 80% of OFMSW and the solid waste or the sludge could be utilised later for agricultural applications under controlled conditions.
Finally, since the total daily amount of OFMSW is 200 tonnes, the diesel consumption for transportation resulted in 170.6 litres or in energy terms 1,993 kWh (1,714,800 kcal).
3.6.Statistical Discussion.EE was 522 on average, with 44.402 of variance and 0.0128 as coefficient of variation (CV) for scenario 1; 632 with 50.343 of variance (CV of 0.0112) for scenario 2; and a mean of 1,396 and variance of 731.17 (CV of 0.01937) for the third scenario.As can be seen, the energy  production of the scenario 3 is the most variable between all the studied followed by the first one.Analyzing mean differences between the first two scenarios, i.e., between scenarios 1 and 2, the EE production of the latter is greater than the first with statistical significance.By the test H 0 : EE 1 � EE 2 vs. H 0 : EE 1 < EE 2 , the null hypothesis is rejected in favor of the alternative even with a level of 99%.In the same way, comparing scenarios 2 and 3, the latter generates EE statistically superior than the second one.
On the other hand, the EG production in scenario 1 is on average 397, with 25.637 of variance; 481 with a variance of 29.067 for the second scenario; and 1,061 (variance of 422.166) for the last one.For everyone, the CV resulted was the same as in the case of EE by the assumptions of the theoretical model, and as it was in the EE production, the scenario 3 is the most variable.And the test of mean differences indicates similar results as well.us, on average, the amount of production in scenario 3 is statistically higher than that in scenarios 2 and 1.
Finally, the descriptive data for HW results is that, on average, the first scenario generated 474 with 36.618 of variance; the second, 574 with a variance of 41.518, and the third, 1,268 (variance of 602.99).Similarly to the case of EG, CV was identical to the EE by the assumptions of the theoretical model, and the HW production of the scenario 3 is the most variable.Ultimately, the mean differences test of mean with regard to HW production indicate similar results to EE and EG being that the average amount in scenario 3 is statistically higher than that in scenarios 2 and 1, even with a 99% level of significance.

Sensitivity Analysis.
In order to check the importance of adding a cosubstrate to AD, a sensitivity analysis was carried out on the plant size in scenarios 1 and 2 and on the amount of cosubstrate required in scenario 3 to find an energetic selfsufficient wastewater treatment plant configuration.
However, the main limitation of process simulation is that it cannot predict synergisms within the plant.us, a facility 2 times larger consumes and produces twice of energy.Figures 3(b) and 3(c) show the plant-wide thermal and electrical power consumption and produced by CHP in scenarios 1 and 2, respectively, with increasing the plant size from 500,000 to 1,000,000 PE.
is confirms that if the process simulation does not include synergisms and scale economies, the electrical energy balance will be negative regardless of the plant size of the plant.On the other hand, Figure 3(d) shows that even adding 60% of the OFMSW produced by 500,000 PE; good results in terms of energy balance can be achieved.
Increasing the amount of OFMSW added from 60% to the 100% produced results in an energy increasing of 21%, while the energy consumption was about 6% higher.

Typical Electrical Energy Consumption and O&M Costs.
In a real situation, 453 Valencian WWTPs consume an average total energy of 0.42 kWh/m 3 of wastewater treated [76].In smaller WWTPs, the energy consumption was very high (i.e., 0.69 kWh/m 3 ) due to the population (1,600 population equivalents), and the consumption decreases to over 0.30 kWh/m 3 with larger WWTPs with increase in population (1,000,000 population equivalents).From the literature, big differences among different WWTPs were observed: average values of 0.78 kWh/m 3 for the USA and 0.35 kWh/m 3 for Canadian small-size WWTP (56,000 m 3 /d).ese differences might due to configuration, pumping, use of membranes technology, or advanced tertiary treatment as ultraviolet disinfection [77].
By considering the above facts, the energy consumption and production of three different scenarios was assessed by considering the total electrical energy consumption to production of sludge, and it was divided by the influent flow of the WWTP.Scenarios 1 and 2 consumed 0.31 kWh/m 3 , but produced only 0.13 kWh/m 3 and 0.15 kWh/m 3 , respectively.Scenario 3 consumed 0.32 kWh/m 3 and produced 0.33 kWh/m 3 during the plant-wide energy balance.Energy savings were achieved because of by-products generated during the CHP system which was related to increased methane production due to codigestion performed in scenario 3. e energy balance could be further improved by considering local weather conditions.
Molinos-Senante et al. [78] provided information based on sample data of 22 Spanish WWTPs about their total operating and maintenance costs in five categories: energy, staff, reagents, waste management, and maintenance.ey identified the most important item as staff, representing one third of total costs.Maintenance and energy costs are the next in importance, representing 21 percent and 18 percent, respectively.Waste management and reagent costs have similar percentage weights, contributing 15 percent and 14 percent, respectively, to total costs.ey reported the average cost of plants with nutrient removal processes is €0.21/m 3 and 0.1413 €/m 3 when environmental benefits are quantified and considered within the calculation.us, the total O&M cost of the plant (scenario 1) can be estimated as 21,000 and 14,130 € per day, respectively.Although this information is not useful for scenarios 2 and 3, it is important to point out how significative environmental benefits can result for the economic evaluation.
According to these data, any change would modify the results.us, disturbance in the elasticity of the electricity price would effectively affect the energy item.Nonetheless, since it represents 18% of the total O&M cost, a variation in the price of the energy would be cushioned by the other factors, and on the other hand, there is still a profit margin that gives some security.Anyways, of course, it is a factor that can be very important.

Conclusions
In the present study, three different scenarios were simulated to predict biological waste treatment behaviour and biofuels production.Simulation was a powerful tool to save time and money for comparing the alternatives; nevertheless, experimental and real data were an essential adjustment step for a conceptual framework of waste management and bioresource recovery in an urban centre.

8
International Journal of Chemical Engineering Process simulation results from scenario 1 and 2 showed negative energy balance, while scenario 3 consumes less energy than it produces.is fact confirms the effectiveness of adding OFMSW for an energetic self-supplied WWTP.However, energy expense during transport by lorry supposes fossil fuel consumption and logistic problems when implementing at full-scale plants.Future studies should include more specific local calculations, especially in zones with high average inlet temperature.

Figure 1 :
Figure 1: Adopted configuration for water and solid line simulation.

Figure 2 :
Figure 2: e solid line and energy integration of the biogas produced in (a) scenario 1, (b) scenario 2, and (c) scenario 3.

Table 2 :
Characterisation of the AD substrate and methane production in different scenarios.

Table 3 :
Daily plant-wide energy balance of WWTP using AD and codigestion of sewage sludge.