Energy Potential of Biogas from Sewage Sludge after Thermal Hydrolysis and Digestion

: This paper presents the energy potential of biogas obtained from the anaerobic digestion (AD) of sewage sludge (SS) preceded by thermal hydrolysis (THP) using Cambi THP ® technology. The presented data are for the Tarn ó w (Poland) wastewater treatment plant for the year 2020. A detailed energy balance of biogas and its use in the cogeneration process and in the production of heat in the water boiler and the steam boiler is presented. The article contains data on the amount of processed SS and the content of dry matter and dry organic matter at different stages of the technological process. The annual plant operation resulted in the production of 3,276,497 Nm 3 of biogas as a result of processing 8684 tonnes of dry solids (tDS) of municipal SS from the Tarn ó w wastewater treatment plant (WWTP) and regional WWTPs. The energy potential of the produced biogas was 75,347.06 GJ. The average caloriﬁc value of biogas was 23,021 kJ/Nm 3. . The obtained biogas production allowed us to cover the thermal energy demand of the THP 100%. The annual average speciﬁc biogas conversion rate during the study period was 0.761 Nm 3 /kg of dry organic matter reduced and the average organic matter content reduction in the sludge was 64.60%.


Introduction
Energy use of biogas is one of the most common applications in the renewable energy industry, using biomass as an intermediate energy source for conversion to biogas in anaerobic digestion (AD) process. Biogas can be of agricultural origin or where dedicated digesters process agricultural waste, including food production waste, crop production wastes and energy crops and animal production wastes [1]. Biogas can also be obtained by terminating the deposition of municipal waste in selected sectors of landfills and closing those sectors with the recovery of landfill biogas used in the cogeneration of electricity and heat or electricity generation alone. Finally, the commonly used AD carried out at wastewater treatment plants (WWTPs) using sewage sludge (SS) leads to energy-usable biogas. The process of wastewater treatment (WWT) is inextricably linked with the generation of municipal SS, the processing and management of which represents a major engineering, economic and environmental challenge. The processing of SS, which must be removed from the WWTP, generates up to 50% of the operating costs of the entire WWTP [2]. Among the methods of SS processing that lead to the creation of biogas that can be used for energy production, we can distinguish AD, co-digestion of SS with non-sludge organic wastes, hydrothermal carbonization of SS coupled with AD and pyrolysis [2].
The process of SS AD is one of the basic technologies of SS processing, which leads to biogas production and gives the possibility of its energetic use. In Poland, there are currently over 140 SS AD installations at municipal sewage treatment plants managed by water and sewage companies, of which over 120 have biogas power plants installed [3].
Depending on the processes and sources of the substrates used in the AD process, the biogas obtained can be characterized by different qualitative and quantitative parameters. The typical biogas composition is mainly methane and carbon dioxide, including about 55-70% CH 4 and 30-45% CO 2 , with small amounts of other components such as H 2 S, N 2 , or siloxanes [4]. The energy value of biogas is typically in the range of 6-6.5 kWh/m 3 and depends on the methane concentration in the biogas; the more methane concentration, the higher biogas calorific value [4].
Anaerobic stabilization of SS by AD is increasingly used on a large scale, e.g., in China, where only between 2009 and 2019 the amount of municipal SS generated was doubled, much of which was deposited in the environment without prior stabilization [5]. THP have also been implemented in China, where only in 2017 four Cambi THP installations were put into operation, 3 of which were for sludge treatment at water treatment plants and one for sludge treatment at Gaoantun Sludge Centre, where 400 tDS (tonnes of dry solids, where DS = dry solids, which is the mass of solids obtained after the drying process at 105 • C until a constant mass is reached [6]) of sludge is treated daily [7].
In the process of SS AD, the inhibitory effect of solid lignin on the activity of methanogenic bacteria is also evident, which has been previously confirmed elsewhere [8]. The dependence of volatile fatty acid accumulation on high doses of solid lignin was also demonstrated. These results were obtained by using kraft lignin, which was co-fermented with microcrystalline cellulose as a model solid lignin substrate. The results showed that the effect of lignin combined with volatile fat accumulation could increase the hydrolysis and digester start-up time by 47.3% and 75.3%, respectively [8]. It should be noted that this problem should not occur when a THP is used as a preceding AD. This is because the actual hydrolysis is greatly accelerated due to THP and the effect of lignin as an inhibitor of methanogenic bacteria activity in the case of THP of sludge preceding AD will be much less than in the case of a stand-alone AD process.
Food waste can also be used independently for biogas production as a good AD substrate when used as a stand-alone feedstock after pre-treatment or used as an additional co-digestion substrate with SS or agricultural waste. Any product that contains organic matter in its composition is suitable for AD, but a significant aspect in its effective use is pre-treatment. A good example of this is the experimental use of the Hollander beater [9] to pre-treat food waste by shredding and beating it. With this method, up to 80% more biogases can be produced by using a beater for 30 min than if the waste was not prebeated [9]. This method may seem similar to THP with the difference that THP involves thermal action and "steam explosion" instead of mechanical shredding. The idea, however, is the same: to make the organic matter available to the bacteria involved in the AD process in as finely divided a form as possible.
Due to the complexity of WWT and SS processing, it is advisable to support process monitoring and decision making using the latest available technologies. Such a solution has been proposed [2] to choose the most cost-effective methods. SS treatment is mainly carried out in order to reduce the mass and quantity of sludge produced and to stabilize it biologically. The main stages of SS treatment can be generally described in the following order: thickening, stabilization, dewatering, composting, drying, final disposal [10]. However, each of the above stages can be implemented in different ways, determining the subsequent stages in terms of the technology to be used. Not in every case, the use of such a model will provide an answer to the question of what technologies should be used in a particular treatment plant. This depends on many factors and a good input data base, or, in cases where this is lacking, on appropriate assumptions. In particular, support using neural networks must be supported by relevant operational experience and user awareness of the technological processes performed and their impact on further stages of sludge treatment [2].
The aim of this paper is to show the effects of functioning a complex system of SS processing in the THP and AD, using Cambi THP ® technology at the WWTP in Tarnów (50 • 0 50" N, 20 • 59 20" E), Poland. The THP and AD installation in Tarnów has been in continuous operation since 2017 [11] and this is the second Cambi installation in Poland (the first one is in Bydgoszcz-Kapuściska, commissioned in 2005). The installation in Tarnów plays the role of a regional installation processing SS, also from other municipal WWTPs in the Tarnów region. In comparison to the installation in Bydgoszcz, the installation in Tarnów is characterized by the most modern technical solutions and an integrated control system with regard to detailed parameters of the installation's operation.
Before the investment was carried out in Tarnów, the original plans for SS disposal in Tarnów involved its use for energy generation in a municipal waste incineration plant to be built by one of the municipal companies. In the end, however, this incineration plant was not built, which made it necessary to find another solution.
The process of SS AD had not been carried out at the WWTP in Tarnów before, so having in mind a comprehensive approach and good experience with similar installations in the world, the idea was to build a complex installation for SS treatment in the THP and AD together with the use of biogas for energy purposes, using Cambi THP ® technology. THP of SS is a process that has a number of advantages when used together with the AD process. On average, dewatered SS contains 50-70% organic matter and 30-50% mineral components [12], and the THP can prepare the organic matter contained in the sludge for efficient processing in digesters and increase biogas production by up to 67% [13] compared to AD without THP.
In addition, THP of SS before AD results in intensified biogas production, greater reduction in organic matter, and improved sludge properties in the context of sludge dewatering, thus making it possible to obtain a higher dry weight of dewatered sludge and reducing the amount of sludge required for management. This paper presents the results obtained for SS processing, including information on: • The amount of processed sludge; • The content of dry matter and organic dry matter in particular stages of the technological process; • The amount of biogas produced, its calorific value; • Energy balance of biogas utilization in individual energy devices; • Reduction of organic matter in the process.
This paper shows a step-by-step conversion of the energy contained in SS, the final form of which is used as biogas generated in the THP and AD of SS. A balance of the energy obtained at each stage of sludge processing provides a clear picture of the potential for energy use of SS and the benefits associated with it. The authors hope that the presented results will encourage other wastewater treatment plant managers to implement analogous installations. A list of abbreviations and acronyms adopted in the manuscript is provided in Abbreviations.

