Waste Heat Driven Integrated Membrane Distillation for Concentrating Nutrients and Process Water Recovery at a Thermophilic Biogas Plant

: To efﬁciently utilize low-concentrate digestate nutrients, further treatment is needed to decrease their volume, recover process water, and increase nutrient concentrations. Membrane distillation (MD) is a thermally driven process that is advantageous due to its ability to harness low-grade waste heat to treat highly complex wastewater streams. This study assessed the techno-economic performance of integrating MD for two-fold concentrations of nutrients and the recovery of process water from digestate at a thermophilic biogas plant. Thermal assessment showed that the recovered waste heat from ﬂue gas and digestate fully met the thermal energy demand of MD and saved 20% of boiler energy by heating incoming slurry. The permeate ﬂux from MD was 3.5 L/(m 2 h) and 3.1 L/(m 2 h) at 66 ◦ C and 61 ◦ C digestate inlet temperatures during winter and summer, respectively. With internal heat recovery, the speciﬁc heat demand for MD was 80 kWh/m 3 and 100 kWh/m 3 in winter and summer, respectively. The unit cost of MD permeate was estimated to be 3.6 € /m 3 and 4.1 € /m 3 at a digestate feed temperature of 66 ◦ C and 61 ◦ C (with heat recovery), and 7.6 € /m 3 and 9.1 € /m 3 (without heat recovery) in winter and summer, respectively. However, cost sensitivity analyses showed that waste heat recovery and thermal energy cost variations had a signiﬁcant impact on the MD permeate production cost. Nevertheless, the economic assessment indicated that the thermal integration of a biogas plant with industrial-scale MD digestate treatment capacity could be economically feasible, with winter being more economically favorable due to higher waste heat recovery.


Introduction
Anaerobic co-digestion (AD) of organic waste is progressively being used to supply renewable energy, for the production of combined heat and power (CHP) or transport fuel, and effluent digestate as a liquid fertilizer for farming [1]. The digestate is rich in plant nutrients, but its fertilizer value is usually low due to its high water content (90-95%) [2], leading to high costs for transportation, storage, and spreading on farmland [3,4]. To overcome this problem, the digestate can be processed for volume reduction, i.e., concentrating the nutrients and obtaining a process water, which can be recycled and used for the dilution of the incoming solid substrate. Phase separation of the digestate with a decanter centrifuge or screw press is a commonly applied technologies [5]. However, the separation process does not always eliminate the desired amount of total solids (TS) from the digestate [5][6][7]. For more comprehensive processing, complicated methods and technologies are required, but those currently available have various degrees of technical development, high energy inputs, and high investment and operating costs [5]. Membrane technologies have been

Materials and Methods
The current operating conditions in winter and summer at the Uppsala Vatten och Avfall AB biogas plant are described in Section 2.1. The characteristics of the digestate are presented in Section 2.2, and the method used to determine the energy consumption of the existing biogas plant is described in Section 2.3. The basic features of the plant and different unit operations in terms of mass and energy balance were evaluated to provide input data for calculations on the thermal integration of an industrial MD system (Section 2.4) into the AD biogas production system (Section 2.5). Assessment of heat integration was Sustainability 2022, 14, 13535 3 of 21 accompanied by applying the principle of energy and material balance for distinctive scenarios defined by the usual working conditions of both the AD and MD processes. The heat energy demand, separation efficiency, and permeate production rate (flux) of the MD unit were calculated based on the performance of a laboratory-scale unit in a previous study [2]. In order to assess whether waste heat recovery and the thermal integration of the AD-MD system is an economical alternative, a general cost analysis (including sensitivity analyses) was performed (Section 2.6).

Uppsala Vatten och Avfall Biogas Plant
The biogas production system was defined based on a survey of commercial AD biogas plants, presented as a simplified flow diagram of the biogas production system (Figure 1). The AD plant, operated by Uppsala Vatten och Avfall AB, Sweden, produces biogas and digestate from mixed organic wastes consisting of source-sorted organic fractions of municipal solid waste (SS-OFMSW,~82 wt%), food waste (~3 wt%), and slaughterhouse waste (~15 wt%), which is digested under thermophilic conditions (52 • C). The SS-OFMSW and food wastes are pre-treated in a Haarslev waste food de-packer for the removal of plastics and other inorganic wastes. The slaughterhouse waste is added and the substrate is passed through two pulpers, where water is added for dilution and the particle size is reduced to <10 mm. The pulped waste is stored in two holding tanks before passing through a disperser and a step screen, removing plastics and other contaminants. Thereafter, the substrate enters the buffer tank and then the sanitization (pasteurization) process ( Figure 1). Heat is supplied by steam from a pellet boiler. Pathogenic microbes are eliminated in the sanitization process, by heating the suspension system to 72 • C for one hour. After sanitization, the outgoing suspension is heat-exchanged with the incoming substrate suspension to achieve 52 • C. The suspension sludge is then pumped into the two parallel digesters with working volume 2200 and 2400 m 3 . The temperatures of the digesters are kept at 52-55 • C through heat exchange and steam supplied by the pellet boiler. The major characteristics of the existing biogas plant are shown in Table 1. 2.4) into the AD biogas production system (Section 2.5). Assessment of heat integrati was accompanied by applying the principle of energy and material balance for distinct scenarios defined by the usual working conditions of both the AD and MD processes. T heat energy demand, separation efficiency, and permeate production rate (flux) of the M unit were calculated based on the performance of a laboratory-scale unit in a previo study [2]. In order to assess whether waste heat recovery and the thermal integration the AD-MD system is an economical alternative, a general cost analysis (including sen tivity analyses) was performed (Section 2.6).

Uppsala Vatten och Avfall Biogas Plant
The biogas production system was defined based on a survey of commercial AD ogas plants, presented as a simplified flow diagram of the biogas production system (F ure 1). The AD plant, operated by Uppsala Vatten och Avfall AB, Sweden, produces b gas and digestate from mixed organic wastes consisting of source-sorted organic fractio of municipal solid waste (SS-OFMSW, ~82 wt%), food waste (~3 wt%), and slaughterhou waste (~15 wt%), which is digested under thermophilic conditions (52 °C). The SS-O MSW and food wastes are pre-treated in a Haarslev waste food de-packer for the remov of plastics and other inorganic wastes. The slaughterhouse waste is added and the su strate is passed through two pulpers, where water is added for dilution and the parti size is reduced to <10 mm. The pulped waste is stored in two holding tanks before passi through a disperser and a step screen, removing plastics and other contaminants. The after, the substrate enters the buffer tank and then the sanitization (pasteurization) proc ( Figure 1). Heat is supplied by steam from a pellet boiler. Pathogenic microbes are elim nated in the sanitization process, by heating the suspension system to 72 °C for one ho After sanitization, the outgoing suspension is heat-exchanged with the incoming substr suspension to achieve 52 °C. The suspension sludge is then pumped into the two paral digesters with working volume 2200 and 2400 m 3 . The temperatures of the digesters a kept at 52-55 °C through heat exchange and steam supplied by the pellet boiler. The ma characteristics of the existing biogas plant are shown in Table 1.

