Optimal Energy Recovery from Water Distribution Systems Using Smart Operation Scheduling

Micro hydropower generators (micro turbines), are used to recover excess energy from hydraulic systems and these applications have important potential in renewable energy production. One of the most viable environments for the use of micro turbines is the water distribution network where, by design, there is always excess energy since minimum pressures are to be maintained throughout the system, and the system is designed to meet future water supply needs of a planning period. Under these circumstances, maintaining the target pressures is not an easy task due to the increasing complexity of the water distribution network to supply future demands. As a result, pressures at several locations of the network tend to be higher than the required minimum pressures. In this paper, we outline a methodology to recover this excess energy using smart operation management and the best placement of micro turbines in the system. In this approach, the best micro turbine locations and their operation schedule is determined to recover as much available excess energy as possible from the water distribution network while satisfying the current demand for water supply and pressure. Genetic algorithms (GAs) are used to obtain optimal solutions and a “smart seeding” approach is developed to improve the performance of the GA. The Dover Township pump-driven water distribution system in New Jersey, United States of America (USA) was selected as the study area to test the proposed methodology. This pump-driven network was also converted into a hypothetical gravity-driven network to observe the differences between the energy recovery potential of the pump-driven and gravity-driven systems. The performance of the energy recovery system was evaluated by calculating the equivalent number of average American homes that can be fed by the energy produced and the resulting carbon-dioxide emission reductions that may be achieved. The results show that this approach is an effective tool for applications in renewable energy production in water distribution systems for small towns such as Dover Township. It is expected that, for larger water distribution systems with high energy usage, the energy recovery potential will be much higher.


Introduction
Commonly recognized renewable energy sources are the natural resources such as solar heat, wind, rain, and tides.However, anthropogenic activity can also be a viable source of renewable energy.In this category, water distribution networks can be a good example of such an energy source.The water distribution networks are designed to satisfy the consumer demands at the outlet junctions of the pipe network.To achieve this goal, adequate pressures need to be maintained throughout the network.While the pressures lower than a minimum may cause sanitary problems such as leakage into pipes, the low-pressure conditions is also not desirable for emergency needs such as Water 2018, 10, 1464 3 of 18

Hydrodynamic Simulation of Water Distribution System
EPANET 2.0 was used for the unsteady hydrodynamic analysis of the water distribution network.EPANET is a simulation tool for extended-period modeling of hydraulic and water quality behavior of pressurized pipe networks [17].Elements of the network defined in EPANET are pipes, junctions, pumps, valves, and storage tanks or reservoirs.EPANET estimates the flow of water in each pipe, the pressure at each junction, and the height of water in each tank throughout the network at each time step during a simulation period.EPANET's capability of considering time-dependent demand categories at junctions makes it a strong tool for the simulation of unsteady hydraulic behavior in water distribution systems.Although EPANET does not have a predefined turbine object as a network element, turbines can be simulated using a general-purpose valve (GPV) defined in EPANET.
To simulate a micro turbine as a GPV, the user needs to supply a special flow-head loss relationship for the object.

Optimization Model
The first step of the design was deciding candidate location(s) and types of micro turbines that would be utilized in the energy recovery system.The unsteady nature of the flow in the water distribution system dictates an operation schedule for each micro turbine that will be installed.A proper energy recovery system design is possible with an operation schedule which enables the turbine to generate as much energy as possible without violating the pressure constraints.For this purpose, the micro turbine/bypass valve combination shown in Figure 1 is proposed.In this system, the degree of operation of the micro turbine can be adjusted by changing the degree of opening of the bypass valve.A completely closed bypass valve would force all the flow to pass through the turbine, while a completely open bypass valve would let all the flow pass through the bypass pipe.Therefore, the operational schedule of a turbine can be determined by the degree of opening of the bypass valve.In this system, the generation of pressure waves is not an issue as long as the sudden movement of the bypass valve is avoided.Therefore, in this study, the pressure surge generation due to the operation of the bypass valve was neglected.
Water 2018, 10, x FOR PEER REVIEW 3 of 19

Hydrodynamic Simulation of Water Distribution System
EPANET 2.0 was used for the unsteady hydrodynamic analysis of the water distribution network.EPANET is a simulation tool for extended-period modeling of hydraulic and water quality behavior of pressurized pipe networks [17].Elements of the network defined in EPANET are pipes, junctions, pumps, valves, and storage tanks or reservoirs.EPANET estimates the flow of water in each pipe, the pressure at each junction, and the height of water in each tank throughout the network at each time step during a simulation period.EPANET's capability of considering time-dependent demand categories at junctions makes it a strong tool for the simulation of unsteady hydraulic behavior in water distribution systems.Although EPANET does not have a predefined turbine object as a network element, turbines can be simulated using a general-purpose valve (GPV) defined in EPANET.To simulate a micro turbine as a GPV, the user needs to supply a special flow-head loss relationship for the object.