Materials and Methods
The study was conducted at a municipal WWTP in Tarnów, Poland, which is in 10th place in Poland regarding capacity in people equivalent (p.e.). The WWTP in Tarnów is a mechanical-biological-chemical treatment plant with increased nutrient removal. The design capacity of the plant is 460,800 p.e.; the actual capacity is about 330,000-350,000 p.e. The hydraulic maximum capacity of the plant is 86,400 m 3 /d [11]. In Tarnów, sludge from WWT is generated in the process of mechanical and biological treatment of municipal and industrial wastewater. The sludge stream is a mixture of primary sludge (PSS) and waste activated sludge (WAS). Preliminary sludge is generated by the sedimentation of suspended solids from the raw sewage in primary settling tanks. Excess sludge is a product of biological WWT in aeration chambers.
Preliminary sludge from the preliminary clarifiers is pumped into a separate tank where it is thickened by gravity to approx. 3-5% of dry solids (DS) and the acid hydrolysis process takes place, resulting in the formation of volatile fatty acids necessary for biological phosphorus reduction. The sludge from the tank is pumped through the sludge pumping station to the mixed thickened sludge tank. WAS is pumped from the recirculated sludge pumping station to the denitrification chamber, from where it is pumped through the sludge pumping station to the mechanical sludge thickening station, and then to the mixed thickened sludge tank, where it is mixed with the thickened preliminary sludge.
The thickened mixed sludge-PSS and WAS-is directed to the centrifuges of preliminary dewatering, where, after dewatering (S dew ) to approx. 16% of DS, it is directed to the THP ® installation, together with the stream of the delivered sludge (S del ) from other municipal WWTPs. The THP installation includes the following technological elements in sequence: a buffer tank for pre-dewatered sludge, a mixer (pulper), two reactors and an flashtank. The installation was constructed using Cambi THP ® technology and combines the processes of homogenisation, thermal hydrolysis and sterilisation (temperature approx. 165 • C and pressure approx. 6 bar), as well as disintegration due to a "steam explosion" (rapid expansion) and cooling.
The sludge after the THP ® process is combined with recycled sludge from the digesters and cooled to approx. 42-43 • C. The digesters carry out a mesophilic methane AD process [14], where conversion of organic substances takes place, resulting in biogas production and biological stabilisation of the sludge after AD. The time the sludge was kept in the digesters during the study period was just under 19 days.
Biogas after pre-treatment, desulphurisation, drying and removal of siloxanes [1] is used to produce electricity (E el ) and heat (E th ) in two co-generators (combustion engine + generator), each with an electrical output of 500 kW p and a heat output of 567.5 kW th . The exhaust gases (exg) from the co-generators are directed to a steam boiler with a thermal capacity of 1299 kW th to generate steam for the THP process [11].
The sludge after AD is dewatered to approx. 32% DS and directed to a medium temperature dryer or directly to means of transport as required. Sludge from the treatment plant is taken to be utilised in the process of reclamation of degraded areas (former landfill for ashes from the power plant). The technological diagram of the sewage sludge treatment process is presented in Figure 1.
process takes place, resulting in the formation of volatile fatty acids necessary for biological phosphorus reduction. The sludge from the tank is pumped through the sludge pumping station to the mixed thickened sludge tank. WAS is pumped from the recirculated sludge pumping station to the denitrification chamber, from where it is pumped through the sludge pumping station to the mechanical sludge thickening station, and then to the mixed thickened sludge tank, where it is mixed with the thickened preliminary sludge.
The thickened mixed sludge-PSS and WAS-is directed to the centrifuges of preliminary dewatering, where, after dewatering (Sdew) to approx. 16% of DS, it is directed to the THP ® installation, together with the stream of the delivered sludge (Sdel) from other municipal WWTPs. The THP installation includes the following technological elements in sequence: a buffer tank for pre-dewatered sludge, a mixer (pulper), two reactors and an flashtank. The installation was constructed using Cambi THP ® technology and combines the processes of homogenisation, thermal hydrolysis and sterilisation (temperature approx. 165 °C and pressure approx. 6 bar), as well as disintegration due to a "steam explosion" (rapid expansion) and cooling.
The sludge after the THP ® process is combined with recycled sludge from the digesters and cooled to approx. 42-43 °C. The digesters carry out a mesophilic methane AD process [14], where conversion of organic substances takes place, resulting in biogas production and biological stabilisation of the sludge after AD. The time the sludge was kept in the digesters during the study period was just under 19 days.
Biogas after pre-treatment, desulphurisation, drying and removal of siloxanes [1] is used to produce electricity (Eel) and heat (Eth) in two co-generators (combustion engine + generator), each with an electrical output of 500 kWp and a heat output of 567.5 kWth. The exhaust gases (exg) from the co-generators are directed to a steam boiler with a thermal capacity of 1299 kWth to generate steam for the THP process [11].
The sludge after AD is dewatered to approx. 32% DS and directed to a medium temperature dryer or directly to means of transport as required. Sludge from the treatment plant is taken to be utilised in the process of reclamation of degraded areas (former landfill for ashes from the power plant). The technological diagram of the sewage sludge treatment process is presented in Figure 1.  [11]. * Delivered hydrated sludge (Sh) with 2-6% DS is dewatered and included in the mass of dewatered sludge (Sdew). ** Biogas is produced in the digestion process.
Sdew from the Tarnów WWTP, as well as Sdel, are directed to THP and AD. The sludge is dewatered in a decanter centrifuge manufactured by the Andritz Guinard model D5L using Praestol857 BC polyelectrolyte. All sludge subjected to the THP process is placed in a common silo and directed to the proper technological process as mixed sludge (Smix).  [11]. * Delivered hydrated sludge (S h ) with 2-6% DS is dewatered and included in the mass of dewatered sludge (S dew ). ** Biogas is produced in the digestion process. S dew from the Tarnów WWTP, as well as S del , are directed to THP and AD. The sludge is dewatered in a decanter centrifuge manufactured by the Andritz Guinard model D5L using Praestol857 BC polyelectrolyte. All sludge subjected to the THP process is placed in a common silo and directed to the proper technological process as mixed sludge (S mix ).
For each of the abovementioned sludge sources, the basic parameters have been defined, i.e., percentage DS and percentage organic dry matter (DS org ). Due to the large variety and number of sources of imported sludge, it was simplified that the DS org content The S dew sludge were tested in the WWTP laboratory at a frequency of once every fortnight, according to the standards: -PN-EN 12880 [6]-testing of dry mass of sediment, at 105 ± 5 • C, -PN-EN 12879 [15]-testing of dry matter of organic sludge, at 550 ± 25 • C. A WAMED SUP-65 dryer was used for testing the dry mass of sludge from the Tarnów WWTP (S dewDS ) and of sludge after the process (S digDS ), while a CZYLOK FCF75 muffle furnace was used for testing the dry organic mass of mixed sludge (S dewDSorg ) and of sludge after the process (S digDSorg ).
The dry mass of the delivered sludge (S delDS ) was tested for each batch of delivered sludge individually and the presented results correspond to the actual measurements made with an AXIS weighing dryer, type AGS60. It is worth noting that the results of the dry matter content of the sludge obtained with the AGS60 weighing dryer compared to the results obtained with the SUP-65 dryer do not differ by more than ± 2.2 pp. and the mean of the test results does not differ by more than ± 0.83 pp.