Digestate Characteristics
The effluent digestate passes directly to the digestate storage and does not undergo any further treatment after digestion ( Figure 1). The average TS content in the digestate is 4.0%, while the average nutrient content of the digestate during the study period is shown in Table 2. The digestate has an N:P:K ratio of 9:1:3, and is used as an organic fertilizer in agriculture. The mass of digestate produced was calculated by subtracting the mass of biogas from the incoming feedstock. The mass of biogas was calculated based on the biogas composition (60% CH 4 , 40% CO 2 ) and densities (CH 4 0.72 kg/m 3 , CO 2 1.96 kg/m 3 ).

Overall Thermal Energy Demand Assessment of the Existing Biogas Plant
To map the energy demand of the existing biogas digester, the system was considered as a whole. The energy supplied to the boiler is used in principle for two purposes, sludge sanitization and digester heating. Heat losses occur in heat exchangers, sanitization vessels, digesters, and pipelines, but these were not explicitly investigated. In order to calculate the amount of energy required to produce the steam, the steam flow rate, temperature, and pressure in the steam line were identified. In the thermal heat assessment, the heat demand of the biogas production system during both winter and summer conditions was considered. Based on previous findings [35], the major heat demands were expected to be for the sanitization process, digester heating, and heat losses.

Mass and Heat Balances
Mass balance was estimated for the AD biogas plant by taking account of all material flows shown in Figure 1. The mass balance is based on the fact that the total feedstock is equal to the total digestate and biogas. In the AD digester and biogas production process, it is critical to achieve a water balance. The water balance in the AD system was estimated using Equation (1), in which the incoming water in the AD plant, i.e., water confined in the raw substrates ( . m substratewater ), from the make-up ( . m mwater ) and steam generated from  (1) where . m is the mass flow for a specific material flow (kg/h). The heat balance in the digestion process is required to maintain a constant temperature inside the digester, for substrate sanitation, and for the compensation of heat losses from the tanks and pipe system (Equation (2)). The heat balance of the AD system was stated as: where . Q digester is the heat necessary for the digester (kW), . Q sanitization is the heat from sanitization slurry (kW), . Q bioreaction is the digestion reaction heat (kW), . Q loss is the system heat loss (kW), and . Q digestate is the digestate effluent heat loss (kW). The five main sub-steps (suspension, heating and heat recovery in the heat exchangers, sanitization, digestion, and water recycle) were assessed for the thermal energy loss from the AD biogas plant. The general thermal energy loss was exemplified by Equation (3): where . Q loss is the total thermal energy loss from the AD plant. The heat energy ( . Q biogas ) loss of moist biogas was calculated as (Equation (4)): . Q biogas = . m biogas * c p,biogas (T + 273) + x water h steam (4) where . m biogas is the flow rate of biogas, x water is the mass percentage of wetness in the biogas, h steam = 2505 − 2.388 T (where T is temperature (K)), and c p,biogas is the specific heat of raw biogas (c p,biogas = 1.53 kJ kg K).

Sanitization/Pasteurization Energy Demand
Sanitization/pasteurization is the main thermal energy-consuming stage in the AD process [36]. Incoming slurry is pumped from the buffer tank to the three parallel sanitization vessels via two heat exchangers. Each sanitized batch (8 m 3 ) is divided between the digesters and fed consecutively with a flow rate of 7.8 m 3 /h and 8.3 m 3 /h. The batches are dispersed consistently over the day and each digester is fed approximately 65 m 3 /day, giving a complete feeding time of 8.3 h/day per digester. All heat is delivered by a pellet boiler (VEÅ Univex P16PD H-16, 1000 kW). For sanitization, steam is added directly to the sanitization tanks. In the first step, the slurry to the tanks is heat-exchanged with newly sterilized slurry before the latter is pumped into the digester. This is done to decrease the heating requirement for incoming slurry and also to avoid overheating the digesters. In this case, efficient heat exchange plays an important role in increasing the overall energy utilization performance. The heat exchangers are counter-current tube heat exchangers, where a water circuit transfers the heat from the warm to the cold side. Some of the steam is used to compensate for heat losses in the digesters and to keep the temperature stable at 52 • C. Total heat supply to the sanitization tank is calculated by Equation (5): Heat recovery from sanitized sludge through incoming substrate is calculated by Equation (6): m slurry * c pslurry * T slurry_h − T slurry_c = . m slude * c psludge * T sludge_h − T sludge (6) where c psludge is the specific heat of sludge and c pslurry is the specific heat of slurry, equal to the specific heat of water (c psludge and c pslurry = 4.187 kJ/kgK).

Mapping Steam Supply to the Sanitization Tank
The steam used in the sanitization process is fed directly into the sanitization tanks and therefore cannot be returned to the process. Under the assumption that no leakage occurs, the only mass loss occurs to the sanitization process. The theoretical energy flow to the sanitization process was calculated as follows (Equations (7) and (8)): and . Q hygenisation = .
Q steam (8) where T 165 and h 165 are the boiler water temperature and enthalpy at 165 • C, respectively.

Digester Heating Demand
In calculating the amount of heat given to the digester, the heat supplies measured were the heat losses of the digesters ( . Q lossdigester ) and the heat required for increasing the incoming slurry temperature. The digester thermal energy losses were calculated based on [32], assuming losses from the slurry to the surroundings, using the following equation (Equation (9)): where A gr is the digester surface area in contact with the ground (m 2 ), A out is the digester surface from sludge to open air (m 2 ), k cs is the heat transfer coefficient through the ground walls from the inside sludge to soil (W/m 2 K), k cw is the heat transfer coefficient from the inside sludge to groundwater (W/m 2 K), and k out is the heat transfer coefficient through the walls from the inside sludge to outdoor air (W/m 2 K). The heat needed to raise the sludge temperature to the operating temperature (in our case,~55 • C) was calculated as Equation (10):

