From the Wastewater Treatment Plant to the Turnstiles of Urban Water and District Heating Networks

Wastewater treatment plants (WWTP) are among the largest energy consumers in municipalities and cause high operating costs. At the same time, many WWTPs produce biogas and have immense untapped potential for the integration of heat pumps (HP). District heating operators are looking for new possibilities to diversify their heat production portfolio and to provide cheap and clean heat to their customers. In our work, we investigate the case study of the WWTP Gleisdorf (Austria) and propose a combination of biogas utilization and heat pump integration to deliver heat for all internal thermal processes as well as to a 1,000 m heat connection line (HCL) toward the district heating network. The net annual costs of different scenarios were calculated for economic comparison. Negative net annual costs mean net annual savings. The reference scenario (biogas combined heat and power, no HCL, no HP; net annual costs of −51,000 €/year) is compared with three different heat pump integration options (HP-IO). The HP-IOs are considering different hydraulic connections, flow temperatures, and heat exchanger placement. The HP-IO-1 focuses on the low-temperature internal demands, but proves to be too limited to balance out the high cost of the HCL. HP-IO-2 operates at higher temperatures (75°C) leading to the lowest efficiency, but ultimately achieving the lowest net annual costs (−57,700 €/years with a 750 kWth HP). HP-IO-3 uses a serial heating concept trying to take advantage of lower flow temperatures while also delivering heat to the district heating network. At 300–400 kWth this leads to net annual costs of −50,100 €/years. The price ratio of 0.5 (40 €/MWh selling price of heat to 80 €/MWh purchasing price of electricity) are varied to analyze the sensitivity of the results. HPs already play an increasing role in the district heating sector, using sewage water as a heat source. The combined analysis of biogas utilization, HP integration options and the thermal as well as electrical demands of WWTP and district heating networks allow the determination of the most viable option.


INTRODUCTION-WHAT IS THE PROBLEM
The conventional municipal biological wastewater treatment is an energy-intensive process. Vast amounts of potential energy (bound in carbon) and valuable nutrients (e.g., nitrogen and phosphorus) are destroyed by energy-intensive aeration.
The specific energy consumption highly depends on the size of WWTP, as shown in Table 1. The project ENERWATER provides a database collecting energy benchmarks of

