Analysis of District Heating and Cooling Energy Systems in Spain: Resources, Technology and Management

District heating and cooling (DHC) systems play an important role under the new European Union (EU) energy transition strategy. Thermal energy networks are helping to stimulate the development of alternative technologies based on a broad range of renewable energy sources. The present study analysed the current situation of DHC systems in Spain and provides an overview of the challenges and future opportunities that their use will entail. Its objective is to assess thermal energy conversion and management from a holistic perspective, including a study of existing energy infrastructures. The focus of this study lies on Spain given the country’s abundance of natural resources such as renewable energy sources including solar energy, biomass and geothermal energy, among others, as well as its strategic location on the map of the EU. Based on the analysis of the three factors for energy conversion in a district heating system, namely resources, technology, and management, the methodology provided an assessment of the different factors involved in running a DHC system. The results show an estimated total production for DHC networks of 1448 MWth, of which 72% is supplied purely by renewable energy sources.


Introduction
Energy is a basic need for society and economic growth [1]. Accomplishing thorough decarbonisation will require full implementation of climate targets in all sectors. In order to achieve these targets in the energy sector, in particular, renewable energies are promoted as alternatives to fossil fuels. The first step in studying their viability is to analyse the factors related to their use and management systems. However, the COVID-19 pandemic has spurred on the energy transition and has turned renewable energies into a sector with great business potential, to the point that fossil fuel-based traditional energy companies have taken a green turn in their strategies.
Power systems must be able to meet the current demand for thermal and electrical energy using available technology, i.e., drawing on existing technology to achieve a more sustainable energy performance [2].
Currently, residential and commercial buildings account for almost one-third of global greenhouse gas (GHG) emissions. Indeed, recent studies estimate that global energy consumption and GHG emissions will rise by approximately 30% by 2040, which means that technological development will play a key role in addressing environmental issues resulting from this technological challenge [3]. Therefore, reducing the use of fossil fuels in the energy production process will make a significant contribution towards meeting the set global targets for reducing the use of fossil fuels [4].
boiler systems, which are specifically dedicated to producing thermal energy, CHP systems deliver thermal energy as a product of electricity generation. A CHP system can achieve more than 80% energy efficiency [12]. Typical boiler efficiencies in energy systems range from approximately 90% with the best solid biomass-fuelled boilers to 95% with natural gas-fuelled boilers. However, heat pump-based systems enabling heat recovery from the ground (i.e., geothermal heat pump systems) and alternatively from other low-grade heat sources, typically have a coefficient of performance (COP) of around 4 [12][13][14]. Additionally, DH systems running on waste heat provide a way to efficiently manage fuel for space heating, which may be originally sourced from fossil fuels. Energy storage has become an important aspect of DH networks. Thermal energy storage (TES) is a type of technology used to store thermal energy by heating or cooling a storage medium. There are two main types of thermal energy storage, thermal (sensible heat and latent heat) and chemical [12]. Such stored energy can be further used for heating and cooling purposes. TES efficiency values can exceed 70% [15]. Heat, cooling, and electricity production (trigeneration systems) allows CHP technology to be integrated with heat pumps. Trigeneration technologies coupled with fuel cells are instrumental in the use of emerging alternative energy sources such as hydrogen. Micro CHP fuel cells, direct flame combustion boilers, catalytic boilers, and gas-fired heat pumps could all be fuelled with hydrogen. An array of larger thermal systems and industry devices running on natural gas also could be redesigned to use hydrogen [16]. In this sense, residual biomass as a renewable resource has been used in trigeneration for high-efficiency thermal blanket heating applications, with the integration of solid oxide fuel cells (SOFC) and gasifier [17,18].
In Spain, the consumption of renewable thermal energy has risen to 50,732 GWh. Biomass accounted for 91.95% of this total, followed by thermal solar (6.73%), biogas (0.88%), and geothermal (0.45%) [19]. Given its strategic importance, it is fundamental that all Spanish bioeconomy strategy policies establish the development of bioenergy as a key priority in the future [20].
Silva et al. [21] show open challenges where the smart city concept is still evolving throughout the globe due to economic and technological barriers. Several case studies have already demonstrated the importance of DHC networks [22][23][24][25]. The majority of these studies focused on one aspect or domain within DH/DHC systems and attempted to connect the entire system according to the type of each resource, technology, or energy management strategy. Several authors have studied the existing heating networks from different perspectives. Mazhar et al. [26] analysed the progress that has been made in technology and proactive research methods to minimise carbon emissions within the heating industry. Vandermeulen et al. [27] argued the need to develop more advanced control systems to improve overall energy management. Lund et al. [28] demonstrated the strong technical and economic potential of these systems and their ability to provide a viable source of heating and cooling for the future. Akhtari et al. [4] and Lake et al. [29] highlighted the need for future network heating system studies that would include factors such as resources, technology, and energy management.
This document aims to fill the existing gaps in the literature on energy sources and implementation of district heating systems, thus providing a framework for research into the DHC system that is in line with the principles of sustainable development. To this end, the three energy conversion factors-resources, technology, and management-were studied, applying them as an example to district heating systems in Spain from a time transition perspective, to achieve more widespread implementation of renewable energy sources and more efficient energy conversion in the future.
This work studies the resources, technology, and energy management of DHC systems from a time perspective of progressive implementation in Spain and is therefore intended as a useful tool to be used for similar processes worldwide.
The novelty of this work lies with the effective identification of actions and limitations in the DHC systems. In this sense, it combines technical, economic, and environmental data regarding the resources, the available technology and the energy management of these systems. Furthermore, it aims to provide a framework for research into the DHC system that is in harmony with the principles of sustainable development: need, equity, generation transition and global environmentalism.
The present study is organized as follows: Section 1 includes the introduction, aims, and gaps of knowledge in the sustainability context; Section 2 explains the analytical methodology applied to the different elements involved in the energy conversion process; Section 3 presents the results within the current framework of available energy resources, technology, and management strategies, and comprises the core of the work; Section 4 examines both the opportunities, challenges facing the industry at present andprovides the final observations; and Section 5 shows the conclusions.

