The previously-described methodology was implemented in a real case study for an existing irrigation network. This network was located in Vallada (Valencia, Spain) and the water manager knew the volume measurements for the final user points as well as main line flow measurements over time.

#### 3.2. Results of the Optimization

Considering the farmers’ habits (Input 1) described by Pérez-Sánchez et al. (2016) [

39] for the Vallada network, the flow was estimated over time, applying the proposed methodology and considering a time interval of 5 min [

39]. After this, the maximum flow in the selected time interval was compared with the registered maximum flow for each time interval in the year 2015. The calibration was done for the maximum flow to determine whether the methodology produced a good or bad estimation, since the flow range is necessary in order to select the machines. When the calibration strategy was applied to this case study, the results were satisfactory according to the

KPIFs in

Table 1. The goodness-of-fit is set out in

Figure 6.

According to

Table 1, the results performance was very good (0.6) when the time interval was between 1 and 5 h. When the time interval varied from 8 to 24 h,

E values were between 0.50 and 0.56. The performance was always very good when the time interval was greater than 24 h.

RRSE values were also analysed, and the goodness-of-fit was satisfactory when the time interval was between 1 and 24 h. If the time interval was above 24 h, the performance was good. Finally, when the

PBIAS index was analysed, the goodness-of-fit was very good for 1, 2, and 48 h. The calibration stage obtained a good fit when the time interval was between 4 and 24 h. Satisfactory results were obtained when the time interval was 168 and 336 h.

Once the goodness-of-fit was verified using the

KPIFs, the energy balance was applied. To do so, the proposed optimization strategy combined the energy balance (Step 3 in

Figure 5); the selection of the machine (Step 4 in

Figure 5), which is chosen through the database created using the proposed turbine generated (

Figure 7); the modified affinity laws (Point 5 in

Figure 5); and the maximization strategy (Step 6 in

Figure 5) developed by simulated annealing algorithm.

When the optimization strategy was performed, the recovered energy was maximized by selecting the machines operating under the best efficiency line.

Table 2 shows from 1 to 10 lines of the selected machines as well as their location for each solution. In each selected pipe, three turbines with the same characteristic curves can be operated in parallel as a function of the flow at each time.

Table 2 identifies the lines where the combination of turbines maximizes the objective function, indicating for each solution the specific speed of the machine, the impeller diameter and nominal rotational speed, as well as the recovered energy for each machine, which is shown using the best efficiency strategy (

${E}_{{R}_{BEL}}$). In contrast,

Table 3 shows the solution when the considered objective function is the ratio between recovered energy and

PSR.

The comparison between both objective functions showed the main lines in which the recovery at maximum were the same (e.g., lines 5, 22, and 38) in both simulations (i.e., the recovered energy and the ratio between the recovered energy and

PSR), but other lines were different. Therefore, the selection of the objective function to optimize the water system will depend upon whether the feasibility parameters are exactly known. In this case, in the optimization strategy considered for each selected line (

n) there were three

PATs in parallel (so called

PAT1,

PAT2, and

PAT3) and one bypass that was opened by an isolation valve (here called IV4) to deviate the flow when the

PAT cannot be operated. The pressure of the deviated flow is reduced by a pressure reduction valve (

PRV1) (

Figure 8a).

The optimization strategy assigned the best machine for each assumption, chosen from the created database (8893 turbines), establishing the specific speed, the impeller diameter and the nominal rotational speed of the machine. The optimization strategy enabled knowledge for each solution of the next parameters, the operation time; work points and volumetric turbine flow for each machine. This was done once the recovered head as a function of flow was estimated applying the energy balance and using the

EPANET Toolkit [

35]. For instance,

Figure 9a shows the pairs of data (i.e., flow and recoverable head) in line 47 when no

PATs were installed upstream, as well as the recoverable points in line 47 when there were installed turbines in lines 5, 22 and 38, showing the dispersion of the operation zone.

This example was obtained when five groups of turbines (

n = 5) were allocated in lines “5 + 22 + 38 + 47 + 59” and the maximization of the recovered energy was carried out (

Table 2). Besides,

Figure 9a shows the variation of the recoverable head as a function of flow when different group of turbines are installed in lines 5, 22, and 38.