Self-Sufficiency Through Biogas CHP
There are two aspects in regard of energy balancing in WWTPs: On the one hand, self-sufficiency is the goal of each WWTPs; thus it is also the aim of the scientific community to achieve or improve self-sufficiency. Examples are the work of Jenicek et al. (2013), Wang et al. (2016), and Bertanza et al. (2018) who reported on how to achieve self-sufficiency, all focusing on different biogas fired combined heat and power plants (CHPs). On the other hand, the WWTP has the potential to provide energy to the energy network and thus exceeding selfsufficiency, especially if co-substrates are added as demonstrated by Aichinger et al. (2015) and Nowak et al. (2015). Gandiglio et al. (2017) has shown how to improve energy efficiency through co-substrates and a fuel cell as CHP equipment.
Exceeding self-sufficiency means, that additional heat and electricity is available for external consumers or future additional internal consumers. WWTPs have a strong focus on electrical efficiency. For thermal efficiency there is a lack of motivation for WWTP providers, due to heat surplus from biogas utilization. This is true if following boundary conditions are fulfilled: (a) there is an anaerobic digester producing biogas efficiently and (b) there is no sludge drying on site or other large thermal energy consumers (e.g., membrane distillation as in the case study). Usually, the leading thermal energy consumer is the digester that needs to maintain its temperature at 38 • C for the anaerobic process if operated in mesophilic conditions. From an exergetic point of view, this would be ideal for low exergy technologies like solar thermal collectors or heat pumps. However, due to the heat surplus from biogas utilization such options are often not pursued.
One option is the increased interaction with the energy networks must be expanded in order to utilize those potentials. While connections to the electricity grid are existing, the connection to the gas grid is optional (either natural gas consumption or biomethane delivery). Further, the connection to the district heating network hardly exists. In the case study, which is introduced in section Case Study Gleisdorf a connection with the district heating network is analyzed.
The WWTP offers ideal internal infrastructural conditions to act as a turnstile between those different energy networks (gas, heat, and electricity). New technologies, systems, and business models are needed to achieve this goal. The combined assessment of WWTPs and energy networks is necessary to investigate synergies and to decide which technologies and systems are best from an energetical, economic, and ecological point of view. Thus, methods and tools are required to investigate, analyze, and evaluate future scenarios where WWTPs apply such technologies and systems. LCA (Life Cycle Assessment) is a suitable method to explore different technologies, product pathways, and energy utilizations. For instance, Pasqualino et al. (2009) applied LCA to compare different biogas utilizations and sludge applications or Piao et al. (2016) used LCA to compare different waste sludge disposal methods. In Godin et al. (2012) a new LCA approach was introduced called net environmental benefit (NEB) to account for the influent wastewater quality specifically. The DEST (Decision Support Tool) introduced in section General description of the Decision Support Tool DEST has been developed by the authors to allow a broad audience the investigation of the scenarios mentioned above.
Biogas utilization is usually done in a combined heat and power (CHP) plant and reduces the internal demand for electricity and heat. Flaring of biogas is necessary if the biogas production exceeds biogas demand. Shen et al. (2015) gave an overview of the biogas production and utilization at WWTP in the United States and found that <10% of WWTPs in the United States produce biogas and that most biogas is either flared or used internally. In Austria, the majority of WWTPs with a capacity of >20,000 PE have a digester and thus produce biogas (Assmann et al., 2019). Pöschl et al. (2010) highlighted alternative biogas utilization measures-like biomethane injection into the natural gas grid, showing the increase of energy efficiency by means of upgrading biogas to a more valuable energy carrier (biomethane). The possible trend toward biomethane injection would require alternative heating equipment for the internal thermal demands of the WWTP.

Heat Pumps in the Context of WWTP and District Heating
HPs have received increased attention in the decarbonization of the space heating sector. The applications of HPs using sewage water as a heat source and space heating as heat sink are growing. Hepbasli et al. (2014) and Culha et al. (2015) give an overview of different HP systems in the wastewater area. Hepbasli et al. (2014) estimates around 500 such systems to be in operation worldwide. There is significant potential of HP in wastewater systems (sewage or WWTP effluent) as stated by paper covering Austria (Neugebauer et al., 2015;Kretschmer et al., 2016), Hungary (Somogyi et al., 2018), Netherlands (Frijns et al., 2013), or China (Chae and Kang, 2013).
Heat pumps using sewage water as heat source is increasingly interesting for district heating operators. Neugebauer et al. (2015) have shown the potential of heat pumps at WWTPs to provide FIGURE 1 | Electricity price incl. production and network cost excle. VAT and other recoverable taxes for the half-years 2015-2019 for non-household consumers between 500 and 2,000 MWh/year (Eurostat, 2020). heat to urban areas, considering the actual distances between WWTPs and dense/sparsely populated settlement areas and stated that it is feasible to reduce up to 17% of the global warming potential for space heating in Austria. Averfalk et al. (2017) have given a good overview of the operation experiences of large heat pumps installed in the 1980s. The majority of the installed heat capacity of 1,200 MW th uses sewage water as heat source. While the original reason for the installations was a Swedish electricity surplus from nuclear power, the aim nowadays is to use the existing capacity for stabilizing the increasingly fluctuating European electricity grid. Similarly, in a recent paper Terreros et al. (2020) investigated electricity market options for heat pumps in rural district heating networks in Austria. They found that with sewage water as heat source the heat generation cost for district-heating operators can be reduced by 27.5% if compared to a biomass boiler. The current study does not focus on the cost benefits of electricity market products, but rather on constant electricity prices.

