Sustainable Water-Energy Nexus towards Developing Countries’ Water Sector Efficiency

Water management and energy recovery can improve a system’s sustainability and efficiency in a cost-effective solution. This research assesses the renewable energy sources used in the water sector, as well as the related water sector performance indicators within Portuguese water management systems. A deep analysis of 432 water entities in Portugal, based on ERSAR data base, was conducted in order to identify factors to be improved regarding the system efficiency. On the other hand, the potential energy recovery developed in the REDAWN project was also used as a reference for the application of micro hydropower (MHP) solutions in the water sector. A water and energy nexus model was then developed to improve the systems efficiency and sustainability. A real case study in Africa, the Nampula water supply system, located in Mozambique, was selected as a promising potential for energy recovery. The application of a pump-as-turbine (PAT) allows the reduction in system costs and environmental impacts while increasing its efficiency. The proposed MHP has a capacity to generate ~23 MWh/year, providing significant savings. The developed economic analysis indicates the project is profitable, with an IRR ~40% depending on the energy selling price. This project can avoid the emission of more than 12 tCO2 to the atmosphere, and it can help to reduce the system’s real losses by more than 10,000 m3/year. Consequently, it creates a total economic benefit of 7604 EUR/year.


Introduction
Global water demand has been rising by 1% per year since the 1980s and is expected to continue increasing at a similar rate until 2050, with the industrial and domestic sectors featuring the greatest contributions. It is expected that water stress will be more extreme, in particular, in areas of the globe where the water resources are already scarce, or the water services are deficient [1][2][3]. To overcome these challenges, water utilities need to take action and implement optimisation methodologies to improve water systems' efficiency. In recent years, the middle classes has been rapidly growing, especially in developing countries, resulting in populations migrating from rural to urban areas. This rural flight leads to changes in water, food and energy consumption patterns [1].
The growth of the middle class implies progress in human development. Nonetheless, this development has been unbalanced, with about 1 billion of the world's population not having guaranteed sources of food, clean water, sanitation or access to electricity.
The objective of this section is to present a methodology to demonstrate how good efficiency in Portugal water managers, where Águas de Portugal maintain connections among Mozambique entities, can improve, based on APREN (Association of Renewable Energies) reports, REDAWN (Reducing the Energy Dependence of the Atlantic Water Networks) studies and ERSAR (Regulator Entity for Water and Waste water Systems) data collection results and performance indicators, system efficiency in a huge number of water managers and respective outcomes. This investigation culminates in a real case study in Africa, in a northern Mozambique water supply system, to show how the best energy recovery solution can be adopted, with significant improvements in terms of the effectiveness of the energy-water nexus, where these variables (i.e., water and energy) are scarce and of primary consumption needs. Figure 1 shows the methodology presented, with the two main components interconnected in a nexus environment, where energy and water management variables have to interact and display what should be done to improve systems efficiency and sustainability. An in-depth survey of all interesting inputs for this multi-variable proposed model is presented based on both Portugal and EU Atlantic countries. The importance of micro hydropower (MHP) implementation in the positive environmental impacts is also emphasised through a real case study. Additionally, the feasibility of the established solution is also considered in terms of energy production, economic indicators, and environmental practicality.
Networks) studies and ERSAR (Regulator Entity for Water and Waste water Systems) data collection results and performance indicators, system efficiency in a huge number of water managers and respective outcomes. This investigation culminates in a real case study in Africa, in a northern Mozambique water supply system, to show how the best energy recovery solution can be adopted, with significant improvements in terms of the effectiveness of the energy-water nexus, where these variables (i.e., water and energy) are scarce and of primary consumption needs. Figure 1 shows the methodology presented, with the two main components interconnected in a nexus environment, where energy and water management variables have to interact and display what should be done to improve systems efficiency and sustainability. An in-depth survey of all interesting inputs for this multi-variable proposed model is presented based on both Portugal and EU Atlantic countries. The importance of micro hydropower (MHP) implementation in the positive environmental impacts is also emphasised through a real case study. Additionally, the feasibility of the established solution is also considered in terms of energy production, economic indicators, and environmental practicality.