Materials and Methods
The work is intended to provide an analysis of the current use of the DHC system to identify potential technological developments and help expand the use of multilateral systems of thermal energy management in Spain following European policies and regulations. More specifically, this study includes an analysis of relevant information and studies published between 2010 and 2019.
The used methodology was based on three phases of energy conversion: resources, technology, and management [30]. Factors such as energy, the environment, and management were analysed under the energy context [22,30]. An analysis of the driving forces yielded data on the actual actions and limitations in DHC systems with the available information of the main existing databases for DHC systems.
Databases and inventories of both public and private organizations of reference with jurisdiction in DH/DHC systems were searched. The resulting multi-objective methodology was based on three specific phases of energy conversion in DHC systems. The first step consisted of the collection of data related to the energy sources used within the studied territory (Phase 1: Resource). Two challenges arose during the process of evaluating the energy potential in a conversion analysis: discrepancies in statistical data and the difficulty involved in calculating the real energy potential [30]. The second step was to analyse the available existing technology (Phase II: Technology). Finally, the systems were examined from an energy management perspective within the current regulatory framework, and their prospects were outlined (Phase III: Energy Management). The research framework is shown in Figure 1.
Furthermore, a critical analysis of the available scientific literature was conducted to fill the existing knowledge gaps to understand the relationship among resources, technology, and the energy conversion management process in these systems. Figure 1 shows a graph of the methodology used.
The core of the database analysis is rooted in sources provided by Spanish energy institutions (Table 1).  Furthermore, a critical analysis of the available scientific literature was cond fill the existing knowledge gaps to understand the relationship among resources, ogy, and the energy conversion management process in these systems. Figure 1 graph of the methodology used.
The core of the database analysis is rooted in sources provided by Spanis institutions (Table 1). Literature analysis was updated with the present study so as to provide t developments, including driving force analysis based on the study of seasonal d Literature analysis was updated with the present study so as to provide the latest developments, including driving force analysis based on the study of seasonal data from a range of sources of relevance to the study and future implementation of DHC systems, as contained in this document.
The respective zones of study for the methodology (Figure 1) were subdivided by region and assigned individual area codes (Table 2).    Figure 2 shows the distribution of the area codes in the study area of Spain. The results of this study allow for the identification of several challenges related to the availability, management, and environmental impact of energy conversion in our society and offer suggestions to improve future research into DHC systems.

Results
District heating networks help improve energy efficiency in the service and construction sectors by offering more efficient climate control and, in doing so, help reduce overall energy demand with renewable energy. Energy demand is a key factor in the calibration The results of this study allow for the identification of several challenges related to the availability, management, and environmental impact of energy conversion in our society and offer suggestions to improve future research into DHC systems.

Results
District heating networks help improve energy efficiency in the service and construction sectors by offering more efficient climate control and, in doing so, help reduce overall energy demand with renewable energy. Energy demand is a key factor in the calibration of building climate control systems [34]. District systems allow for greater use of renewable energy sources and provide more efficient energy production, thereby reducing regional carbon emissions.

Non-Renewable Sources
The main nonconventional or alternative energy sources available comprise those of renewable, reusable, or residual nature. Several different fuels are commonly used in residential buildings; natural gas stands out among conventional fuels as producing the least hazardous levels of emissions [35]. Conventional fossil fuel sources such as propane, butane, diesel, and coal are generally not used in DHC systems. largely because of the transport and storage difficulties involved as well as their higher levels of hazardous emissions.
The heat generated from these systems is used for both heating and domestic hot water (DHW) and is capable of supplying hot water ranging in temperature from 45 to 110 • C for either heating or steam-based systems. Hot water can be generated by heat pumps, boilers, CHP systems, or the use of residual energy sources (e.g., steam from a waste revaluation plant or smoke from industrial production). Although cooling is generally used for air conditioning purposes, it can also be used in either industrial processes or condensation circuits and is supplied through cold water, generally at around 5 • C. Steam can also generate heating and DHW through the use of steam/water exchangers or serve industrial purposes as a heat carrier fluid (at different pressures and temperatures, although it is most often superheated). While it is most often generated using compressors, it can also be harnessed from nearby sources of residual industrial energy.
Industrial cooling is usually generated using condensation circuits, compressors, or cold stores ranging from 0 to 7 • C and is supplied in a glycol/water mixture (at around −10 • C) or liquid carbon dioxide or ammonia. Generally, it is generated using either compressors or residual industrial energy sources.

