Thermodynamic-Based Method for Supporting Design and Operation of Thermal Grids in Presence of Distributed Energy Producers

District heating networks are well-established technologies to efficiently cover the thermal demand of buildings. Recent research has been devoting large efforts to improve the design and management of these systems for integrating low-temperature heat coming from distributed sources such as industrial processes and renewable energy plants. Passing from a centralized to a decentralized approach in the heat supply, it is important to develop indicators that allow an assessment of the rational use of the available heat sources in supplying heating networks, and a quantification of the effect of inefficiencies on the unit cost of heat. To answer these questions, Exergy Cost Theory is here proposed. Thanks to the unit exergetic cost of heat, energy managers can (i) quantify the effects of thermodynamic inefficiencies occurring in the production and distribution on the final cost of heat, (ii) compare alternative systems for heat production, and (iii) monitor the performance of buildings’ substation over time. To show the capabilities of the method, some operating scenarios are compared for a cluster of five buildings in the tertiary sector interconnected by a thermal grid, where heat is produced by a cogeneration unit, an industrial process, and distributed heat pumps. Results suggest that moving from the centralized production of heat based on fossil fuels to a decentralized production with air-to-water heat pumps, the unit cost of heat can be decreased by almost 30% thanks to the improvement of thermodynamic efficiency. In addition, the analysis reveals a great sensitivity of unit exergetic cost to the maintenance in substations. The developed tool can provide thermodynamic-sound support for the design, operation, and monitoring of innovative district heating networks.