Figure 8b shows such an example, of the selected machine to install in line 47 inside of the group in parallel. The figure contains the obtained curves of the turbine: the runaway curve, the characteristic head curve for nominal rotational speed

$(\mathsf{\alpha}=1)$, the efficiency curve for nominal speed, and the

BEH and

BEL curves.

BEL was theoretically obtained by the PAT module and therefore the curve is horizontal. When this curve was developed by experimental tests, it was not horizontal and it was defined by a polynomic equation [

35].

Figure 9b shows the flow values that were derived by the pass. The range for this selected machine varied between 0 and 2.19 L/s, and the total energy that could not be recovered because it was deviated was 124 kWh/year, guaranteeing the downstream pressure at all irrigation points over time. Besides, the figure shows the operation points when the

PAT1 operated as well as its recovered head. For this machine, the volumetric turbine flow and the operation time were 36,097 m

^{3} and 1978 h, respectively. For

PAT1, the average flow and the average recovered head were 5.06 L/s and 26.05 m w.c., respectively, obtaining an average power of 1.04 kW and a total recovered energy of 2047 kWh/year.

Figure 9c,d show the recoverable energy values which were available to be operated throughout the

PAT2 and the

PAT3. The operation points are also shown in these figures for both

PATs. Hence, the same values of volumetric turbine flow, operation time, turbine flow, recovered head and power are also indicated in

Figure 9c,d. Finally, when the global values were analysed, the total volumetric turbine flow was 53,420 m

^{3}, representing 98.71% of the volume throughout line 47. The minimum and the maximum turbine flow were 2.19 and 18.99 L/s, respectively. The total recovered energy was 2924 kWh/year, recovering 58.26% of the theoretical available energy of this line.

The increase of recovered energy was due to the use of the optimization strategy based on the best efficiency line of the selected machines.

Figure 10a shows the different values of rotational speed

$(\mathsf{\alpha})$ for each

PAT as well as the total operation hours for each recovery machine. This figure shows that the nominal rotational speed represents only a few hours compared to the total turbine hours in each

PAT. Therefore, the variation of the rotational speed for each machine was important to reach the maximum energy production in each time, considering the best efficiency line.

Figure 10b shows an example in which the next items can be observed: the variation of speed coefficient (

$\mathsf{\alpha}$), the generated power by recovery system over time in line 47. This figure also represents the pressure in node 47 that was downstream of the turbine, considering there are

PATs in line 47, as well as showing the pressure when there are no turbines in this line.

#### 3.3. Comparison of the Results of the Theoretical Energy Analysis, Fixed Rotational Speed, and BEL Strategy

Finally, the results of the proposed optimization strategy were compared with those obtained when the theoretically energy was determined. Besides, the obtained energy from the proposed optimization was also compared to the recovered energy, when the recovery machines only worked at their nominal rotational speed.

Table 4 shows the obtained values when the maximization of the recovered energy was considered as an objective function. When the

BEL strategy was applied (

${E}_{{R}_{BEL}})$, the generated energy varied between 33.78 and 58.18 MWh/year. These values represented a recovery coefficient between 37.41 and 41.66% of the theoretical recovered energy (

${E}_{TR}$) that is considered when the efficiency of the machine is one (i.e., an ideal machine). The

PSR varied between 1.7 and 15.41 years from the one to 10 group of turbines (

n), respectively. If the recovered energy using the

BEL strategy is compared to the recovered energy when the machine operated at a nominal rotational speed (

E_{R}_{α=1}), the increase of the recovered energy varied between 140.88 and 183.79%. Therefore, the

BEL strategy is one of the novelties introduced in this research, improving the energy recovery under all assumptions when the energy recovery was compared with values for the machine under nominal conditions.

Table 5 shows the results for the maximization of the ratio between recovered energy and simple payback period. In this case, the

${E}_{{R}_{BEL}}$ varied between 27.32 and 34.38 MWh/year. These values were lower than one for the maximization of the recovered energy objective function, and their reduction varied between 56.08 and 80.87%. In this assumption, the difference of the recovered energy by using the

BEL strategy was between 89.34 and 147.19% as a function of the number of groups of turbines (

n) when the results were compared to

${E}_{{R}_{\alpha =1}}$.