Optimization Model
The first step of the design was deciding candidate location(s) and types of micro turbines that would be utilized in the energy recovery system.The unsteady nature of the flow in the water distribution system dictates an operation schedule for each micro turbine that will be installed.A proper energy recovery system design is possible with an operation schedule which enables the turbine to generate as much energy as possible without violating the pressure constraints.For this purpose, the micro turbine/bypass valve combination shown in Figure 1 is proposed.In this system, the degree of operation of the micro turbine can be adjusted by changing the degree of opening of the bypass valve.A completely closed bypass valve would force all the flow to pass through the turbine, while a completely open bypass valve would let all the flow pass through the bypass pipe.Therefore, the operational schedule of a turbine can be determined by the degree of opening of the bypass valve.In this system, the generation of pressure waves is not an issue as long as the sudden movement of the bypass valve is avoided.Therefore, in this study, the pressure surge generation due to the operation of the bypass valve was neglected., where i ω stands for the operational schedule of the bypass valve of the micro turbine located at the th i candidate location; therefore, i ω is a vector of a variable k δ , which takes a real value between 0 and 1 representing the If the energy recovery system has N micro turbines located at N candidate locations, then we can represent the micro turbines with different characteristic head functions as a vector Ψ = [ψ 1 , ψ 2 , . . . ,ψ N ] T , where ψ i represents a candidate micro turbine proposed to be installed at the ith candidate location.A vector Λ = [λ 1 , λ 2 , . . . ,λ N ] can also be defined to represent the pipes where micro turbines Ψ are proposed to be installed.The operation schedule of each of these micro turbines can be represented by another vector Ω = [ω 1 , ω 2 , . . . ,ω N ] T , where ω i stands for the operational schedule of the bypass valve of the micro turbine located at the ith candidate location; therefore, ω i is a vector of a variable δ k , which takes a real value between 0 and 1 representing the degree of opening of the bypass valve of the micro turbine, i.e., ω i = δ 1 , δ 2 , . . ., δ N ST T , where N ST is the number of time steps in the analysis period and k = {1, 2, 3, . . . ,N ST }.For a given set of operation schedules of bypass valves of the candidate micro turbines, the system may not satisfy the pressure constraint.In order to describe this mathematically, let P k = p 1,k , p 2,k , . . ., p N J ,k denote the vector of pressures, p j,k , at the jth junction of the water distribution network at the kth time step of the analysis period, where N J is the total number of junctions in the network.Then, one can determine the first pressure constraint failure time, t f (Ψ, Ω), such that min(P k ) < P min , where P min is the minimum pressure limit set by the management for safe operation of the system.According to this definition, when t f (Ψ, Ω) is equal to the analysis period with no reported failures, one can say that, for the given configuration of micro turbines (Ψ) and respective operation schedules (Ω), pressure constraint is satisfied at all locations, at all times.At this point, we can define a dimensionless failure time T(Ψ, Ω) as the ratio of the pressure constraint violation time t f (Ψ, Ω) to the total time of the analysis period T A , as in Equation ( 1).It can be seen that T(Ψ, Ω) can have values between 0 and 1.While T(Ψ, Ω) = 0 indicates that the pressure constraint is violated at the very beginning of the analysis, T(Ψ, Ω) = 1 implies that the pressure constraint is satisfied throughout the analysis period.
The energy produced by the energy recovery system until the first pressure constraint failure time can be denoted by the scalar E(Ψ, Ω).One can also calculate the total energy of the flow passing through the pipes Λ = [λ 1 , λ 2 , . . . ,λ N ] without micro turbines installed, as described in Equation ( 2).
where γ is the specific weight of water, ∆t is the time step, and Q(λ i , k) and H(λ i , k) are the flow rate and the average total head in the pipe λ i at the kth time step of the analysis, respectively.A non-dimensional energy measure E(Ψ, Ω) can be defined as the ratio of the energy produced E(Ψ, Ω) obtained from the flow and head in the turbine to the total energy of the flow E M as described in Equation (3).
The energy recovery system is defined as achieving as high an energy production by the micro turbines as possible without violating the pressure constraint.The design of this system can be formulated as an optimization problem that can be mathematically expressed as where Ψ o is a vector of the predefined micro turbines used in the analysis.Since any decision on the micro turbine operation at a given time step k affects the satisfaction of the constraints in future time steps, this is a very complex and nonlinear optimization problem.In this study, a genetic algorithm which imitates the evolutionary natural selection was utilized to find the best operation schedules (Ω) for the candidate micro turbines.In this case, a configuration of operation schedules of the micro turbines in the system is represented by an individual, and a population of a set of individuals needs to be simulated.Each individual in a set has an objective function fitness value represented by the total energy obtained from the energy recovery system configuration.In a genetic algorithm, a common way of dealing with candidate solutions that violate the constraints is to generate potential solutions without considering the constraints and then penalizing them by decreasing the goodness-of-fitness function.In this respect, the fitness function of the genetic algorithm f GA is determined as in Equation (5).
where A is a large penalty coefficient, which was selected as 1000 in this study.According to Equation (4), the fitness value of an individual which violates the pressure constraint (i.e., T(Ψ, Ω) < 1) will have a lower fitness value compared to an individual which satisfies the pressure constraint at all times (i.e., T(Ψ, Ω) = 1).The GAs will improve the initial population by reproducing new generations applying natural selection and population genetics, such as selection, crossover, and mutation.In every generation, individuals are rated according to their fitness values obtained from the simulations.The optimal configuration which has the highest energy production is reached in a finite number of generations.

