Exergy Evaluation of a Water Distribution System

The water supply system is one of the most important elements in a city. Currently, many cities struggle with a water deficit problem. Water is a commonly available resource and constitutes the majority of land cover; however, its quality, in many cases, makes it impossible to use as drinking water. To treat and distribute water, it is necessary to supply a certain amount of energy to the system. An important goal of water utility operators is to assess the energy efficiency of the processes and components. Energy assessments are usually limited to the calculation of energy dissipation (sometimes called “energy loss”). From a physical point of view, the formulation of “energy loss” is incorrect; energy in water transport systems is not consumed but only transformed (dissipated) into other, less usable forms. In the water supply process, the quality of energy—exergy (ability to convert into another form)—is consumed; hence, a new evaluation approach is needed. The motivation for this study was the fact that there are no tools for exergy evaluation of water distribution systems. A model of the exergy balances for a water distribution system was proposed, which was tested for the selected case studies of a water supply system and a water treatment station. The tool developed allows us to identify the places with the highest exergy destructions. In the analysed case studies, the highest exergy destruction results from excess pressure (3939 kWh in a water supply system and 1082 kWh in a water treatment plant). The exergy analysis is more accurate for assessing the system compared to the commonly used energy-based methods. The result can be used for assessing and planning water supply system modernisation.


Introduction
For the process of abstraction, treatment, and distribution of water, some amount of energy should be delivered to initiate chemical and physical transformation. Numerous methods of assessing water supply systems have been presented in the literature. A review on energy-based methods of water supply system assessment has previously been published by Bylka and Mróz [1]. Energy assessment methods of water supply systems are usually based on physical and mathematical descriptions of energy transformation. Models of energy transformation in the water supply (known as energy balance) have been previously developed [2][3][4][5][6]. The main goal of performing energy balance assessments is to calculate the energy dissipation in each part of the water supply system. From a physical point of view, the phrase "energy loss" is incorrect. In a water transport system, energy is not consumed but only transformed (dissipated) into other, less usable forms [7][8][9][10]. The indicator that allows the assessment of the ability of energy to change is exergy. According to the definition, exergy is "the amount of work obtainable when some matter is brought to a state of thermodynamic equilibrium with the common components of its surrounding nature by means of reversible processes, involving interaction only with the above-mentioned components of nature" [11]. The exergy approach is well known in industrial and commercial energy system analyses [12]. Many exergy models have been developed to describe processes in which large B u is the rate of exergy change in an isolated system [W]. The exergy description for water streams was presented by Martínez-Gracia et al. [31]. The total specific exergy of a water stream depends on the temperature, pressure, chemical composition, concentration of dissolved substances, and the speed and height of the water stream in relation to the reference level. The total specific exergy of the water stream can be calculated as follows: The chemical exergy depends on the chemical composition of the substance. Because the chemical exergy change in a water distribution system is exceptionally low, it is possible to neglect this value in technical calculations. After the assumption that the water temperature does not change during the supply, thermal exergy changes can also be omitted. In pipes in water supply systems, the flow velocity is typically low. Hence, the kinetic exergy of the water flow can be neglected in technical analyses.
A developed exergy model of a water supply system should include analyses of mechanical and potential exergy transformation. The specific mechanical exergy can be calculated using Equation (4): where v H 2 O is the specific volume of water [m 3 /kg], p is the water pressure in pipes [Pa], and p 0 is the reference pressure [Pa].
The specific potential exergy of water can be calculated as follows: where z is the height [m] and z 0 is the reference height [m]. The rate of exergy can be calculated as follows: .
where . m H 2 O is the mass flux of water [kg/s].

Exergy Model of a Water Supply System
Water supply systems consist of water intake, treatment stations, and distribution systems. A water supply system scheme is presented in Figure 1.