Electricity Price
The electricity price is crucial for an economical operation of a HP. Figure 1 shows the trend of the electricity price of the last 5 years for non-household consumers between 500 and 2,000 MWh/years (Eurostat, 2020). Austria has a lower electricity price compared to the EU28 (109 e/MWh in the second half of 2019), while the neighboring countries Germany and Czechia represent the wide range of prices in the EU. The electricity price of the case study is discussed in section Case Study Gleisdorf. The WWTP of the case study consumes 1,040 MWh/year.

Case Study Gleisdorf
The WWTP Gleisdorf is located in the region of Styria, Austria, and has currently a designed capacity of 32,000 population equivalent (PE). The actual capacity is in average 29,183 PE based on the COD load in 2018 and exceeds the designed capacity at times. Thus, an expansion of the WWTP to 49,000 PE is in the pre-planning phase.
The daily influent water of 2018 was in average 6,420 m 3 /d with 545.5 mg/l COD, 50.8 mg/l nitrogen, and 9.0 mg/l phosphorous. The monthly temperatures of the influent water were between 9.4 (February) and 20.4 • C (August) (details in Table 3).
The boundary conditions for the analysis was the expected plant outline from a pre-planning phase. Thus, the current equipment which will be decommissioned is not explained in detail. The WWTP has currently no primary treatment to recover primary sludge (e.g., sedimentation or micro sieve), but in the expansion process, primary sedimentation shall be installed with 1 h retention time and 268 m 3 volume.
The main treatment has nitrification and denitrification in alternating operation in four aeration basins of 1,725 m 3 plus a selector basin with 300 m 3 totaling to 7,200 m 3 . There is no addition of carbon in the aeration basins as well as no cosubstrates in the digester. Phosphorous precipitation is done with iron salts and the basins are equipped with surface aerators. The two secondary clarifiers with 2,430 m 3 and 1,550 m 3 are equipped with shield scrapers to remove excess sludge which is partly returned to the aeration basins or treated in the digester. The current digester has only 400 m 3 but will be replaced with a new one, the volume of the digester has been defined in the base scenario with 1,312 m 3 .
The integration of a nitrogen removing technology (in the presented case through the thermal driven membrane technology membrane distillation) will be installed, recovering nitrogen as ammonia from the return water of the centrifuge. The membrane distillation is included in all scenarios to consider its thermal energy demand.
There is no natural gas grid connection at the WWTP. A biogas boiler converts the biogas to thermal energy. In the current state of the WWTP Gleisdorf, 11% of the biogas must be flared. The biogas boiler will be replaced by either a biogas CHP or a biogas boiler.
The electricity price of the WWTP is below the Austrian average (compare with Figure 1) and a 280 kW peak photovoltaic plant on the compound is also influencing electricity costs, leading to the electricity prices used in the study as outlined in Table 5.
The district heating network in Gleisdorf is biomassdominant (75% of produced heat) with natural gas as backup (20%) and several solar thermal plants (5%). The districtheating network is adding new customers and requires additional heating capacities. Although the existing natural gas boilers still have open capacities in winter, the operators are committed to the goal of maintaining 80% renewable share in the short term and to achieving 100% renewable share in the long term. The district heating requires a minimal flow temperature of 70 • C. Recent efforts to reduce the temperature of the return line led to an average temperature of 50 • C. This improves the integration possibilities of waste heat from industries, solar heat, and heat pumps.