Smart Seeding of the Genetic Algorithm
Genetic algorithms (GAs) are based on stochastic processes, and every step in a GA has random characteristics.Although this property helps GA get out of local optima in certain cases, it also creates individual members of a population with irregular chromosomes, which makes it difficult for the GA algorithm to reach a global optimal solution for some cases.Several researchers suggested that the solution to this problem lies at the initial population of the GA [18][19][20][21][22].They suggested that good feasible solution(s) can be seeded in the initial population of the elitist GA, where a number of individuals which have the highest fitness value are always selected for the next generation.In this way, the GA is initially supported by the information of a strong individual, and it is forced to find fitter individuals.This process helps us gain a significant amount of computation time, and it considerably improves the final best solution found by the GA using a reasonable population size.
The most important step of this seeding process is to find a good feasible solution to the problem.Thus, the individual operational schedule of the bypass valve of the micro turbine of this seeding process needs to satisfy pressure constraints all the time.In that sense, the schedule which has a completely open bypass valve throughout the simulation is a feasible solution for this problem since the micro turbine does not affect the system.However, this solution is not a good feasible solution for the seeding purpose, because the fitness value, which is the energy generated by the micro turbine, is zero for this individual.Therefore, the seeding individual should have a fitness value as high as we can possibly find using a deterministic approach.Because the high energy generation increases the quality of our seed, we prefer a longer micro turbine operation.At the same time, we must satisfy pressure constraints to save the feasibility of the seed.Therefore, we must open the bypass valve whenever it is necessary.Sometimes we can eliminate a pressure violation in the system by simply opening the bypass valve at the pressure violation time.However, this is not always the case since the system may require a longer period of bypass valve opening to satisfy the pressure constraints.Thus, an iterative procedure is proposed to find a good individual to seed the GA, as described by the flowchart in Figure 2.
This procedure is based on delaying the first pressure violation time by opening the bypass valve at or before that time.The final output of this seed generation algorithm is an operation schedule where the bypass valve is either completely open or completely closed.Then, this individual operation schedule is seeded into the initial population of the GA; it is further improved, enabling us to reach the best solution that can be obtained with a reasonable amount of computational expense.Using this procedure, the applications developed in this study were solved in 6-8 h on an Intel Core I7 workstation.
bypass valve whenever it is necessary.Sometimes we can eliminate a pressure violation in the system by simply opening the bypass valve at the pressure violation time.However, this is not always the case since the system may require a longer period of bypass valve opening to satisfy the pressure constraints.Thus, an iterative procedure is proposed to find a good individual to seed the GA, as described by the flowchart in Figure 2.This procedure is based on delaying the first pressure violation time by opening the bypass valve at or before that time.The final output of this seed generation algorithm is an operation schedule where the bypass valve is either completely open or completely closed.Then, this individual operation schedule is seeded into the initial population of the GA; it is further improved, enabling us to reach the best solution that can be obtained with a reasonable amount of computational expense.Using this procedure, the applications developed in this study were solved in 6-8 h on an Intel Core I7 workstation.

Applications
The proposed methodology was tested for several candidate micro turbines that might be installed in Dover Township water distribution system, which is a pump-driven network.Once the performance of the optimized energy recovery system was obtained for the original water distribution system, it was converted into a hypothetical gravity-driven system which satisfied the constraints of the network, and the same analysis was performed for comparison purposes.The sections below provide the analysis outcomes for these two cases.

Study Area
In this study, the proposed methodology was applied to the water distribution system serving the Dover Township area in New Jersey (Figure 3), which can represent a typical small town in the United states of America (USA).This water distribution system was selected to test the proposed approach since it is extensively studied and well documented [23][24][25][26].This water supply network is composed of 16,048 pipes connecting 14,945 junctions.Twenty underground wells located at eight inlet points serve as the main water supply of the system (Figure 3).Therefore, the energy required for the flow in the system is provided by the pumps located at these wells, and the authors had access to this schedule, which was a predetermined schedule for the Dover Township to satisfy the network constraints.
United states of America (USA).This water distribution system was selected to test the proposed approach since it is extensively studied and well documented [23][24][25][26].This water supply network is composed of 16,048 pipes connecting 14,945 junctions.Twenty underground wells located at eight inlet points serve as the main water supply of the system (Figure 3).Therefore, the energy required for the flow in the system is provided by the pumps located at these wells, and the authors had access to this schedule, which was a predetermined schedule for the Dover Township to satisfy the network constraints.Previous studies reported the average daily demand pattern for each month of the year and, in this study, we used these demand patterns consecutively to represent the yearly demand pattern, as shown in Figure 4. Since, one month is represented by a 24-h time period, the simulation time required to represent one year is 288 h.Similarly, the operational schedule to be determined for a micro turbine is composed of 288 h (i.e., N ST = 288).Every junction in the water distribution system has a different base demand, which will yield a different time series of demand flow rate when multiplied with the demand pattern in Figure 4. Previous studies reported the average daily demand pattern for each month of the year and, in this study, we used these demand patterns consecutively to represent the yearly demand pattern, as shown in Figure 4. Since, one month is represented by a 24-h time period, the simulation time required to represent one year is 288 h.Similarly, the operational schedule to be determined for a micro turbine is composed of 288 h (i.e.,

ST N =
).Every junction in the water distribution system has a different base demand, which will yield a different time series of demand flow rate when multiplied with the demand pattern in Figure 4. Since the main goal of this study was to harvest the available excess energy in the system, it was important to assess the excess energy potential of the water distribution network.If the excess energy at a junction is defined as the energy due to the pressure above a minimum limit, min P , then one can make a rough estimate of total excess energy dissipated at a demand junction i using Equation (6). where are the demand and pressure head above min / P γ at junction i at the th k time step, respectively.The total excess energy dissipated in the system can be calculated as Since the main goal of this study was to harvest the available excess energy in the system, it was important to assess the excess energy potential of the water distribution network.If the excess energy at a junction is defined as the energy due to the pressure above a minimum limit, P min , then one can make a rough estimate of total excess energy dissipated at a demand junction i using Equation (6).
Water 2018, 10, 1464 8 of 18 where q i,k and ∆h i,k are the demand and pressure head above P min /γ at junction i at the kth time step, respectively.The total excess energy dissipated in the system can be calculated as TEE = where N N is the number of junctions.The total excess energy dissipated in the Dover Township water distribution system was estimated as 1.4 GWh/y.We could also calculate excess energy input to the system at the eight inlet junctions utilizing Equation ( 6) with the discharge passing through the inlet pipe and average pressure head above P min /γ along the inlet pipe for q i,k and ∆h i,k , respectively.The total excess energy input at the inlet pipes of the Dover Township water distribution system was estimated to be 1.6 GWh/y.Figure 5 shows the distribution of this energy at every inlet pipe.In this figure, percentages indicate the excess energy contribution of the corresponding inlet location divided by the total excess energy input to the system.The numbers below the percentages indicate the value of annual excess energy input in GWh/y at the corresponding inlet location by setting the pressure limit as P min = 20 psi.This figure indicates that the two locations of highest excess energy supply are locations 3 and 4, and these two inlet points were investigated in this study as candidate micro turbine locations.The locations other than these inlet points in Figure 5 do not provide better energy recovery sites.The reason behind this is the fact that the micro turbine introduces a significant head loss at the pipe where it is installed, behaving as an obstacle to the flow, and the flow prefers other routes with lower head losses in the network to reach its destination, distributing itself such that the flow at the micro turbine is very low.This results in a very low energy generation at the micro turbine since the energy produced at the micro turbine is an increasing function of flow rate.At the inlet locations, however, since the flow does not have alternative routes, the flow through the micro turbine does not decrease as much as an ordinary location in the network resulting in a higher energy recovery.
Water 2018, 10, x FOR PEER REVIEW 9 of 19 alternative routes, the flow through the micro turbine does not decrease as much as an ordinary location in the network resulting in a higher energy recovery.In this study, the two micro turbines used, which are pumps used as turbines (PATs), are listed in Table 1 [3].In this table, tb Q , tb H , tb η , and tb P stand for the flow rate, turbine head, efficiency, and power generated at the best efficiency point in turbine mode, respectively, and those without the subscript b are variable points of the same parameters.Derakhshan and Nourbakhsh [27] developed Equation ( 7) for turbine head and Equation ( 8) for turbine power estimations.According to these equations, although NC 100-200 produces higher power for a given flow rate, it causes a higher head loss in the flow than NC 150-200.This can be interpreted as a higher possibility of pressure violation.The head curves described by Equation (7) were used in the hydrodynamic simulation as inputs to EPANET, providing head loss vs. flow rate information for the general-purpose valve representing the micro turbine, using several points on these curves.The power curves in Equation ( 8) were used to calculate the energy produced by the micro turbine at a given time step.In this study, the two micro turbines used, which are pumps used as turbines (PATs), are listed in Table 1 [3].In this table, Q tb , H tb , η tb , and P tb stand for the flow rate, turbine head, efficiency, and power generated at the best efficiency point in turbine mode, respectively, and those without the subscript b are variable points of the same parameters.Derakhshan and Nourbakhsh [27] developed Equation (7) for turbine head and Equation (8) for turbine power estimations.According to these equations, although NC 100-200 produces higher power for a given flow rate, it causes a higher head loss in the flow than NC 150-200.This can be interpreted as a higher possibility of pressure violation.The head curves described by Equation (7) were used in the hydrodynamic simulation as inputs to EPANET, providing head loss vs. flow rate information for the general-purpose valve representing the micro turbine, using several points on these curves.The power curves in Equation ( 8) were used to calculate the energy produced by the micro turbine at a given time step.