Renewable Energy Sources in the Water Sector
Water pumping using wind and solar energy sources has been widely studied. Wind systems and photovoltaic systems are mostly applied for small-scale pumping, essentially for irrigation and water supply in remote areas. Wind power can be used for large-scale pumping, whereas photovoltaic systems, due to their high initial cost, are limited to medium-scale systems [20].
The impact of electricity from renewable energy sources (RES) was analysed and projected until 2030. This analysis consisted of applying two scenarios: the 2030 National Energy and Climate Plan (NECP), based on the "Peloton" scenario of the 2050 Carbon Neutrality Roadmap (CNR); and another, based on the "Off Track" scenario, also belonging to the CNR, consisting of continuing the currently implemented measures. It is estimated that by 2030, 86% of the energy supply in Portugal will comes from renewable energy sources [21].

Renewable Energy Sources in the Water Sector
Water pumping using wind and solar energy sources has been widely studied. Wind systems and photovoltaic systems are mostly applied for small-scale pumping, essentially for irrigation and water supply in remote areas. Wind power can be used for large-scale pumping, whereas photovoltaic systems, due to their high initial cost, are limited to medium-scale systems [20].
The impact of electricity from renewable energy sources (RES) was analysed and projected until 2030. This analysis consisted of applying two scenarios: the 2030 National Energy and Climate Plan (NECP), based on the "Peloton" scenario of the 2050 Carbon Neutrality Roadmap (CNR); and another, based on the "Off Track" scenario, also belonging to the CNR, consisting of continuing the currently implemented measures. It is estimated that by 2030, 86% of the energy supply in Portugal will comes from renewable energy sources [21].
The main estimated impacts of the NECP scenario by 2030 include: creating around 160 thousand jobs by 2030, reducing CO 2 emissions at a rate of 6.7% per year, and providing savings of more than 27 billion euros by reducing imports of fossil fuels. Although the dependence on external energy has reached around 77%, it is estimated that by 2030, the dependence on imported fossil fuels will decrease to 65.8%. In general, the estimated impacts of the "Off Track" scenario are lower than the estimates for NECP (Table 1) [21]. In 2020, wind was the RES with the largest impact on Portugal's gross domestic product (GDP) (60%), followed by hydropower (25%). Both sources combined accounted for more than 2.5 billion euros in gross value added (GVA). However, considering unit contribution, solar is the largest contributor, with the share from hydropower sources decreasing since 2010. According to the NECP 2030 goals, it is estimated the GVA of RES increases to approximately 4.6% of the GDP, representing around 11 billion euros [21].
The total installed capacity in Portugal is expected to grow around 63% from 2015 to 2030, with RES representing 86% of the installed capacity mix in 2030, according to the proposed goals by NECP ( Figure 2). Solar generation is estimated to become the largest contributor among RES, representing 34% of the RES installed capacity, followed by wind (32%) and hydropower (31%) generation, with the total installed capacity from RES reaching 28 300 MW in 2030 [21].  In the period from 2015 to 2030, the NECP predicts a decrease of 25% of the total, in each period, in non-renewable electricity production. Meanwhile, for the same period, the electricity production is expected to grow more than 40%. Regarding the renewable production mix, it is estimated that the wind sector will have the largest share (35%), followed by the solar (33%) and hydropower (26%) sectors. The NECP estimates that the required investment to achieve the 2030 goals will be around 23,000 million euros [21].
On the other hand, an estimate of the energy use in the water sector over the period to 2040 shows that the amount of electricity consumption will increase by 80%. This increment will cover all the aspects of the water system, from the supply to the end users. The largest increase in energy use will be observed in the water supply, as an effect of a more diffuse use of water desalination to overcome the problem of water scarcity, where the energy demand will double. Then, the higher increments in the energy use will be observed in large-scale water transfer and in wastewater treatment. In the last decade, important results of research activity and of the resulting technological innovations in the water sector have been observed. The innovation focuses on two main aspects: increasing the energy efficiency of the component and of the system, and energy recovery potential in the water production, transfer, distribution, drainage and treatment. By exploiting these technologies, a significant potential for energy savings will be present, and the limit for the reduction in the energy use will be mainly determined by the economic viability of the projects. All of the economically available technologies in the water sector are exploited. Important examples of the opportunities to provide a reduction in energy use are present in the new technologies for water desalination plants, in the high efficiency of the pumps based on the new standards on product eco-design, and in the major opportunity to reduce water losses along the supply chain resulting from leaks, bursts and non-legal connections, which consequently would also save water and energy. Even wastewater contains significant amounts of embedded energy that, if harnessed, could cover more than half of the electricity needs of municipal wastewater utilities.
Hence, the use of new technological developments allows: • more efficient irrigation practices; • a reduction in the volumes of water volumes by leakage containment; • a more efficient use of energy in the water transmission; • a more sustainable use of water and energy in supply and sanitation; • a new market of green technologies for the water sector; • a new model for multiuse water management.
It is now widely recognised that the cost of water resources to end users has to be evaluated on the basis of a number of different contributions, starting from the cost of water and energy services, and including the water footprint. Using the new economic instruments which facilitate the calculation of the water tariff, incentives for allocating water to higher value uses in environmental, social or economic issues can be fixed by the local authorities. When these economic instruments are not sufficient to reach an environmental target, new regulatory measures can be taken at a local, nation or international level.
The impact of all these options should be evaluated considering the wider context of a future sustainable water distribution in the urban, industrial and irrigation sectors. The water sector itself could generate power by means of more careful management of the distribution chain and by the integration of electricity production into water pressure management. In the future, the problems connected with water scarcity will probably predominate in the energy auditing of the systems. Currently, energy recovery in the pressurized water distribution networks has the largest relevance, both in the urban and the irrigation water supply. In the former, the energy consumption is as large as 7% of the world's consumption of energy, with an energy footprint varying between 0.18 and 0.32 kWh/m 3 . Water irrigation networks are also very important for the improvement of energy efficiency in the water cycle, because of the large volumes of water necessary for agricultural practices. In fact, the worldwide water consumption is distributed as follows: 69.53% of water in irrigation, 18.70% in industry, and 11.77% in drinking water systems. The technologies used for increasing the efficiency and recovering energy in the irrigation sector are different from the technologies implemented in the urban sector. Most of the water conveyance systems for irrigation are open channels, and only in countries with a highly automated irrigation sector, such as Spain or Italy, are pressurized water conveyance systems commonly used [22][23][24]. The lack of pressurized systems in many countries reduces the options for reaction MHP, increasing the opportunities for action MHP. However, from this perspective, pressurized system will spread to many regions to combat the problems connected with water scarcity. Figure 3 shows the CO 2 emissions caused by the electrical consumption of the hydraulic infrastructures in the EU regions in the Atlantic area. The highest consumption takes place in wastewater networks. In general, Energies 2021, 14, 3525 6 of 18 the consumption (and emissions) ratio of irrigation is substantially lower than in other sectors. The highest emissions take place in wastewater networks (54%), because these systems have the greatest electrical consumption. In Figure 4, the highest potential for reduction is identified in the irrigation sector (−53.2%), and there is interesting potential in drinking water networks (19.3%) and in wastewater networks (2.3%). By country, the highest potential for reduction is identified in Spain (13%), with and the lowest potential being found in Ireland (3%) [25].