Waste Heat Available in Effluent Digestate and Boiler Flue Gases in the Biogas Plant
Considerable amounts of waste heat (energy) could be recovered from the digestate, although the quantitative contribution is unclear. Heat transfer performance depends on the properties of the internal working fluid, i.e., the higher the viscosity, the lower the heat transfer efficiency. For the digestate slurry, the apparent viscosity depends on its mass flow rate [34]. The waste heat available in effluent digestate sludge ( . Q heat digestate sludge ) was calculated as: Up-to-date pellet boilers reach efficiencies of 85-89% and wood chip boilers reach 73-81% based on the gross calorific value [37]. However, the annual efficiency of the pellet boiler in the Uppsala Vatten och Avfall AB plant is only approximately 60%. The combustion efficiency, which is around 80%, only describes the efficiency at combustion, and thus does not take into account heat losses to the environment [36]. Nonetheless, pellet boilers have such losses, which mainly originate from the heat energy of the flue gas, which leaves the pellet boiler at temperatures of up to 210 • C (at full load operation), depending on the boiler type [38]. The boiler in the Uppsala Vatten och Avfall plant operates under a constant pressure of 7-8 bar and supplies steam. The pellet boiler's efficiency, including flue gas sensible heat loss, was measured in this study. In this study, it was assumed that the available sensible heat in the flue gas was recovered via a heat exchanger. A key component in waste heat recovery is the heat exchanger, which captures unused heat from flue gases. The hot exhaust flue gases flow on the exterior of the heat exchanger and transfer heat to relatively cold water. A counterflow heat exchanger is simple in design and provides the most thermally effective arrangement for the recovery of heat from exhaust flue gases. In the present analysis, a B5/Dx36 SWEP brazed plate heat exchanger is considered [16]. Flue gas heat recovery ( . Q f lue gas ) was determined by Equation (12) as: where . m f lue gas is the flue gas flow rate, c p f luegas is the specific heat of flue gas, and T f lue in and T f lue out are the flue gas inlet and outlet temperatures, respectively.

Membrane Distillation and Its Performance
The permeate (product water) yield in the MD process increases with the increasing difference in temperature between the module feed and cooling channel. An increase in flow rate increases the permeate yield in a linear trend [2,11]. Laboratory-scale MD unit performance data ( Figure 2) (such as the separation efficiency, permeate production rate, and specific thermal energy demand) used in the present calculations were taken from previous studies [2,11]. The experiment was run for three consecutive days in order to obtain the small-scale lab unit MD's performance results. The total amount of permeate production for a given heat recovery level in the AD system integrated with the MD unit was estimated by using the reported performance data [2,11].
Sustainability 2022, 14, x FOR PEER REVIEW 7 of 21 gas sensible heat loss, was measured in this study. In this study, it was assumed that the available sensible heat in the flue gas was recovered via a heat exchanger. A key component in waste heat recovery is the heat exchanger, which captures unused heat from flue gases. The hot exhaust flue gases flow on the exterior of the heat exchanger and transfer heat to relatively cold water. A counterflow heat exchanger is simple in design and provides the most thermally effective arrangement for the recovery of heat from exhaust flue gases. In the present analysis, a B5/Dx36 SWEP brazed plate heat exchanger is considered [16]. Flue gas heat recovery ( ) was determined by Equation (12) as: where is the flue gas flow rate, is the specific heat of flue gas, and and are the flue gas inlet and outlet temperatures, respectively.

Membrane Distillation and Its Performance
The permeate (product water) yield in the MD process increases with the increasing difference in temperature between the module feed and cooling channel. An increase in flow rate increases the permeate yield in a linear trend [2,11]. Laboratory-scale MD unit performance data ( Figure 2) (such as the separation efficiency, permeate production rate, and specific thermal energy demand) used in the present calculations were taken from previous studies [2,11]. The experiment was run for three consecutive days in order to obtain the small-scale lab unit MD's performance results. The total amount of permeate production for a given heat recovery level in the AD system integrated with the MD unit was estimated by using the reported performance data [2,11]. At the Uppsala Vatten och Avfall biogas plant, the sizing of the full-scale MD module was based on the available waste heat recovery achieved. The MD permeate flux estimation was considered from previous experimental studies [2,11].
Experimental data from a laboratory-scale MD unit and pilot-scale study were used to analyze the specific thermal energy demand (STED) of the MD [2,11,40]. The MD coolant side ( Figure 2) heat recovery through incoming slurry was considered in the net heat energy calculation. Moreover, there is a small amount of convection and conduction heat loss via the MD permeate and module surfaces to the surroundings. A minor amount of MD pump electricity (kWh) is necessary for feed digestate and coolant flow. Detailed calculation procedures for the MD heat losses and pump electricity consumption were considered in this study. At the Uppsala Vatten och Avfall biogas plant, the sizing of the full-scale MD module was based on the available waste heat recovery achieved. The MD permeate flux estimation was considered from previous experimental studies [2,11].
Experimental data from a laboratory-scale MD unit and pilot-scale study were used to analyze the specific thermal energy demand (STED) of the MD [2,11,40]. The MD coolant side ( Figure 2) heat recovery through incoming slurry was considered in the net heat energy calculation. Moreover, there is a small amount of convection and conduction heat loss via the MD permeate and module surfaces to the surroundings. A minor amount of MD pump electricity (kWh) is necessary for feed digestate and coolant flow. Detailed calculation procedures for the MD heat losses and pump electricity consumption were considered in this study.

Thermal Integration of AD-MD (Use of Available Low-Grade Waste Heat for MD, Process Integration, and Mass and Energy Calculation)
The integrated AD-MD approach was intended to improve the thermal energy efficiency and the water balance at the biogas plant by: (1) Utilizing the potential of waste heat available from the existing biogas system (thermal characteristics of waste heat sources) for MD operation; (2) Assessing the thermal characteristics of the AD biogas production system (sink for waste heat); (3) Recovering flue gas heat from the pellet boiler via a heat exchanger, to heat the digestate from an initial 52 • C to 66 • C and 61 • C in the winter and summer season, respectively, before MD; (4) Recovering waste heat from the MD cooling channel via a heat exchanger to preheat the substrate suspension; (5) Replacing the tap water used for substrate dilution with permeate from the MD unit, which has a higher temperature than tap water; (6) Concentrating the effluent digestate two-fold through MD.
In the integrated AD-MD system, waste heat recovered from the digestate and the pellet boiler flue gas system is re-used in an MD unit, and the permeate from the MD unit is used as process water for the AD system, thus replacing the feedstock dilution water and boiler make-up water (tap water) ( Figure 3). The digestate sludge heat recovery unit mainly comprises a heat exchanger, which is attached to the boiler exhaust gas line to capture the waste heat. Incoming feedstock is pre-heated by the MD cooling side through the heat exchanger, and further heated in the sanitization and digester. This reduces boiler energy consumption and increases net energy production in the system. The digestate sludge is separated by the MD unit and the liquid fraction (permeate) is sent to the water tank, which is recirculated into the pulper mixer. The retentate, as concentrated digestate from the MD unit, leaves the system for storage before application to agricultural land.