Types of Elements Source of Exergy Destructions Pumps
Hydraulic friction Electrical energy transformation to the kinetic and potential energy of water  To develop an exergy balance for a water supply system, the hydraulic parameters of the network operation, including pressure in nodes and flow in pipes, are required. These values are obtained from mathematical models of the water supply system, which are based on the mass and energy conservation law. The water system is described by non-linear energy conservation equations (Bernoulli equations), linear mass conservation equations, and boundary conditions (pressure in water supply nodes-reservoir). Practically, systems of equations describing the flow and pressure in water supply networks are solved using computer programs. One of the best-known software packages for modelling water supply networks is Epanet, developed by the U.S. Environmental Protection Agency (US EPA) [32]. This model was adopted to develop exergy models of water supply systems. In the exergy models, six elements types are used, including the reservoir, pumps, pipes, nodes, valves, and tanks. Table 1 presents the sources of exergy destructions for each element in the water supply system. Table 1. Source of exergy destructions in a water distribution system.

Types of Elements Source of Exergy Destructions
Pumps Hydraulic friction Electrical energy transformation to the kinetic and potential energy of water

Pipes
Hydraulic friction External exergy destructions (caused by leakage)

Nodes
Maintaining pressure higher than required Valves Hydraulic friction Detailed exergy models for each element of the water supply system were developed using Equations (1)- (6). The exergy models are presented in Sections 3.1-3.7. In attachment 2, the list of used symbols is presented. The flow in a water distribution system is one-way and not circulated. Due to this fact, in this research the impact of the relation between the pressure inside a system and its environment was not taken into account [17,33].

Exergy Model for Reservoirs
A reservoir is constant, irresistible, and irrelevant to the outflow and headwater. Reservoirs are used to model water sources for water supply systems (e.g., streams, dams, or groundwater aquifers). From a mathematical point of view, reservoirs are used as boundary conditions. The exergy model for a reservoir ( Figure 2) can be calculated as follows: .

Exergy Model for Pumps
Exergy destructions in pumps result from the imperfections in the conversion of electricity into potential and kinetic energy of water.

Exergy Model for Pumps
Exergy destructions in pumps result from the imperfections in the conversion of electricity into potential and kinetic energy of water.
The exergy model for a pump ( Figure 3) can be calculated as follows:

Exergy Model for Pumps
Exergy destructions in pumps result from the imperfections in the conversion of electricity into potential and kinetic energy of water.
The exergy model for a pump ( Figure 3) can be calculated as follows:   The internal mechanical power required for the pump operation can be calculated as follows: The rate of exergy inflow to the control volume CV_PUMP can be calculated as follows: where p pump,out is the water pressure leaving the control volume CV_PUMP [Pa] and H pump,out is the elevation of pump outlet CV_PUMP [m]. The internal mechanical power required for the pump operation can be calculated as follows: where η is the pump efficiency (total). The rate of the internal exergy destruction in the pump can be calculated as follows:

Exergy Model for Pipes
In the pipes, exergy destructions are caused by friction head loss and by the water losses caused by pipe leaks. Most methods for modelling water supply networks assume the mass conservation law for pipes-the amount of water that flows into the pipe should be equal to the amount of water Energies 2020, 13, 6221 6 of 16 outflow from the pipe. Thus, it is not possible to include water losses in the exergy destruction model for pipes. Exergy destruction caused by leaks will be considered in the exergy model for nodes.
The exergy model for pipes ( Figure 4)