INTRODUCTION
Climate change and the recent energy crisis have pointed out the urgent need to move towards fully renewable energy systems [1].District Heating and Cooling Networks are included among the key technologies for the achievement of this challenging goal [2].More specifically, if coupled with power-to-heat technologies like air-to-water or water-to-water heat pumps (HP), they could help managing the unpredictable electricity production from renewable energy sources (RES) [3], which makes the operation of the distribution electric grid very complex [4].In addition, they could allow for the sharing of heat produced from distributed thermal RES [5] and the exploitation of low-temperature waste heat (WH) from industries [6] and data centers [7].Due to these capabilities, energy planning tools like EnergyPlan [8] or EnergyPro [9] include these systems among the key technologies in the development of 100% renewable energy systems.
District Heating Networks (DHN) are not new technologies, but great advances have been achieved during the last decades, in terms of thermal insulation, reduction of pressure drop, and operating temperature.Regarding the latter, DHNs are typically supplied by centralized combined heating and power plants (CHP) where fossil fuels or biomass are burnt, and they are operated at 85 °C (typical value for 3 rd generation DHN) [10].However, this operating temperature of the networks does not allow for the inclusion of heat from RES or lowtemperature WH flows.To solve this problem, the concept of 4 th [11] and 5 th -generation DHNs has been developed [12].In the 4 th generation, DHNs are operated at a maximum temperature of about 60 °C.In the 5 th DH system, the grid is operated at almost ambient temperature with local boosting at the end-user by using heat pumps to achieve the required temperature level [13].
Attention has also been paid to the development of District Cooling Networks (DCN).In this respect, Østergaard et al. [14] provided a clear picture of the time evolution of this technology, by identifying four generations like in DHNs.Interestingly, in 4 th -generation DCNs, the cold demand of the users is met not only by diversified cold sources such as centralized systems (e.g., absorption chillers, compression chillers) and natural cooling sources (lakes, excess cold streams) but also with cold sharing among prosumers and consumers, with HPs operated in combined heating and cooling mode and with the implementation of distributed cold storages (such as water tank or seasonal storage).
Considering the recognized role played by DHNs in future energy systems, large efforts have been devoted by researchers to optimize DHN design [15].Some researchers focused on the need to redesign substations in case of the lower operating temperature of 4 th and 5 th DHNs [16].Some authors focused on the benefits achievable by prosumers in DHNs in terms of achievable energy saving and/or the reduction of carbon dioxide emissions [17].Other studies, instead, focused on cost evaluation in DHNs.For instance, Gudmundsson et al. [18] found that 4 th DHNs could lead to greater economic benefits compared to 5 th DHNs.Li et al. [19] developed a dynamic price model for DHNs while comparing some criteria to allocate the costs burdening the heat production (e.g., fuels, maintenance, etc.).Tian et al. [20] found that a 5-9% reduction in heat unit cost could be achieved by using solar collectors.Millar et al. [21] found that a 5 th DHN allowed for a strong reduction in heat cost.Verda et al. [22] and Catrini et al. [23] showed the potential of Exergoeconomics for allocating capital and operating costs in DHNs.Finally, other authors addressed the issue of proper maintenance schedules in substations to reduce energy consumption [24].Indeed, the diagnosis of anomalies in heat exchangers of DHN substations is an essential point to assure high comfort levels in buildings, as well as to save energy.Gadd et Werner [25] identified unsuitable heat load patterns, low average annual temperature difference, and poor substation control, as common faults in European DHNs.Kim et al. [26] developed virtual sensors for detecting fouling in DHN substations using datasets measured from a conventional building automation system.Results showed that by using virtual sensors a 61% improvement in the accuracy of fault detection was achieved.
Considering the strong interest in DHNs, it is useful to provide researchers in this field with simple indicators that could provide insights on the following aspects: (i) the rational uses of thermal energy resources with a different thermodynamic "quality" for DHN supply (e.g., WH at different temperatures or thermal energy from CHP plants), (ii) the effects of thermodynamic inefficiencies occurring in heat production and distribution on the cost of the heat supplied to the users, and (iii) the effect of the off-design operation of poorly-maintained substations.The first point is of utmost importance considering that sustainability issues are pushing society to a keen use of limited energy sources.Meantime, as the number of producers will increase (e.g., the presence of prosumers), there is a need to have indicators that classify them not only for the quantity of thermal energy supplied but also for the thermodynamic quality of the heat flows.Only a few papers have addressed the topic of thermodynamic efficiency in DHNs.For instance, Pass et al. [27] carried out an exergy analysis for a bidirectional network, which adopted a single circuit for both heating and cooling.The authors compared exergy destruction in the case of high-and low head load density vs. individual heating and cooling systems, and the effect of pumping on the exergy destruction was also quantified.Dorotić et al. [28] performed an economic, environmental, and exergetic multi-objective optimization of district heating systems.The minimization of exergy destruction led to the phase-out of natural gasbased technologies.
In a previous paper [23], the authors of this work have developed an exergoeconomic modeling of a ring-shaped network for allocating capital and operating costs in DHN systems.The results highlighted the capability of the method in allocating sustained costs among different users, reflecting the effect of irreversibility on the variation of the unit cost of supplied heat.However, the following aspects were not addressed: (i) the capability of the method to account for different quality of heat sources (especially WH), (ii) the effect of the operating temperature of the grid, (iii) the percentage incidence of irreversibility sources in the heat unit cost (iv), the effect of proper design and maintenance of the DHNs substation on the unit cost of heat.To address the previous points, this paper proposes the Exergy Cost Theory (ECT) [29].More specifically, ECT provides the unit exergetic cost of a given product (e.g., an energy flow or a stream of matter) which quantifies the resources (measured in exergy) used to produce a unit of exergy of the given product.If inefficient processes are involved along the productive chain of a given product, a large irreversibility is generated, and a high exergy cost is consequent.This property has been proven to make it suitable for allocating sustained costs [30], the consumed natural resources [31], and emissions [32] in multi-output systems.Moreover, it could support the diagnosis of malfunction [33] or be assumed as an index for the evaluation of urban sustainability [34].
In the case of DHNs, by using the unit exergetic cost of the heat supplied to the buildings, it is possible to account separately for inefficiencies occurring in the production units (e.g., CHP plant, RES systems, WH recovery, etc.), along the network (e.g., heat losses and pressure drop), and in substations (arising for instance due to poor maintenance, or wrong design).Moreover, the method allows for performing sensitivity analyses to design (e.g., DHN tube diameter, heat exchanger sizes in substation, etc.) and operating variables (such as heat load sharing among different production units).To show the capabilities of the method, a cluster of five buildings in the tertiary sectors is assumed as the case study.More specifically, a ringshaped network with centralized fossil-fueled CHP is considered as the base case, and three alternative scenarios are characterized by the presence of waste heat from an industrial process, and prosumers.The paper is structured as follows.In the second section, a detailed description of the physical and exergetic cost modeling is provided.In the third section, the case study is presented together with the simulated scenarios.In the fourth section, results are shown and discussed.In the last section, conclusions are drawn.