Technical Requirements and Cost Determination for the Integrated MD System
The cost of AD-MD thermal integration is a critical issue, especially for heat reco from low-temperature heat sources. Both the technical and cost-effective aspects mu taken into account, for the assessment of the viability of the integrated AD-MD tech ogy at an industrial scale. For estimating the costs for a full-scale AD-MD integrated  Two seasonal cases (winter and summer) were defined here for the calculation of thermal integration, to represent the different thermal energy capacities of AD plants. It was assumed that the waste heat generated from the outgoing digestate only depends on the digestate flow rate and temperature, and not on the season, while the heat recovery from boiler flue gases depends on seasonal temperature variations. The heat features of the MD process (sink for waste heat) and the anticipation of waste heat recovery were evaluated by the temperature differences for the key streams (such as feed digestate and flue gas) of the processes described in this study. It was considered that the minimum temperature necessary for waste heat utilization should be higher than the available temperature in the MD inlet feed digestate.
A pinch point study [41] is the most commonly used approach for internal thermal integration to recover waste heat and improve the overall thermal efficiency of a process. Therefore, it was applied in this study, and the pinch temperature for heat exchangers was set to 5 • C. The MD feed digestate temperature after the heat exchanger may vary, depending on the available waste heat from the digestate sludge line and the flue gas flow rates and temperatures.
In the present study, the two-stage cascaded MD module arrangement presented elsewhere [42,43] was considered for scaled-up performance, with 10 cassettes per module (two or more cassettes placed in parallel), with total heat energy input, feed digestate, and coolant (incoming slurry) flow rates adjusted proportionately. For a specified temperature difference across the MD module, the total number of cassettes was estimated by the amount of waste heat available. The scaling-up method for the integrated MD module for an industrial biogas plant was considered in this analysis.

Technical Requirements and Cost Determination for the Integrated MD System
The cost of AD-MD thermal integration is a critical issue, especially for heat recovery from low-temperature heat sources. Both the technical and cost-effective aspects must be taken into account, for the assessment of the viability of the integrated AD-MD technology at an industrial scale. For estimating the costs for a full-scale AD-MD integrated system, the capacity method was used in [44]. This cost estimation methodology was also used in our study. For the projected commercial-scale MD system in this study, the cost estimations were provided by Xzero AB (subsidiary company of Scarab Development AB) [39], based on the economics of pilot-scale MD plants used in preceding studies [17,42].
At this point, the cost and benefit changes due to the thermal integration of MD were considered, including waste heat utilization, recovered water recycling in the biogas plant for feedstock dilution, and the concentration of nutrients from the digestate (reducing the volume by 50%).
The major parameters applied during the economic assessments of MD were capital expenditure (CAPEX), operating and maintenance expenditure (OPMEX), and MD product water (permeate) cost. The economic lifetime of the capital investment in the full MD unit was set to 20 years. These CAPEX costs were then distributed over the amortization period n of the MD plant, assuming a fixed interest rate z and capital expenditure, to give the annual CAPEX (Σ CAPEX ): An interest rate of 5% was assumed for the planned economic model, since this interest rate is stated for conventional desalination plants in the literature [42,45].
The OPMEX of the MD unit comprises the energy requirement, chemicals for membrane cleaning, maintenance, insurance, and replacement of the membranes. No external heat energy is needed if the recovered waste heat is sufficient to run the full-scale MD. However, the unit cost of heat energy was 0.05 €/kWh. Moreover, the cost of the electricity required for the pumps was set to 0.06 €/kWh [6,46] in this study.
In order to decrease the pH of the feed inlet digestate from 8.0 to 5.0, and to clean the membrane surface to prevent fouling, diluted acid is necessary [2]. The total annual operating and maintenance expenditure, Σ OPMEX , is the sum of all annual costs listed above. Finally, the specific cost C pw of MD permeate (€/m 3 ) includes all the yearly expenditures (CAPEX and OPMEX) divided by the total annual MD permeate production ( . M p ): Different cost data (mainly internal energy cost, maintenance costs, and transportation costs) were assessed based on data for a Swedish biogas plant [47].
In this study, laboratory and pilot-scale MD results were used for predicting the techno-economic performance in a full-scale integrated AD-MD plant, so some uncertainty obviously exists. Therefore, a sensitivity analysis was performed on the most significant cost variables identified, to evaluate the impact of changes in these on the economic consequences.

Mass and Heat Balance for the Existing Biogas Plant
The mass and heat flow of each stream during summer and winter are shown in Table 3 and Figure 4. There was a significant difference in the heat requirement between summer and winter (Equation (10)) ( Table 3). The influent slurry temperature range varies significantly between winter (approximately 10 • C) and summer (approximately 32 • C), which obviously has a substantial effect on the thermal energy consumption of the plant (Figure 4). The thermal energy required for raising the influent slurry to the working temperature accounts for around 75% and 85% of the total heat requirement during summer and winter, respectively (see Table 3). This resulted in variations in waste heat recovery between summer and winter. Obviously, the feeding heating load is a key part of the total digester heat demand. Hence, it is necessary to pay more attention to the feedstock heating load, to ensure that the working temperature remains stable. Apparently, in the digestion process, there are some heat losses that occur, and the estimated thermal energy losses were as follows: thermal energy losses from the sanitization and digester units were estimated (Equation (3)) to be 15% of the total heat demand [30,31] of the digestion process. These thermal heat losses are dependent on the digester scheme and the temperature difference between the inside of the digester and the outside surroundings. In the mass analysis, it was considered that the volume of the effluent digestate from the digester accounts for 87% of the incoming substrate to the biogas AD plant, whereas 13% of the substrate is converted into biogas.  (3)) to be 15% of the total heat demand [30,31] of the digestion proce These thermal heat losses are dependent on the digester scheme and the temperature d ference between the inside of the digester and the outside surroundings. In the mass an ysis, it was considered that the volume of the effluent digestate from the digester accoun for 87% of the incoming substrate to the biogas AD plant, whereas 13% of the substrate converted into biogas.  In the sanitization tank, the temperature is raised from~45 • C to~72 • C by means of water vapor (see Equations (5) and (7)). The sanitization process moves between the three tanks. When the first tank is ready, the next is filled and heat exchange can take place between the two tanks (Equation (6)). The sequence continues between the three tanks and excess heat is utilized in this way. The data in Table 3 suggest that the energy demand was nearly constant for the entire period, but that the energy consumption depended strongly on the season. The total slurry flow rate was also higher in winter than in summer, because the steam supply to the sanitization tank and digester was higher in winter. The energy calculation showed that the net heat energy needed for sanitization in winter was 40% higher than in summer. Moreover, it showed that the seasonal variation was more significant for the pellet boiler energy supply (66% higher in winter).
The energy balance calculation demonstrated, for the existing thermophilic digester, that the course of energy consumption has a higher dynamic than the course of energy production. The sanitization process and the digester itself consume the majority of the heat produced.
There is a significant amount of waste heat in the flue gases and effluent digestate (Equations (11) and (12)), but the amount available varies between winter and summer operation depending on the thermal energy consumption by the plant (Figure 4 and Table 3).