Methodological Approach
General Description of the Decision Support Tool (DEST) The Decision Support Tool (DEST) 1 is an openly available tool to jointly investigate WWTPs and energy networks, thus also is the basis for the presented concept within this paper. The DEST allows a detailed definition of an individual WWTP and 1 Openly available Decision Support Tool (DEST) from the AR-HES-B project webpage www.ar-hes-b.aee-intec.at. The project "Energy storage, production and recovery of valuable substances in wastewater treatment plants" (AR-HES-B) has been funded by the Austrian Research Promotion Agency (FFG). the already connected or nearby energy networks (electricity grid, district heat network, and gas grid). It has a strong focus on the thermal balance, thus considering temperature levels and seasonal variability.
The tool requires input in four areas: (1) Definition of inlet data as daily average values, (2) Definition of applied technologies categorized in six clusters (primary treatment, secondary treatment, sludge treatment, energy conversion, nutrient recovery, and trace element elimination) including emerging technologies, (3) Definition of further specifications certain technologies may require, and (4) Definition of all three energy networks in terms of geographical distances, available energy load, or monthly demands as well as the purchase and selling price of all three energy types.
The wastewater treatment is calculated based on internationally well-known guidelines for the dimensioning of activated sludge treatment plants (DWA, 2016). The energy conversion is based on energy balances of electricity, heat (considering temperature levels), and gas. Similarly, mass balances for carbon (using the parameter COD-chemical oxygen demand) and nitrogen (considering its different forms) are made.
Economic analysis is done based on net annual costs. Investment costs are split into two types (construction and machines) and the annuity is calculated for both. Together with the yearly costs and revenues the net annual costs are calculated. For the ecological analysis, the greenhouse gas emissions (GHG) at the WWTP are considered (CO 2 , CH 4 , and N 2 O) but also the indirect emissions due to energy consumption.  The relevant methods used in the DEST to analyze energyrelated scenarios are explained below.

Technical Data
All calculation are based on the parameters from Tables 2, 3 focusing on the energy concept including biogas utilization and heat pump integration.

Heat Demand Calculation in DEST
The monthly(m) thermal demand of the digester is calculated based on the thermal energy balance as shown in Figure 2. It considers the inlet mass and temperature of the combined primary sludge from the primary sedimentation and excess sludge from the secondary sedimentation as well as heat losses to the ambient (Equation 1).
The membrane distillation requires constant thermal power. An internal heat exchanger preheats the inlet mass flow and thus reduces the external thermal demand. Consequently, the daily heat demand for the membrane distillation is calculated based on Equation (2).
The thermal energy demand of the WWTP (Table 3) has been considered in its seasonal variation. The space heating Q Bui,(m) has been derived from heat meters on site. The determination of the heat demand of the digester and membrane distillation is derived from Equations (1, 2). The district heating demand Q DH,(m) are values from 2018 and were provided by the local district-heating operator.

Heat Pump Calculation in DEST
The thermal energy balance is performed on a monthly basis, thus accounting for the seasonal changes in heat demand and sewage temperature. The COP (co-efficient of performance) of the heat pump is calculated based on the Carnot cycle where the condensation (T Cond ) and evaporation temperature (T Eva ) of the refrigerant in the heat pump is considered (Equation 3). A constant Carnot efficiency (η Carnot = 0.55) accounts for losses and inefficiencies of the heat pump and is thus the ratio of the real heat pump to the ideal Carnot cycle. The temperature gradient between the cold and hot side of both the condensation and evaporation heat exchanger is defined with 5 Kelvin ( T HX ). Thus, the condensation temperature (T Cond ) must be always 5 Kelvin ( T HX ) higher than the flow temperature (T Distri ) of the hydraulic distribution (Equation 4). The flow temperature depends on the HP-IO and varies between 60 and 75 • C. The evaporation temperature T Eva must be always T HX lower than the temperature of the effluent water (T Efflu,(m) ) (Equation 5). Due to the seasonal variation of the effluent water ( Table 3) the COP (m) is also changing throughout the year.
In the current version of the DEST, three heat pump integration options (HP-IO) have been implemented. Each HP-IO has advantages and disadvantages in regards to hydraulic flexibility and simplicity, electric efficiency and maximal thermal capacity. The HP-IOs are explained in section HP-IO-1-For Internal Usage Only. The target temperature of the heat pump must reach the required temperature of the heat consumers.

Method of Economic Calculation in DEST
For the findings of this study, the net annual costs of the heat connection line NC HCL , the CHP (or boiler) NC CHP and the heat pump NC HP have been summed up to the total energy-related net annual costs (NC En ) in Equation (6). Negative net annual costs mean actual savings, positive net annual costs refer to actual costs.
Net annual costs of each equipment NC x are considering the annuity of the investment, the annual costs and the annual revenues. The investment (C) is broken down to annual costs considering interest rate (i) (3% for all investments) and operating lifetime (n) of the individual equipment ( Table 4).
The costs include the operating cost formulas from Table 4, the HP additionally includes costs for electricity consumption. The revenues from producing heat and electricity are calculated based on the energy balances of demand and supply and using the prices from Table 5. No investment subsidies are considered in the analysis.