Processed Amount of Sludge Expressed as Actual Weight
The equation that represents the total amount of sludge processed in the THP and AD, expressed in tonnes [t], is given as: (1) where:

Processed Amount of Sludge Expressed as Dry Matter
The total amount of sludge treated in the THP, expressed in tonnes of dry solids (tDS), is defined as follows: where:

Organic Matter Content of Mixed Sludge before the Process
One of the basic indicators of the efficiency of the AD process and biogas production is the amount of biogas produced as a result of the unit organic matter reduction of the treated sludge (normal m 3 /kg of dry organic matter reduction) [16]. To calculate dry organic matter reduction, it is necessary to know the amount of dry organic matter in the sludge before and after the process. Dry matter of organic sludge was tested according to Polish standards PN-EN 12879-testing of dry matter of organic sludge at 550 ± 25 • C [15].
The principle of this method is: dry SS are heated in a muffle furnace at a temperature of 550 ± 25 • C. Dry matter of organic sludge (DS org ) is calculated from the difference in weight before and after the roasting process. DS org is defined as part of the mass given off as a gas as a result of roasting dry SS under certain conditions. The DS org value is related to the dry mass of sludge and is calculated as below: where: Knowing the DS org value, the values of the monthly average amount of organic matter in sludge before the process can be calculated as follows: where: The reduction in organic dry matter is calculated in Section 2.5.