Integrated Performance of AD-MD Assessment
The results presented below for AD-MD thermal integration are based on steady state conditions of the system. The heat energy consumption of the sanitization process for the reference biogas plant currently requires approximately 12,790 kWh/day in winter and 8324 kWh/day in summer (see Table 3). Thermal energy analysis showed that, conceivably, 90% of the available waste heat from the effluent digestate and flue gas can be recovered ( Figure 5). The heat energy calculation showed that the MD unit thermal energy consumption could be fully met by the recovered waste heat. Table 4 summarizes the energy flow for the main streams of the integrated AD-MD system under the conditions of sanitization at 72-75 • C for one hour in both summer and winter, and the main characteristics and results of thermal integration. Two factors were found to have significant impacts on thermal integration, namely the sanitization operation conditions and ambient conditions. Net thermal energy consumption was reduced by up to 17% due to the reduction in internal energy consumption through thermal integration. The integrated AD-MD system significantly increased water utilization through (1) recycling the raw digestate water and (2) sharing the process water.  The most encouraging outcome was the high waste heat recovery rates attained fr comparatively low-quality waste heat sources through AD-MD thermal integration. T was mainly due to the heat characteristics of the biogas digestate and the working te peratures of the MD technology, i.e., the temperature range of the waste heat comp mented the heat demand of the MD. The heat recovery rate from the integrated syst was found to be highly dependent on the sanitization and ambient conditions. Dur winter, the waste heat from digestate and flue gases was mostly (90-95%) utilized by MD unit. During summer, the waste heat recovery rate fell to 64-85%, depending on  The most encouraging outcome was the high waste heat recovery rates attained from comparatively low-quality waste heat sources through AD-MD thermal integration. This was mainly due to the heat characteristics of the biogas digestate and the working temperatures of the MD technology, i.e., the temperature range of the waste heat complemented the heat demand of the MD. The heat recovery rate from the integrated system was found to be highly dependent on the sanitization and ambient conditions. During winter, the waste heat from digestate and flue gases was mostly (90-95%) utilized by the MD unit. During summer, the waste heat recovery rate fell to 64-85%, depending on the sanitization situation (see Table 4 and Figure 5). The higher waste heat recovery rates in winter were obtained because more heat was necessary for sanitization at 72 • C for one hour. A significant amount of the heat in flue gases was recovered, with the recovery rate being 44% higher in winter than in summer. The energy saving from biogas production with thermal integration was reflected by the lower internal use of steam from the pellet boiler for heating ( Table 4).
The mass balance calculations were based on the mass flow of incoming feedstock (food and slaughterhouse wastes, diluting water, and boiler make-up water) and added chemicals, the biogas flow rate, and the effluent digestate flow and its characteristics. Since dilution water is needed to dilute the incoming feedstocks to the plant, and make-up water is needed for the pellet boiler for steam production, in this analysis, the digestate liquid was separated out by the MD, and this MD permeate was assumed to be recycled as dilution water and make-up water in the digestion process. The permeate recovery from effluent digestate by MD through the thermal integration of AD-MD can provide a better water mass balance for the overall system (see Figure 5), and fully replaced the dilution and make-up water for incoming substrates' dilution and pellet boiler steam production purposes. On the other hand, recycling the MD permeate for substrate dilution had a significant impact on the influent slurry temperature, especially in winter conditions (see Figure 5). The digestate separation/concentration MD technology concentrated the effluent digestate by two-fold ( Table 5). Concentration of the digestate feed with MD by 50% of the primary incoming substrates, nitrogen was converted into ammonium nitrate (approximately 6000 mg/kg). Moreover, in the MD feed side digestate retentate, the nitrogen concentration was approximately 9000 mg/kg, compared with 4500 mg/kg in the effluent digestate, while the phosphorus concentration was 1000 mg/kg in the MD concentrated digestate and 500 mg/kg in the effluent digestate, and the potassium concentration was 3000 mg/kg in the MD concentrated digestate and 1500 mg/kg in the effluent digestate. The temperature of the MD permeate varied from 25 to 30 • C in winter and summer conditions. Therefore, the temperature of the MD permeate is higher than that of municipal piped water (10 • C). Therefore, the heat energy contribution through MD permeate water was significant. The thermal energy analysis (Table 4) showed that the permeate water heat energy input was 1155 kWh/day (15% of total recovered waste heat contribution) and 834 kWh/day (12% of total recovered waste heat contribution) during winter and summer, respectively. The flue gas heat recovery was higher in winter because the pellet boiler was working in full load operation due to high-energy consumption by the sanitization process. Based on Equations (11) and (12), the heat energy required for total slurry heating in the sanitization process after introducing MD was approximately 10,658 kWh/day in winter and 6756 kWh/day in summer (see Table 4), i.e., an approximately 17% reduction compared with the reference Uppsala Vatten och Avfall plant. The sanitization heat demand was 58% higher in winter than in summer. Heat analysis also exhibited that most of the accessible low-grade waste heat (7633 kWh/day in winter, 7067 kWh/day in summer; 8% higher than summer) was recovered by the effective integration of the AD-MD process ( Figure 5).
The heat energy calculation showed that 77% and 83% of recovered waste heat added to the MD process in winter and summer (Equations (11) and (12)), respectively (see Table 4), which demonstrates the significance of AD-MD thermal integration and waste heat recovery. Moreover, the heat energy assessment showed that the thermal integration of the AD-MD not only improved waste heat utilization, but also reduced the internal thermal energy consumption (1568 kWh/day in winter and 2133 kWh/day in summer).
The variations in the MD water production rate estimated as permeate at different feed inlet temperatures are shown in Figure 6. It was assessed that the permeate production rate increased significantly with increasing feed inlet temperature. The maximum digestate and flue gas exhaust temperatures can be obtained in winter conditions compared to summer ( Figure 6). Thus, the permeate production rate varied with the feed inlet temperature and it is higher in winter conditions ( Figure 6). 4), which demonstrates the significance of AD-MD thermal integration and waste heat recovery. Moreover, the heat energy assessment showed that the thermal integration of the AD-MD not only improved waste heat utilization, but also reduced the internal thermal energy consumption (1568 kWh/day in winter and 2133 kWh/day in summer). The variations in the MD water production rate estimated as permeate at different feed inlet temperatures are shown in Figure 6. It was assessed that the permeate production rate increased significantly with increasing feed inlet temperature. The maximum digestate and flue gas exhaust temperatures can be obtained in winter conditions compared to summer ( Figure 6). Thus, the permeate production rate varied with the feed inlet temperature and it is higher in winter conditions ( Figure 6).