Exergy Model for Pipes
In the pipes, exergy destructions are caused by friction head loss and by the water losses caused by pipe leaks. Most methods for modelling water supply networks assume the mass conservation law for pipes-the amount of water that flows into the pipe should be equal to the amount of water outflow from the pipe. Thus, it is not possible to include water losses in the exergy destruction model for pipes. Exergy destruction caused by leaks will be considered in the exergy model for nodes.
The exergy model for pipes ( Figure 4) can be calculated as follows: where B , is the rate of exergy inflow to the control volume CV_P (in start node) [W], B , is the rate of exergy outflow from the control volume CV_P (in end node) [W], and δB is the rate of the internal exergy destruction in the pipes (caused by friction) [W]. The rate of exergy inflow to the control volume CV_P can be calculated as follows: where m , is the mass flux of water flowing in pipes [kg/s], p , is the pressure in start node [Pa], and H , is the elevation of start node [m]. The rate of exergy outflow from the control volume CV_P can be calculated as follows: where p , is the pressure in the end node [Pa] and H , is the elevation of the end node [m]. The rate of exergy outflow from the control volume CV_P can be calculated as follows: where p , p , is the head loss caused by friction in pipes [Pa]

Exergy Model for Nodes
In water distribution system models, it is assumed that water is delivered to the node. The useful exergy of water is delivered with the mass of water consumed by the end-user. To supply water to all users, an appropriate network pressure should be maintained, which depends on building height, installation, and the required pressure at the draw-down point. The optimal solution, from the point The rate of exergy inflow to the control volume CV_P can be calculated as follows: where . m H 2 O,p is the mass flux of water flowing in pipes [kg/s], p p,in is the pressure in start node [Pa], and H p,in is the elevation of start node [m].
The rate of exergy outflow from the control volume CV_P can be calculated as follows: .
where p p,out is the pressure in the end node [Pa] and H p,out is the elevation of the end node [m]. The rate of exergy outflow from the control volume CV_P can be calculated as follows: where (p p,out − p p,in ) is the head loss caused by friction in pipes [Pa].

Exergy Model for Nodes
In water distribution system models, it is assumed that water is delivered to the node. The useful exergy of water is delivered with the mass of water consumed by the end-user. To supply water to all users, an appropriate network pressure should be maintained, which depends on building height, installation, and the required pressure at the draw-down point. The optimal solution, from the point of view of network operation, would be to maintain a water pressure equal to the minimum pressure. Because of the terrain and network characteristics, this is not possible in most cases. To maintain adequate pressure at the most unfavourable points in the network, excess pressure will be experienced by other parts of the water distribution system. However, maintaining a higher than required pressure causes exergy destruction. Network leaks will also cause exergy destructions in nodes. The value of the losses depends on many parameters, including the network age, level of maintenance, materials used, and pressure, among other factors. In the exergy model, the simplifying assumptions are that water losses are determined by the percentage loss indicator and are assigned to the node. Water losses are calculated during a water loss Energies 2020, 13, 6221 7 of 16 audit, as a value of the percentage of losses. In the exergy model, it is assumed that water loss does not depend on pressure and does not change during the day.
An exergy model for nodes ( Figure 5) can be calculated as follows: of view of network operation, would be to maintain a water pressure equal to the minimum pressure. Because of the terrain and network characteristics, this is not possible in most cases. To maintain adequate pressure at the most unfavourable points in the network, excess pressure will be experienced by other parts of the water distribution system. However, maintaining a higher than required pressure causes exergy destruction. Network leaks will also cause exergy destructions in nodes. The value of the losses depends on many parameters, including the network age, level of maintenance, materials used, and pressure, among other factors. In the exergy model, the simplifying assumptions are that water losses are determined by the percentage loss indicator and are assigned to the node. Water losses are calculated during a water loss audit, as a value of the percentage of losses. In the exergy model, it is assumed that water loss does not depend on pressure and does not change during the day.
An exergy model for nodes ( Figure 5) can be calculated as follows:  The rate of exergy inflow to the control volume CV_J can be calculated as follows: where m , , is the mass flux of water inflowing to the node [kg/s], p is the pressure in the node [Pa], and H is the nodes' elevation [m]. The rate of usable exergy outflow from the control volume CV_J can be calculated as follows: where m , , is the mass flux of water outflowing to the node [kg/s]. The rate of usable exergy outflow from the control volume CV_J (delivered to the user) can be calculated as follows: where m , , is the mass flux of water delivery to the user [kg/s] and p is the required pressure in the node [Pa].
The rate of external exergy destructions, caused by loss of water mass because of leakage from the control volume CV_J can be calculated as follows: where m , , is the mass flux of water losses because of leakage [kg/s] The rate of internal exergy destructions caused by excess pressure in the node: The rate of exergy inflow to the control volume CV_J can be calculated as follows: where . m H 2 O,j,in is the mass flux of water inflowing to the node [kg/s], p j is the pressure in the node [Pa], and H j is the nodes' elevation [m].
The rate of usable exergy outflow from the control volume CV_J can be calculated as follows: .
where . m H 2 O,j,out is the mass flux of water outflowing to the node [kg/s]. The rate of usable exergy outflow from the control volume CV_J (delivered to the user) can be calculated as follows: where . m H 2 O,j,use is the mass flux of water delivery to the user [kg/s] and p wym is the required pressure in the node [Pa].
The rate of external exergy destructions, caused by loss of water mass because of leakage from the control volume CV_J can be calculated as follows: where . m H 2 O,j,loss is the mass flux of water losses because of leakage [kg/s] The rate of internal exergy destructions caused by excess pressure in the node:

Exergy Model for Valves
The source of exergy destruction in valves is minor head loss. Using valves, any type of device (with known hydraulic characteristics) can be represented.
The exergy model for valves ( Figure 6) can be calculated as follows: .
where m , , is the mass flux of water delivered to the user [kg/s].

Exergy Model for Valves
The source of exergy destruction in valves is minor head loss. Using valves, any type of device (with known hydraulic characteristics) can be represented.
The exergy model for valves ( Figure 6) can be calculated as follows:  The rate of exergy inflow to the control volume CV_V can be calculated as follows: where p , is the pressure of water outflow from the control volume CV_V [Pa] and H , is the outflow elevation CV_V [m]. Assuming that H , = H , , the rate of internal exergy destruction in the control volume CV_V can be calculated as follows: where , , is the minor head loss [Pa].

Exergy Model for Tanks
Tanks are used in water supply networks, to compensate for unequal water demand during the day. Tanks store water mass and exergy and there is no exergy destruction in water tanks. Tanks should be included in the exergy balance because some of the exergies can be "magazined" in tanks at the end of analysis simulation time.
The exergy model for tanks (Figure 7) can be calculated as follows: where B , is the rate of exergy inflow to the control volume CV_T [W], B , is the rate of exergy outflow from the control volume CV_T [W], ∆B represents the changes of exergy stored in control The rate of exergy inflow to the control volume CV_V can be calculated as follows: The rate of exergy outflow from the control volume CV_V can be calculated as follows: .
where p v,out is the pressure of water outflow from the control volume CV_V [Pa] and H v,out is the outflow elevation CV_V [m].
Assuming that H v,in = H v,out , the rate of internal exergy destruction in the control volume CV_V can be calculated as follows: δ where (p v,in − p v,out ) is the minor head loss [Pa].

Exergy Model for Tanks
Tanks are used in water supply networks, to compensate for unequal water demand during the day. Tanks store water mass and exergy and there is no exergy destruction in water tanks. Tanks should be included in the exergy balance because some of the exergies can be "magazined" in tanks at the end of analysis simulation time.
The exergy model for tanks (Figure 7) can be calculated as follows:  Assuming that δB = 0 (there is no water loss in the tanks), the rate of exergy inflow to the control volume CV_T can be calculated as follows: In the energy balance, ∆B can be: ∆B 0-water levels in the tank at the beginning and end of analysis are equal. ∆B 0-water level in the tank is higher at the end than at the start of analysis. ∆B 0-water level in the tank is lower at the end than at the start of analysis.