Organic Matter Content of Treated Sludge
For the calculation of the organic dry matter reduction in the process, the organic dry matter content of the sludge treated in the process, i.e., sludge after THP and AD, should be included. The calculation of the organic matter content of the sludge after THP and AD was carried out as follows: where:

Reduction of Organic Dry Matter in Treated Sludge
The calculation of the organic dry matter reduction is crucial to determine the efficiency of the AD process and to calculate the biogas unit production rate [10]. The reduction in organic dry matter in sludge treated by the THP and AD process represents the difference in organic dry matter content of sludge mixed before the process and sludge at the outlet of the plant. The calculation of the reduction in organic dry matter in the treated sludge was made considering Equations (7) and (10) as follows:

Biogas Production and Organic Matter Conversion Rate
A total of 3,276,497 Nm 3 of biogas was produced during the presented annual plant operation period. Knowing the total amount of reduced organic dry matter after the THP and AD (S digDSorgred ) process, the biogas production rate (B j ) from each kilogram of reduced organic dry matter (kgDS orgred ) can be calculated. The calculation was based on (12) according to the formula: where: B j -biogas production rate, [Nm 3 /kgDS orgred ] B-total biogas production, [Nm 3 ] S digDSorgred -amount of reduced organic dry matter after THP and AD [tDS org ]