Water Sector Performance Indicators (PIs)
In Portugal, the water sector consists of various entities which play the roles of legislation, regulation, and management. The Portuguese Government is responsible for the legislation and regulation of the water sector, while the Portuguese Regulatory Entity for Water and Waste Services (Entidade Reguladora dos Serviços de Água e Resíduos-ERSAR) is only accountable for the sector's regulation. The sector's management, which can be direct, delegated or concession-based, is responsible for various entities that can be state-owned or municipal or inter-municipal ( Figure 5a) [26]. The distribution of management models in Portugal is presented in Table 2, according to the activity within the water sector-water supply, wastewater sanitation and urban waste management. There are a total of 432 entities in the water sector in Portugal ( Figure 5b). The information registered by ERSAR is organized, where each line contains the name of the entity, the performance indicators (PI), its value and units, the type of systems (bulk/retail) and the branch of activity of the entity, providing data related to approximately 200 performance indicators (PIs).
Energies 2021, 14,3525 The technologies used for increasing the efficiency and recovering energy in the ir sector are different from the technologies implemented in the urban sector. Mo water conveyance systems for irrigation are open channels, and only in countrie highly automated irrigation sector, such as Spain or Italy, are pressurized water ance systems commonly used [22][23][24]. The lack of pressurized systems in many c reduces the options for reaction MHP, increasing the opportunities for action MH ever, from this perspective, pressurized system will spread to many regions to com problems connected with water scarcity. Figure 3 shows the CO2 emissions cause electrical consumption of the hydraulic infrastructures in the EU regions in the area. The highest consumption takes place in wastewater networks. In general, sumption (and emissions) ratio of irrigation is substantially lower than in other The highest emissions take place in wastewater networks (54%), because these have the greatest electrical consumption. In Figure 4, the highest potential for re is identified in the irrigation sector (−53.2%), and there is interesting potential in d water networks (19.3%) and in wastewater networks (2.3%). By country, the hig tential for reduction is identified in Spain (13%), with and the lowest potential bein in Ireland (3%) [25].