Exergy Model for Devices
In the water supply system (e.g., in treatment plants, intake), there are devices, such as aerators, filters, and nozzles, among others, in which physical exergy destructions are caused by the friction of the flow. Destruction of exergy can also result from other causes, such as diffusion, dissolution, and disposal of waste products (e.g., sludge), among others. The general exergy model for devices (Figure 8) can be calculated as follows: where ∑ B , is the sum of the exergy rates of water and reagents inflow to the control volume CV_U, B , is the sum of the exergy rates of water and reagents outflow from the control volume CV_U, ∑ δB , is the sum of the exergy destructions rates of water and reagents in the control volume CV_U, and ∑ B , is the sum of the exergy destructions rates of all waste products with positive useful exergy. Assuming that δ . B t = 0 (there is no water loss in the tanks), the rate of exergy inflow to the control volume CV_T can be calculated as follows: where .

m H 2 O,t,in is the mass flux of water inflowing to the tank [kg/s], p t is the water pressure in the tank [Pa], and H t is the water head in the tank [m].
The rate of exergy outflow from the control volume CV_P can be calculated as follows: where . m H 2 O,t,out is the mass flux of water outflowing from the tank [kg/s]. Changes in exergy stored in the control volume CV_T can be calculated as follows: In the energy balance, ∆ . B tank can be: ∆ . B t = 0-water levels in the tank at the beginning and end of analysis are equal.
∆ . B t > 0-water level in the tank is higher at the end than at the start of analysis.
∆ . B t < 0-water level in the tank is lower at the end than at the start of analysis.

Exergy Model for Devices
In the water supply system (e.g., in treatment plants, intake), there are devices, such as aerators, filters, and nozzles, among others, in which physical exergy destructions are caused by the friction of the flow. Destruction of exergy can also result from other causes, such as diffusion, dissolution, and disposal of waste products (e.g., sludge), among others. The general exergy model for devices (Figure 8) can be calculated as follows:

Case Studies
Two case studies are presented here: a water distribution network and a water treatment plant. Exergy balance was performed based on hydraulic modelling of each case using the Epanet software. For research purposes, computer tools for exergy calculations were developed in the QGIS environment using the Python language. The developed software allows the calculation of exergy models, visualisation of the results on a map, and creation of exergy balance reports (charts).

Water Distribution Network
For research, the example of an "artificial" water supply network was generated. The network was generated using the DynaVIBe-Web software [34][35][36]. This software allowed the generation of water supply system models automatically (e.g., for research purposes) based on a background map. The network consisted of 447 pipes (95 km) and 404 nodes. The roughness coefficients for pipes were 0.1-5 and the total water demand was 16,257 m 3 /day. The network scheme is presented in Figure 9.

Case Studies
Two case studies are presented here: a water distribution network and a water treatment plant. Exergy balance was performed based on hydraulic modelling of each case using the Epanet software. For research purposes, computer tools for exergy calculations were developed in the QGIS environment using the Python language. The developed software allows the calculation of exergy models, visualisation of the results on a map, and creation of exergy balance reports (charts).

Water Distribution Network
For research, the example of an "artificial" water supply network was generated. The network was generated using the DynaVIBe-Web software [34][35][36]. This software allowed the generation of water supply system models automatically (e.g., for research purposes) based on a background map. The network consisted of 447 pipes (95 km) and 404 nodes. The roughness coefficients for pipes were 0.1-5 and the total water demand was 16,257 m 3 /day. The network scheme is presented in Figure 9.

Case Studies
Two case studies are presented here: a water distribution network and a water treatment plant. Exergy balance was performed based on hydraulic modelling of each case using the Epanet software. For research purposes, computer tools for exergy calculations were developed in the QGIS environment using the Python language. The developed software allows the calculation of exergy models, visualisation of the results on a map, and creation of exergy balance reports (charts).