FUNDAMENTALS OF EXERGY COST THEORY
To perform the exergy cost analysis of a given process, the definition of the Fuels and Products of each component is required [35].The "fuel" Fi of the i-th component represents the exergy of consumed energy or matter flows.The "product" Pi is the exergy content of its useful output [35].The exergy balance is set as shown in Eq. ( 1), where Ii is the exergy destroyed in the i-th component.The unit exergy consumption "ki" is a useful indicator and it is defined by the ratio between Fi and Pi as shown here follows: To describe the "functional" interactions among components (in exergy terms), the "productive structure" of the given process is developed.This diagram provides a clear picture of the fuels and products exchanged among all components placed along the productive chain of given products.However, in energy systems, it is common to find components necessary for plant operation, (e.g., stacks, condensers, cooling towers, and dust separators), for which it is not possible to define a "productive scope" [36].To model these units, a common approach consists in considering the exergy destroyed or lost as a "fictitious product" of these components, which is then allocated as additional fuel to the components that contributed to its formation.This "fictitious product" is usually named "residue" [36].
According to the well-known Cost Conservation Rule, all costs sustained along a given production process must be allocated to the final product's cost.On this basis, the exergetic cost balance is set as shown in Eq. ( 3), where the exergetic cost of the product ( .This indicator measures the irreversibility occurring along the production chain of a given stream of matter or energy flow.It follows that (as previously said) the higher the unit exergetic cost of a product, the higher the amount of resources used along the process.Alternatively, this indicator could be used to qualify the thermodynamic rational of different systems aimed at producing the same products.
Note that regarding the allocation of residues, some allocation criteria have been proposed in the literature.In this paper, the criterion presented by Torres et al. [36] was adopted.More specifically, the exergy cost of a residue is allocated to the components proportionally to their contribution to the production of the exergy flow finally destroyed or lost in the dissipative component.
When performing exergy cost analysis, it is useful to gain insights on two aspects: (i) the contribution of the exergy cost of the fuel used to supply the i-th component on the final k to the specific cost of the fuels consumed, or to the irreversibility generated along the production process.Regarding the first points, the "technical coefficients" presented in Eqs. ( 5) and ( 6) can be adopted.More specifically, κij is the ratio between the exergy produced by the j-th component and used as a fuel by the i-th unit (indicated as Eji) and the total product of the i-th component.θ ij is defined as the ratio between the fraction of the residue generated by the j-th component, which is allocated as input to the i-th component, Rji, and the same product.
It is possible to show that, by combining Eq. ( 4) with Eqs ( 5) and ( 6), the unit exergy cost of the i-th component can be written as follows [29]: In Eq. ( 7), , κ e i quantifies the amount of external exergy resources used to produce the unit exergy of Pi, and * 0,i k is the unit exergy cost of these sources.Worth noting that, following ECT rules, in the absence of external assessment, the exergy cost of the flows entering the plant equals their exergy, thus meaning that * 0, . ECT provides alternative coefficients which directly relate the unit exergetic cost of a product to the irreversibility generated along the productive process of the same product [29].More specifically, the factors ϕji and ψji, represent the irreversibility and the residue generated in the j-th component to produce the unit of exergy of the product Pi.Using these coefficients, it is possible to rewrite Eq. ( 4) as follows: Eq. ( 8) allows for an in-depth analysis of the effects on * , P i k of the irreversibility generated not only in the components that fuel the i-th component, but also in the same i-th component.If no irreversibility was generated along the production of Pi, then * , P i k would be equal to one.

PHYSICAL AND EXERGY COST MODELLING OF RING-SHAPED NETWORK
Before providing details on the productive structure for a ring-shaped thermal network, it is useful to briefly present the thermohydraulic modeling, from which the productive structure is then developed.Worth noting that some aspects of thermohydraulic and exergy modeling were already presented in another paper by the authors [23].However, for the self-consistency of the proposed work, some equations are here repeated.

Description of the physical modeling
In Figure 1, simplified scheme of a ring-shaped heating network serving a cluster of buildings is shown.The red and blue lines indicate the supply (SR) and the return (RR) rings respectively.Numbered nodes are used to indicate the position of each substation along the grid.Worth noting that the possibility to have prosumers (e.g., Building no."h") is accounted for.The thermohydraulic model of the network was obtained by applying mass and energy conservation to nodes, branches, and substations of the network.The water mass flow rate ( ) j m τ entering the j-th consumer's substation at the time "τ" (e.g., seconds, hours, etc.) was calculated as follows: where , th j D is the thermal demand of the j-th consumer, w c is the specific heat of water, , s j T and , r j T are the supply line and return line temperature at the j-th building substation.Looking at the substation, it is possible to write:  ℎ, () =       (10) where Usub and Asub are the overall heat transfer coefficient and the heat transfer area of heat exchangers in the substation.ml T ∆ is the logarithmic mean temperature difference between the water drawn from the substation and the temperature of the water returning from and supplied to the hydronic circuit of the user.
When considering water mass flow rate exchanged in the j-th node of the SR, it is possible to write: where ( )