Renewable Sources
There are also several highly efficient technological solutions that are compatible with the use of biomass, such as biogas, geothermal and thermal solar energies, highefficiency combined heat and power, and residual heat from thermal energy power plants, waste management valuation plants, and industrial production (cement, glass, iron and steel, and aluminium as well as metalworking and forging). Besides its environmental advantages, such as the reduction of CO 2 emissions, biomass is the most common source of primary energy in heat networks because it has other advantages in line with savings and sustainable development. As it is indigenous and therefore uses resources from the environment in which it is consumed, it is not affected by the volatility of the fossil fuel market and presents societal advantages related to the creation of new economic activities in the environment and the improvement of incomes. Biomass can originate from different sources, including forestry and lumber industry residues, or it can appear in the form of biogas, which is a residual fuel source obtained from processing waste from landfills, sewage treatment plants, or urban/animal waste treatment plants [36].
The use of biomass yields some clear benefits, including greater symbiosis between a variety of industries and local communities and a wealth of social benefits (employment opportunities, urban heating, waste removal) generated in the production process [37]. Hagos et al. [38] discussed the importance of urban heating networks and individual and central bioheating systems in high energy demand areas to highlight the potential long-term benefits of bioenergy over conventional systems .
Thus, biomass will be a core element in the progress of Europe's bioeconomy and is one of the principal challenges related to both climate change and the energy transition process currently facing the EU.
There is a growing need to better understand and assess several of the key factors in global demand for bioenergy, including how much available biomass can be transported, how much is used and to what end, how it flows within the economy, and how a greater dependence on natural resources can be reconciled with meeting environmental, economic, and social sustainability standards at a European and global level. Moreover, new energy systems are constantly being implemented. Lausselet et al. [39] demonstrated the need for a circular economy when dealing with the management and use of these resources. Wood-based biomass is an efficient source of thermal energy [40]. A 51 kt pellet production is equivalent to 32 MW th in thermal systems [41,42] (Figure 3).
A building's average primary energy consumption depends on the climate area. This can reach up to 282 kWh/(m 2 year) in northern Spain [43]. The heating consumption of an average Spanish household can reach up to 4700 kWh/year. This energy is basically supplied by electricity, natural gas, and diesel fuel [44].
Solar-powered urban DH systems have a long history of use in Europe. Sweden was the first country to develop this type of system, and a number of other European countries (including Denmark and Austria) subsequently recognised their enormous potential and fast-tracked the development of their thermal solar heating systems [45][46][47]. For thermal solar DH systems, the output range varies depending on the technology used in 1000 kW th systems, which operate for 1500 h annually. The upper limit corresponds to installations with a concentrated collection tube, whereas the lower limit corresponds to installations with a coated/covered flat collector.
There is a growing need to better understand and assess several of the key factors in global demand for bioenergy, including how much available biomass can be transported, how much is used and to what end, how it flows within the economy, and how a greater dependence on natural resources can be reconciled with meeting environmental, economic, and social sustainability standards at a European and global level. Moreover, new energy systems are constantly being implemented. Lausselet et al. [39] demonstrated the need for a circular economy when dealing with the management and use of these resources. Wood-based biomass is an efficient source of thermal energy [40]. A 51 kt pellet production is equivalent to 32 MWth in thermal systems [41,42] (Figure 3). A building's average primary energy consumption depends on the climate area. This can reach up to 282 kWh/(m 2 year) in northern Spain [43]. The heating consumption of an average Spanish household can reach up to 4700 kWh/year. This energy is basically supplied by electricity, natural gas, and diesel fuel [44].
Solar-powered urban DH systems have a long history of use in Europe. Sweden was the first country to develop this type of system, and a number of other European countries (including Denmark and Austria) subsequently recognised their enormous potential and fast-tracked the development of their thermal solar heating systems [45][46][47]. For thermal solar DH systems, the output range varies depending on the technology used in 1000 kWth systems, which operate for 1500 h annually. The upper limit corresponds to installations with a concentrated collection tube, whereas the lower limit corresponds to installations with a coated/covered flat collector.
The use of geothermal energy, whether direct or through heat pumps, is an example of another highly efficient energy application. Centralised systems allow much greater output levels and higher efficiency compared to individual systems. The basic energy services commonly provided in DH systems include heating, cooling, steam supply, and industrial cooling. Geothermal energy systems are also used, which operate with an underground renewable energy source. Of these systems, those that work the equivalent of 3500 h provide a wide range of overall performance. The typical lower and upper limits of thermal power are 500 kWth and 10,000 kWth, respectively.

Performance Principles
At present, Spain uses a wide range of different technologies that pose several challenges in terms of energy management. DH/DHC systems often vary depending on local energy policies, energy security, level of economic development, access to emerging and innovative technology, fuel dependency, regulations, climate, and other local conditions. The use of geothermal energy, whether direct or through heat pumps, is an example of another highly efficient energy application. Centralised systems allow much greater output levels and higher efficiency compared to individual systems. The basic energy services commonly provided in DH systems include heating, cooling, steam supply, and industrial cooling. Geothermal energy systems are also used, which operate with an underground renewable energy source. Of these systems, those that work the equivalent of 3500 h provide a wide range of overall performance. The typical lower and upper limits of thermal power are 500 kW th and 10,000 kW th , respectively.

Performance Principles
At present, Spain uses a wide range of different technologies that pose several challenges in terms of energy management. DH/DHC systems often vary depending on local energy policies, energy security, level of economic development, access to emerging and innovative technology, fuel dependency, regulations, climate, and other local conditions. For example, in the European territory, Poland uses geothermal heating technology even though current economic research shows that it is more expensive than coal and has a much lower calorific value than biomass, natural gas, and fuel oil [48].
Heating source flexibility is one essential element that all of these systems share, as any number of different centralised and decentralised heat sources can be used to provide dependable and flexible operating conditions using basic control strategies.
The main final objective for urban heating companies is to ensure that clients receive the lowest possible price for thermal energy, which requires a holistic approach considering that there are a growing number of heating and cooling options available.
District networks can also integrate renewable energy sources by using heat pumps, biomass and thermal solar energy, residual heating, and municipal waste. Depending on the location and the needs of any given zone, the same system can provide both heating during winter and cooling during the summer months using the same energy source year-round. Therefore, DH/DHC systems differ greatly in terms of energy management and environmental impact.

Biomass
Uses wood-based input material to produce thermal energy. The oldest source for heating has been wood chips and wood pellets.
It has high thermal efficiency in energy systems, reaching a thermal efficiency of around 80-90%. Today, large-scale production of biofuels for DH grids allows for both economic and environmental benefits, enabling the energy supply to be managed, since it is a source of energy in the form of fuel.
There is low availability of biomass. A barrier to its mass commercialisation is its cost and the lack of adequate infrastructure. However, a versatile range of energy sources allows selecting the best fit for each set of applications to achieve the best performance.

Geothermal energy
This is the oldest and most mature of all DHC technologies. Most research seeks to improve energy efficiency and use geothermal heat in hybridisation with other energy sources.
It is built on sites above large geothermal or mining sources. Heat pumps increase the overall energy efficiency in heating and cooling performance. It provides low-cost heating and cooling by using heat pump technology in the DH system (thermal conversion efficiency above 60%) with a typical COP value of 4 in the case of heat pumps.
Geologically limited. The low efficiency of geothermal heat sources is partly because they are indirectly used for heating, given the potential for contamination in central heating systems in buildings.

Fossil fuel/waste heat
An old, mature heating generation mechanism. It burns coal, oil, or natural gas to provide thermal energy. The technology to implement this idea is available and is, in fact, widely used.
Energy infrastructure is often already running, thus reducing fuel transport-related costs. It is highly thermally efficient (85-95%). Fossil fuel waste energy could contribute to its implementation.
A non-renewable energy source producing high GHG emissions. Clean combustion and efficient waste management strategies hold the key to addressing this problem.