Economic Data
All relevant investment costs, operating costs, and operating lifetimes have been summarized in Table 4. CHP costs functions were publicly available in a satisfying quality based on longtime experiences from existing biogas CHPs (ASUE, 2014, p. 11-16).
The particular application of the heat pump with wastewater heat exchanger and digester heat exchanger made it necessary to make inquiries at manufacturers and engineering companies. Based thereon, the investment cost function was determined for the study.
To simplify the evaluation of price variations three price ratios have been defined and summarized in Table 5. The electricity prices in Austria have been around 100 e/MWh for nonhousehold consumers in the last 5 years (Figure 1). The prices have risen to 109 e/MWh in the second half of 2019. The investigation of lower prices (80-100 e/MWh) is justified with the actual electricity prices of the WWTP Gleisdorf considering their electricity bill and internal cost calculation of a 280 kW peak photovoltaic plant.
The heat selling price is used for internal and external use of heat produced by CHP, boiler, and HP. The electricity price is used for the CHP electricity production and the HP electricity consumption.

Solution Approach
Heat Connection Line (HCL) In order to go beyond self-sufficiency, maximize energy potentials at the WWTP and provide renewable heat sources to the DH, a heat connection line between WWTP and DH is investigated. FIGURE 4 | Flow sheet of the WWTP Gleisdorf with three heat pump integration options (HP-IO) and the corresponding usage of thermal heat from a CHP or biogas boiler (own drawing). HP-IO-1 HP for internal heat demand only, thus 60 • C is sufficient. Heat from CHP/boiler covers remaining internal heat demand and provides rest to heat connection line. HP-IO-2 HP provides 75 • C and can thus provide heat to internal and external heat demands. HP-IO-3 HP is operated at either 60, 65, or 70 • C covering all internal heat demands and pre-heats the return of the district heat connection line to 55, 60, or 65 • C. Note that only changes to HP-IO-3 are shown in the separate boxes of HP-IO-1 and-2.
The proposed heat connection line is 1,000 m long. It starts from the digester area at the WWTP Gleisdorf and ends at an identified hydraulic connection point at the district heating network (Figure 3).
Heat from biogas utilization and a heat pump (using the effluent as a heat source) will be used to cover all internal WWTP heat demands and a certain share of the district heating demand.

Hydraulic Scheme of WWTP Thermal Network
The hydraulic scheme of the suggested concept is shown in Figure 4. A heat pump uses the effluent water as heat source to provide heat internally (HP-IO-1) or both internally and externally (HP-IO-2 and -3). The design flow temperature on the heat pump also varies depending of the HP-IO but is always between 60 and 75 • C. All internal thermal demands (digester, buildings, and membrane distillation) can sufficiently be covered with 60 • C flow temperature.
The required flow temperature of the DH is 70 • C and the return temperature is 50 • C. A hydraulic separation between the DH-network and the WWTP-network is necessary. Therefore, the WWTP-network must supply a temperature spread of 75/55 • C.

HP-IO-1-for Internal Usage Only
The HP is designed to cover the heat demand of the WWTP. If the heat demand is not met, heat from the biogas utilization must cover the remaining demand. Surplus heat from the CHP is provided to the DH. The design and operation are simple. Low temperatures in the internal hydraulic distribution lead to a high COP of the HP. The hydraulic connection with the DH is simple. However, the size of the HP is limited to the internal demand of the WWTP.

HP-IO-2-Parallel Heating
The HP is designed to meet the temperature level of the DH directly. The temperature must reach at least the flow temperature of the DH (75 • C), which leads to a low COP. On the other side, a large HP can be installed and the operation is flexible since there are no temperature constraints. Again, the hydraulic connection to the DH is rather simple.