Specific Thermal Energy Demand by Membrane Distillation
Heat energy values obtained in a previous study on a laboratory-scale MD unit [2] were scaled up for a full-scale MD unit in the thermal integration method for continuous digestate feed and coolant (sludge) flow rates, as summarized in Table 5. The specific thermal energy demand (STED) of MD is in the order of ~800 kWh/m 3 and 1050 kWh/m 3 at a feed digestate inlet temperature of 66 and 61 °C in winter and summer, respectively, if no heat recovery is obtained from the MD cooling side via incoming slurry heating, but the STED is reported to be relatively lower with a higher feed inlet temperature [2,11,48]. In the present analysis, the average STED (including MD coolant heat recovery) value was considered to be 80 kWh/m 3 in winter and 100 kWh/m 3 in summer. The electrical energy (see Table 5) needed for the pumps in a full-scale MD process depends on the number of membrane modules, feed and coolant flow rates, and pressure drop, etc. The average pump electricity demand considered in this study was 1.60 kWh/m 3 . The overall thermal energy balance showed that the recovered waste heat was sufficient to run the full-scale MD. Thus, additional heat would not be required if MD was integrated in full-scale operation. Furthermore, the total heat loss assessment found that more heat transfer to the MD module shields and permeates at a higher MD feed and coolant temperatures. Some recent studies have shown that, by reducing the overall heat losses of MD, a lower specific heat demand can be achieved [42,49,50].
Using the comprehensive data about thermal energy demand and supply provided in Figure 5, the overall performance (feed digestate inlet and outlet temperatures, digestate feed flow, coolant flow, and permeate production rate, etc.) of the full-scale MD was calculated (Table 5). However, the total specific thermal energy demand for MD was still 5500 kWh/day in summer and 3500 kWh/day in winter. The maximum capacity of feed digestate flow for the MD was 2.7 m 3 /h/module and the total number of modules was 234 in winter, but 264 in summer (as the MD feed digestate temperature was lower in summer). The total permeate production rate was approximately 55 m 3 /day with the full-scale

Specific Thermal Energy Demand by Membrane Distillation
Heat energy values obtained in a previous study on a laboratory-scale MD unit [2] were scaled up for a full-scale MD unit in the thermal integration method for continuous digestate feed and coolant (sludge) flow rates, as summarized in Table 5. The specific thermal energy demand (STED) of MD is in the order of~800 kWh/m 3 and 1050 kWh/m 3 at a feed digestate inlet temperature of 66 and 61 • C in winter and summer, respectively, if no heat recovery is obtained from the MD cooling side via incoming slurry heating, but the STED is reported to be relatively lower with a higher feed inlet temperature [2,11,48]. In the present analysis, the average STED (including MD coolant heat recovery) value was considered to be 80 kWh/m 3 in winter and 100 kWh/m 3 in summer. The electrical energy (see Table 5) needed for the pumps in a full-scale MD process depends on the number of membrane modules, feed and coolant flow rates, and pressure drop, etc. The average pump electricity demand considered in this study was 1.60 kWh/m 3 . The overall thermal energy balance showed that the recovered waste heat was sufficient to run the full-scale MD. Thus, additional heat would not be required if MD was integrated in full-scale operation. Furthermore, the total heat loss assessment found that more heat transfer to the MD module shields and permeates at a higher MD feed and coolant temperatures. Some recent studies have shown that, by reducing the overall heat losses of MD, a lower specific heat demand can be achieved [42,49,50].
Using the comprehensive data about thermal energy demand and supply provided in Figure 5, the overall performance (feed digestate inlet and outlet temperatures, digestate feed flow, coolant flow, and permeate production rate, etc.) of the full-scale MD was calculated (Table 5). However, the total specific thermal energy demand for MD was still 5500 kWh/day in summer and 3500 kWh/day in winter. The maximum capacity of feed digestate flow for the MD was 2.7 m 3 /h/module and the total number of modules was 234 in winter, but 264 in summer (as the MD feed digestate temperature was lower in summer). The total permeate production rate was approximately 55 m 3 /day with the fullscale operation of MD. If the digestate feed flow rate to the MD module is fixed, permeate production can be optimized to increase the temperature difference between feed digestate and coolant temperature and adjust the number of membrane modules required, thereby also decreasing the total energy demand.

Economic Assessment of the Integrated AD-MD System
In low-grade heat-driven MD applications, both capital expenditure (CAPEX), and operating and maintenance expenditure (OPMEX) costs are largely influenced by waste heat utilization, product water recovery, and the effective integration of MD. The costs of detailed components and other essential parameters of the integrated AD-MD system are shown in Figure 7. The cost analysis calculations showed that the CAPEX was approximately EUR 443,000 and EUR 497,000 for the full-scale installation of integrated MD for winter and summer conditions, respectively. The CAPEX values of MD were 12% higher in summer because of the need for a larger MD capacity, due to the lower waste heat recovery from the existing biogas plant in summer. It can be observed from the CAPEX estimation that the MD module costs (around 31% of total CAPEX in both winter and summer) and the AD-MD integrated heat supply line including control (around 22% and 21% of total investment in winter and summer, respectively) contributed the highest share of the total CAPEX costs, followed by other investment expenditures (as can be seen from Figure 7). The heat exchangers' investment cost also represented a significant share of the CAPEX costs. operation of MD. If the digestate feed flow rate to the MD module is fixed, permeate production can be optimized to increase the temperature difference between feed digestate and coolant temperature and adjust the number of membrane modules required, thereby also decreasing the total energy demand.