Solar
A mature technology, with most research aiming to both improve efficiency and incorporate heat storage. Sunlight and solar collectors are used to provide high-temperature water for thermal energy purposes.
High energy source availability with thermal conversion by both passive and active systems (thermal efficiency 30-80%). It is a low-grade heat source. Efficiency improvements could boost thermal output, particularly in regions with low solar irradiation.
Geographical assessment and proper planning are necessary. As solar thermal energy is unpredictable, it is not a reliable option in the absence of large-scale TES.
As a complement to the energy system technologies in Table 3, TES can operate as heat sinks at off-peak times and as peak demand heat sources in boiler, CHP, or trigeneration systems. TES systems for residential buildings ranges could overcome barriers such as energy supply variability from unpredictable and fluctuating renewable heat sources [57,58], and thus are expected to become integrated into DH/DHC network with efficiency over 70% [15]. Moreover, a variety of larger thermal systems and industry devices that use natural gas for thermal purposes could also be redesigned to use hydrogen for thermal purposes to develop DH/DHC networks [16].

Energy System Network Design
Energy systems are designed to meet the entire demand for heating, cooling, and DHW. Energy systems depend on several factors such as the fuel used, the technology, and the chosen location (Table 3).
An ideal scenario in urban areas would be either to harness the residual thermal energy from existing plants in operation or to create new ones that can harness either the residual thermal energy from the production of electricity or any residual fuel.
The current trend, however, is for power plants to be located outside the urban centre. Boilers or cogeneration equipment can be used to generate thermal energy in the form of heat, whether it be engines or turbines. Each technology can be used in combination with any of the various available energy sources, thereby yielding varying levels of emissions, with higher emissions from fossil fuels and lower emissions from biomass, renewables, or waste heat.
Regardless of which type of energy system is used, there is the possibility of integrating solar energy into the circuit. The most widespread solution is for the production of solar thermal energy to be consumed in the building itself, without exporting it to the grid. How it is adopted depends on the configuration of the overall system, where the working temperatures of the heating network play a very important role.
When it comes to cooling, electric power compression systems are most commonly used. There is the possibility of using absorption and adsorption systems that are powered by heat sources. It is suitable to integrate this technology in systems where heat generation comes from a residual source such as incinerators, waste heat, or even cogeneration. In any case, these systems need to be supported by compression cooling systems. Figure 4 shows a model of a district heating system.  As far as the distribution network is concerned, the ducts of DHC systems are composed of two pipelines, one for supply and one for return. The size of the system and the number of branches it has depends on its location in the energy system, the number and distribution of users, and the loss of energy to the grid. Inadequate distribution of the network can jeopardize the project's economic profitability.
Insulation is a major feature of the pipes as it is necessary to reduce to a minimum any heat loss through distribution. Pre-insulated pipes are typically used in order to avoid any problems caused by defective installation of the insulation. Cooling pipes require larger diameters due to the lower thermal gap.
There are several ways to regulate the flow rate in a pipe network; choosing one system or another depends on factors such as the type of flow rates to work with, investment costs, efficiency, operating speed, and maintenance, among others. These flow regulation systems can be either valves or multispeed pumps. The latter is the most expensive method to implement, but also the most energy-efficient and economical. As far as the distribution network is concerned, the ducts of DHC systems are composed of two pipelines, one for supply and one for return. The size of the system and the number of branches it has depends on its location in the energy system, the number and distribution of users, and the loss of energy to the grid. Inadequate distribution of the network can jeopardize the project's economic profitability.
Insulation is a major feature of the pipes as it is necessary to reduce to a minimum any heat loss through distribution. Pre-insulated pipes are typically used in order to avoid any problems caused by defective installation of the insulation. Cooling pipes require larger diameters due to the lower thermal gap.
There are several ways to regulate the flow rate in a pipe network; choosing one system or another depends on factors such as the type of flow rates to work with, investment costs, efficiency, operating speed, and maintenance, among others. These flow regulation systems can be either valves or multispeed pumps. The latter is the most expensive method to implement, but also the most energy-efficient and economical.
Finally, the connection to the customers and the substation consists of linking the energy distribution system, i.e., the network, to the consumers (buildings or other facilities). Water supply lines are the connection pipes between the network and the customer's substation, usually running into the customer's building from below street level. Substations adapt the distribution network pressure and temperature to the requirements of the building, guaranteeing the necessary temperature jumps for proper system efficiency.
Substations comprise equipment for regulation and control, counting equipment, and, depending on the type of substation, exchange or storage equipment. All connections to customers must be equipped with thermal energy meters. Overall, output levels of DH and industrial thermal energy production systems continue to increase, which allows for increasingly larger-scale benefits. Nevertheless, the creation of a common European framework for legislation regarding DH/DHC networks and technologies remains a vitally important objective in the EU.

