New Expressions to Apply the Variation Operation Strategy in Engineering Tools Using Pumps Working as Turbines

: The improvement in energy saving aspects in water systems is currently a topic of major interest. The utilization of pumps working as turbines is a relevant strategy in water distribution networks consisting of pressurized pipes, using these machines to recover energy, generate green energy and reduce leakages in water systems. The need to develop energy studies, prior to the installation of these facilities, requires the use of simulation tools. These tools should be able to deﬁne the operation curves of the machine as a function of the ﬂow rate. This research proposes a new strategy to develop a mathematics model for pumps working as turbines (PATs), considering the modiﬁed afﬁnity laws. This proposed model, which can be input into hydraulic simulation tools (e.g., Epanet, WaterGems), allows estimation of the head, efﬁciency, and power curves of the PATs when operating at different rotational speeds. The research used 87 different curves for 15 different machines to develop the new model. This model improves the results of the previously published models, reducing the error in the estimation of the height, efﬁciency, and power values. The proposed model reduced the errors by between 30 and 50% compared to the rest of the models.


Introduction
Mathematical models have been a very useful tool to improve the management of water networks [1]. These models improved both pressurized systems [2], as well as free surface channels [3], improving their management and behavior in steady and unsteady flows. Some of these models were focused on the integration of the management into the new sustainability challenges of the infrastructures [4].
The improvement of the sustainability has been analyzed in water systems from different points of view, such as leakage reduction [5], minimizing consumed energy in pump systems [6], and quality parameters in the water supply [7], among others. One of these strategies has been the use of pumps working as turbines (PATs). These machines replace the pressure reduction valves, taking advantage of the excess of energy in the pressurized water systems [8]. A PAT is a pump which works in reverse mode and it is cheaper than classical turbines of the same small size [9]. When this machine operates in this mode, it generates energy. The efficiency of these machines is lower than traditional turbines and its hydraulic efficiency value is between 0.6 and 0.7 [10]. The global efficiency is between 0.5 and 0.6 when all the electromechanical equipment (electric and electronic devices) is considered. The traditional machines are classified as action (e.g., Pelton, where H 0 is the recovered head in nominal rotational speed in m w.c. (water column); Q 0 is the flow rate in m 3 /s; A, B, and C are the coefficients, which define the head curve of the PAT; η 0 is the efficiency of the machine for each flow (non-dimensional); E 4 , E 3 , E 2 , E 1 , and E 0 are the coefficients, which define the efficiency curve; P 0 is the generated power in kW; P 4 , P 3 , P 2 , P 1 , and P 5 are the coefficients, defining the power curve of the machine. The head curve enables the determination of the recovered head as a function of the flow. The efficiency curve determines the efficiency of the machine according to the circulating flow; finally, the power curve establishes the generated power by the machine for each flow value. Previous references demonstrated the possibility to estimate these curves by use of non-dimensional parameters [14]. This estimation should be developed using non-dimensional parameters and they are head number (h), flow number (q), efficiency number (e), and torque number (b) [15]. The different non-dimensional parameters, which are used to regulate the machines by variation of the rotational speed, are the following: where q, h, e, and p are the flow, head, efficiency, and power coefficients; Q i is any flow value of the PAT in m 3 /s; H i is the head for Q i according to the head curve in m w.c.; η i is the efficiency of the machine when the flow is Q i ; P i is the effective power for Q i ; Q BEP , H BEP , P BEP , and η BEP refer to the best efficiency point (BEP) of the machine, which define the best efficiency head (BEH) when the rotational speed is changed.
In line with this, the reduction of the uncertainties by estimating the characteristic curves with respect to their known behavior as pumps has been an objective of different studies [16]. Different semiempirical methods have been published, proposing polynomial expressions to estimate the PAT curves, when the machine operates with constant rotational speed [10,12,17,18]. The development of these mathematical expressions was crucial to improve the characterization of the PATs and the energy models to analyze the energy recovery.
However, the flow rate changes over time in the different pipes of the water networks due to the demands of the users. Therefore, the energy analyses are not maximized when they consider PATs, if they work under constant rotational speed. To increase energy re-covery, different strategies have been published in which the energy maximization was reached when the machine operated at different rotational speeds, called the variable operation strategy (named VOS) [19]. The variation of the rotational speed is crucial to reach the best efficiency values in the water systems, and it is the focus of new challenges in hydropower systems also applied to Francis turbines [20]. Furthermore, when the rotation speed changes, it is necessary to introduce knowledge of PAT curves into mathematical models, which analyze energy recovery in water systems. The lack of mathematical expressions makes it difficult to improve energy estimates when applying the VOS strategy in the modeling of water systems [14].
In recent years, some researchers have published different methods which allow water managers and companies to estimate the characteristic curves of PATs, avoiding the experimental tests when developing preliminary energy studies. Efficiency and head curves operating without variation of rotational speed were described in [21,22]. The analysis of PAT curves was carried out using other methods, which proposed expressions considering specific speed as well as the best efficiency point [23][24][25]. These methods did not consider the variation in the rotational speed, which is of paramount importance to reach the maximization of the recovered energy [26].
A step forward was taken in 2014, when some researchers analyzed the variation in rotational speed through experimental tests to improve the maximization of energy recovery. Research described in [12] proposed empirical expressions using four different tested machines in 2016. These equations should only be considered when the specific speed is between 120 and 162 (m, kW). In 2018, two PATs were tested and they were used to define other expressions, which could estimate the characteristic curves when the best efficiency point was known [27]. Research published in [28] studied the efficiency, power, and head curves in one PAT, which was installed in water pressurized systems in 2020. All studies used between one and four machines [12,14,27,28]. The low number of machines reduces the applicability of the proposed expressions, when other machines are used. To solve this issue, the present research goes one step further, using 87 different tested characteristic curves (i.e., head, efficiency, and power) of the majority of hydraulic machines, which have been published in previous references.
New empirical expressions are here proposed. These expressions could be used by modelers, who could improve their energy analysis when they apply the VOS strategy in water systems. Previous research has conducted similar analyses to define the characteristic curves of the machine [12,14,27,28]. They used non-dimensional numbers (i.e., q, h, e, and p), which are calculated at the best efficiency point. These values were used to propose functions, which depended on the ratio of the rotational speed of the machine to modify the affinity laws. This proposal improves the use of PATs in the simulation tools. It will enable the reduction of the uncertainty in the previous energy analysis when the use of PATs is considered in a real case study. The proposed expressions reduced the error indexes when they were compared with the other published methods, as well as increasing the validity range. Furthermore, these expressions are based on fifteen different machines, which had 87 different curves, increasing the number of experimental curves.

Methodology
The methodology proposed herein is focused on obtaining some particular empiric expressions, which allow water managers to develop tools for modeling PATs in water systems, when they operate at variable rotational speed. The strategy is based on the knowledge of the operation curves (head, efficiency, and power) at nominal speed [29]. The proposed method is based on classical expressions of the hydraulic machines, proposing a strategy to modify them by the affinity laws.
The main objective of the strategy is to propose an empirical expression that allows water managers to introduce management tools to simulate the different scenarios under the VOS operation. Furthermore, the method will reduce the errors when the characteristic curves are estimated in variable velocity conditions. To achieve this, different steps were proposed to derive the new expressions considering the modification of the affinity laws of hydraulic machines. [30]. Finally, the method was validated with the different tested machines. Figure 1 shows the different proposed steps. These steps are the following:

1.
Obtaining experimental characteristic curves of the PATs. The characteristic curves (i.e., head, efficiency, and power curve) were made available for the different machines using experimental data which were published by other researchers. Both the nominal curve and the curves for different rotational speeds were digitized using Equations (1)-(3).

2.
Definition of the dimensionless values of the curve to apply the affinity laws. This is developed using the previously defined equations (Equations (4)- (8)). When the affinity laws are applied, the congruence parabola is defined by the following equation [29]: where Q j is the new flow rate in m 3 /s in which the machine has to operate. H PC is a parabola, which has the same efficiency at each point. This consideration is theoretical, since (in practice) it is only acceptable for values around +/−20% of the best efficiency point of the machine [29]. This variation in the rotational speed of the machine is defined by the ratio between the rotational speed (n j ) of the machine to reach the value (Q j ) and the nominal rotational speed (n 0 ). This ratio between n j and n 0 is called α.
The affinity laws are expressions which define points similar to each other under conditions of restricted similarity, neglecting the stresses due to viscosity. These expression are defined by the following expressions [29]: where Q 1 is the flow under the new conditions of rotational speed (n 1 ) in m 3 /s; H 1 is the head under the new conditions in m w.c.; P 1 is the shaft power under the new conditions in kW. When affinity laws are applied for different rotational speeds, the variable operation strategy (VOS) can be defined between ratios of α min and α max .
When affinity laws are applied, the dimensionless parameters are: Applying the affinity laws, k AL, BEH is defined by the following expression, considering that the ratio h q 2 = 1 (if the classical affinity laws is applied ideally): When affinity laws are applied for different rotational speeds, the variable operation strategy (VOS) can be defined between ratios of and . When affinity laws are applied, the dimensionless parameters are:

3.
Once the dimensionless parameters (q, h, e, and p) are defined, the best efficiency curve (BEH) of the machine is determined. BEH is the curve which establishes the recovered head for each flow, maximizing efficiency and changing the rotation speed of the machine. This curve is defined in [27].

4.
When the BEH is known for each machine, the ratio h/q 2 is defined for the different values, using the experimental data as well as the regression of the different head and efficiency curves. This parameter is defined for each rotational speed of the machine. The rotational speed varies between the α min and α max of the VOS. The operation area is defined by the maximum and minimum rotational speed, determined by the tested machine. 5.
In [27,31], variations of the affinity laws are proposed, where the flow ratio (Q/Q 0 ) is a function that depends on α; taking into account this modification of the affinity laws, the corresponding parameter k AL for the modified affinity laws (MOAL) can be defined when the affinity laws are modified by the following expression: 6.
The value of the k MOAL, BEH coefficient is defined for the different rotational speeds of the machine, determining the cut-off point with the hypothetical head surface and machine efficiency ( Figure 2).
Mathematics 2021, 9, x FOR PEER REVIEW 7 Once the , is defined using and , is extended for diffe values of , defining the , for each rotational speed and the intersection po with head and efficiency areas are calculated. These points are , , , , , and , (Figure 3a Once the k MOAL, BEH is defined using Q BEP and H BEP , k MOAL is extended for different values of Q 0 , defining the k MOAL,i for each rotational speed and the intersection points with head and efficiency areas are calculated. These points are Q 0 , H 0 , η 0 , Q i,α j , H i,α j and η i,α j (Figure 3a,b). The values of these parameters enable definition of the new non-dimensional values, which will define the functions of the modified affinity laws. Each of these points is calculated considering the intersection point for each rotational speed curve. The new non-dimensional parameters are defined by the following expressions: Mathematics 2021, 9, x FOR PEER REVIEW 8 of 18 7. Once the non-dimensional parameters for the different rotational speeds are defined, the regression expressions are proposed. These functions depend on rotational speed ( ), which is a significant variable [31] when the non-dimensional parameters are defined (i.e., ℎ, , ). Moreover, different expressions are also proposed considering the ratio / . This parameter is considered since it measures the gap between the flow value and the flow for the best efficiency point. The incorporation of this parameter will improve the regression coefficient of the expressions, as well as reducing the errors. The modified affinity laws are then defined according to different expressions:

7.
Once the non-dimensional parameters for the different rotational speeds are defined, the regression expressions are proposed. These functions depend on rotational speed (α), which is a significant variable [31] when the non-dimensional parameters are defined (i.e., h, q, and e). Moreover, different expressions are also proposed considering the ratio Q/Q BEP . This parameter is considered since it measures the gap between the flow value and the flow for the best efficiency point. The incorporation of this param-eter will improve the regression coefficient of the expressions, as well as reducing the errors. The modified affinity laws are then defined according to different expressions: Ten different functions (F i ) were proposed, in order to be analyzed and obtain the best one to estimate the behavior of the machine when it operates at variable rotational speed. Table 1 shows the proposed functions in which the different coefficients (β i ) are calculated as a function on the analyzed F i . This analysis proposes six polynomial functions and four exponential expressions. Table 1. Proposed functions to be analyzed.
8. This step is related to the previous step and concerns the recalculation of the coefficients β i considering the values of all the tested machines q i,j,m , h i,j,m , and e i,j,m . The sub-index "m" refers to each tested machine. 9.
Having the coefficients for the different functions (F i ) as well as the non-dimensional parameters (i.e., h, q, e, h q 2 , he q 2 ) defined, the errors of the proposed functions by MOAL are calculated. The error indices considered were root mean square error (RMSE), mean absolute deviation (MAD), the mean relative deviation (MRD), and BIAS: RMSE. This error index measures the error between the empirical expression and experimental values. When RMSE is zero, this value indicates a perfect fit. It is defined by (24): where O i are the estimated values; P i the experimental values, and x is the number of observations.
(b) MAD. This index measures the average of the errors in the estimated values, using the absolute differences between estimated and experimental values. The perfect fit is defined when MAD is zero, and it is defined by the following expression (25): (c) MRD. This index considers the weight of the error to the variable value. If MRD is zero, this value indicates a perfect fit. Formally, it is defined as follows (26): (d) BIAS. The index considers the variable tendency, analyzing whether the estimated values are greater (negative value) or smaller (positive value) than experimental values. It is defined by the following expression (27): If the error values are acceptable and the goodness of the expressions is correct, the best expression is chosen in order to be applied. The best expression should set low error values, and it should consider a smaller number of variables.

Materials
The proposed methodology was applied using different experimental machines. As indicated, 15 PATs were used in this research, as shown in Table 2. The experimental database was developed from different consulted studies. These PATs were tested considering different rotation speeds (Table 3), which allowed interpolation of the different experimental values among rotation speeds. The specific speed (n st ) of the used machines was between 5 and 50 rpm. n st is defined as:     Table 2 also shows the number of experimental curves (RS) which were tested considering different rotational speeds for each machine, the number of interpolated curves used, as well as the number of used points to develop the regression and database analysis. The analysis of the 87 tested curves for different PATs, which operated on different rotational speeds, enabled us to obtain 10,949 interpolated parabolas, as well as 56,450 work points, to develop the surface (Q, H, α; Figure 2).

Proposed Function Models
Once the experimental data from the referred 15 tested PATs were analyzed, the β i coefficients were determined for the different non-dimensional parameters (i.e., q, h, e, p, h/q 2 , he/q 2 ). Table 3 shows the different values of coefficients β i for each proposed function (F i ) to model the non-dimensional parameters (NP). Table 3 also shows the regression coefficient (R 2 ).
The goodness of these models was measured according to the different error indexes, which were described previously in the Methodology section by Equations (21)- (23). The different dimensionless parameters proposed for each machine and rotation speed were determined, defining the error rates for the ten different functions of the model. Table 4 shows the error values for each index, as well as its ranking compared among the ten functions. This table determines the average values of the error indexes, since these errors were calculated for each rotational speed in each tested machine (87 curves). BIAS shows the absolute value, in order to know the magnitude of this error in case of oversize or undersize of a variable (i.e., H, η, and P). Table 4 shows the average error values for each FM. These errors values enable us to decide the best function model for each dimensionless parameter (i.e., h, q, e, and p). When the error analysis was developed, the best function model (FM) was F 6 for h and e dimensionless parameters. Although different FMs could be used, F 6 considered both rotational speed as well as the ratio Q Q BEP . The use of this ratio is interesting since it measures the distance between Q and Q BEP . This is an important difference, since it allows water managers to fix the operation range of flow in order for the affinity laws to be applied [29]. Table 4. Average error indexes for the different characteristic curves using the defined MOAL.

Expression (21) Expression (22) Expression (23)
0.0629 (5) The ranking of the F i when the error indexes are compared from (1) to (9) as indicated. When non-parameter p was analyzed, the F 7 function also was chosen since it only considered one variable (α), yielding good results in the estimation of the PATs curve. F 7 was used to determine the power curve directly by expression (23). However, when water managers wish to determine the power curve by the use of Q, H, and η, they should use the F 6 function.

Error Distribution Compared to Rotational Speed
Once F 6 was chosen, the error of the modified affinity laws was compared with all tested curves. All error indexes were calculated for head, efficiency, and power.
When head was analyzed, the MRD was smaller than 0.05, with a cumulated frequency equal to 91%. The maximum value was 0.089. In head values, RMSE was smaller than 0.6 in 57 compared curves and BIAS was smaller than 0.25 in 49 compared curves.
When efficiency was compared, RMSE was smaller than 0.035 in 58% of the comparisons and it was smaller than 0.07 in 88% of the comparisons. When MRD was checked, it was smaller than 0.15, showing a BIAS value smaller than 0.069 in 92% of the cases.
When the error values for the power curve using the F 6 function model were analyzed, RMSE was smaller than 0.2 (72% cumulated frequency). When MAD was analyzed, similar values were obtained. MAD was lower than 0.17, and the MRD was smaller than 0.2 in 90% of the samples.
However, when the errors of F 7 were analyzed for the power curve, they showed the best approach. Figure 4 shows the error values for the power curve using the F 7 expression. RMSE was analyzed (Figure 4a), and it was smaller than 0.18 (70% of cumulated frequency). This value was smaller than 0.09 in 51 cases. Moreover, when the α value was observed, smaller values were located between 0.8 and 1.2, reaching a minimum around 0.9.
When non-parameter was analyzed, the F7 function also was chosen since it only considered one variable ( ), yielding good results in the estimation of the PATs curve. F7 was used to determine the power curve directly by expression (23). However, when water managers wish to determine the power curve by the use of Q, H, and , they should use the F6 function.

Error Distribution Compared to Rotational Speed
Once F6 was chosen, the error of the modified affinity laws was compared with all tested curves. All error indexes were calculated for head, efficiency, and power.
When head was analyzed, the MRD was smaller than 0.05, with a cumulated frequency equal to 91%. The maximum value was 0.089. In head values, RMSE was smaller than 0.6 in 57 compared curves and BIAS was smaller than 0.25 in 49 compared curves.
When efficiency was compared, RMSE was smaller than 0.035 in 58% of the comparisons and it was smaller than 0.07 in 88% of the comparisons. When MRD was checked, it was smaller than 0.15, showing a BIAS value smaller than 0.069 in 92% of the cases.
When the error values for the power curve using the F6 function model were analyzed, RMSE was smaller than 0.2 (72% cumulated frequency). When MAD was analyzed, similar values were obtained. MAD was lower than 0.17, and the MRD was smaller than 0.2 in 90% of the samples.
However, when the errors of F7 were analyzed for the power curve, they showed the best approach. Figure 4 shows the error values for the power curve using the F7 expression. RMSE was analyzed (Figure 4a), and it was smaller than 0.18 (70% of cumulated frequency). This value was smaller than 0.09 in 51 cases. Moreover, when the value was observed, smaller values were located between 0.8 and 1.2, reaching a minimum around 0.9.  When MAD was analyzed (Figure 4b), similar values were obtained. In this case, MAD values were smaller than 0.16 (92% of cumulated frequency). When MRD was analyzed (Figure 4c), this value was smaller than 0.2 in 94% of the samples. This value had a value of 65% of cumulated frequency for values lower than 0.07. Finally, BIAS had good accuracy, showing values lower than 0.1 in 85% of the sample. In all cases, the minimum errors were reached when the machine operated using α rates between 0.8 and 1.2, being the minimum for values near 0.9.

Proposed Functions vs. Other Published Functions
Once the relative errors of the selected function model (F 6 ) were compared for each rotational speed of the different tested machine in the different proposed functions of head, efficiency, and power, the proposed expressions were compared with other expressions which have already been published in the literature.
This research proposes the following particular functions to define the characteristic curves of the machine according to expressions (21)- (23). The model F 6 was chosen when head and efficiency curves should be estimated. F 6 showed the lowest errors compared to the rest of the models. Moreover, this model contained the variation of the rotational speed (α) as well as the use of the ratio Q/Q BEP , enabling us to measure the closeness to BEP. To calculate the power, F 7 was chosen since it had the minimum error values, and it uses a simpler expression. The final expressions proposed herein are: The comparison concerns the model proposed in this research and four published proposals that are shown in Table 5.  Figure 5 shows the different values for error, when head, efficiency, and power were estimated using the proposed model (in black color, "this study") and the rest of the published models. In all cases, the present proposed model presented the best results.
When head curve was analyzed, the error indexes (RMSE, MAD, and MRD) were reduced between 20 and 45% compared to the second-best model (Carravetta et al.). The BIAS value for this characteristic curve was −0.005, compared to the second-best model (0.048). Similar values were shown when the efficiency curve was compared. When efficiency errors were compared, RMS, MAD, and MRD were reduced by 33% compared to the second-best model, while BIAS was ten times lower than the second-best model. Finally, when the power errors were checked using the F 7 model, the error indexes were reduced between 36 and 63% compared to the second-best model. Only when BIAS was checked, the second-best value was observed. Moreover, the F 6 model was also compared to the rest of the proposed models for the power curve. This model (F 6 ) showed good accuracy and the error indexes were 0.2209 (RMSE), 0.1884 (MAD), 0.0823 (MRD), and −0.097 (BIAS). All values were better than the second-best model, except for BIAS, which was the third-best value.
Finally, a visual comparison was carried out on the proposed model and the remaining models compared to an experimental PAT curve ( Figure 6). To develop this comparison, the chosen PAT was a radial machine. The specific speed was 5.67 rpm (m, kW) and its nominal rotational speed was 1100 rpm. The best operation point of this machine was defined as 9.762 l/s and 51.267 m w.c., the efficiency being equal to 0.703 [24] the second-best model, while BIAS was ten times lower than the second-best model. Finally, when the power errors were checked using the F7 model, the error indexes were reduced between 36 and 63% compared to the second-best model. Only when BIAS was checked, the second-best value was observed. Moreover, the F6 model was also compared to the rest of the proposed models for the power curve. This model (F6) showed good accuracy and the error indexes were 0.2209 (RMSE), 0.1884 (MAD), 0.0823 (MRD), and −0.097 (BIAS). All values were better than the second-best model, except for BIAS, which was the third-best value. Finally, a visual comparison was carried out on the proposed model and the remaining models compared to an experimental PAT curve ( Figure 6). To develop this comparison, the chosen PAT was a radial machine. The specific speed was 5.67 rpm (m, kW) and its nominal rotational speed was 1100 rpm. The best operation point of this machine was defined as 9.762 l/s and 51.267 m w.c., the efficiency being equal to 0.703 [24] Figure 6a shows the accuracy of the proposed study, other published models, and experimental data. All models   Figure 6a shows the accuracy of the proposed study, other published models, and experimental data. All models showed good accuracy when the head curve was compared with the experimental data. However, this accuracy decreased in the rest of the models when α was higher than one. The accuracy of the proposed expressions was much better when the efficiency curves were compared. This visual accuracy, which can only be observed, is supported by analysis of errors indexes shown in Figure 5. In this graph, the proposed expressions reduced over 20% of the error of the other published methods. The mean reduction in the error was 60%. To improve this perception, Figure 6c,d show the comparison between the proposed model and the experimental data. In all cases, the accuracy was good but, when the α was between 0.8 and 1.2, the estimation of the curves showed excellent accuracy.

Conclusions
This research proposed a modification of the affinity laws (MOAL) of the hydraulic machines that are used as pumps working as turbines. This modification was established according to a new methodology, which was defined in this research. The research proposed an analysis with ten general expressions (polynomial and exponential), considering the most significant variables (the ratio of the rotational speed, α, and the ratio of Q and Q BEP ). Finally, a polynomial model (namely F 6 ) depending on α and Q Q BEP was selected, when head and efficiency were estimated, and a potential model (F 7 ) if the power is to be calculated directly. All proposed models exhibited good error indexes (RMSE, MAD, MRD, and BIAS) compared to the others, reducing the errors between 30 and 50% compared to the second-best model.
In addition, the proposed models were checked and compared to 15 different machines, which were tested by varying their rotational speed and its specific speed between 5 and 50 rpm (m, kW). The present model is based on 87 different curves and 56,450 operation points, using the largest database ever published.
The use of these models, which have excellent accuracy when α is between 0.8 and 1.2, is crucial to the development of mathematical models. These are of paramount importance to introduce the use of PATs when the manufacturer curve is not known. This is common when PATs are used, since the manufacturers do not publish these curves in their catalogue. Therefore, the inclusion of these equations will allow water managers to develop simulation tools, which can be introduced in the management of the water systems, improving the accuracy in their operation estimation. These models are expected to give a new impetus in the inclusion of the analysis tools when PATs operate at variable speed in water systems, and water modelers need mathematical expressions to develop simulations and operational limitations. Consequently, future works should be developed in which different procedures are proposed to establish the best variable operating strategy (VOS) in order to maximize the energy recovery using these expressions.