## 2 Methodology
### District Heating Network
#### 2.3.4 Energy and Products Storage Requirements and Possibilities of Various Types of Energy  
In WWTP, it is essential to coordinate the operation of energy-producing and energy-consuming processes and equipment in time. The important processes for our study can be divided into several groups. According to the temporal nature, processes can be divided into continuous, intermittent and volatile operations. According to the energetic nature, processes can be divided into energy-consuming and energy-generating. Energy-generating processes include processes that produce not only electricity and heat, but also energy carriers (biogas, biomethane, hydrogen) and oxygen used in wastewater treatment processes. A list of the main processes in a WWTP according to their time characteristics and main type of energy is presented in Table 1.  
The types of energy or energy carriers whose storage should be ensured to achieve energy neutrality of the wastewater treatment plant are electricity, heat, biogas, biomethane, hydrogen and oxygen. **The size of the electricity storage facility** is determined by the following main parameters: (1) the demand of electrolysis products in WWTP; (2) the power and the operating mode of the electrolyzer; (3) the availability of green electricity in solar, wind, hydro power plants and biogas cogeneration plants in terms of quantity and time. For the main types of electrolyzers, the most optimal is the continuous operation mode. The cold start-up time of the electrolyzer varies from less than 5 min for PEM to more than 600 min for Solid Oxide Electrolyzer Cell (SOEC) electrolyzers, while the warm start-up time varies from less than 10 s for PEM to 10-15 min for SOEC electrolyzers [19; 64]. However, solar and wind electricity generation is unstable. In order to ensure the optimal operating mode of the electrolyzer and the consumption of peak solar and wind electricity, it is necessary to install electricity storage facilities [18; 20; 22] in the WWTP. In some cases, the grid can act as a storage system, minimizing the high capital cost of batteries, especially if net metering regulations are applied [20; 38]. **A heat storage facility** is required if the electrolyzer operates intermittently and produces more heat than is consumed by the main processes of the wastewater treatment plant, primarily sludge drying. If the wastewater treatment plant is connected to a district heating system and there are technical and legal possibilities for storing heat energy, then the district heating network could be used as a heat storage facility [106]. **The size of the oxygen storage facility** is determined by the following parameters: (1) the amount of oxygen consumed for aeration and sulfur removal and the temporal nature of consumption; (2) the amount of oxygen produced in the electrolyzer and the operating mode of the electrolyzer. The operating mode of the electrolyzer, in turn, depends on the availability of green electricity [19]. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Process Name**} & \multicolumn{3}{c}{**The Temporal Nature of the Process**} & \multicolumn{2}{c}{**Main Type of Energy**} \\ \cline{2-5}  & **Continuous** & **Intermittent** & **Volatile** & **Electricity** & **Heat** \\ \hline
**Energy-consuming processes** & & & & & \\ \hline Anaerobic digestion & X & & & X \\ \hline Biogas cleaning & X & & & X \\ \hline Biogas upgrading & X & & X & \\ \hline Sludge management & X & X & & X \\ \hline Aeration & X & X & & X \\ \hline Methanation & X & & & X \\ \hline Electrolysis & X & X & & X \\ \hline
**Energy-generating processes** & & & & \\ \hline Solar power production & & & X & X \\ \hline Wind power production & & & X & X \\ \hline Cogeneration & X & X & & X \\ \hline Hydropower production & X & & & X \\ \hline Electrolysis & X & X & & & X \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The main WWTP processes by time characteristics and main type of energy (structured by the authors).