HP-IO-3-Serial Heating
The HP is designed for internal usage plus preheating of the DH return line. The CHP heat must cover the remaining temperature increase for the DH. Thereby the HP serves as a leverage for the limited CHP heat. The higher the target temperature of the HP is, the more heat can be sold to the DH. Thus, three different target temperatures for HP are investigated (60/65/70 • C). The hydraulic system is rather complex and the operation control must ensure all demands are met.

Reference Scenario CHP
The reference scenario is the utilization of biogas in a CHP with neither a heat pump nor a heat connection line. Figure 5 shows the thermal energy balance of the reference scenario.
The heat from the CHP covers 98% of the internal thermal demand. No additional heating equipment for the reference scenario is used for the remaining 2%, instead the remaining heating demand is covered by an electrical heater.
In the summer months 10% of the produced waste heat cannot be used and are thus subtracted from the revenues of the CHP. In Table 6 the net annual costs of CHP and heat connection line are shown. The CHP has different net annual costs due to different price ratios. The reason for the highest annual cost at the price ratio of 0.5 are the actual prices behind the ratios (as shown in Table 5). The ratio of 0.5 has the lowest prices, thus the highest costs for the CHP. Surplus heat in summer and heat shortage in winter lead to the actual net annual cost of the CHP (NC CHP ). Figures 6-10 show the NC En (Equation 6) for various HP-sizes in connection with the biogas utilization (CHP or boiler) and the HCL. The HCL is included in all scenarios. The available surplus heat from the reference scenario is usable due to the HCL. Heat shortage of the reference scenario is 13 kW th and is thus covered by all HP scenarios with a heating capacity ≥25 kW th . All figures will show negative net annual costs, which can be also seen as positive net annual savings.

General Explanations of the Results
If no heat pump is installed (0 kW th ), the net annual costs at a price ratio of 0.5 are −33,800 e/year. (CHP Ref: −51,000; CHP Surplus heat usable: −2,900; HCL: +20,100). If the curve starting from the y-axis (no HP) is going downwards, the HP leads to additional savings. The optima for each HP-IO is the lowest net annual cost or the highest net annual savings, respectively. With the increasing size of the heat pump beyond the optima, the net annual costs are going up again. This trend continues for larger heat pump capacities not depicted in Figures 6-10. The Negative net annual costs are net annual savings.  reason for this trend is the decreasing utilization rate of the heat pump. The investment cost for the heat pump is increasing, while the revenue for selling the heat is limited by the actual monthly thermal energy demand. The HP and HCL together are economically feasible if the total net annual cost is below the reference scenario. Figure 6 shows the net annual costs of the three heat pump integration options (HP-IO) for various sizes between 0 (no) and 1,000 kW th heat pump thermal capacity at the price ratio of 0.5.

Variation of Heat Pump Hydraulic Options (HP-IO)
HP-IO-1 has the smallest optimum at 75 kW th with −39,000 e/year. This is due to the limited internal demand. HP-IO-2 has higher net annual costs compared to the other options between 0 and 200 kW th due to the worse COP because of the higher target temperature. However, the ideal thermal capacity for HP-IO-2 is 750 kW th resulting in the lowest net annual costs for all options (−57,700 e/year). HP-IO-3 has its optimum between 150 and 200 kW th (−42,400 e/year). At this size it benefits from the better efficiency compared to HP-IO-3 and the higher possible thermal capacity compared to HP-IO-1. At larger capacities, the HP-IO-2 is limited in providing heat to the DH due to only preheating the return line.
The comparison with the reference line shows, that only HP-IO-2 with 500-900 kW th can have lower net annual costs. This indicates the dominant factor of the HCL which is only evened out with a high HP capacity.
Variation of Target Temperature for HP-IO-3 Figure 7 shows the variation of the target temperature for HP-IO-3. Viable target temperatures are 60, 65, and 70 • C leading to a preheating of 25, 50, and 75% of the DH flow, respectively (compare to Figure 4). Accordingly, the 70 • C-option has the highest thermal capacity of 400 kW th , (−50,100 e/year) while the 60 • C-option has an economic optimum of 100 kW th (−41,300 e/year). For comparison, the 65 • C-option has already been show in Figure 6.
The reference line is only reached by the 70 • C-option at 400 kW th HP capacity. Figure 7 shows the effect of the better COP at smaller HP sizes up to 100 kW th , but also indicate the limitation of the return line preheating at lower temperatures.