Economic Assessment of the Integrated AD-MD System
In low-grade heat-driven MD applications, both capital expenditure (CAPEX), and operating and maintenance expenditure (OPMEX) costs are largely influenced by waste heat utilization, product water recovery, and the effective integration of MD. The costs of detailed components and other essential parameters of the integrated AD-MD system are shown in Figure 7. The cost analysis calculations showed that the CAPEX was approximately EUR 443,000 and EUR 497,000 for the full-scale installation of integrated MD for winter and summer conditions, respectively. The CAPEX values of MD were 12% higher in summer because of the need for a larger MD capacity, due to the lower waste heat recovery from the existing biogas plant in summer. It can be observed from the CAPEX estimation that the MD module costs (around 31% of total CAPEX in both winter and summer) and the AD-MD integrated heat supply line including control (around 22% and 21% of total investment in winter and summer, respectively) contributed the highest share of the total CAPEX costs, followed by other investment expenditures (as can be seen from Figure 7). The heat exchangers' investment cost also represented a significant share of the CAPEX costs.  The OPMEX values for the integrated MD system ( ) are summarized in Figure 8 for winter and summer. The previous studies [17,42] reported that the thermal energy cost made the highest contribution to the total OPMEX for the integrated MD system. As can be seen from above the energy balance, the MD can run with recovered waste heat from the biogas plant, so no thermal energy cost was considered in the OPMEX cost calculation. In this study, it was estimated that the MD module replacement costs made the highest contribution, around 41% for both winter and summer, to the total OPMEX. The costs analysis also exhibited that OPMEX values were lower in winter, when waste heat was utilized in the full-time operation, than in summer. As a result, it can be said that the OPMEX could be affected considerably by waste heat recovery. The heat cost calculation showed that the waste heat recovery could save EUR 58,000 and EUR 91,000 yearly in winter and summer, respectively, which signifies a substantial amount of the total OP-MEX of the integrated AD-MD system. Furthermore, MD has emerged as a robust technology and is less likely to undergo severe scaling compared to RO and other membrane The OPMEX values for the integrated MD system (Σ OPMEX ) are summarized in Figure 8 for winter and summer. The previous studies [17,42] reported that the thermal energy cost made the highest contribution to the total OPMEX for the integrated MD system. As can be seen from above the energy balance, the MD can run with recovered waste heat from the biogas plant, so no thermal energy cost was considered in the OPMEX cost calculation. In this study, it was estimated that the MD module replacement costs made the highest contribution, around 41% for both winter and summer, to the total OPMEX. The costs analysis also exhibited that OPMEX values were lower in winter, when waste heat was utilized in the full-time operation, than in summer. As a result, it can be said that the OPMEX could be affected considerably by waste heat recovery. The heat cost calculation showed that the waste heat recovery could save EUR 58,000 and EUR 91,000 yearly in winter and summer, respectively, which signifies a substantial amount of the total OPMEX of the integrated AD-MD system. Furthermore, MD has emerged as a robust technology and is less likely to undergo severe scaling compared to RO and other membrane technologies; therefore, only light pretreatment of the feed digestate liquid has been considered in the analysis. On the contrary, due to the supplementary costs of the heat streamline, pumps, control system, and heat exchangers, the total CAPEX was higher for the integrated AD-MD system than for the system without heat recovery. Nevertheless, due to the overall lower OPMEX cost of the integrated AD-MD system, these added CAPEX costs can be reimbursed within less than one year. Moreover, the OPMEX of the integrated system can be influenced significantly by the operating parameters of the MD, membrane performance, and waste heat recovery rate. integrated AD-MD system than for the system without heat recovery. Nevertheless, due to the overall lower OPMEX cost of the integrated AD-MD system, these added CAPEX costs can be reimbursed within less than one year. Moreover, the OPMEX of the integrated system can be influenced significantly by the operating parameters of the MD, membrane performance, and waste heat recovery rate.
(a) Operation and maintenance costs in winter b() Operation and maintenance costs in summer In this study, the unit cost of MD permeate ( ) for an integrated AD-MD unit with waste heat recovery was 3.6 €/m 3 and 4.1 €/m 3 at a digestate inlet feed temperature of 66 °C and 61 °C during winter and summer, respectively. Cost analysis showed that the permeate production cost was 14% higher in summer than in winter, due to the lower rate of heat recovery and lower digestate feed temperature in summer. The permeate production cost calculation exhibited that the unit permeate cost in this study was lower than the 5.6 €/m 3 and 4.7 €/m 3 reported by [17,42], respectively, for a pilot-scale test rig set up at Hammarby Sjöstadsverk, Stockholm, and higher than the 2.2 €/m 3 stated by [43] for a test rig deployed at Idbäcken Cogeneration Facility, Nyköping, Sweden, perhaps because of the higher net specific thermal energy demand for MD and the operation and maintenance costs for a challenging digestate feed.

Overall Cost Performance and Sensitivity Analyses at the Integrated MD-AD Plant
The thermal energy analysis showed that the MD heat energy consumption could be met by the available waste heat in the biogas plant. The thermal energy cost analysis showed that it had a significant impact on the permeate production cost for the cases with and without heat recovery, even though the case without heat recovery showed higher sensitivity (Figure 9). The cost of heat energy change of ±15% (keeping all other cost variables constant) would give an MD permeate production cost of 3.6 ± 0.5 €/m 3 and 4.1 ± 0.6 €/m 3 for the AD-MD integrated system with waste heat recovery in winter and summer, respectively ( Figure 9). Moreover, the cost analysis showed that the permeate production cost without heat recovery would be significantly higher, 7.6 ± 1.0 €/m 3 (110% higher than with heat recovery) in winter and 9.1 ± 1.1 €/m 3 (122% higher than with heat recovery) in summer. In this study, the unit cost of MD permeate C pw for an integrated AD-MD unit with waste heat recovery was 3.6 €/m 3 and 4.1 €/m 3 at a digestate inlet feed temperature of 66 • C and 61 • C during winter and summer, respectively. Cost analysis showed that the permeate production cost was 14% higher in summer than in winter, due to the lower rate of heat recovery and lower digestate feed temperature in summer. The permeate production cost calculation exhibited that the unit permeate cost in this study was lower than the 5.6 €/m 3 and 4.7 €/m 3 reported by [17,42], respectively, for a pilot-scale test rig set up at Hammarby Sjöstadsverk, Stockholm, and higher than the 2.2 €/m 3 stated by [43] for a test rig deployed at Idbäcken Cogeneration Facility, Nyköping, Sweden, perhaps because of the higher net specific thermal energy demand for MD and the operation and maintenance costs for a challenging digestate feed.

