## 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  
The resources required for the production of green hydrogen are renewable electricity and water. According to the literature, the production of 1 kg of hydrogen by electrolysis, depending on the efficiency of the device, may require 50-66 kWh of electricity [13; 47], or 1.27-1.67 kWh of electricity per kWh of hydrogen energy value. From an economic point of view, the cost of electricity constitutes the most significant portion of the operating costs of an electrolyzer. The average hydrogen production costs using grid electricity in Europe in 2023 for all countries were 7.94 EUR/kg [48]. Taking into account that, for example, the 2023 yearly aggregated electricity price in the NordPool Germany area was 95.18 Eur/MWh [49], the average cost of electricity in various electrolysis devices ranged from 5.0 Eur to 6.6 Eur per 1 kg of green hydrogen. The energy efficiency of modern electrolyzers reaches 60-79% [13; 47]. The main by-products of hydrogen production are heat and oxygen, which are obtained by splitting water during electrolysis. Heat is itself a form of energy, and its direct use can reduce the need for other energy sources in WWTP. Oxygen itself does not replace other energy sources, but the direct use of oxygen, as we will see later, has a very significant impact on the electricity demand in WWTP, and thus on the energy balance of the WWTP. Oxygen Demand at the Wastewater Treatment Plant  
One of WWTP's most important technological processes is activated sludge treatment by aeration. During this process, the decomposition of organic dissolved pollutants and the removal of nitrogen (nitrification and denitrification in parallel) occur. The biological decomposition of organic compounds is one of the key processes in wastewater treatment. It is very important to properly aerate activated sludge, as microorganisms must be provided with the appropriate amount of oxygen [12]. The most often used aeration methods are diffused air aeration (coarse, medium, fine bubble) and surface aeration (especially in older WWTPs). Pure oxygen aeration in municipal WWTPs is still quite rarely used. Aeration usually consumes the biggest portion of energy in current wastewater treatment technology (consuming 50-70% [12; 50], or even up to 90% of electricity used by WWTP). At the same time, it constitutes one of the largest operating costs. The air demand depends on the control of the aeration process. The simplest control systems are only supplying a proper amount of air to the aeration tanks without using the feedback signals. More complex control systems include feedback from the oxygen level meters in nitrification zones. However, these management methods do not ensure optimal oxygen levels and electricity consumption. The most advanced control systems include online feedback signals from the other important variables (ammonia nitrogen and total nitrogen) to adjust the optimal oxygen concentration level in aeration tanks. The best results are achieved when aeration process simulation systems are used to control air supply [12]. By optimizing aeration control in this way, the amount of air supplied, and thus the energy consumed by the blowers, can be reduced by 10-20% [12]. The aeration process requires precisely the oxygen present in the air. Nitrogen and other gases present in the air do not affect the aeration process and essentially act as unnecessary ballast. When air is replaced with oxygen during the aeration process, there is a possibility of significantly reducing electricity consumption. Since the oxygen content in the air is slightly less than 21%, replacing the air with oxygen should reduce the amount of gas supplied and, at the same time, the efficiency of the blowers by almost 5 times. In addition, by reducing the flow of injected gas, oxygen uptake can be improved [12]. The typical electricity consumption for air aeration is 2.25 kg O\({}_{2}\)/kWh (1.58 m\({}^{3}\) O\({}_{2}\)/kWh), for standard fine bubble diffusers.