System Integration
Secondary or residual heat often originates from industrial processes, agricultural production, and/or waste combustion ("Waste to Energy") and can be obtained either directly from the source or in conjunction with electricity through CHP systems.
One of the biggest advantages of CHP systems is the production of electricity. Different works have studied the possibility of implementing these types of systems in Spain. Paredes-Sánchez et al. [2] demonstrated the complexity involved in the development of nodal systems, which have proved their capability to adequately supply both heating and electricity through the use of conventional organic Rankine cycles (ORC). Moreover, there are also examples of heating networks using residual heat from conventional Rankine cycles currently operating in thermal power plants. Rodríguez et al. [60] coined the term "city water heating", which refers to transferring an amount of residual thermal energy (residual heat) originating in an electrical power plant to a nearby city, thus heating the drinking water supply.
The three main advantages of this type of system include overall energy savings and cost reductions for residents, zero contribution to global warming, and a significant reduction in CO 2 emissions. Moreover, many state-of-the-art CHP systems are also capable of recovering residual heat from the system to provide cooling, heating, and energy [61,62].
Heating from renewable sources without the combustion process is an option in energy systems. Solar heating can be readily adapted to both small-and large-scale systems. Currently, large solar energy farms are an important part of urban heating systems in Denmark [63], even though the conditions for solar radiation energy are generally not as favourable in higher latitudes compared to other regions like Spain.
The advantages of thermal systems using renewable energy sources include significant reductions in both fossil fuel consumption and GHG emissions by helping facilitate the transition to a highly efficient and renewable energy source in the future [2]. Particular mention should be made of the use of heat pumps in these systems. Heat pumps are generally electrically operated during periods of surplus electrical generation, for example, in Scandinavia when there is a surplus of wind energy. COP is defined as the proportion of heat supplied to the DHC system and the electricity that is consumed.
The use of heat pumps in urban heating systems is one of the most promising advances for improving overall energy efficiency, and the economic figures will play a key role in meeting the current European energy and climate objectives established for 2030 and 2050. In order to determine the correct positioning, connection, and operating modes of heat pumps, it is essential to evaluate the available data and seek out the experience and training of both city planners and engineers, as these systems must satisfy the demand for heat while operational [64]. The COP of heat pumps oscillates between 2.5 and 5.5, depending on factors including the cooling levels and temperature of the lower source, the characteristics of the carrier fluid being used, and the temperature range of the higher source. The COP of absorption heat pumps oscillates between 1.7 and 2.3 in two-stage systems, which require steam, gas, or high-temperature water as a lower energy heat source [7]. De Carli et al. [65] demonstrated that heat pumps, with or without the support of solar panels, can reduce primary energy consumption by 50-60% compared to standard systems, and a combination of heat pumps and boilers can reduce it by an additional 30-35%, which highlights the importance of adopting hybrid energy technologies in the future.
Conventional boilers are often used as a backup whenever an excess of energy is produced. Many different types of fuels can be used in these systems (including biomass) with a thermal efficiency ranging from 0.85-0.97 [7]. However, even higher efficiency levels are possible when gas-fired boilers are used in conjunction with exhaust condensation techniques. The use of burning combustibles for heat production has been widely studied. Paredes-Sánchez et al. [24] analysed the importance of biomass use in heating networks by defining District Bioheating Systems (DBS), which underscored the importance of utilising previously unused energy sources to reduce CO 2 emissions. The above indicated that the criteria most frequently used in the classification process include the morphology of the system, the services offered, and the profile of the clients However, given that micronetworks involve smaller-scale geographical areas (limited network extensions) and have fewer clients, the classification criterion of services offered was used for this study.
In addition to the technology used in obtaining thermal energy, the so-called Industry 4.0 has ushered in a wealth of benefits for the production and energy sectors alike. Within the production industry, in particular, elements such as device identification, cloud connectivity, and AI device support systems have offered substantial benefits to both the overall service and the end users by making significant improvements to energy efficiency, final energy cost, and quality of the energy supply. Thermal operation optimisation, which is a process using artificial intelligence technology to perform a specific task with a specific objective, plays an important role in finding the optimal balance between the energy temperature and flow within a district system to minimize costs and ensure the quality of the energy supply.

