## 2 Methodology
### Presumptions for the Successful Integration of Green Hydrogen and Biomethane Production Processes
#### 2.3.1 Utilization Possibility of All Products from Electrolysis in WWTP
In situ systems can only reach a final CH\({}_{4}\) concentration of up to 90% [77] while the ex situ systems can produce a high purity (~98%) CH\({}_{4}\) stream [78], meeting the quality requirements of the natural gas grid. Furthermore, the ex situ technology is a system of a higher technology readiness level (TRL) with demo plants already in operation [79] while the in situ is only proven at lab scale [14]. It is reported that industry-ready Continuously Stirred Tank Reactors (CSTRs) can have Methane evolution rate (MER) up to 800 L CH\({}_{4}\)/L\({}_{\mathrm{v}\mathrm{r}}\)/day at grid injection purity 99% CH\({}_{4}\)[66]. The implementation of the BHM process can increase CH\({}_{4}\) yields by 50-70%, depending on the injected biogas composition from the AD process [66]. The BHM process converts the injected H\({}_{2}\) and CO\({}_{2}\) gas at a theoretical molar ratio of 4:1 to grid-quality CH\({}_{4}\). Yet it was noted [80] that a molar ratio for H\({}_{2}\) to CO\({}_{2}\) of 3.76:1 gave a higher quality gas in terms of methane content. In addition to the generation of green, renewable energy, carbon capture and reuse are other significant benefits of the technology. As a model in article [13] showed, the power of a PEM electrolyzer based on oxygen demand for aeration of a 426,400 PE wastewater treatment plant is 10 MW. The hydrogen demand for CO\({}_{2}\) methanation in BHM equates to 3.1 million m\({}^{3}\) H\({}_{2}\)/a, or 22.2% of that produced from the 10 MW electrolyzer. An additional yield of 0.76 min m\({}^{3}\) CH\({}_{4}\)/a can be generated (with 98.8% conversion); this additional CH\({}_{4}\) equates to a 54.3% increase in the CH\({}_{4}\) yield, totalling 2.17 min m\({}^{3}\) CH\({}_{4}\)/a. The study [14] presents a comprehensive techno-economic assessment of four power-to-gas systems based on ex situ biomethanation and gasification technologies in a real UK WWTP, treating 198,000 m\({}^{3}\)/a sewage sludge and 33,673 m\({}^{3}\)/a digestate after dewatering. In the simplest scenario, the whole amount of H\({}_{2}\) is provided by the PEM electrolyzer. It does not consider digestate utilization, and the digestate is thereby recycled after dewatering into farmland. The biomethanation in this scenario leads to a 63% increase in biomethane production. In the most sophisticated scenario, the digestate is treated in a gasification reactor and a mixture of H\({}_{2}\) and CO\({}_{2}\) (ratio 4:1) is provided to the methanation reactor. In this case, an increase of biomethane up to 96% can be achieved. 3.2 Availability of Green Electricity for the Production of Green Hydrogen in Terms of Quantity and Time  
As mentioned above, not all renewable electricity is suitable for green hydrogen production. According to EU requirements, renewable electricity generation facilities must be directly dedicated to the production of green hydrogen [9]. The first option to secure renewable electricity for green hydrogen production is to install and utilize renewable electricity generation capacities within the WWTP territory. The most important factors defining this option are the WWTP territory and the WWTP location [20]. It is estimated that the ground area required for a solar power plant is 8 m\({}^{2}\)/kW [20; 21], or 0.8 ha/1 MW of solar PV. The roofs of WWTP buildings can be used to install a solar power plant, but this does not solve the problem if we are talking about producing green hydrogen of at least somewhat higher capacity. According to the results of studies, examining land demand analysis for installation of wind and solar power generation systems in WWTPs, for a WWTP with a capacity of 120,000 m\({}^{3}\)/day, the available area for installation of flexible PV over treatment pools and roof PV on building roofs is about 50,000 m\({}^{2}\) in total, and the available area for installation of wind turbines in free green areas is about 10,000 m\({}^{2}\) in total [20,22].