and
( ) are the water flow rate entering into and exiting the j-th node, respectively.
( ) m τ is the mass flow rate supplied to SR by the j-th prosumer, and , C j δ is a binary variable that describes the behavior of the j-th building as a "consumer" or "producer".Indeed, when the building is a "consumer", , C j δ equals "1", otherwise it equals "0".Eq. ( 12) m τ taken from the RR, and supplied to the SR after being re-heated up within the substation, , av h Q is the heat available from the h-th prosumer., s nom T is the nominal operating temperature of the SR.The value of , s nom T is highly dependent on the generation of the considered DHN considered.If HPs are used by prosumers to supply heat to the network, the following equation can be used to calculate ( ) where , HP h COP is the coefficient of performance of the HP installed at h-th prosumer (either airto water or water-to-water) and , , e HP h P is the electric power consumed.Once mass flow rates are found, distributed, and concentrated pressure drops grid p ∆ in the grid are calculated via Eq.( 14) In Eq. 11, k λ is the friction coefficient calculated by ad-hoc correlations, Dk is the diameter of the k-th tube of the grid, vk is the average velocity of the water, and Kt is a coefficient that depends on the type of concentrated pressure drop.
Regarding heat production, the thermal energy demanded by the network to the centralized heat producers, indicated here as τ is calculated as follows: where ( ) loss Q τ is the heat lost by the water circulating within the tubes and transferred to the ground.To calculate ( ) loss Q τ , Eq. ( 16) can be used: where , tube k U is the average heat transfer coefficient of the insulated tube of the k-th branch of the grid per unit length, Lk is the length of the tube, k T is the temperature of the water within the tube, and soil T is the temperature of the soil.As shown in Eq. ( 17), the thermal energy required by the network is then equal to the sum of energy available from k-th producers (e.g., CHP plants or WH).Worth noting that in the case of multiple energy producers, a coordinated share of ( ) total Q τ among producers must be formulated.
() = �� , () +  , ()�  (17) Finally, for the CHP plant, the fuel flow rate ( ) fuel m τ consumed during its operation would be calculated as follows: ()  ℎ (  , )  (18) where LHV is the Lower Heating Value of the fuel and ( , is the thermal efficiency of the prime mover, which is a function of the temperature of the outdoor air TOD and the partload ratio (PLR).PLR is the ratio of the heat delivered by the prime mover and the maximum value deliverable with a given TOD.
The electric power used to drive hydraulic pumps (more specifically, centrifugal pumps) in the network was calculated as: where ( ) V τ is the volumetric flow rate, and ηp is the pump global efficiency.

Description of the exergy cost modeling
In Figure 2, the productive structure of the thermal grid of Figure 1 is shown.The fuel, product, and residue (generated and allocated) are plotted.In Table 1, the equations used to calculate these exergy flows are detailed.Regarding the centralized producer, the definition of the fuel depends on the adopted system.For a fossil-fueled CHP plant (e.g., gas turbines, combined cycles, etc.), the exergy content of the fuel supplied to the prime mover (indicated as fuel E ) is usually identified as the exergy fuel.Meantime, two products could be identified: (i) the increase in the thermal exergy of the water supplied to the grid, indicated as ; and (ii) the delivered electrical power.Eqs.20.a-n can be used to calculate these quantities.In Eq. 20.a, ϕ is a factor that is dependent on the type of fuel consumed [38,39].Moreover, ref T is the temperature of the reference environment (e.g., the outdoor air temperature or the temperature of the soil).For the industrial process that supplies a WH flow to the network, the exergy content of the thermal energy , ( ) ) is considered as the useful product (Eq.20.f).
Regarding pumps, the consumed electric power is the fuel (Eq.20.g), and the increase in the exergy of water flow (i.e., ( ) in Eq. 20.h) is assumed as the product.Note that the exergy content of electric power is equal to the power itself according to [38].
The SR and RR rings destroy part of the exergy produced by the centralized plants and the pumps ( Network E in Figure 2).This exergy destruction is due to heat losses and pressure drop, and according to ECT is considered as a residue (indicated as Network R , green arrows in Figure 2).Eq. 20.i was used to calculate this exergy destruction.Then, following the criterion proposed by Torres et al. [36], its exergy cost is allocated as additional fuel to the CHP plant, Industry, and pumps.
Regarding building substations, a different definition of fuel and product is adopted whether it is a producer or a consumer.In particular: -i-th Building as a consumer: the building consumes the exergy flow "EBLD,j" from the grid (eq.20.k) to produce the exergy flow "EQ,j" of hot water used then for covering space heating and hot water demand (Eq.20.l).Note that, in Eq. 20.k-l, exergy variation due to water temperature change and pressure drop are accounted for.Moreover, Ts,j, ps,j and Tr,j, pr,j are the temperature and pressure of SR and RR at j-th node. .m from the temperature Tr,j (temperature of the j-th node on the RR) to Ts,n (Eq.20.n).In the case of a prosumer equipped with HPs, the fuel is the electric power used to drive the HPs Eq. 20.m).