Water Distribution Network
For research, the example of an "artificial" water supply network was generated. The network was generated using the DynaVIBe-Web software [34][35][36]. This software allowed the generation of water supply system models automatically (e.g., for research purposes) based on a background map. The network consisted of 447 pipes (95 km) and 404 nodes. The roughness coefficients for pipes were 0.1-5 and the total water demand was 16,257 m 3 /day. The network scheme is presented in Figure 9.  The changes in water demand during the day (pattern) were assumed as typical for settlements with residential functions. It was assumed that the required pressure in all nodes was 20 mH 2 O (2 bar) and the water loss was 15%. The analyses were conducted for 1 d, with 1-h time steps (24 time steps in total).
The results of the calculation can be presented on maps, which show the location of places where the exergy destructions occur (Attachment 1). Figure S1 (Attachment 1) presents units of exergy destructions (W/m 3 ) in pipes, Figures S2 and S3 (Attachment 1) present visualisation of exergy destruction for nodes. For the complex evaluation of the overall system, exergy balance was developed based on Equation (32): where: . The graphical representation of the exergy balance is shown in Figure 10. The changes in water demand during the day (pattern) were assumed as typical for settlements with residential functions. It was assumed that the required pressure in all nodes was 20 mH2O (2 bar) and the water loss was 15%. The analyses were conducted for 1 d, with 1-h time steps (24 time steps in total).
The results of the calculation can be presented on maps, which show the location of places where the exergy destructions occur (Attachment 1). Figure S1 (Attachment 1) presents units of exergy destructions (W/m 3 ) in pipes, Figure S2 and S3 (Attachment 1) present visualisation of exergy destruction for nodes. For the complex evaluation of the overall system, exergy balance was developed based on Equation (32): In the analysed case, ∑ B , 6534 kWh , ∑ B 991 kWh , ∑ δB 3939 kWh , ∑ δB 870 kWh , and ∑ δB 732 kWh . The graphical representation of the exergy balance is shown in Figure 10. As analysed, the largest exergy destruction resulted from maintaining higher than the required pressure in the water-supply network. Exergy destruction in pipes has also significant impact on the exergy balance. Figure 11 shows the distribution of exergy losses caused by keeping the pressure in nodes higher than required. Figure 12 presents the distribution of exergy loss in pipes (due the friction). As analysed, the largest exergy destruction resulted from maintaining higher than the required pressure in the water-supply network. Exergy destruction in pipes has also significant impact on the exergy balance. Figure 11 shows the distribution of exergy losses caused by keeping the pressure in nodes higher than required. Figure 12 presents the distribution of exergy loss in pipes (due the friction).

Water Treatment Plant
In the second case, the exergy balance for a water treatment plant was conducted, consisting of a water intake area, treatment station, and pumping station. Water intake consisted of two wells. Water from the wells was transported by pipe systems to a water treatment station, where it was aerated (in a closed aerator), and then pumped through filters to the clean water tank. From the clean water tank, it was pumped to the water distribution system by a second stage pumping station. Figure 13 shows a diagram of the analysed water treatment plant.

Water Treatment Plant
In the second case, the exergy balance for a water treatment plant was conducted, consisting of a water intake area, treatment station, and pumping station. Water intake consisted of two wells. Water from the wells was transported by pipe systems to a water treatment station, where it was aerated (in a closed aerator), and then pumped through filters to the clean water tank. From the clean water tank, it was pumped to the water distribution system by a second stage pumping station. Figure 13 shows a diagram of the analysed water treatment plant. The results of the calculations were the exergy models for each element of the water treatment station. Figure S4   The results of the calculations were the exergy models for each element of the water treatment station. Figure S4 (attachment 1) presents units of exergy destructions (W/m 3 ) in the water treatment plant. For the complex evaluation of the overall system, exergy balance was developed based on Equation (33):  Figure 14. The analysis shows that the biggest exergy destruction resulted from maintaining a higher than required pressure at the station outlet. Figure 15 presents the rate of exergy destruction during simulation time.