Energy Potential of Biogas from THP and AD of SS
The average methane content (M) was measured using a ProlineProsonicFlow 200 ultrasonic flow meter from Endress + Hauser. In the investigated period, the average methane content in biogas was 64.29%. For the calculation of the energy potential of biogas, the calorific value of methane was taken into account according to the PN-ISO 6976:2016-11 [17] standard. The calorific value of methane is 35,808 kJ/Nm 3 . Knowing the average methane content in biogas, its calorific value (Q j ) was calculated as follows: Q j = M × 35,808 kJ/Nm 3 (14) where: Knowing the B (13) and Q j (14) it is possible to calculate the energy potential of biogas (E B ) produced from the THP and AD of SS. It amounts to, respectively:

Energetic Use of Biogas
The consumption of biogas for energy purposes (B U ) consists of the use of biogas by the individual devices involved in the technological process, in particular:

•
Biogas use in cogeneration units (B CHP ) for the combined production of electricity (E el ) and heat (E th ); • Biogas use in a steam boiler (B SB ) to produce steam for the THP; • Biogas use in a water boiler (B WB ) to produce thermal energy in central heating during peak heat demand.
The overall quantitative balance of biogas consumed (B U ) is completed by the amount of biogas consumed by the flare stack (B F ), which operates occasionally during maintenance of the combined heat and power production (CHP) units. The volumetric balance of the biogas consumed is calculated as follows:

Energetic Use of Biogas-Energy Potential
The energy potential of the biogas used (E BU ) is calculated with the amount of biogas used in each unit and Q j (14): which can be written as where:

Energetic Use of Biogas-Actual Useful Energy
The actual amount of biogas energy used in the individual appliances (E BRU ), with the exception of CHP units, was calculated taking into account the energy production efficiency (η) of the individual appliances according to their technical documentation.
which can be written as where: For CHP units, the actual amount of biogas energy was calculated as: • Electricity produced (E CHPel ), based on actual meter readings of electricity produced; • Primary thermal energy produced (E CHPth ), based on actual meter readings; • Exhaust gas heat energy produced (E CHPexg ), taken in proportion to the actual biogas used in the units, based on documentation data on the quantity of exhaust gas and its heat output. where:

Energetic Use of Biogas-Total Balance of Energy Used
The total energy contained in the biogas produced and used (E BU ) corresponds to the energy used per unit (E BRU ) and the losses in the conversion of biogas to energy per unit (E L ), and is given as: where:

Energetic Use of Biogas-Energy Conversion Losses
The energy losses (L) of biogas used in the energy facilities: CHP units, steam boiler and water boiler, in relation to the biogas energy potential are given as: where:

Results and Discussion
The data presented in this paper show the benefits of using the process of thermal hydrolysis and AD of SS. These benefits are mainly due to the use of biogas resulting from the processing of SS. Thanks to the technology used, the amount of biogas obtained can cover 100% of the heat demand of the plant and its technological processes. The relatively difficult operation of the plant, which requires annual maintenance, may be a cause for concern for new users. However, the energy effect achieved is worth implementing the technology on a technical scale, even in plants already carrying out methane fermentation. The results calculated as presented in Sections 2.1-2.5 in the Materials and Methods section are presented in Table 1. Full results data can be found in in the Supplementary Materials in Table S1.
The average monthly amount of processed mixed sludge S mix was 4852 tonnes in 2020. Regarding the average monthly amount of processed mixed sludge expressed in DS, the value was equal to 724 tDS, which, taking into account the average percentage of organic dry matter equal to 76.68%, gives the average monthly total organic amount of processed sludge equal to 46 tDS org . The average monthly amount of SS after the THP and AD process (S digDS ) was 327 tDS with an average organic dry matter content (DS orgdig ) of 60.1%. The content of organic dry matter after the THP and AD is quite stable and is in the average range of 56-63% DS org , indicating the stable conduct of the digestion process. The average monthly results of organic matter reduction are equal to 65.80%, which indicates a very effective process and high stabilisation of SS after the process; it also confirms the very high efficiency of the THP in terms of supporting organic matter reduction in AD.
The obtained values of the standard deviation from the data in Table 1 show a relatively small variation in the values of the calculated parameters. In particular, noteworthy are the very small values of the standard deviation for organic dry matter of sludge after THP and AD (DS orgdig ) and the total reduction in dry organic matter in the process (R digDSorg ), which testify to a stably conducted technological process with no apparent disturbances. Table 1. Basic sewage sludge (SS) data calculated from Sections 2.1-2.5-amount of dewatered sludge (S dew ), delivered sludge (S del ), dry matter of dewatered sludge (S dewDS ), delivered sludge (S delDS ), sludge after THP and AD (S digDS ), organic dry matter of dewatered sludge (S dewDSorg ), delivered sludge (S delDSorg ), percentage of organic dry matter of sludge after THP and AD (DS orgdig ) and total reduction of dry organic matter in the process (R digDSorg ). The processing of SS with basic parameters indicated in Table 1 resulted in a significant amount of biogas (B) with a relatively high methane content (M). Thus, the possibility of its energetic use depending on the needs of the WWTP was obtained. Data on the amount of biogas produced and its energy potential are shown in Table 2. Full results data can be found in in the Supplementary Materials in Table S2. Table 2. Basic biogas data calculated from Sections 2.6 and 2.7-biogas production (B), amount of reduced organic dry matter after THP and AD (S digDSorgred ), biogas production rate (B j ), average methane content (M), biogas calorific value (Q j ) and energy potential of biogas (E B ). During the presented annual operation period of the THP and AD SS treatment, concerning the year 2020, 8684 Mg dry solids of municipal SS were treated, producing 3,276,497 Nm 3 of biogas with an energy potential of 75,347.06 GJ, an average calorific value of 23,021 kJ/Nm 3 , with an average methane content of 64.29%. The rest of the biogas content is 35.51% of CO 2 and the remaining 0.2% are components such as H 2 S, O 2 , H 2 , N 2 and other. The produced and used biogas allowed 100% coverage of the demand for thermal energy of all technological processes of the installation and the social and household needs of WWTP (central heating network, demand for hot water). The annual average specific biogas conversion rate in the study period was 0.761 Nm 3 /kg of dry organic matter reduced.