CASE STUDY: DESCRIPTION AND MODELLING
A cluster of five buildings (briefly indicated as BLD in the following) of the tertiary sector was considered as the case study (Figure 3).It was assumed that the cluster was in Sicily (Italy), and it consisted of the following BLDs: three offices, one hospital, and one hotel.In Table 2, distances among substations are reported.The peak value of the thermal demand of each BLD is also presented.As shown in Figure 3, air-to-water HPs or natural gas (NG) boilers were installed at each consumer not only to supply the uncovered part of thermal demands (for instance, in case of low thermal demand during night-time when it was not economically viable to operate the centralized plant) but also for the sake of redundancy.The nominal heating capacity of local generators is shown in Table 2.
Regarding substations, the UA values are reported in Table 1.These values were calculated according to Eq. 7, by considering an operating temperature of the SR equal to 85 °C and a minimum temperature difference among the water flow drawn from the network and water circulating in the hydronic loop of the building equal to 5 °C.In this respect, the hot water produced in the substations was not the same for all BLDs.For BLD no. 1 and BLD no. 5, it was assumed that water returning from the hydronic circuit was heated up to 78-80 °C.For BLDs no.2-3-4, instead, hot water at 55 °C was produced.NG gas turbines (GT) were assumed as prime movers in the CHP plant (located in "Node 0" in Figure 3).Moreover, the SR was operated at 85 °C as in the case of 3 rd generation of DHNs.The UA value of the CHP plant substation is also reported in Table 2.In Figure 4.a, the overall thermal demand of the cluster is shown.The thermal demand profile was derived from a previous study [40].A peak of around 6.1 MWth was observed.Moreover, in Figure 4.b, the hourly profile of a typical weekday in winter (beginning of February) is shown.According to the methodological scope of this paper, the following analysis will focus only on the exergy cost analysis for the peak hour in the considered day (indicated by the black dot in

Description of the exergy cost modeling
As previously clarified, for the case study it was assumed a NG-fueled GT as a CHP plant which supplies heat to the heating network, and the SR was operated at 85 °C.This condition will be indicated in the following as the Reference Scenario.To show the capabilities of ECT, three alternative scenarios were investigated and compared with the reference one.In particular: -Scenario no. 1.It was assumed to supply the network not only by a CHP plant but using also a low-temperature WH flow (LT-WH) at 110 °C available from an industrial process (located in "Node 4" of the network in -Scenario no. 2. The operating temperature of the network was lowered down to 60 °C as in the case of 4 th Generation DHNs.The LT-WH was also assumed to supply the network.However, in this case, to supply BLDs no. 1 and 5, booster HPs (i.e., water-to-water HP) were included within substations to achieve the hot water temperature required by the building.-Scenario no. 3. It was assumed to lower the operating temperature to 45 °C to exploit the heat available from prosumers.More specifically, it was assumed that to help the power grid operator in managing electricity surplus from RES, BLD no. 2 and 4 activated their air-to-water HP instead of buying heat from the grid.Moreover, since it was assumed to operate the HPs at their maximum capacity, the surplus heat produced onsite is sold to the network.Referring to the day shown in Figure 4.b, by comparing the heating demand of BLDs no. 3 and 4 and the heating capacity of air to water HP, it was found that about 153 kWth and 131 kWth of thermal power could be supplied by the BLDs no. 3 and 4, respectively.Finally, due to the reduced operating temperature of the network, booster HPs were included in all building substations to achieve the temperature required by these users.Differently from Scenarios no. 1 and 2, no LT-WH was included here.

Details on main assumptions and simulations
Two small GTs (fueled by NG) with a nominal electrical and thermal capacity equal to 2.35 MWe and 3.7 MWth each are assumed to be installed.Worth noting that the overall nominal capacity of the CHP plant (i.e., 7.4 MWth) is greater than the peak of the thermal demand shown in Figure 4.a (i.e., 6.1 MWth).The selection was made considering a 7.3 MWth peak of the "aggregated thermal demand" (which was found by assuming the possibility to cover the overall cooling demand by using absorption chillers installed at each user substation with an average COP=0.7 [41]).Eqs ( 21) and ( 22) were adopted to calculate the thermal and electrical efficiency of the GT when operating at part load.where PLR accounts for the full-and part-load operation.These curves were developed based on data available in [42] at different TOD values.A decrease in the energy performance of the prime mover is observed when the GT operates at PLR lower than one.
Regarding the COP of air-to-water HPs installed on BLDs, performance curves developed by the authors in another study were used [43].Regarding the COP of the booster HPs, the performance curves available in [44] were used.
Regarding the temperature of the reference environment for exergy calculation (i.e., ref T ), the temperature of the outdoor air was assumed.
The thermohydraulic and the exergy cost modeling presented in Section 2 were jointly solved using Engineering Equation Solver (EES) [45].Note that the following assumptions were made: -The inner tube diameter of the grid was selected limiting the value of the average pressure drop per unit length of the grid in the range 150-250 Pa/m.The nominal diameter of a pre-insulated steel pipe that satisfied this condition was 180 mm, with a linear heat transfer coefficient Utube equal to 0.4 W/(m•°C).-The electricity used to drive the HPs' prosumers was assumed to be produced by using electricity from RES plants.

Description of the sensitivity analyses
The following sensitivity analyses were performed only for Scenario no.1: -first, the sensitivity of the unit exergetic cost of the heat with the WH temperature was investigated; more specifically, by assuming the same hourly WH amount (i.e., 1,080 kWh, see Figure 5.b) the following temperatures were considered: 100-150-200-250 and 300 °C.-the effect of substation maintenance on the unit exergetic cost of heat was evaluated.In the case of poor maintenance, a progressive decrease in the heat exchanger properties (more specifically in the Usub) is observed.According to Eq. ( 10), to exchange the same amount of heat and to compensate for a reduced Usub, a greater logarithmic mean temperature difference is required.Then, according to Eq. ( 10) an increase in the amount of water drawn by the substation from the grid is consequent.Referring to the substation of BLDs no. 2 and no. 5, it was assumed a 5-10-20 % reduction of the overall heat transfer coefficient.

RESULTS AND DISCUSSION
In the following subsections, results are separately shown and discussed for each scenario.After that, a comparative analysis is performed.In the last part of this section, the results of the sensitivity analyses are presented.

Results for the Reference Scenario
The results of the exergy cost analysis for the reference scenario are shown in Figure 6.a -b.The unit exergetic consumption values shown in Figure 6.a highlighted that the CHP plant is the one characterized by the highest exergy destruction.Moreover, the unit exergy consumption of substation in BLD.no. 2 is 25.8% higher than the one of BLD.no 5 due to the higher temperature difference between the temperature of water drawn from the SR and the one the hot water produced.
The unit exergy cost values are shown in Figure 6.b.Regarding the unit exergetic cost of the heat supplied to the BLDs, kp*, a value of 3.29 kWex /kWex was found for BLD no. 5 and 4.15 kWex /kWex for BLD no. 2. The decomposition of the unit exergy cost of the heat supplied to the users (as shown by the different colored bars in Figure 6.b) show that irreversibility generated by the CHP plant (red striped area) play a key role in determining the final unit cost.The irreversibility generated with substation slightly contributes to the final exergy cost of BLD no. 2, conversely, its contribution is negligible for BLD no. 5.The irreversibility generated in the pumps and in the network does not affect the unit exergetic cost of the heat supplied to the buildings.

Results for Scenario no. 1
The results of the exergy analysis for this scenario are shown in Figure 7.a-b.As shown in Figure 7.a, the unit exergy consumption of the CHP plant increases from 2.65 up to 2.72 kWex/kWex when passing from the Reference to Scenario no. 1 (+2.64%).Such a result is a consequence of the part-load operation of the CHP.Indeed, since a fraction of the thermal demand is covered using WH from the industry, the CHP plant operates at part load.In this case, according to Eqs ( 21) and ( 22), the energy performance (and then the exergy performance) of the CHP plant decreases.Looking at Figure 7.a, it is possible to observe that a high exergy destruction occurs the in substation aimed at the recovery of the WH.Regarding the unit exergy cost of the heat supplied to the buildings, kp * , as shown in Figure 7.b, a value of 4.36 kWex/kWex was found for BLD no. 2 and 3.50 kWex /kWex for BLD no. 5.The decomposition of the unit exergy cost of the heat supplied to the users shows that also in this case, the irreversibility generated within the CHP plant (red area) plays a key role in determining the final unit cost (more than 50%).Then, the irreversibility generated in the recovery of the WH (green area) affects the unit exergetic cost of the heat supplied by about 24% in the case of BLD no.2, and 6.6% in the case of BLD no. 5. Finally, the exergy destruction in substations moderately contributes to the final exergetic cost.Results for Scenario no. 2 The results for Scenario no. 2 are shown in Figure 8.a-b.Note that due to the installation of the booster-HPs in BLDs no. 1 and 5, almost a 50% reduction of the heat demanded by the grid to centralized producers (i.e., CHP plant and the industry) is estimated with respect to Scenario no. 1.In this case, the CHP plant is operated at a lower PLR compared to Scenario no 1, and an increase in the unit exergy consumption of the CHP plant (Figure 7.a) is observed passing (+66%).Moreover, an increase in the unit exergy consumption in the WH recovery is found when comparing Scenarios no. 1 and no. 2, due to the larger average temperature difference between the WH temperature (110 °C) and the SR temperature (60 °C).Regarding the unit exergetic cost of the heat supplied to the BLDs (shown in Figure 8.b), it is possible to observe that it increases up to 4.84 kWex /kWex for BLD no. 2 and it decreases down to 2.63 kWex/kWex for BLD no. 5.Moreover, worth noting that the unit exergetic cost of BLD no. 2 is highly influenced by the irreversibility occurring in the CHP plant and LT-WH substation.Regarding BLD no. 5, although the exergy destruction in the substation is increased due to the presence of the booster-HP (blue area), the reduction of the thermal exergy drawn from the network leads to a reduction in the unit exergetic cost.

Results for Scenario no. 3
In this scenario, it was assumed that due to the surplus of RES electricity in the power grid, HPs in BLD no. 3 and no. 4 were operated at their maximum capacity, and the exceeding heat was provided to the heating network (thus becoming prosumers).In Figure 9, the exergy unit cost values are shown.Worth noting that for BLD no. 2, the unit exergetic cost decreased to 2.98 kWex/kWex (almost -38.4% with the one obtained in Scenario no. 2) thanks to the insertion of the booster HP.The unit exergetic cost of heat supplied to BLD no. 5, decreased from 2.93 (Scenario no. 2) to 2.19 in Scenario no. 3 (-25.2%).Moreover, in this scenario, the unit exergetic cost of heat supplied to BLDs no. 2 and 5 is more sensitive to the inefficiencies occurring in the substation than the one occurring in the CHP plant.Finally, it is worth noting that the effects of inefficiencies occurring in the prosumers (the BLDs no. 3 and no.4) on the unit cost of the heat supplied to BLDs no. 2 and no. 5 are negligible.

Comparative analysis of the proposed scenarios
Table 3 collects the unit exergetic cost of the heat supplied to BLDs no, 2 and no. 5 for all proposed scenarios.Moving from the Reference Scenarios to Scenario no. 1, the unit exergetic cost increases by about +5.5%.This increase testified that the inclusion of the assumed amount of WH at 110 °C does not lead to a great improvement in the thermodynamic efficiency of the grid.Passing to Scenario no. 2, a further increase in the unit exergetic cost of the heat supplied to BLD no. 2 is observed, meaning that although the lower operating temperature of the network reduces heat losses along the network, this does not lead to an increase of the overall thermodynamic efficiency.Worth noting that a reduction in the unit exergetic cost of the heat supplied to BLD no. 2 could be achieved in Scenario 2, only in the case of LT-WH if a temperature lower than 110 °C would be available.When moving to Scenario no. 3, thanks to the insertion of booster HP and the use of heat coming from prosumers, a substantial decrease in the unit exergetic cost is observed.

Results of sensitivity analyses
As previously clarified, the first sensitivity analysis investigated for Scenario no. 1 is the effect of the temperature of the WH on the unit exergy cost of the heat.More specifically, the WH temperature was varied from 100 °C up to 300 °C.The results of this analysis are shown in Figure 10.Note that when the WH temperature is increased, the unit exergy cost of the heat steeply increases.For instance, for BLD no. 2, the unit exergetic cost increases from 3.80 kWex/kWex when a WH flow at 100 °C is assumed, up to 16.69 kWex/kWex for the WH at 300 °C.This large variation in the unit exergetic cost of the heat suggested that the use of mediumtemperature WH flows for producing low-temperature hot water within building substations is not rational.The second sensitivity analysis investigated the effect of substations' maintenance on the unit exergetic cost of the heat supplied to the considered buildings.Results are shown in Figure 11.Note that, when the Usub value is reduced from 100% to 80%, a gradual increase in the unit exergetic cost of heat for BLD no. 2 is observed (+6.83%).However, when Usub is decreased from 80% to 70% of the nominal value (which would occur in the case of very poor maintenance) a higher change in the unit exergy consumption is observed (+18.5%).Regarding the unit exergy cost of heat supplied to BLD no. 5, it is possible to observe that its value is not sensitive to offdesign operation in the substation on BLD no. 2, in case of a low and moderate reduction in Usub.However, in case of a heavy reduction of Usub, also the unit exergy cost of heat supplied to BLD no. 5 increases.This result is very important as it shows that this indicator could allow for the prediction of off-design operations of substations and then support the scheduling of proper maintenance programs.

CONCLUSIONS
This work proposed ECT for supporting the design and operation of heating networks serving a cluster of buildings.To show the capabilities of this method, a cluster of five buildings in the tertiary sector was assumed as the case study.Some scenarios were compared, respectively characterized by a centralized GT-based CHP plant, the integration of WH, and the presence of prosumers.Results demonstrated that the use of unit exergetic cost of heat could help identify which steps along the heat production process highly contribute to lowering the thermodynamic efficiency, and then leading to high operating costs.More specifically, from this analysis, it was found that the inefficiencies occurring in the CHP plant accounted for almost 50% of the unit exergy cost of the heat supplied to the buildings.Moreover, it was found that a lower operating temperature of the network did not lead to better thermodynamic efficiency if the same heat production units were assumed to supply the network, by keeping the same systems for heat generation.Finally, the analysis revealed a 30% reduction in unit exergy cost of heat when moving from a centralized to a decentralized production, although booster HPs should be installed within substations, The proposed model was useful for performing sensitivity analyses.For instance, when the WH temperature increases, the unit exergy cost of the heat consumed by buildings steeply increases because of the higher exergy destruction occurring in the substation.This trend justified the poor rationale for using medium-temperature WH for space heating.Moreover, in case of poor maintenance in building substations, the increasing value of unit exergy cost of the heat provided not only a quantitative assessment of extra resources consumed for heat production in the off-design condition but also a support for scheduling of proper maintenance program.In conclusion, ECT could provide support in the design, operation, and monitoring of thermal grids.

ACKNOWLEDGEMNT
* i P ) is equal to the exergetic cost of the consumed fuels ( * i F ) and allocated residues ( * i R ) [29].More specifically, the unit exergetic cost of a product * , P i k (measured in Wex/Wex or Jex/Jex) indicates, for the generic i-th plant component, the amount of external resources (measured in exergy units) consumed per unit of exergy content of the product of the i-th component [29] Pietro, C., Testasecca, T., et al.Thermodynamic-based method for supporting design… Year 2023 Volume 11, Issue 3, 1110459
., Testasecca, T., et al.Thermodynamic-based method for supporting design… Year 2023 Volume 11, Issue 3, 1110459 was used to calculate the mass flow rate

T
are the temperature of water supplied and returning from the hydronic plant of the served building and , w j m is the water mass flow rate.-i-th Building as a producer: the exergy product , , th HP h E ∆ is equal to the increase of the exergy of the flowrate ( ) p j

Figure 3 .
Figure 3. Scheme of the cluster of five buildings considered as the case study.

Figure 4 .
Figure 4. Thermal demand of the cluster for the (a) annual profile and (b) typical weekday profile.

Figure 5 .
a).The operating temperature of the SR was equal to 85 °C, as in the reference scenario.Regarding the LT-WH profile production, the profile shown in Figure 5.b was assumed.Note that WH is produced simultaneously with the industry operation (this time frame is indicated by "ON" in Figure 5.b).Moreover, as shown by Figure 5.c, it was assumed that the LT-WH was produced almost during the whole daytime.Fig. 5.c depicts the contribution of the CHP plant and LT-WH in meeting the thermal demand."AUX" refers to the energy supplied by local heat generators.