Gravity-Driven Water Distribution System
In its original form, the Dover Township water distribution system is a pump-driven network, where the water is supplied by 20 pumps located at eight pumping stations (Figure 5).For comparison purposes, a hypothetical gravity-driven network was modeled by removing all the pumping stations in Dover Township water distribution system and connecting three constant-head reservoirs at locations 3, 4, and 7 with total heads of 320.4 ft, 320.4 ft, and 306 ft, respectively, corresponding pump energy level cases.These heads were selected such that the demand flows were satisfied without pressure head violation prior to turbine installation.Thus, the flows in the gravity-driven system were similar to those of the original pumped network.Because the flow was supplied by three inlets in the gravity-driven system, as opposed to the eight supply locations in the pumped network, the pressure heads were generally higher in the gravity-driven system when compared to the pumped network.The same optimization algorithm was applied to the hypothetical gravity-driven water distribution system, and the results are reported after the results of the original pump-driven network in the sections below.

Results
In this section, the results of a preliminary analysis performed to decide the population size of the GA are presented, and the effect of the smart seeding process on the final optimal result of the GA is demonstrated.Then, the optimization algorithm was applied to several energy recovery system configurations in the pump-driven network, and the energy budget of each is discussed and their economic and environmental impacts are reported.Next, the same analysis was performed for the gravity-driven network.

Smart Seed versus Non-Seeded GA Solutions and the Population Size
To understand the decision process for the population size of the GA, we need to recall that the decision variable of our optimization algorithm is the hourly operation schedule of the micro turbine/valve combination.Since our model simulated each month by a representative 24-h period, the operational schedule of the micro turbine consisted of 288 h.Therefore, for a single-turbine problem, each individual in the GA had a chromosome size of 288 bytes.This large chromosome size may require a large number of individuals, i.e., the population size.To observe the effect of population size on the final output of the GA, several population sizes with numbers of individuals including 80, 160, 400, and 1000 were tested for the case of the NC 150-200 installation at location 3 (Figure 5).Moreover, a smart seed for the GA was found and its fitness value was compared with the result of non-seeded GA results.In these test runs, the minimum pressure that needed to be satisfied was set as 20 psi.
In Figure 6, the fitness values of the best solutions found by the non-seeded GA and the smart seed are compared.In this figure, the circles demonstrate how the best solution found by the non-seeded GA improved as the number of individuals in the population increased, and the horizontal line indicates the fitness value of the individual found by the iterative process as the smart seed to the GA.It is clear from this figure that the population size needs to increase significantly in order to find a solution which has a fitness value higher than the smart seed.Because of these test runs, it was decided that a smart-seeded genetic algorithm with a population size of 1000 was to be used for the optimization of the operational schedules.In this way, the genetic algorithm started with an individual which had considerably good fitness, and could improve this fitness value with a lower computational effort.