Phase III: Energy Management
Based on the previous analysis of energy systems (i.e., Sections 3.2.1-3.2.3), one of the main benefits of DHC systems is their ability to offer higher-efficiency energy production by integrating a variety of renewable energy sources (biomass, geothermal, thermal solar, etc.) and local resources that would otherwise go unused (natural cooling, excess heat or cooling from nearby industrial work, integration of both heating and cooling, etc.).
A combination of the aforementioned factors, along with appropriate energy management of the generation/demand binominal and continual professional maintenance and management, can significantly contribute to reducing energy consumption levels, CO 2 emissions, and air pollution while providing a highly stable energy supply.
There are many important parties involved in the successful completion of DHC projects, including local administrations, installation management companies (generally energy service providers), energy company industries, suppliers, property developers, and end clients. The respective city halls and city councillors play especially influential roles, as they are responsible for territorial planning. Moreover, administrations can further facilitate the administrative process by either approving or rejecting projects, making economic contributions, and taking a more active role in the process.
The ability to identify an opportunity to develop a district heating system in the urban planning stage is key to the success of the project, as it helps to reduce costs and allows for easier integration of other services. System costs include updating both the existing heating systems and the heating distribution networks, which in turn minimises energy loss within the system, promotes more efficient use of low-temperature energy sources and higher overall efficiency, and, most importantly, allows for greater integration of other systems when compared to DH systems [66]. Thus, the next step in the development of these systems will be to conduct a study of their economic viability to provide a profit analysis to help in the final decision-making process.
Despite the possible technological impediments, legislative issues, or network management difficulties, the expertise offered by the ongoing work of experienced companies in the sector engaged in fully operational networks makes the logistics of such project ever less complicated. The current management model for DHC projects in Spain relies on joint ventures between both private and public entities. Likewise, public agencies, associations, and institutions responsible for promoting and developing energy-efficient technologies also play an important role in helping secure resources like subsidies as well as promoting the use of DHC systems in municipal and regional energy plans.
The ability to secure financing and installation management services is also a crucial factor in determining the viability of a project. The joint venture is responsible for securing the necessary financial backing for the project. Energy service companies manage the facilities themselves while providing know-how in the construction process and subsequent management of any resources involved in the commercialisation and operation of the facilities. Lastly, the end client is also a determining factor in the successful achievement of a project.
When dealing with a new urban project, the connection timeline for prospective clients is a key issue, and the planning and design previsions must be as realistic as possible. In those cases where previously inhabited urban areas are involved, the local authorities play an important role in the planning process as they have the final decision regarding the approval and execution of the project. Regardless of the particulars of any given individual project, however, strict adherence to the life cycle for the installations is essential.
Based on methodological analysis [31,33], Spain has an estimated total output of 1448 MW th , 72% of which is supplied exclusively with renewable energy sources. The remaining 28% come from a combination of energy sources, with natural gas being the most common in Spain. The total registered output includes 612 MW th from heating networks, 829 MW th from heating and cooling systems, and 7 MW th from cooling ( Figure 5).
inability 2021, 13, x FOR PEER REVIEW 14 of The ability to secure financing and installation management services is also a cruci factor in determining the viability of a project. The joint venture is responsible for securin the necessary financial backing for the project. Energy service companies manage the f cilities themselves while providing know-how in the construction process and subseque management of any resources involved in the commercialisation and operation of the f cilities. Lastly, the end client is also a determining factor in the successful achievement a project.
When dealing with a new urban project, the connection timeline for prospective c ents is a key issue, and the planning and design previsions must be as realistic as possibl In those cases where previously inhabited urban areas are involved, the local authoriti play an important role in the planning process as they have the final decision regardin the approval and execution of the project. Regardless of the particulars of any given ind vidual project, however, strict adherence to the life cycle for the installations is essentia Based on methodological analysis [31,33], Spain has an estimated total output of 144 MWth, 72% of which is supplied exclusively with renewable energy sources. The remai ing 28% come from a combination of energy sources, with natural gas being the mo common in Spain. The total registered output includes 612 MWth from heating network 829 MWth from heating and cooling systems, and 7 MWth from cooling ( Figure 5). These systems offer some decarbonisation measures, including their abilities to u more efficient technologies, replace coal with lower-contamination fossil fuel sources lik These systems offer some decarbonisation measures, including their abilities to use more efficient technologies, replace coal with lower-contamination fossil fuel sources like natural gas, and run exclusively on renewable energy sources [67]. Zones with area codes 2, 3, 7, and 8 (Table 2) are heavily dependent on coal industry in thermal applications, which could make the development of DH/DHC based on biomass an important energy goal.
Thus, biomass and natural gas (or a combination of the two) provide 63% of total output, with 20% coming directly from renewable sources. Specifically, biomass is used, either exclusively or in combination with other fuel sources, in 3 out of every 4 networks. In terms of total energy output, 73% is used for heating and 27% for cooling.
Overall, district energy output has been continually increasing in recent years [31]. Catalonia (495 MW th ), Community of Madrid (342 MW th ), and Autonomous Community of Navarre (175 MW th ), area codes 9, 14, and 16 in Table 2, respectively, contribute approximately 70% of the national output in Spain. In terms of network type, 363 provide heating, 35 provide heating and cooling, and 4 provide cooling (Figures 6 and 7).  Table 2, respectively, contribute approximately 70% of the national output in Spain. In terms of network type, 363 provide heating, 35 provide heating and cooling, and 4 provide cooling (Figures 6 and 7).  In terms of client profile, 68% belong to the services sector, 24% to housing, and 8% to industry. In terms of total consumption, 45% comes from the services sector, 32% from housing, and 23% from industry.
According to the data, 49% of Spanish networks are public property, 47% are private, and 4% are mixed. By region, Catalonia registers the highest number of DHC networks (130), followed by Castile and Leon (59), the Autonomous Community of Navarre (38), La  Table 2, respectively, contribute approx imately 70% of the national output in Spain. In terms of network type, 363 provide heat ing, 35 provide heating and cooling, and 4 provide cooling (Figures 6 and 7).  In terms of client profile, 68% belong to the services sector, 24% to housing, and 8% to industry. In terms of total consumption, 45% comes from the services sector, 32% from housing, and 23% from industry.
According to the data, 49% of Spanish networks are public property, 47% are private In terms of client profile, 68% belong to the services sector, 24% to housing, and 8% to industry. In terms of total consumption, 45% comes from the services sector, 32% from housing, and 23% from industry.
According to the data, 49% of Spanish networks are public property, 47% are private, and 4% are mixed. By region, Catalonia registers the highest number of DHC networks (130), followed by Castile and Leon (59), the Autonomous Community of Navarre (38), La Rioja, and Cantabria (3 each), and the Region of Murcia (1), area codes 9, 8, 16, 13, and 15 in Table 2.
District heating systems in Spain have an overall thermal efficiency in boilers of around 90% and COP of 4 in heat pumps. The total thermal production corresponds to 1448 MW th , of which 72% is exclusively supplied by renewable energy sources. The Association of District Heating and Cooling Companies [31] has registered 402 networks in Spain, servicing a total of 5000 buildings with an estimated network of approximately 680 km. Combined, these networks account for an annual reduction of 305,945 tonnes of CO 2 emissions and a 79% reduction in fossil fuel use. The existing DHC in each zone are studied based on the operational information available in the databases, as described in Section 2. In this respect, homogenisation of this information is pursued by means of a particular analysis of the behaviour and barriers included in Table 3. One of the most important DHC networks in Spain is located in Barcelona (area code 9, Table 2), which was built in 2002 in order to provide heating, air conditioning, and DHW. It extends over a distance of nearly 18 km and provides services to 100 buildings [68].
In addition, the City Hall of Barcelona, together with the Public Consortium Local Energy Agency of Barcelona, planned to develop an 18,000 home residential complex near the Seat Automotive plant in the Zona Franca district of Barcelona (Hospitalet City Hall). However, due to the global economic crisis, the project was never realised. What made this particular project noteworthy was the fact that its trigeneration power plant was to be equipped with heating and cooling systems, a glycol cooling bath (−10 • C), water source heat pumps, and photovoltaic solar panels, and it was configured to service over 1,200,000 m 2 [69].
The Mostoles district in Madrid (Community of Madrid) (area code 14, Table 2) offers an example of an exclusively urban area heating and DHW network using biomass (pellets and pruning waste). A total of 3000 homes have already been connected to the heating network during the initial stage of the project, and the total will increase to 6000 homes in subsequent stages [70].
Industrial activities (e.g., technology centres, industrial complexes, etc.) are often located in or near mining areas and can help minimize the ratio between distance and consumption, which is essential in these projects [33]. The primary technical challenge involves the transportation of thermal energy over large distances, since end consumers are often located a considerable distance from production centres, and very few mining areas are close to urban areas.
Area code 3 offers noteworthy examples of the progress being made in geothermal technology, including a project developed by Grupo Hunosa, which uses mining water for a DH system located in Mieres (Principality of Asturias) (area code 3, Table 2). The network originates at the mining area of the Pozo Barredo and provides service to the Polytechnic School of Mieres of the University of Oviedo, Bernaldo de Quirós High School, and a group of buildings containing 248 homes located in the Vasco-Mayacina neighbourhood [71]. Public institutions must play a pivotal role in initial contract negotiations to encourage private enterprises to participate in these types of network projects in the future. In this respect, it is worth mentioning that district heating has been installed, with similar circumstances, in the Pontevedra campus of the University of Vigo. This infrastructure connects the Faculty of Education and Sport Sciences with the Faculty of Social Sciences and Communication. The thermal system has two combustion chambers of movable grate of 1 MW th , each of which is supplied with wood chips (Figure 8). Sustainability 2021, 13, x FOR PEER REVIEW 17 of 23 In addition, at the Campus of Ourense, a project of geothermal installation to meet the demand for heating (80%) and cooling (100%) by a "hybrid" system stands out. This district heating is a combination of aerothermal production of about 200 kWth and geothermal generation of approximately 500 kWth. The thermal system has five heat pumps in cascade configuration.
As far as research into heating networks is concerned, a lot of progress has been made recently in Spain. Fourth-generation urban heating systems (4GDH) are being discussed now, an example of which is the SmartEnCity project sponsored by Vitoria-Gasteiz (Basque Country) (area code 17, Table 2) City Hall as part of the EU Horizon 2020 program. The idea behind the project is that if more citizens become actively involved in the planning process, fewer people will reject the idea of heating networks in the future.
The SmartEnCity project calls for the complete renovation of the entire Coronación neighbourhood and the creation of a biomass-based network that is capable of meeting the basic energy needs of 750 to 1313 homes. Additionally, it will develop integrated thermal and electric infrastructures, encourage sustainable mobility by using cleaner technologies in vehicle fleets, help spread technologies of the information and communication, and promote urban renewal by renovating public spaces like streets and squares [72].
In addition, the R2CITIES project was born in Spain and at the international level, the objective of which is to create and develop repeatable, large-scale renovation projects for the construction and management of district heating to achieve cities with near-zero energy consumption. Currently, pilot programs are operating in Kartal (Turkey), Valladolid (Spain), and Genoa (Italy), all of which have different climates and objectives. Each of the three programmes is being managed by its respective municipality; these municipalities are also the principal promoters of these highly ambitious neighbourhood renovation programmes. Single projects prove that a systematic approach, in combination with the use of technologies such as insulation and information and communication technologies, as well as cost-effective and energy-efficient resources, can not only achieve excellent results in terms of energy efficiency but also drastically reduce CO2 emissions [73].
The DHC engineering firm DH Eco Energías has initiated a "macro-project" in Spain for the promotion and construction of hybrid networks with biomass and concentrated solar heating systems on a budget of EUR 204 million. Thanks to the positive environmental impact of the project, the Ministry of Ecological Transition has selected it to become part of the "Climate Project", since it will prevent 360,000 t of CO2 from being released In addition, at the Campus of Ourense, a project of geothermal installation to meet the demand for heating (80%) and cooling (100%) by a "hybrid" system stands out. This district heating is a combination of aerothermal production of about 200 kWth and geothermal generation of approximately 500 kWth. The thermal system has five heat pumps in cascade configuration.
As far as research into heating networks is concerned, a lot of progress has been made recently in Spain. Fourth-generation urban heating systems (4GDH) are being discussed now, an example of which is the SmartEnCity project sponsored by Vitoria-Gasteiz (Basque Country) (area code 17, Table 2) City Hall as part of the EU Horizon 2020 program. The idea behind the project is that if more citizens become actively involved in the planning process, fewer people will reject the idea of heating networks in the future.
The SmartEnCity project calls for the complete renovation of the entire Coronación neighbourhood and the creation of a biomass-based network that is capable of meeting the basic energy needs of 750 to 1313 homes. Additionally, it will develop integrated thermal and electric infrastructures, encourage sustainable mobility by using cleaner technologies in vehicle fleets, help spread technologies of the information and communication, and promote urban renewal by renovating public spaces like streets and squares [72].
In addition, the R2CITIES project was born in Spain and at the international level, the objective of which is to create and develop repeatable, large-scale renovation projects for the construction and management of district heating to achieve cities with near-zero energy consumption. Currently, pilot programs are operating in Kartal (Turkey), Valladolid (Spain), and Genoa (Italy), all of which have different climates and objectives. Each of the three programmes is being managed by its respective municipality; these municipalities are also the principal promoters of these highly ambitious neighbourhood renovation programmes. Single projects prove that a systematic approach, in combination with the use of technologies such as insulation and information and communication technologies, as well as cost-effective and energy-efficient resources, can not only achieve excellent results in terms of energy efficiency but also drastically reduce CO 2 emissions [73].
The DHC engineering firm DH Eco Energías has initiated a "macro-project" in Spain for the promotion and construction of hybrid networks with biomass and concentrated solar heating systems on a budget of EUR 204 million. Thanks to the positive environmental impact of the project, the Ministry of Ecological Transition has selected it to become part of the "Climate Project", since it will prevent 360,000 t of CO 2 from being released annually, which is equal to the pollution from some 240,000 vehicles. The ten heating network systems involved in the project will generate 1335 jobs in total during the construction phase and will be developed in 10 different locations throughout Spain, including Ávila, Huesca, Oviedo, Palencia, Salamanca, Valladolid, Zamora, Boadilla del Monte, Coslada, and Leganés. It could provide service to a total of 111,545 homes and cover an annual energy demand of 1100 GWh [59].