Discussion
In this study, the exergy models for each part of a system were developed, which allowed the calculation of exergy models and results presentation on maps (Attachment 1). Using the developed tools, the exergy destruction calculations were conducted for sample elements of a water-supply   The analysis shows that the biggest exergy destruction resulted from maintaining a higher than required pressure at the station outlet. Figure 15 presents the rate of exergy destruction during simulation time. The analysis shows that the biggest exergy destruction resulted from maintaining a higher than required pressure at the station outlet. Figure 15 presents the rate of exergy destruction during simulation time.

Discussion
In this study, the exergy models for each part of a system were developed, which allowed the calculation of exergy models and results presentation on maps (Attachment 1). Using the developed tools, the exergy destruction calculations were conducted for sample elements of a water-supply system. Unit indicators of exergy destructions and exergy balance were developed, which could be  SIMULATION TIME Figure 15. The rate of exergy destruction during simulation time.

Discussion
In this study, the exergy models for each part of a system were developed, which allowed the calculation of exergy models and results presentation on maps (Attachment 1). Using the developed tools, the exergy destruction calculations were conducted for sample elements of a water-supply system. Unit indicators of exergy destructions and exergy balance were developed, which could be used to evaluate the system. The visualisation allowed the detection of weak points in the system and the exploration of opportunities to increase the efficiency of energy transformation.
Exergy models are particularly important for mapping opportunities to increase the energy efficiency of the entire system. Graphical analysis (Attachment 1) makes it possible to check which elements have the highest exergy destructions. In the first case (water-supply system) the highest exergy destructions were caused by keeping the pressure in the node higher than required. Detailed analysis shown that a small number of node and pipes are responsible for a significant part of the exergy destruction (Figures 11 and 12). The developed tool made it possible to easily select these nodes and pipes. In the first case study energy efficiency can be increased in two ways: by minimising pressure in the pumping station or by increasing the recovery of energy in the system (in the turbines). Energy recovery from the water-supply system is possible primarily through the use of turbines with pressure recovery in places where the pressure in the network is higher than required. The maps allow determination of locations where the highest exergy destructions occur, which is correspondingly the place in which the greatest potential gains from modernisation can be obtained.
In the second case, the highest exergy destruction results from destructions in pump motors and from excess pressure in the pumping station. It is necessary to analyse the results if the pump is changed to a more effective one. The analysis of the graph (Figure 15) showed that the pressure is maintained higher than required throughout the simulation period. To improve the energy efficiency of this system, the control algorithms of the pump should be change. The pressure should be reduce when it is higher than required (eg. by installing a frequency converter). Data analysis ( Figure 14) showed that exergy losses in filters and wells are small and do not have a large impact on the total exergy balance. The most important criteria in modernization of these elements should be primarily technological (maintaining adequate water quality). Exergy destruction in this analized case is not an important criterion for wells and filters.

Conclusions
This study presents exergy models for a water-supply system, which are based on the first and second law of thermodynamics. The research shows that: • Exergy analysis is an effective method of assessing the water supply system. It enables both quantitative and qualitative assessment of energy transformations, • Analyse of exergy balance allow the determination of the most exergy-consuming elements in the system and assess the possibility of reducing exergy destruction during modernisation, • The developed tools can be used to support decision making in the design, operation, and maintenance of water-supply systems,

•
Using developed open source tool, it is possible to automatically perform an exergy analysis of the system. This approach can be helpful in maintenance processes to determine system insufficiencies.
Future work will be directed toward the development of exergy models for chemical and thermal energy changes in water-supply systems. The development of chemical exergy transformation models will allow for a better understanding of water treatment processes and water-quality changes in supply networks. A model of thermal exergy transformation can be useful to assess the potential of the water-supply system as the lower heat source for heat pumps. The exergy assessment is one of the important aspects of the overall assessment of the water-supply system. As discussed, it allows the identification of the weakest points in the system. Final investment decisions must take into account the financial aspect of the organisation as well as the safety and reliability of the system operation. In future works, we plan to develop the proposed methodology with a multi-criteria and exergo-economic analysis.