Parameter
The obtained low value of the standard deviation of biogas production rate (B j ) equal to 0.078 allows us to confirm the stability of the THP and AD process. Additionally, the low standard deviation value (0.25) of methane content in the biogas indicates a stable process and environmental conditions for methanogenic bacteria involved in the AD process. As shown in Figure 2, most of the biogas produced is used in the CHP, and further in the steam boiler. process and environmental conditions for methanogenic bacteria involved in the AD process. As shown in Figure 2, most of the biogas produced is used in the CHP, and further in the steam boiler. Presented data are from the calculations in Section 2.8. In April, the annual shutdown of THP was performed, therefore the water boiler was turned on to maintain the AD temperature process; the small amount of biogas was used in the water boiler. Additionally, in October, the water boiler was serviced and it was turned on due to burner calibration. As shown in Figure 2, most of the biogas was consumed for the needs of, respectively, CHP units, steam boiler, flare and water boiler. The relatively high consumption of biogas in the flare evident at the beginning of the year from January to May was due to the necessary maintenance of the CHP units resulting from their significant wear and tear. Often, these were ad hoc services whose duration resulted in the inability to fully utilize biogas in CHP units. On the other hand, the increased consumption of biogas in the flare from June to September was due to the general overhaul of the two CHP units and taking them out of service for such a long time. During CHP renovation, much more durable equipment materials were used, which resulted in negligible consumption of biogas in the flare in the following years.
Data presented in Figure 3 are from calculations in Section 2.9. High energy potential of biogas is proportional to the amount of biogas used by individual energy devices. This potential has been used to produce combined heat and power in CHP units, to produce steam in a steam boiler for THP operation, and for peak heat demand in water boiler operation. Details of the utilization of biogas energy potential are shown in the Supplementary Materials in Table S3. Presented data are from the calculations in Section 2.8. In April, the annual shutdown of THP was performed, therefore the water boiler was turned on to maintain the AD temperature process; the small amount of biogas was used in the water boiler. Additionally, in October, the water boiler was serviced and it was turned on due to burner calibration. As shown in Figure 2, most of the biogas was consumed for the needs of, respectively, CHP units, steam boiler, flare and water boiler. The relatively high consumption of biogas in the flare evident at the beginning of the year from January to May was due to the necessary maintenance of the CHP units resulting from their significant wear and tear. Often, these were ad hoc services whose duration resulted in the inability to fully utilize biogas in CHP units. On the other hand, the increased consumption of biogas in the flare from June to September was due to the general overhaul of the two CHP units and taking them out of service for such a long time. During CHP renovation, much more durable equipment materials were used, which resulted in negligible consumption of biogas in the flare in the following years.
Data presented in Figure 3 are from calculations in Section 2.9. High energy potential of biogas is proportional to the amount of biogas used by individual energy devices. This potential has been used to produce combined heat and power in CHP units, to produce steam in a steam boiler for THP operation, and for peak heat demand in water boiler operation. Details of the utilization of biogas energy potential are shown in the Supplementary Materials in Table S3.  The implemented process allows us to produce the electricity for WWTP purposes, with a total 5136 MWh in 2020, and reduce the cost of purchasing it from the grid by more than 56% [11]. The energy use of biogas is a very important element in the whole THP and allows it to be self-sufficient in energy through the cooperation of CHP units and the steam boiler, where the energy from CHP exhaust gases is used in the steam boiler to produce the steam for THP. The THP is in operation 24/7 for 360 days a year (5 days are scheduled for the annual shutdown), hence it is necessary to ensure its reliable operation and efficient utilization of biogas potential. In addition, the amount of SS that needs to be disposed of after the process is reduced, which reduces costs by more than 50% [11] regarding the years without THP and AD operation. However, in applications of the process of anaerobic stabilization of SS, the influence of the leachate in the final dewatering of the sludge on the biological processes of wastewater treatment occurring in the aerobic chambers must be taken into account. In the case of classical AD, this influence is noticeable, but the load of the additional pollutant load, especially nitrogen compounds, does not cause problems with the operation of the treatment plant and with meeting the required process parameters. In case of additional application of the THP, the load of pollutants present in the centrifuge leachate may be significantly higher. In that case, depending on the technological capabilities of the WWTP, in principle, two scenarios may be met. In the first scenario, the technical equipment and technology of the WWTP is sufficient to reduce the additional pollutant loads, in which case no modifications to the wastewater treatment process need to be made. In the second scenario, the pollutant loads in the leachate from digested sludge dewatering are so high that the existing WWTP methods are not sufficient and additional wastewater treatment processes should be considered, e.g., in a lateral line in the annamox process.
The processing of SS by THP offers great opportunities to continue research in aspects related to the quality of biogas, as well as the properties of SS after this process. Characteristic issues for the processing of SS by THP are the quality of biogas in the context of the occurrence of VOC, organosilicon compounds and H2S content. Not without significance is also the influence of the process on the proportions of individual organic components and their variability in the process depending on the load of digesters with a new load. Additionally, the use of THP technology also increases the concentration of heavy metals in the digested sludge due to a reduction in the total amount of sludge. A similar phenomenon also takes place in the case of classical AD, but it is not as visible due The implemented process allows us to produce the electricity for WWTP purposes, with a total 5136 MWh in 2020, and reduce the cost of purchasing it from the grid by more than 56% [11]. The energy use of biogas is a very important element in the whole THP and allows it to be self-sufficient in energy through the cooperation of CHP units and the steam boiler, where the energy from CHP exhaust gases is used in the steam boiler to produce the steam for THP. The THP is in operation 24/7 for 360 days a year (5 days are scheduled for the annual shutdown), hence it is necessary to ensure its reliable operation and efficient utilization of biogas potential. In addition, the amount of SS that needs to be disposed of after the process is reduced, which reduces costs by more than 50% [11] regarding the years without THP and AD operation. However, in applications of the process of anaerobic stabilization of SS, the influence of the leachate in the final dewatering of the sludge on the biological processes of wastewater treatment occurring in the aerobic chambers must be taken into account. In the case of classical AD, this influence is noticeable, but the load of the additional pollutant load, especially nitrogen compounds, does not cause problems with the operation of the treatment plant and with meeting the required process parameters. In case of additional application of the THP, the load of pollutants present in the centrifuge leachate may be significantly higher. In that case, depending on the technological capabilities of the WWTP, in principle, two scenarios may be met. In the first scenario, the technical equipment and technology of the WWTP is sufficient to reduce the additional pollutant loads, in which case no modifications to the wastewater treatment process need to be made. In the second scenario, the pollutant loads in the leachate from digested sludge dewatering are so high that the existing WWTP methods are not sufficient and additional wastewater treatment processes should be considered, e.g., in a lateral line in the annamox process.
The processing of SS by THP offers great opportunities to continue research in aspects related to the quality of biogas, as well as the properties of SS after this process. Characteristic issues for the processing of SS by THP are the quality of biogas in the context of the occurrence of VOC, organosilicon compounds and H 2 S content. Not without significance is also the influence of the process on the proportions of individual organic components and their variability in the process depending on the load of digesters with a new load. Additionally, the use of THP technology also increases the concentration of heavy metals in the digested sludge due to a reduction in the total amount of sludge. A similar phenomenon also takes place in the case of classical AD, but it is not as visible due to a smaller reduction in the amount of sludge than in the case of the application of the THP process. The issue of leachate from sludge dewatering after THP and AD requires a separate analysis due to the relatively high content of nitrogen, phosphorus and suspended solids in these leachates.