Figure 5 .
Figure 5. Scenario no.1: (a) position of the industry along the grid; (b) LT-WH production profile, and (c) demand covered by the CHP plant, WH and local heat generators.

Figure 6 .
Results of the exergy cost analysis for the Reference Scenario: (a) unit exergy consumption, and (b) unit exergetic cost.

Figure 8 .
Figure 8. Results of the exergy cost analysis for Scenario no.2: (a) unit exergy consumption, and (b) unit exergetic cost.

5 Figure 9 .
Figure 9. Results of the exergy cost analysis for Scenario no.3: unit exergetic cost.

Figure 10 .
Figure 10.Results of the sensitivity analysis of the unit exergy cost of the heat with the temperature of the WH flow.

Figure 11 .
Figure 11.Results of the sensitivity analysis of the unit exergy cost of the heat with the maintenance of the substations in BLDs no. 2 and no. 5.

Table 2 .
Main data of the thermal grid and substations.Heating capacity and COP of the HPs refers to the following boundary conditions: variation of the water temperature in the condenser from 40 to 45 °C; an outdoor dry air temperature equal to 7 °C; outdoor air wet bulb temperature equal to 6 °C. *

Table 3 .
Unit Exergetic cost of heat supplied to the representative BLDs.
This study was developed in the framework of the research activities carried out within the Project "Network 4 Energy Sustainable Transition-NEST", Spoke 7: Smart Sector Integration, Project code PE0000021, funded under the National Recovery and Resilience Plan (NRRP), Mission 4, Component 2, Investment 1.3-Call for tender No. 1561 of 11.10.2022 of Ministero dell'Università e della Ricerca (MUR); funded by the European Union-NextGenerationEU. Thermal exergy entering the substation of the i-th substation [Wex or J ex] Pietro, C., Testasecca, T., et al.Thermodynamic-based method for supporting design… Year 2023 Volume 11, Issue 3, 1110459 Journal of Sustainable Development of Energy, Water and Environment Systems Exergy cost of the product of the i-th plan component [Wex or J ex] Thermal Energy produced per second by the h-th prosumer [Wth]