Pump-Driven Network
In this study, six different configurations of energy recovery systems are proposed by installing single micro turbines (either NC 100-200 or NC 150-200) at locations 3 and 4 (Figure 5), and NC 100-200 and NC 150-200 at both locations.The first two cases involved the use of NC 100-200 or NC 150-200 as single turbines at location 3 (Figure 5).The next two applications involved the use of NC 100-200 or NC 150-200 as single turbines at location 4 (Figure 5).The final two cases involved the double micro turbine applications at both locations.In this case, either NC 100-200 or NC 150-200 was used as the turbine selection.The optimal operational schedule which satisfied consumer demands without pressure violations and resulting energy gain were determined for each scenario.The minimum pressure that needed to be satisfied was set as 20 psi.7 and 8 are compared, the effect of head curve of a micro turbine on the optimal operational schedule can easily be seen, since it is obvious that NC 100-200, which is a higherhead micro turbine, needs more bypass valve openings than NC 150-200, which is a lower-head micro turbine.7 and 8 are compared, the effect of head curve of a micro turbine on the optimal operational schedule can easily be seen, since it is obvious that NC 100-200, which is a higher-head micro turbine, needs more bypass valve openings than NC 150-200, which is a lower-head micro turbine.A partially open bypass valve is indicated by a bypass valve opening value between 0 and 1, and a completely closed bypass valve is represented by the value 0. When Figures 7 and 8 are compared, the effect of head curve of a micro turbine on the optimal operational schedule can easily be seen, since it is obvious that NC 100-200, which is a higherhead micro turbine, needs more bypass valve openings than NC 150-200, which is a lower-head micro turbine.A partially open bypass valve is indicated by a bypass valve opening value between 0 and 1, and a completely closed bypass valve is represented by the value 0. When Figures 7 and 8 are compared, the effect of head curve of a micro turbine on the optimal operational schedule can easily be seen, since it is obvious that NC 100-200, which is a higherhead micro turbine, needs more bypass valve openings than NC 150-200, which is a lower-head micro turbine.A similar trend for the turbine head can be observed in Figures 9 and 10, which show the optimal operational schedules found for the single turbine/valve case at location 4 for the micro turbines NC 100-200 and NC 150-200, respectively.These figures also provide the opportunity to compare the candidate locations of the micro turbines.For example, when Figures 7 and 9 are compared, one can say that, since location 3 needs more bypass valve opening than location 4 for the same micro turbine, it is a more critical point for the operation of the water distribution system.A similar conclusion can be drawn when Figures 8 and 10  A similar trend for the turbine head can be observed in Figures 9 and 10, which show the optimal operational schedules found for the single turbine/valve case at location 4 for the micro turbines NC 100-200 and NC 150-200, respectively.These figures also provide the opportunity to compare the candidate locations of the micro turbines.For example, when Figures 7 and 9 are compared, one can say that, since location 3 needs more bypass valve opening than location 4 for the same micro turbine, it is a more critical point for the operation of the water distribution system.A similar conclusion can be drawn when Figures 8 and 10    The operational schedules of the bypass valves of individual micro turbines found for the double-turbine case, where one NC 100-200 was installed at location 3 and one NC 100-200 was installed at location 4 (Figure 5), are reported in Figure 11.The operational schedules of the bypass valves for the similar case with the double micro turbine NC 150-200 are shown in Figure 12.In these figures, the operating schedules were obtained using the genetic algorithm seeded with an individual found by applying the iterative procedure to find a seed for the bypass valve at location 4, while the schedule of the bypass valve at location 3 was the same as the smart seed found for the single micro turbine installed at this location.When Figures 11 and 12 are compared, one can see that the high- A similar trend for the turbine head can be observed in Figures 9 and 10, which show the optimal operational schedules found for the single turbine/valve case at location 4 for the micro turbines NC 100-200 and NC 150-200, respectively.These figures also provide the opportunity to compare the candidate locations of the micro turbines.For example, when Figures 7 and 9 are compared, one can say that, since location 3 needs more bypass valve opening than location 4 for the same micro turbine, it is a more critical point for the operation of the water distribution system.A similar conclusion can be drawn when Figures 8 and 10    The operational schedules of the bypass valves of individual micro turbines found for the double-turbine case, where one NC 100-200 was installed at location 3 and one NC 100-200 was installed at location 4 (Figure 5), are reported in Figure 11.The operational schedules of the bypass valves for the similar case with the double micro turbine NC 150-200 are shown in Figure 12.In these figures, the operating schedules were obtained using the genetic algorithm seeded with an individual found by applying the iterative procedure to find a seed for the bypass valve at location 4, while the schedule of the bypass valve at location 3 was the same as the smart seed found for the single micro turbine installed at this location.When Figures 11 and 12 are compared, one can see that the high- installed at location 4 (Figure 5), are reported in Figure 11.The operational schedules of the bypass valves for the similar case with the double micro turbine NC 150-200 are shown in Figure 12.In these figures, the operating schedules were obtained using the genetic algorithm seeded with an individual found by applying the iterative procedure to find a seed for the bypass valve at location 4, while the schedule of the bypass valve at location 3 was the same as the smart seed found for the single micro turbine installed at this location.When Figures 11 and 12 are compared, one can see that the high-head micro turbines (NC 100-200 turbines in Figure 11) require more bypass valve openings than the low-head micro turbines (NC 150-200 turbines in Figure 12).To find the best energy recovery system among the six configurations described above, it was necessary to estimate the energy gained by each system.At this point, it should be noted that, because the Dover Township water distribution system is driven by pumps, it is important to track the To find the best energy recovery system among the six configurations described above, it was necessary to estimate the energy gained by each system.At this point, it should be noted that, because the Dover Township water distribution system is driven by pumps, it is important to track the amount of annual energy consumed by the pumps before and after the energy recovery system was installed.In its original state when there were no turbines installed, the pumps of this water distribution system consumed approximately 3.5 GWh/y of energy to maintain the flow.Depending on the configuration of the energy recovery system, the amount of this energy consumption may have decreased or increased when the micro turbines were introduced to the water distribution network.
Table 2 summarizes the energy budgets for the energy recovery system configurations considered.In this table, it can be seen that the energy used by the pumps decreased after the energy recovery system was installed in all cases, except for the NC 150-200 installation at location 4 (Figure 5), which resulted in an increased energy consumption.Thus, in most cases, the energy recovery system installation resulted in not only energy production by the micro turbine(s), but also energy saving at the pumps.This energy saving is most significant at location 3 where, even though the energy recovered by the micro turbines is lower than that at location 4, the net energy gain is considerably higher due to the high energy saving at the pumps.Also, the installation of NC 150-200 at locations 3 and 4 resulted in the highest energy production by the micro turbines (89,209 kWh/y).However, this configuration did not save very high pumping energy, and the net energy gain was not as high as a single micro turbine installed at location 3.As a result, for this pump-driven water distribution system, the best configuration which has the highest net energy gain is the double NC 100-200 installed at locations 3 and 4, with a net energy gain of 274,990 kWh/y.To find best energy recovery system among the six configurations described above, it was necessary to estimate the energy gained by each system.At this point, it should be noted that, because the Dover Township water distribution system is driven by pumps, it is important to track the amount of annual energy consumed by the pumps before and after the energy recovery system was Table 2. Energy budgets (kWh/y) for the candidate energy recovery system configurations in the pump-driven network.