Water Sector Performance Indicators (PIs)
In Portugal, the water sector consists of various entities which play the roles lation, regulation, and management. The Portuguese Government is responsible legislation and regulation of the water sector, while the Portuguese Regulatory En Water and Waste Services (Entidade Reguladora dos Serviços de Água e Resíduo SAR) is only accountable for the sector's regulation. The sector's management, wh be direct, delegated or concession-based, is responsible for various entities that state-owned or municipal or inter-municipal (Figure 5a) [26]. The distribution of m ment models in Portugal is presented in Table 2, according to the activity within th sector-water supply, wastewater sanitation and urban waste management. The total of 432 entities in the water sector in Portugal (Figure 5b). The information re by ERSAR is organized, where each line contains the name of the entity, the perfo indicators (PI), its value and units, the type of systems (bulk/retail) and the branc tivity of the entity, providing data related to approximately 200 performance in (PIs).  The analysed PIs were grouped according to the types of PI as stated by the Portuguese Water Distribution and Wastewater Sanitation Association APDA (Associação Portuguesa de Distribuição e Drenagem de Águas) [26]. Therefore, for this research, the analysed PIs were divided into three categories: (1) water volumes, (2) energy consumption and (3) economic and financial. A water supply system input volume ( Figure 6) consists of revenue and non-revenue water, wherein the first comprises revenue-authorized consumption, and the latter concerns non-revenue-authorized consumption and water losses, which can be apparent or real losses. Part of the system input volume is treated and exported from one entity to another. Domestic consumption exclusively concerns in-house consumption, with individual contracts, whilst non-domestic consumption includes commercial and industrial activities. The analysed PIs were grouped according to the types of PI as stated by the Portuguese Water Distribution and Wastewater Sanitation Association APDA (Associação Portuguesa de Distribuição e Drenagem de Águas) [26]. Therefore, for this research, the analysed PIs were divided into three categories: (1) water volumes, (2) energy consumption and (3) economic and financial. A water supply system input volume ( Figure 6) consists of revenue and non-revenue water, wherein the first comprises revenue-authorized consumption, and the latter concerns non-revenue-authorized consumption and water losses, which can be apparent or real losses. Part of the system input volume is treated and exported from one entity to another. Domestic consumption exclusively concerns in-house consumption, with individual contracts, whilst non-domestic consumption includes commercial and industrial activities. In accordance with the water-energy nexus, the analysis of the sources of the energy consumed by water systems takes into account the fact that part of this consumption comes from own energy production within the systems and that the other part comes from the external grid. Regarding this, as displayed in Figure 7, most of the consumed energy comes from the external grid, with own energy production contributing~30% in 2020. Usually, most of the energy consumption in water systems is due to water pumping. Accordingly, there was a decrease in energy consumption for water pumping, from 2015 to 2020, even though the total energy consumption increased. In accordance with the water-energy nexus, the analysis of the sources of the energy consumed by water systems takes into account the fact that part of this consumption comes from own energy production within the systems and that the other part comes from the external grid. Regarding this, as displayed in Figure 7, most of the consumed energy comes from the external grid, with own energy production contributing ~30% in 2020. Usually, most of the energy consumption in water systems is due to water pumping. Accordingly, there was a decrease in energy consumption for water pumping, from 2015 to 2020, even though the total energy consumption increased. Water supply is one of the basic needs for human life in society, and wastewater treatment is essential for the sustainability of the water sector. Hence, one of the United Nations Sustainable Development Goals for 2030 is to ensure the availability and sustainable management of drinkable water and sanitation for all [1,21]. Therefore, the priority of the water sector is not to be profitable, but to make clean water available for everyone. However, since water supply and wastewater treatment have associated costs, it is essential to ensure that the sector activities are gainful enough to cover these costs (Figure 8). The average charges associated with water supply services represent the majority of the water and sanitation sector, essentially because this sub-sector requires more energy, since  In accordance with the water-energy nexus, the analysis of the sources of th consumed by water systems takes into account the fact that part of this cons comes from own energy production within the systems and that the other part com the external grid. Regarding this, as displayed in Figure 7, most of the consumed comes from the external grid, with own energy production contributing ~30% Usually, most of the energy consumption in water systems is due to water pump cordingly, there was a decrease in energy consumption for water pumping, from 2020, even though the total energy consumption increased. Water supply is one of the basic needs for human life in society, and wa treatment is essential for the sustainability of the water sector. Hence, one of th Nations Sustainable Development Goals for 2030 is to ensure the availability and able management of drinkable water and sanitation for all [1,21]. Therefore, the of the water sector is not to be profitable, but to make clean water available for e However, since water supply and wastewater treatment have associated costs, it tial to ensure that the sector activities are gainful enough to cover these costs (F The average charges associated with water supply services represent the majori water and sanitation sector, essentially because this sub-sector requires more ener it involves more energy consumption and more expensive technology than the ot sectors. Water supply is one of the basic needs for human life in society, and wastewater treatment is essential for the sustainability of the water sector. Hence, one of the United Nations Sustainable Development Goals for 2030 is to ensure the availability and sustainable management of drinkable water and sanitation for all [1,21]. Therefore, the priority of the water sector is not to be profitable, but to make clean water available for everyone. However, since water supply and wastewater treatment have associated costs, it is essential to ensure that the sector activities are gainful enough to cover these costs (Figure 8). The average charges associated with water supply services represent the majority of the water and sanitation sector, essentially because this sub-sector requires more energy, since it involves more energy consumption and more expensive technology than the other sub-sectors. Accordingly, among the water supply entities that provided data, the tariffs presen an average value of EUR 0.45/m 3 . Regarding wastewater, the approved tariffs present a average value of EUR 0.55/m 3 .

Brief Background
Mozambique has a population of 30.3 million people, and 70% of this populatio lives on less than USD 1.90 per day. Despite having undertaken important efforts in elec trifying the whole country, the access to electricity is concentrated on urban areas. How ever, while 70% of Mozambique's population lives in rural areas, only 5.7% uses electricit for lighting [27]. Overall, 85% of the domestic energy requirements are supplied by for ests, while these percentage rise to 95% in rural areas. The geographical spread of th country and the low population density in rural areas make it impossible to achieve uni versal access through grid extension, emphasising the need for a strong off-grid sector.
In Mozambique, the water supply sector is divided into two levels, namely centra and local (Figure 9). The National Directorate of Water Supply and Sanitation (Direcçã Nacional de Abastecimento de Água e Saneamento, DNASS) performs on every level and is responsible for the strategic management of the water supply and sanitation sector i Mozambique, while, in turn, the Water Supply Investment and Trust Fund (Fundo d Investimento e Património de Abastecimento de Água, FIPAG), the private companies local governments and dispersed resources managed by the communities are responsibl for the water supply at the operational level. The Water Regulatory Board (Conselho d Regulação de Águas, CRA) is the entity responsible for the regulation of the sector.  Accordingly, among the water supply entities that provided data, the tariffs present an average value of EUR 0.45/m 3 . Regarding wastewater, the approved tariffs present an average value of EUR 0.55/m 3 .

Brief Background
Mozambique has a population of 30.3 million people, and 70% of this population lives on less than USD 1.90 per day. Despite having undertaken important efforts in electrifying the whole country, the access to electricity is concentrated on urban areas. However, while 70% of Mozambique's population lives in rural areas, only 5.7% uses electricity for lighting [27]. Overall, 85% of the domestic energy requirements are supplied by forests, while these percentage rise to 95% in rural areas. The geographical spread of the country and the low population density in rural areas make it impossible to achieve universal access through grid extension, emphasising the need for a strong off-grid sector.
In Mozambique, the water supply sector is divided into two levels, namely central and local (Figure 9). The National Directorate of Water Supply and Sanitation (Direcção Nacional de Abastecimento de Água e Saneamento, DNASS) performs on every level and is responsible for the strategic management of the water supply and sanitation sector in Mozambique, while, in turn, the Water Supply Investment and Trust Fund (Fundo de Investimento e Património de Abastecimento de Água, FIPAG), the private companies, local governments and dispersed resources managed by the communities are responsible for the water supply at the operational level. The Water Regulatory Board (Conselho de Regulação de Águas, CRA) is the entity responsible for the regulation of the sector. Accordingly, among the water supply entities that provided data, the tariffs present an average value of EUR 0.45/m 3 . Regarding wastewater, the approved tariffs present an average value of EUR 0.55/m 3 .

Brief Background
Mozambique has a population of 30.3 million people, and 70% of this population lives on less than USD 1.90 per day. Despite having undertaken important efforts in electrifying the whole country, the access to electricity is concentrated on urban areas. However, while 70% of Mozambique's population lives in rural areas, only 5.7% uses electricity for lighting [27]. Overall, 85% of the domestic energy requirements are supplied by forests, while these percentage rise to 95% in rural areas. The geographical spread of the country and the low population density in rural areas make it impossible to achieve universal access through grid extension, emphasising the need for a strong off-grid sector.
In Mozambique, the water supply sector is divided into two levels, namely central and local (Figure 9). The National Directorate of Water Supply and Sanitation (Direcção Nacional de Abastecimento de Água e Saneamento, DNASS) performs on every level and is responsible for the strategic management of the water supply and sanitation sector in Mozambique, while, in turn, the Water Supply Investment and Trust Fund (Fundo de Investimento e Património de Abastecimento de Água, FIPAG), the private companies, local governments and dispersed resources managed by the communities are responsible for the water supply at the operational level. The Water Regulatory Board (Conselho de Regulação de Águas, CRA) is the entity responsible for the regulation of the sector.  A case study is here analysed to assess the potential of energy recovery in a water supply system with excess pressure. In collaboration with FIPAG, the case study is located in the north of Mozambique, wherein the abstraction occurs in hilly areas and the distribution station is located at lower elevations.

Model Development
The Nampula water supply system provides water to the city of Nampula in northern Mozambique, with more than 610,000 inhabitants. The water is abstracted from a reservoir in Monapo Dam, located 10 km from Nampula City. The abstraction capacity is up to 20,000 m 3 /day and the water treatment plant (WTP) is located next to the abstraction, with a treatment capacity of 40,000 m 3 /day. The system consists of four distribution centres and six pumping stations working with twelve tanks, with a reserve capacity of 23,800 m 3 . This study will focus on the section between the pumping stations EB1 and EB2 ( Figure 10).   The objective of this study is to control the pressure in the system while reducing leakages and assess the potential for energy recovery. Thus, a model was built on EPANET 2.0 [28], according to the data provided by FIPAG. The hydraulic parameters and time option in EPANET were defined, considering a simulation with a total duration of 24:00 h and a time step of 1:00 h. The simulation was based on the demand pattern for an average day, allowing us to obtain the pressure variation throughout the system. The area of implantation of the system pipes to be studied can be seen in Figure 11a, where EB2 is the pumping station designed for water distribution consumption, while EB6 is a pumping station designed for irrigation purposes. The model was built while taking into account the fact that a PRV is installed upstream of EB6 (Figure 11b). A PAT will be installed in parallel with the existing PRV in order to use the surplus pressure to produce energy. The values throughout the entire system remain almost constant throughout the day, because the present water system is a bulk system, which means that the flow does not depend on consumption patterns (Figure 12a,b). Hence, this is an advantage for energy generation purposes, using the water system to generate energy for a long period.

Energy Recovery
According to the available head and flow in the system, the chosen turbomachine for this case was an Etanorm 80-250 Turbine with a diameter of 269 mm, coupled with an induction motor operating as a generator sized to support a power of 500 kW. To simulate the use of the selected PAT in EPANET, the PRV was replaced by a general-purpose valve (GPV), associated with the related characteristic curve, as provided by the turbine manufacturer. Based on that curve, characteristic curves for different rotation speeds of the PAT were defined using the theory of similarity [4,14].
The hydraulic and time options in EPANET were defined as shown in Figure 13a, The values throughout the entire system remain almost constant throughout the day, because the present water system is a bulk system, which means that the flow does not depend on consumption patterns (Figure 12a,b). Hence, this is an advantage for energy generation purposes, using the water system to generate energy for a long period. The values throughout the entire system remain almost constant throughout the d because the present water system is a bulk system, which means that the flow does n depend on consumption patterns (Figure 12a,b). Hence, this is an advantage for ener generation purposes, using the water system to generate energy for a long period.

Energy Recovery
According to the available head and flow in the system, the chosen turbomachine this case was an Etanorm 80-250 Turbine with a diameter of 269 mm, coupled with induction motor operating as a generator sized to support a power of 500 kW. To simul the use of the selected PAT in EPANET, the PRV was replaced by a general-purpose va (GPV), associated with the related characteristic curve, as provided by the turbine man facturer. Based on that curve, characteristic curves for different rotation speeds of the PA were defined using the theory of similarity [4,14].

Energy Recovery
According to the available head and flow in the system, the chosen turbomachine for this case was an Etanorm 80-250 Turbine with a diameter of 269 mm, coupled with an induction motor operating as a generator sized to support a power of 500 kW. To simulate the use of the selected PAT in EPANET, the PRV was replaced by a general-purpose valve (GPV), associated with the related characteristic curve, as provided by the turbine manufacturer. Based on that curve, characteristic curves for different rotation speeds of the PAT were defined using the theory of similarity [4,14].
The hydraulic and time options in EPANET were defined as shown in Figure 13a, considering a simulation with a total duration of 24:00 h and a time step of 1:00 h. The simulation was based on the demand pattern for an average day (Figure 13), allowing us to obtain the pressure variation throughout the system. The characteristic curve of the hydraulic installation (CCI) was obtained based on the results from EPANET, considering the head losses throughout the conveyance system (Figure 13b,c and Figure 14a). Based on the curve provided by the manufacturer, characteristic curves for different rotation speeds were defined using the theory of similarity.
hough to avoid instability problems, the operating point must match the point of the char acteristic curve with the maximum power [5,13,14]. To define the operating point, an eco nomic comparative analysis took place.

Economic Viability
The selected PAT characteristic curves were applied to the EPANET model, in orde to estimate the curve which leads to higher generation. Since the flow values are almos constant throughout the day, the considered turbine flow is assumed to be the minimum round value that is available for most of the day. The energy production is only possible for 20 h per day, since, during the remaining 4 h, the tanks are full, and there is no water flowing along the hydraulic system. Therefore hourly results were extracted from EPANET, and turbine flows, installed powers, efficien cies and produced energy depending on the rotational speed are displayed in Table 3. I can be seen that a rotational speed of 1120 rpm leads to higher energy production, thi being the chosen solution. The lower the rotational speed, the lower the unit head loss wil be and the higher the turbine flow, efficiency and produced energy ( Table 2).   The cost of the PAT can be assessed considering a cost curve which displays the cost of the PAT per kW [29]. According to this curve, the greater the value of produced energy, the lower the unit cost. For an installed power of 3.13 kW, the PAT will cost EUR 1300. The construction of the bypass and the interconnection to the national grid cost EUR 500 each.
For the economic analysis, a period of 40 years was considered, including the replacement of the PAT at the year 20. The maintenance costs are based on the investment costs and are 1% of the investment for the civil construction works and 2.5% of the cost of the hydromechanical equipment. The discount rates applied in the developed analysis were 6%, 8%, and 10%. Two scenarios are compared, varying the energy selling price, which are EUR 0.095/kWh in the first scenario and EUR 0.110/kWh in the second [27].
The main conclusions of the economic analysis are presented in Table 3. Both scenarios present positive NPVs and B/C ratios higher than 1 independently of the analysed discount rates. Nonetheless, for the first scenario, the payback period is 4 years and the internal rate of return (IRR) is 39.2%. For the second scenario, with the increase in the selling price, the economic attractiveness of the project also increases, with the IRR reaching 45.7% and the payback period reducing to 3 years. The interception of the CCI with the characteristic curves of the PATs corresponds to the operating point (Figure 14b). The system can work in different operating points, although to avoid instability problems, the operating point must match the point of the characteristic curve with the maximum power [5,13,14]. To define the operating point, an economic comparative analysis took place.

Economic Viability
The selected PAT characteristic curves were applied to the EPANET model, in order to estimate the curve which leads to higher generation. Since the flow values are almost constant throughout the day, the considered turbine flow is assumed to be the minimum round value that is available for most of the day. The energy production is only possible for 20 h per day, since, during the remaining 4 h, the tanks are full, and there is no water flowing along the hydraulic system. Therefore, hourly results were extracted from EPANET, and turbine flows, installed powers, efficiencies and produced energy depending on the rotational speed are displayed in Table 3. It can be seen that a rotational speed of 1120 rpm leads to higher energy production, this being the chosen solution. The lower the rotational speed, the lower the unit head loss will be and the higher the turbine flow, efficiency and produced energy ( Table 2). The cost of the PAT can be assessed considering a cost curve which displays the cost of the PAT per kW [29]. According to this curve, the greater the value of produced energy, the lower the unit cost. For an installed power of 3.13 kW, the PAT will cost EUR 1300. The construction of the bypass and the interconnection to the national grid cost EUR 500 each.
For the economic analysis, a period of 40 years was considered, including the replacement of the PAT at the year 20. The maintenance costs are based on the investment costs and are 1% of the investment for the civil construction works and 2.5% of the cost of the hydromechanical equipment. The discount rates applied in the developed analysis were 6%, 8%, and 10%. Two scenarios are compared, varying the energy selling price, which are EUR 0.095/kWh in the first scenario and EUR 0.110/kWh in the second [27].
The main conclusions of the economic analysis are presented in Table 3. Both scenarios present positive NPVs and B/C ratios higher than 1 independently of the analysed discount rates. Nonetheless, for the first scenario, the payback period is 4 years and the internal rate of return (IRR) is 39.2%. For the second scenario, with the increase in the selling price, the economic attractiveness of the project also increases, with the IRR reaching 45.7% and the payback period reducing to 3 years.
Overall, the results obtained are positive, highlighting that the project can be highly profitable regardless of the chosen scenario. Figure 15a,b present the flow and head values throughout the system after applying the PAT at 3:00 a.m. and 11:00 a.m., respectively, showing the almost non-variability of the flow throughout the day. Overall, the results obtained are positive, highlighting that the project can be highly profitable regardless of the chosen scenario. Figure 15a,b present the flow and head values throughout the system after applying the PAT at 3:00 a.m. and 11:00 a.m., respectively, showing the almost non-variability of the flow throughout the day. The total economic benefits associated with the reduction in CO2 emissions, as well as the estimation of the reduction in real losses [30][31][32], are presented in Table 4.

Conclusions
Water pipe systems can generate clean energy without environmental impacts, using the guaranteed continuous flow consumption or the water tank balance, potentially generating electricity 24 h per day throughout the year, without imposing constraints for the The total economic benefits associated with the reduction in CO 2 emissions, as well as the estimation of the reduction in real losses [30][31][32], are presented in Table 4.

Conclusions
Water pipe systems can generate clean energy without environmental impacts, using the guaranteed continuous flow consumption or the water tank balance, potentially generating electricity 24 h per day throughout the year, without imposing constraints for