Discussion
The institutional context takes into account factors including the basic drive forces from resources to energy management, the importance of awareness of the economic benefits of district heating and cooling systems, ownership, legal frameworks, prices, and advancement in knowledge [10]. The majority of the barriers currently facing DHC systems arise during the initial planning and proposal stages. These barriers come from different fields and are often of technical, economic, institutional, social or cultural, institutional, and legal natures.
Technical barriers mainly arise during construction of, e.g., the energy system or building structure. District heating networks involve some factors such as:

•
The installation of a heating production system using existing technology.

•
The needs of large-scale civil engineering projects, which vary greatly according to the scope of the project.
The latter factor is accentuated when providing services in populated urban areas, where street work is required and often disrupts other services.
According to the technical building codes responsible for the certification process in buildings, there are no standards for rewarding buildings that are serviced by district networks. However, there are currently proposals aimed at remedying this unfortunate situation. At present, all new buildings must satisfy a portion of their hot water energy demand through either thermal solar energy or an equally efficient, previously approved alternative.
This regulation causes a challenge with district network systems that do not incorporate CHP, residual heat, or alternative systems providing equivalent energy savings. At present, there is no legal recourse to remedy this situation, even though logic would dictate that buildings serviced by district heating networks should be exempt from such legislation.
However, if the district network is not supplied by a renewable or residual energy source, the environmental impact could be greater. One possible solution to this problem would be changing current legislation regarding thermal solar installations, urban municipal schemes, and energy plans to include DH/DHC systems as an option in new housing projects with favourable conditions on the basis that they are a profitable and effective means of reducing energy consumption in high energy demand areas. Financial incentives should also be considered to encourage the construction of these types of systems and network connections in addition to searching for ways to ease regulations in the future.
With regard to economic barriers, they arise as a result of the size and scope of the proposed project, as the majority of them involve civil works projects that affect distribution networks. Akhtari et al. [4] outlined the numerous social and environmental advantages inherent in the use of renewable energy sources in these types of systems. However, implementing these systems in inhabited areas can exponentially increase construction costs. Moreover, recovering the initial investment costs of these types of project takes a long time for private capital funds, which means that public aid or participation from public organisations is needed to cover the initial investment and the necessary maintenance costs until the initial investment cost can be recovered.
Uncertainties in the timeframe for new client connections can complicate the task of calculating the medium-term revenues of the operating company. The timeline can also be affected by economic cycles, which means that the design process must consider a number of economic factors. In this sense, the selection of a system that provides enormous environmental benefits can ultimately become economically unfeasible, and a less expensive system can either provide little to no positive environmental impact or be environmentally harmful [29].
As previously mentioned, social or cultural barriers generally arise in projects planned for inhabited urban areas that are intended to substitute existing heating infrastructures with DH/DHC systems. Widespread unfamiliarity with the operation and management of these systems often complicates the decision to replace an existing operational heating system that is already familiar to the consumer.
The Spanish State Department and a number of regional energy agencies have recently undertaken the task of providing local authorities with informative material, including a municipal ordinance guide explaining the current legislative framework and legal guidelines for local administrations, promoters, and building developers [32].
Generally, there is less of this type of resistance in regions where network heating systems are already prevalent. DH systems are widely considered to be the simplest and most efficient way of remedying the problem of low energy efficiency in urban areas.
The key to the success of DH networks is finding the right balance between national governmental policies and local city council initiatives; they are the institutional barriers. Social participation, especially in the initial stages of development, is another essential part of the process. Therefore, coordination between the public and private enterprises responsible for financing, maintaining, and developing these projects is an essential part of successful policymaking.
Private funding for low carbon technologies by residents is another viable option for the construction of DH systems in open markets [74]. While governmental participation in the form of payment plans requires soft loans and other financial incentives, it reduces the financial risks involved for private investors and helps stimulate public interest in DH systems.
In many European states, local councils have more administrative control and greater financial clout [26]. Many of these public city administrations (institutional barrier) determine their energy policies to benefit the local area rather than simply seeking financial rewards, which helps ensure that these projects benefit all of society rather than private enterprises alone [75]. Moreover, this strategy helps encourage the use of local labour forces and promotes greater levels of local technical expertise.
More widespread use of these systems at a variety of levels is essential to overcome the abovementioned social barriers.
This study aims to help in this process of promoting greater public awareness (social barrier). Prospective clients need detailed explanations and/or demonstrations of these systems in order to familiarise themselves with their use and fully comprehend the financial benefits and reliability of the services they provide (social barrier).
In the social context, technicians, town planners, engineers, and public entities in charge of energy management must strive to create a better public understanding of these systems, which starts by ensuring a bigger presence in school and university curriculums. Ultimately, however, more widespread adoption of DH/DHC network systems is the first step towards creating a better general awareness of these benefits of these systems to make them more accessible to potentially interested parties.
To resolve the challenge regarding legislation (legal barrier) requiring thermal solar energy systems in new buildings and ensure flexibility, systems must possess inertia to maintain a balanced energy supply at all times. Thermal networks can use thermal energy as a source of thermal inertia. These capacities are located in different places throughout the network, including the heat/cooling carrier fluid, thermal storage reservoirs, and the thermal inertia of the buildings being serviced with heating/cooling [27].
Special attention must be given to managing thermal energy systems to reduce their carbon footprint and GHG emissions. One of the principal advantages of district heating systems is their ability to significantly reduce CO 2 emissions through the use of polygeneration energy conversion technology.
Likewise, there are clear benefits to using excess industrial heat as an energy source as it is free and can be easily integrated into urban heating systems. Moreover, there are social benefits including the reduction of pollution [76]. An analysis of the results obtained from continued improvements to urban heating systems, along with the corresponding reduction in energy demand, demonstrates that it is crucial to continue their current line of development [29]. Future challenges lie in the parametric modelling and optimisation of the individual systems, which must be developed through the analysis of case studies [77]. Additionally, this characterisation will enable the results of Phase III to be implemented parametrically as an in situ thermal system [78].