Overall Cost Performance and Sensitivity Analyses at the Integrated MD-AD Plant
The thermal energy analysis showed that the MD heat energy consumption could be met by the available waste heat in the biogas plant. The thermal energy cost analysis showed that it had a significant impact on the permeate production cost for the cases with and without heat recovery, even though the case without heat recovery showed higher sensitivity (Figure 9). The cost of heat energy change of ±15% (keeping all other cost variables constant) would give an MD permeate production cost of 3.6 ± 0.5 €/m 3 and 4.1 ± 0.6 €/m 3 for the AD-MD integrated system with waste heat recovery in winter and summer, respectively ( Figure 9). Moreover, the cost analysis showed that the permeate production cost without heat recovery would be significantly higher, 7.6 ± 1.0 €/m 3 (110% higher than with heat recovery) in winter and 9.1 ± 1.1 €/m 3 (122% higher than with heat recovery) in summer. The total costs and benefits for the integrated AD-MD system at the Uppsala Vatten och Avfall plant are shown in Figure 10. Aside from the costs associated with the CAPEX and OPMEX of the integrated AD-MD unit, the total yearly cost would range between 105,000 and 125,000 €/year, taking into account a difference in the heat energy cost of ±20% during summer and winter, respectively.
The concentration of digestate by the integrated MD can considerably decrease the costs for storage facilities, transportation, digestate management, and spreading on the land. The cost saving from concentrating digestate nutrients can thus be substantial, particularly for the biogas plant in Sweden. It was assessed that the annual revenue would range between EUR 350,000 and EUR 210,000, considering the variation between seasons. In the AD plant, feed substrate dilution and boiler make-up water is supplied by the Uppsala municipality, but in the integrated AD-MD system, the MD permeate is recycled for dilution and make-up water purposes. Therefore, additional water costs can be saved by using MD permeate water. The total costs and benefits for the integrated AD-MD system at the Uppsala Vatten och Avfall plant are shown in Figure 10. Aside from the costs associated with the CAPEX and OPMEX of the integrated AD-MD unit, the total yearly cost would range between 105,000 and 125,000 €/year, taking into account a difference in the heat energy cost of ±20% during summer and winter, respectively. The total costs and benefits for the integrated AD-MD system at the Uppsala Vatten och Avfall plant are shown in Figure 10. Aside from the costs associated with the CAPEX and OPMEX of the integrated AD-MD unit, the total yearly cost would range between 105,000 and 125,000 €/year, taking into account a difference in the heat energy cost of ±20% during summer and winter, respectively.
The concentration of digestate by the integrated MD can considerably decrease the costs for storage facilities, transportation, digestate management, and spreading on the land. The cost saving from concentrating digestate nutrients can thus be substantial, particularly for the biogas plant in Sweden. It was assessed that the annual revenue would range between EUR 350,000 and EUR 210,000, considering the variation between seasons. In the AD plant, feed substrate dilution and boiler make-up water is supplied by the Uppsala municipality, but in the integrated AD-MD system, the MD permeate is recycled for dilution and make-up water purposes. Therefore, additional water costs can be saved by using MD permeate water. The concentration of digestate by the integrated MD can considerably decrease the costs for storage facilities, transportation, digestate management, and spreading on the land. The cost saving from concentrating digestate nutrients can thus be substantial, particularly for the biogas plant in Sweden. It was assessed that the annual revenue would range between EUR 350,000 and EUR 210,000, considering the variation between seasons. In the AD plant, feed substrate dilution and boiler make-up water is supplied by the Uppsala municipality, but in the integrated AD-MD system, the MD permeate is recycled for dilution and make-up water purposes. Therefore, additional water costs can be saved by using MD permeate water.
The thermal integration of AD-MD can be a viable alternative in terms of expenditures and benefits. However, available cost data for CAPEX and OPMEX for full-scale integrated MD are limited. However, it is possible to further improve the cost and benefit performance by adopting a thermal energy and MD size optimization approach in the integrated system. It was estimated that a net annual profit of around EUR 85,000 in summer and EUR 250,000 in winter (for the base case situation, i.e., no variation in heat energy cost) could be achieved at the Uppsala Vatten och Avfall biogas plant through the thermal integration of an MD unit.

Overall Discussion
The integrated AD-MD process offers the possibility to recycle concentrated nutrients from highly diluted digestate (>90% water content) back to arable land as fertilizer, reducing the storage requirement and transportation costs. A high low-grade waste heat recovery rate was achieved in this study, mainly due to the thermal characteristics of the available waste heat in digestate and boiler flue gas, and the MD unit. Moreover, the MD module cost reduction in the future will contribute to the cost and benefit outcomes. Furthermore, the addition of sulfuric acid to the MD feed digestate during the treatment for pH reduction, and the effects on concentrated nutrients, have to be explored.
However, MD faces some drawbacks, such as low permeate production and high conduction heat loss. Moreover, scale formation (fouling) is witnessed in membrane surfaces when applied to normally challenging feed characteristics, but is significantly lower than in other membrane processes [14,51]. Laboratory-scale MD tests showed that the membrane surface could be cleaned with highly diluted sulfuric acid with good results [2]. The actual membrane and module lifetime should be investigated on at least a pilot scale in long-term testing. In future work, the assumptions made in this study must be validated in practice. Ultimately, detailed engineering of an AD-MD system as described in this work is needed to validate all assumptions made.

Conclusions
In this work, cost and performance analyses were conducted for a waste-heat-driven integrated MD for the treatment of digestate liquid, in order to recycle process water, recover low-grade waste heat, and concentrate (by two-fold) the nutrients for bio-fertilizer use. It was found that the waste-heat-driven MD membrane effectively rejected nutrients, which led to their enrichment in the digestate sludge (MD retentate). The following conclusions can be drawn from the current study.
-Thermal energy analysis of the existing biogas plant showed that the heat energy requirement for bringing the influent slurry to the working temperature accounted for around 75-85% of the total heat requirement. The analysis also showed that the net heat energy needed for substrate sanitization was 40% higher in winter than in summer. - The performance of an AD system with thermal integration of MD would thus mainly depend on the operating conditions of the integrated process, especially the substrate sanitization process and ambient conditions (summer or winter). - The recovered waste heat from the effluent digestate and boiler flue gas (around 7633 kWh/day in winter and 7063 kWh/day in summer) could meet the total thermal energy demand of MD and can save around 20% of pellet boiler energy by heating incoming slurry. - The MD permeate production rate was 3.5 L/(m 2 h) at 66 • C and 3.1 L/(m 2 h) at 61 • C digestate inlet temperature, during winter and summer conditions, respectively. -When the available heat was recovered from the coolant side of the MD through the incoming slurry, the net specific thermal energy consumption for the MD system was estimated to be 100 kWh/m 3 and 80 kWh/m 3 permeate during summer and winter, respectively. -Cost assessments showed that with waste heat recovery, the unit cost of MD permeate production waste heat recovery was 3.6 €/m 3 and 4.1 €/m 3 at a digestate feed temperature of 66 • C and 61 • C (including waste heat recovery) during winter and summer, respectively. Without heat recovery, the cost was 7.6 €/m 3 and 9.1 €/m 3 in winter and summer, respectively. - The economic assessment also indicated that the revenues could exceed the total costs, mainly because the MD could be operated using only recovered heat. -A net annual profit of approximately EUR 250,000 and EUR 85,000 was achieved for the base case scenario (i.e., no variation in thermal energy cost) in summer and winter conditions, respectively. -In order to determine the impact of membrane fouling on MD performance, long-term studies are needed.