Energy Recovered by the Micro Turbines Net Energy Gain
According to the US Energy Information Administration [28], the average annual electricity consumption of a US residential utility customer was 11,496 kWh in 2010.This average energy consumption value could be used to estimate the economic significance of the candidate energy recovery systems, as shown in Figure 13.In this figure, the dark, wider bars indicate the number of average American homes that can be fed by the energy gained using a given energy recovery system.As expected from Table 2, the double NC 100-200 turbines installed at locations 3 and 4 support electricity consumption of the highest number (25) of average American homes.In addition to its economic effects, this energy recovery has important environmental benefits.The US Environmental Protection Agency [29] suggests that an emission factor of 6.8956 × 10 −4 metric tons CO 2 /kWh can be used to calculate the equivalencies for emission reductions from energy-efficient or renewable-energy programs.This emission factor was utilized to estimate the annual equivalent CO 2 emission reduction for each of the candidate energy recovery system, as indicated by the thinner, light, filled bars in Figure 13.The double NC 100-200 turbines installed at locations 3 and 4 resulted in the highest CO 2 emission reduction (190 tons/y).

Gravity-Driven Network
The same analysis was performed on the gravity-driven network, as explained in Section 3.2.Therefore, all six energy recovery system configurations were tested in this new hypothetical water distribution system.The constant-head reservoirs supply a steady source of energy to the network, lowering the chance of pressure violations in the case of micro turbine installation.As a result, several configurations, such as single NC100200 or NC150200 and double NC150200 turbines installed at locations 3 and 4, do not require operational schedules for the micro turbines.However, the double NC100200 turbines installed at locations 3 and 4 caused pressure violations when operated continuously without scheduling.Thus, an optimal operation schedule for the micro turbines was found for this configuration.In this operational schedule, the NC100200 turbine installed at location 3 can operate with the bypass valve fully closed for the entire service period.However, the NC100200 turbine installed at location 4 requires bypass valve openings as shown in Figure 14.In order to find the best energy recovery system configuration among the six alternatives tested in this study, the energy recovered by the micro turbines needed to be calculated.Table 3 presents the results of this energy recovery calculation.Here, it needs to be noted that, since the water distribution system was converted into a hypothetical gravity-driven network without pumps, the net energy gained by the recovery system was equal to the energy produced by the turbines.When Table 3 is examined, it can be clearly seen that the energy recovery by a single micro turbine installation in this three-reservoir system is not very high when compared with a double micro

Gravity-Driven Network
The same analysis was performed on the gravity-driven network, as explained in Section 3.2.Therefore, all six energy recovery system configurations were tested in this new hypothetical water distribution system.The constant-head reservoirs supply a steady source of energy to the network, lowering the chance of pressure violations in the case of micro turbine installation.As a result, several configurations, such as single NC100200 or NC150200 and double NC150200 turbines installed at locations 3 and 4, do not require operational schedules for the micro turbines.However, the double NC100200 turbines installed at locations 3 and 4 caused pressure violations when operated continuously without scheduling.Thus, an optimal operation schedule for the micro turbines was found for this configuration.In this operational schedule, the NC100200 turbine installed at location 3 can operate with the bypass valve fully closed for the entire service period.However, the NC100200 turbine installed at location 4 requires bypass valve openings as shown in Figure 14.