Effect of the Price Ratio
The price ratio plays a crucial role in the economic feasibility of the suggested concept. Figure 8 shows the HP-IO-3 at 65 • C (50% preheating of DH return line) at the three different price ratios. The price ratios have different references as shown in Table 6.
At a price ratio of 0.4 the CHP performs best due to the high electricity price. This is also the reason why the HP is never economically feasible, even if the HCL would be already in place. For the price ratios 0.5 and 0.625 the optima are both at 200 kW th . However, only with a price ratio of 0.625 the suggested concept is better than the reference scenario (−58,800 e/year). Figure 9 shows the 3 HP-IO at a price ratio of 0.625. Even with this favorable price ratio the HP-IO-1 does never perform better than the reference scenario. HP-IO-3 (65 • C) (both shown in Figures 8, 9) has its optima at 200 kW th and HP-IO-2 at 750 kW th . Both options perform better than the reference scenario. Figure 8 has shown the net annual costs for HP-IO-3 for three different price ratios There, the biogas is utilized in a biogas CHP which produces both electricity and thermal energy. Another option is the utilization in a biogas boiler into thermal energy. Figure 10 shows the net annual costs for HP-IO-3 (both sources in series, HP at 65 • C) for the three different price ratios and biogas utilization in either biogas boiler or biogas CHP.

Effect of Biogas Utilization Options
Generally, the higher the price ratio, the more favorable is the implementation of a HP and less favorable is the implementation of a CHP vs. a simple boiler. At Price Ratio 0.625 the biogas boiler is always more favorable. At Price Ratio 0.4 the CHP is always more favorable. At Price Ratio 0.5 the CHP is more favorable than the boiler from HP-size 25-150 kW th with a break-evenpoint at 200 kW th . From there on, the boiler is more favorable than the CHP.
This reveals a second consequence of the decision between CHP and boiler. As shown in Figure 4 (HP-IO-3), the HP preheats the return water of the DH to a defined temperature level. The thermal energy from CHP or the boiler ensures the required temperature of the DH is met. Thus, the more thermal energy the CHP or boiler provides, the more thermal energy can the HP provide. Since the CHP produces less thermal energy than the boiler, the HP is also limited in its heat delivery and has a smaller optimum of thermal capacity.