Conclusions
Globally, DH/DHC have very strong technical and economic potentials and represent a future viable heating and cooling supply option. However, further efforts are required to identify, assess, and implement these potentials with a view to fully harvesting the global benefits of district heating and cooling. Based on the data obtained from the analysis, there is now a good understanding of how to deal with the technical aspects of resources, technology and management for the implementation of heat networks. The present study led to the following conclusions for the implementation of heat networks:

1.
Heating networks require a centralised heating source for several interconnected buildings in a given area (e.g., hospitals). What DH systems have in common is the use of a centralised heating source, which allows for the use of more efficient technologies and requires energy management services.

2.
The key performance indicator for all of the technologies and energy sources discussed in the present work is the ability to successfully combine resources, technology, and energy management to available energy sources on the market. 3.
Through the use of renewable energy sources alone, it is possible to reduce the amount of fossil fuel consumption. Moreover, the resulting energy savings create energy efficiency opportunities and reduce area CO 2 levels. These networks account for an annual reduction of 305,945 t of CO 2 emissions and a 79% reduction in fossil fuel use in Spain.

4.
DH systems are of particular interest to European regions that are undergoing a process of energy transition. At present, zones with area codes 2, 3, 7, and 8 (Table 2; Figures 5-7) in Spain are heavily dependent on coal industry, which makes the development of district heating networks based on biomass an important technological and energetic goal.
District heating and cooling networks combine a wide variety of technological solutions and energy management strategies. Properly organized district heating networks ultimately provide many benefits to all of the parties involved, including public administrations, energy service providers, property developers, and end-users, among others. The supplied energy needs to meet both quality and energy efficiency standards while remaining economically viable. Therefore, the methodology presented in this study provides a very powerful decision-making tool for thermal energy systems. The main challenge now is understanding the specific local parameters, operational conditions, and legal framework. Funding: The authors would like to express their acknowledgment to the Biomasa-AP project, which was approved by the INTERREG V-A España-Portugal 2014-2020 programme (POCTEP) and cofinanced by the European Regional Development Fund (FEDER) and the H2020-FTI-Pilot-2016-1-760551-CYCLOMB approved by the European Commission. We would like to thank all the companies and institutions that have contributed in some way to the work described in this paper, and especially DH Eco Energías (FUO-19-118) for its research collaboration with the University of Oviedo.
Institutional Review Board Statement: Not applicable.