Conclusions
The implementation of the process of thermal hydrolysis and AD of SS in Tarnów WWTP allowed the effective use of biogas for energy purposes. The consumption of natural gas, which previously constituted a primary source of heat for social and domestic purposes of the plant, has been avoided. The demand for heat energy for the THP process is fully covered by energy production using biogas.
Positive experiences from the effective energetic use of biogas and reduction in SS amount are a good example to encourage the implementation of similar solutions in other WWTPs. Regionalization of SS processing also from other WWTPs points to new opportunities for the development of the sludge market in the context of creating installations that solve environmental problems on a regional scale. In combination with the possibility of co-digestion of SS with other biological waste, it gives great opportunities to implement pro-ecological solutions that are practically self-sufficient in terms of thermal energy and support co-generation or trigeneration processes. This is important in view of the need to conserve energy due to the rising costs of electricity, environmental charges, costs of SS treatment and tightening legal regulations regarding the use of municipal SS.
Supplementary Materials: The following are available online at https://www.mdpi.com/article/ 10.3390/en15145255/s1, Table S1: Basic sewage sludge (SS) data calculated from Sections 2.1-2.5amount of dewatered sludge (Sdew), delivered sludge (Sdel), dry matter of dewatered sludge (SdewDS), delivered sludge (SdelDS), sludge after THP and AD (SdigDS), organic dry matter of dewatered sludge (SdewDSorg), delivered sludge (SdelDSorg), percantage of organic dry matter of sludge after THP and AD (DSorgdig) and total reduction of dry organic matter in the process (RdigDSorg), Table S2: Basic biogas data calculated from Sections 2.6 and 2.7-biogas production (B), amount of reduced organic dry matter after THP and AD (SdigDSorgred), biogas production rate (Bj), average methane content (M), biogas calorific value (Qj) and energy potential of biogas (EB), Table S3: Basic use of biogas energy-data calculated from Sections 2.10-2.12-electrical energy from biogas produced in CHP (ECHPel), heat energy from the engine primary cycle from CHP units (ECHPth), heat energy from exhaust gas from CHP units (ECHPexg) actual biogas energy used in CHP units (EBCHPU), steam boiler (EBSBU), water boiler (EBWBU). Total biogas energy used in energy facilities (EBRU), biogas energy losses in CHP (E LCHP ), steam boiler (E LSB ), water boiler (E LWB ). Total biogas-to-energy conversion losses in energy facilities (E L ), losses without losses in the flare (E B-F ), percentage loss of biogas potential used in energy facilities (L).