## 3 Results and Discussion
### Energy Balance: Co-Digestion Case  
Cheese whey and residual glycerol both have high methane yields (446 mL CH\({}_{4}\)/g VS, reported by [PERSON] et al. [59] for cheese whey and 561.3 mL CH\({}_{4}\)/g VS reported by [PERSON] et al. [60] for glycerol). In the present case, 2302 kW of extra biogas can be valorized based on the plant installed capacity. Therefore, if considering characteristics for these substrates similar to those reported by [PERSON] et al. [61], with whey having a concentration of 70 g COD/L and glycerol a concentration of 1520 g COD/L (COD: chemical oxygen demand), the WWTP could treat a stream of 366 m\({}^{3}\)/d in the case of cheese whey, but for glycerol, this amount is reduced to 16 m\({}^{3}\)/d. A similar analysis can be performed for the use of waste cooking oil, also characterized by high methane yield (922 mL CH\({}_{4}\)/g VS, methane yield reported by [PERSON] et al. [62]). However, in this latter case, complexities regarding the appearance of possible inhibitory conditions due to long-chain fatty acid accumulation need to be carefully evaluated. In addition, storage and handling of waste cooking oil may be more problematic because of additional heating systems needed to avoid pipe clogging. Figure 8 shows the co-digestion configuration. The degree of electrical self-consumption is now 55.1%, still a low value. However, it should be taken into account that the WWTP has a tertiary treatment system based on lamellar decantation and the use of O\({}_{3}\) and ultraviolet rays for final polishing of the treated water, significantly rising the energy demand of the whole plant. Co-digestion with cheese whey could add an extra 2302 kW of biogas, summing to 5892 kW. A fraction of this power, 870 kW, would be used by the recovery boiler for producing steam to cover the demand of the thermal hydrolysis pre-treatment (Cambi THP B6.2, two reactors of 6 m\({}^{3}\)). The remaining amount (5022 kW) could be used as fuel in engines. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Values** \\ \hline Number of operating engines & 2 \\ Gross electrical power generated (kW) & 1039 \\ \(EP_{inst}\), installed electrical power of the engines (kW) & 2392 \\ _IECUF_, installed electrical capacity utilization factor (\%) & - \\ _DSC_, degree of self-consumption (\%) & 55.1 \\ Gross electrical energy generation (MWh/d) & 24.9 \\ Gross electrical energy generation (MWh/year) & 9102 \\ Value of gross electrical energy generation (\(\xi\)/year) & 837,384 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Results from the energy balance of the WWTP. Co-digestion is a suitable option for increasing biogas production and reactor productivity. The energy balance is positively affected in the hypothetical case of adding cheese whey as co-substrate since this material is readily degraded and does not require any pre-treatments. The greater availability of biogas affects engines' performance, increasing the mass of exhaust gases and improving the recovery boiler energy balance. Table 9 shows the results of the energy balance under co-digestion configuration. This table also shows results from the hypothetical case of adding a hydrolyzed co-substrate. This latter configuration is also schematized in Figure 8 as an alternative treatment option. For this second valorization scheme, a volumetric flow of microalgae biomass was hydrolyzed with sludge. The methane yield for hydrolyzed microalgae biomass reported by [PERSON] et al. [63] was 223 mL CH\({}_{4}\)/g VS, whereas a value of 339.1 mL CH\({}_{4}\)/g VS was  
Figure 8: Proposed scheme for cheese whey co-digestion and hydrolyzed sludge. As alternative to this process is represented in the case where a thermally pre-treated co-substrate is introduced into the digestion line. The scheme also represents biogas valorization, the recovery energy system, and thermal hydrolysis. reported by [PERSON] et al. [64]. Thus an average value of 281 mL CH\({}_{4}\)/g VS was used for evaluating the energy balance.