Gravity-Driven Network
The same analysis was performed on the gravity-driven network, as explained in Section 3.2.Therefore, all six energy recovery system configurations were tested in this new hypothetical water distribution system.The constant-head reservoirs supply a steady source of energy to the network, lowering the chance of pressure violations in the case of micro turbine installation.As a result, several configurations, such as single NC100200 or NC150200 and double NC150200 turbines installed at locations 3 and 4, do not require operational schedules for the micro turbines.However, the double NC100200 turbines installed at locations 3 and 4 caused pressure violations when operated continuously without scheduling.Thus, an optimal operation schedule for the micro turbines was found for this configuration.In this operational schedule, the NC100200 turbine installed at location 3 can operate with the bypass valve fully closed for the entire service period.However, the NC100200 turbine installed at location 4 requires bypass valve openings as shown in Figure 14.In order to find the best energy recovery system configuration among the six alternatives tested in this study, the energy recovered by the micro turbines needed to be calculated.Table 3 presents the results of this energy recovery calculation.Here, it needs to be noted that, since the water distribution system was converted into a hypothetical gravity-driven network without pumps, the net energy gained by the recovery system was equal to the energy produced by the turbines.When Table 3 is examined, it can be clearly seen that the energy recovery by a single micro turbine installation in this three-reservoir system is not very high when compared with a double micro In order to find the best energy recovery system configuration among the six alternatives tested in this study, the energy recovered by the micro turbines needed to be calculated.Table 3 presents the results of this energy recovery calculation.Here, it needs to be noted that, since the water distribution system was converted into a hypothetical gravity-driven network without pumps, the net energy gained by the recovery system was equal to the energy produced by the turbines.When Table 3 is examined, it can be clearly seen that the energy recovery by a single micro turbine installation in this three-reservoir system is not very high when compared with a double micro turbine energy recovery system.The reason behind this is the fact that a micro turbine installation at an inlet pipe increases the energy loss through that pipe, causing a significant decrease in the flow rate if the system can acquire the necessary flow from other inlet points to satisfy the demands.This significant decrease in the flow rate is reflected as a significant decrease in the energy production.In a double micro turbine situation, two of the three inlet pipes have a significant increase in the head loss due to the micro turbines installed.This might result in a significant decrease in the flow rate at the pipes where the micro turbines are installed if the system can acquire the necessary flow from one inlet pipe which is intact.However, one constant-head reservoir is not enough to provide the required flow rate.As a result, the conservation of mass principle necessitates that the flow rate through the inlet pipes does not decrease significantly.Thus, double micro turbine configurations have a considerably high net energy gain, as shown in Table 3.When we look at the economic and environmental impacts of these energy recovery configurations (Figure 15), we can again see that energy recovery systems with two micro turbines can supply energy for a significantly higher number of average American homes, which results in a higher reduction in carbon-dioxide emissions when compared to single micro turbine energy recovery systems.In our best-case scenario, which is the double NC150-200 turbines installed at locations 3 and 4, the energy production by the micro turbines was equal to the energy consumption of 33 average American homes, and, using this energy, we could reduce the carbon-dioxide emissions by 260 metric tons annually.
Water 2018, 10, x FOR PEER REVIEW 16 of 19 turbine energy recovery system.The reason behind this is the fact that a micro turbine installation at an inlet pipe increases the energy loss through that pipe, causing a significant decrease in the flow rate if the system can acquire the necessary flow from other inlet points to satisfy the demands.This significant decrease in the flow rate is reflected as a significant decrease in the energy production.In a double micro turbine situation, two of the three inlet pipes have a significant increase in the head loss due to the micro turbines installed.This might result in a significant decrease in the flow rate at the pipes where the micro turbines are installed if the system can acquire the necessary flow from one inlet pipe which is intact.However, one constant-head reservoir is not enough to provide the required flow rate.As a result, the conservation of mass principle necessitates that the flow rate through the inlet pipes does not decrease significantly.Thus, double micro turbine configurations have a considerably high net energy gain, as shown in Table 3.When we look at the economic and environmental impacts of these energy recovery configurations (Figure 15), we can again see that energy recovery systems with two micro turbines can supply energy for a significantly higher number of average American homes, which results in a higher reduction in carbon-dioxide emissions when compared to single micro turbine energy recovery systems.In our best-case scenario, which is the double NC150-200 turbines installed at locations 3 and 4, the energy production by the micro turbines was equal to the energy consumption of 33 average American homes, and, using this energy, we could reduce the carbon-dioxide emissions by 260 metric tons annually.

Conclusions
In this study, genetic algorithms were used to find the optimal operating schedule of an energy recovery system in a water distribution network.The objective function of this optimization problem was formulated as the maximization of energy recovery at the micro turbines such that the consumer demands are always satisfied without pressure violations.The candidate locations for the energy recovery system were determined from the excess energy input distribution of the water supply system.For this study, two locations which had the highest excess energy inputs were selected.In order to demonstrate the effect of the micro turbine used, two different micro turbines were tested.The proposed methodology was applied for different combinations of locations and micro turbine types.
The optimization algorithm successfully determined the operational schedules for the energy recovery systems which never violate the pressure constraint.The results show that location and micro turbine type have significant effects on the optimal operation schedules.A high-head micro turbine requires more bypass valve openings than a low-head micro turbine, and one location can be more critical in satisfying the pressure constraint than another location.
Another outcome of this study is the fact that the energy recovery system installed in pump-driven networks may not only produce energy at the micro turbines, but also decrease the energy consumption at the pumps, depending on the location and the type of micro turbine used.While some energy recovery systems may decrease energy consumption, some recovery systems may result in increased pump energy.In pump-driven networks, the energy saving at the pumping stations constitute a significant portion of the net energy gain, which eventually reveals the best configuration for the energy recovery system.
Another conclusion can be the fact that the results of this study demonstrate the important economic and environmental impacts of energy recovery systems in water distribution networks.Even in the pump-driven water distribution network serving a typical small town in the USA, the energy saving can support the electricity consumption of more than 20 average US homes, corresponding to a reduction of 177 tons of CO 2 emissions annually.In the gravity-driven system, these numbers increased to 33 average American homes and 260 tons of CO 2 reduction.These economic and environmental impact numbers will obviously increase for larger water distribution networks.
The available excess energy potential of a water distribution system may vary significantly depending on the complexity and type of the driving force of the network.A large network may have higher consumer demands which require higher flow rates at the inlet locations, increasing the energy generation at the times of micro turbine operation.In addition to the complexity, the driving force of the network significantly affects the energy gain from a water distribution system.In a gravity-driven water distribution system, where the nature supplies the required energy for the flow, the available excess energy potential may be much higher than that of a pump-driven network.It should also be noted that, since the gravity-driven network does not require any pumps, the only energy that need to be tracked is the energy produced at the micro turbines.
The results of this study are comparable with the results of another work [3] which was based on a gravity-driven network where three energy recovery systems were proposed.The energy production of these three options ranged from 418.8 kWh/d to 821.6 kWh/d.In the current study, the highest net energy gain was found for the NC 100-200 turbine at location 3 as 695.7 kWh/d in the pump-driven network (Table 2).In the gravity-driven network, the highest energy production was 1032.4 kWh/d (Table 3) by two NC150-200 turbines installed at locations 3 and 4.

Figure 1 .
Figure 1.Micro turbine/bypass valve combination.If the energy recovery system has N micro turbines located at N candidate locations, then we can represent the micro turbines with different characteristic head functions as a vector [ ] 1 2 , ,..., N ψ ψ ψ Τ

Figure 2 .
Figure 2. Process of obtaining a smart seed.

Figure 2 .
Figure 2. Process of obtaining a smart seed.