DISCUSSION
The study investigated the economic feasibility of the case study Gleisdorf. The concept suggested a combination of biogas utilization and effluent water heat pump to provide thermal energy to internal heat demands and to a district heating network via a 1,000 m heat connection line. Three different heat-pump integration-options (HP-IO) were defined and investigated. The net annual cost of the energy relevant equipment (biogas utilization, heat pump, and heat connection line) were analyzed using the Decision Support Tool (DEST). The aim of achieving high self-sufficiency of electrical and thermal energy via a biogas-CHP proofed to be still the best option in most scenarios. The relatively well-suited coverage of the thermal demand in the reference scenario (2% heat shortage in winter, 10% surplus heat in summer) means little surplus is available for selling to the DH (1,600-2,000 e/years). The inclusion of the membrane distillation in the case study led to this reduced surplus heat. In comparison with the annual net costs for the HCL (20,1000 e/years) means additional revenue must mainly come from the integration of a HP.
For HP integration, the price ratio must be at least 0.5 (in this case 40 e/MWh selling price of heat to 80 e/MWh purchasing price of electricity) to achieve economic savings. All scenarios with a price ratio of 0.4 (40/100) proofed to be not favorable.
The price ratio of 0.5 led to following results: Although HP-IO-2 (parallel heating) requires high temperatures (75 • C) and thus a low COP, it achieves lower net annual cost compared to the reference scenario between 500 and 900 kW th HP capacity with a price ratio of 0.5 (−57,700 e/years at 750 kW th compared to −51,000 e/years). The HP-IO-3 (serial heating) was investigated in more detailed due to its more complex hydraulic concept. The trade-off between better COP and higher heating capacity was in favor of the latter. At 70 • C flow temperature and a heat capacity between 300 and 400 kW th the net annual costs (−50,100 e/years) are similar to the reference scenario.
With the price ratio of 0.625 the HP-IO-2 and HP-IO-3 are both favored in comparison to the reference scenario. With 750 kW th the HP-IO-2 can achieve up to 73,100 e/years of additional savings. The HP-IO-1 is never favored in comparison to the reference scenario. Due to its limited size it cannot deliver sufficient heat to make up for the high costs of the HCL.
The biogas-CHP is still to be favored in comparison to a biogas-boiler at lower price ratios. The biogas-boilers would allow a higher leverage in the HP-IO-3 and thus increases the HP-optima from 150 to 250 kW th .
The proposed concept for the case study is currently further investigated. A price ratio of 0.6 is the most likely scenario and would allow an actual implementation. The usage of electricity market products as suggested by Terreros et al. (2020) can lead to further decrease of electricity costs. The costs of HCL might be reduced through the construction of a new rain water sewer and synergies in the construction through the overall expansion seem viable at this point.
Besides the economic calculations presented, the implementation of the suggested concept at the case study would have additional benefits: Thermal efficiency measures at the WWTP will receive higher attention, since it has a direct economic effect. The district heating network in Gleisdorf increases its flexibility. The WWTP can cover the heat demand of the summer months and thus avoid operations costs by shutting down biomass boilers completely. In the winter months the biogas utilization and heat pump can react flexibly to varying demand in the DH network.
There are technical, economical, and organizational challenges for a widespread application of the presented concept. Generally, the usage of wastewater as heat source for a heat pump is already proven, however not yet state-of-the-art for WWTPs. From the technical point of view, the wastewater heat exchanger integration in the effluent is easier than an alternative integration in the sewage, because the water is FIGURE 10 | Net annual costs (NC En ) of the HP-IO-3 (both with 65 • C) at three different price ratios and biogas utilization in either biogas boiler or biogas CHP. Negative net annual costs are net annual savings. already purified, thus cleaning costs are reduced. However, the distance from the effluent to the next possible integration point of a district heating network is often farther away than the sewage.
Thus, the proximity as well as the operating temperatures and thermal load profile of the existing or potential new district heating networks are techno-economic limitations of the presented concept. The combined approach of examining the whole thermal network (biogas utilization and heat pump integration) can partly overcome these limitations, because higher temperatures can be reached and more heat can be transported. Future price developments of electricity purchase and on-site electricity production (for WWTP operators) and heat production costs (for district heating operators) will significantly affect the economic viability of the presented concept.
There are also organizational challenges for this and similar concepts. As stated before, the focus of the WWTP operators is to achieve self-sufficiency, which is usually achieved by the operation of a biogas-CHP. However, WWTP operators must embrace the idea of going beyond self-sufficiency in order to utilize the existing energy potentials on-site. Being challenged with many other developments affecting their operational and strategic planning, some WWTP operators will be reluctant to open up new fronts. Nevertheless, innovators will see the potential role of the WWTP in the future carbon-free energy system: Being the turnstile of water, electricity, heating, and gas network.

DATA AVAILABILITY STATEMENT
The datasets generated for this study are available on request to the corresponding author.

AUTHOR CONTRIBUTIONS
WG-G was the main author of the text. HS has drafted the first approach of the text and has revisioned the manuscript. CB worked on the method, problem statement, and solution approach of the text. SM worked on the DEST and on the case study. All authors contributed to the article and approved the submitted version.

FUNDING
The research presented here was part of the Austrian flagship project ThermaFLEX (FFG No.: 868852) and funded by the Austrian Climate and Energy Fund in the framework of the research initiative Green Energy Lab as part of the Austrian innovation campaign Vorzeigeregion Energie.