Figure 3 .
Figure 3. Dover Township water distribution system, Toms River, New Jersey.

Figure 3 .
Figure 3. Dover Township water distribution system, Toms River, New Jersey.

Water 2018 ,
10, x FOR PEER REVIEW 8 of 19

Figure 4 .
Figure 4. Hourly demand pattern representing one year.

Figure 4 .
Figure 4. Hourly demand pattern representing one year.

19 Figure 6 .
Figure 6.Fitness values of the smart seed and the genetic algorithm (GA) outputs for different population sizes.

Figures 7 and 8
Figures 7 and 8 show the optimal bypass valve operation schedules found for the single turbine case at location 3 for the micro turbines NC 100-200 and NC 150-200, respectively.In these figures, black vertical bars are used to indicate the degree of opening of the bypass valve.A bypass valve opening of 1 represents a fully open bypass valve.A partially open bypass valve is indicated by a bypass valve opening value between 0 and 1, and a completely closed bypass valve is represented by the value 0. When Figures7 and 8are compared, the effect of head curve of a micro turbine on the optimal operational schedule can easily be seen, since it is obvious that NC 100-200, which is a higherhead micro turbine, needs more bypass valve openings than NC 150-200, which is a lower-head micro turbine.

Figure 6 .
Figure 6.Fitness values of the smart seed and the genetic algorithm (GA) outputs for different population sizes.

Figures 7 and 8
Figures 7 and 8 show the optimal bypass valve operation schedules found for the single turbine case at location 3 for the micro turbines NC 100-200 and NC 150-200, respectively.In these figures, black vertical bars are used to indicate the degree of opening of the bypass valve.A bypass valve opening of 1 represents a fully open bypass valve.A partially open bypass valve is indicated by a bypass valve opening value between 0 and 1, and a completely closed bypass valve is represented by the value 0. When Figures7 and 8are compared, the effect of head curve of a micro turbine on the optimal operational schedule can easily be seen, since it is obvious that NC 100-200, which is a higher-head micro turbine, needs more bypass valve openings than NC 150-200, which is a lower-head micro turbine.
black vertical bars are used to indicate the degree of opening of the bypass valve.A bypass valve opening of 1 represents a fully open bypass valve.

Figure 7 .
Figure 7. Operational scheduling for the bypass valve of the single NC 100-200 turbine installed at location 3.

Figure 8 .
Figure 8. Operational scheduling for the bypass valve of the single NC 150-200 turbine installed at location 3.

Figure 7 .
Figure 7. Operational scheduling for the bypass valve of the single NC 100-200 turbine installed at location 3.

Figure 7 .
Figure 7. Operational scheduling for the bypass valve of the single NC 100-200 turbine installed at location 3.

Figure 8 .
Figure 8. Operational scheduling for the bypass valve of the single NC 150-200 turbine installed at location 3.

Figure 8 .
Figure 8. Operational scheduling for the bypass valve of the single NC 150-200 turbine installed at location 3.
are compared.Water 2018, 10, x FOR PEER REVIEW 12 of 19 are compared.

Figure 9 .
Figure 9. Operational scheduling for the bypass valve of the single NC 100-200 turbine installed at location 4.

Figure 10 .
Figure 10.Operational scheduling for the bypass valve of the single NC 150-200 turbine installed at location 4.

Figure 9 .
Figure 9. Operational scheduling for the bypass valve of the single NC 100-200 turbine installed at location 4.
are compared.

Figure 9 .
Figure 9. Operational scheduling for the bypass valve of the single NC 100-200 turbine installed at location 4.

Figure 10 .
Figure 10.Operational scheduling for the bypass valve of the single NC 150-200 turbine installed at location 4.

Figure 10 .
Figure 10.Operational scheduling for the bypass valve of the single NC 150-200 turbine installed at location 4. The operational schedules of the bypass valves of individual micro turbines found for the double-turbine case, where one NC 100-200 was installed at location 3 and one NC 100-200 was

Figure. 11 .
Figure.11.Operational scheduling for the bypass valves of the two NC 100-200 turbines installed at locations 3 and 4.

Figure 12 .
Figure 12.Operational scheduling for the bypass valves of the two NC 150-200 turbines installed at locations 3 and 4.

Figure 11 .
Figure 11.Operational scheduling for the bypass valves of the two NC 100-200 turbines installed at 3 and 4.

(b) Location 4 Figure. 11 .
Figure.11.Operational scheduling for the bypass valves of the two NC 100-200 turbines installed at locations 3 and 4.

Figure 12 .
Figure 12.Operational scheduling for the bypass valves of the two NC 150-200 turbines installed at locations 3 and 4.

Figure 12 .
Figure 12.Operational scheduling for the bypass valves of the two NC 150-200 turbines installed at locations 3 and 4.

Figure 13 .
Figure 13.Economic and environmental impacts of the energy saving in the pump-driven network.

Figure 14 .
Figure 14.Operational scheduling for the bypass valve of the NC 100-200 turbine installed at location 4.

Figure 13 .
Figure 13.Economic and environmental impacts of the energy saving in the pump-driven network.

Figure 13 .
Figure 13.Economic and environmental impacts of the energy saving in the pump-driven network.

Figure 14 .
Figure 14.Operational scheduling for the bypass valve of the NC 100-200 turbine installed at location 4.

Figure 14 .
Figure 14.Operational scheduling for the bypass valve of the NC 100-200 turbine installed at location 4.

Figure 15 .
Figure 15.Economic and environmental impacts of the energy saving in pump-driven network.

Figure 15 .
Figure 15.Economic and environmental impacts of the energy saving in pump-driven network.

Table 1 .
Characteristics of micro turbines used.PAT-pump used as turbine.

Table 3 .
Energy budgets (kWh/y) for the candidate energy recovery system configurations in the gravity-driven network.

Table 3 .
Energy budgets (kWh/y) for the candidate energy recovery system configurations in the gravity-driven network.