# Optimization of Water Pressure of a Distribution Network within the Water-Energy Nexus
## 3 Case Study  
The network of Baharestan city, located in the Isfahan province of Iran, was investigated to illustrate the potential of the developed model to establish a water-energy nexus based on local factors. This network consists of 71 nodes, 107 pipes, 1 reservoir, and 1 PRV for altering the average pressure of the network. The characteristics of the nodes and pipes are presented in Tables 1 and 2, respectively. To calibrate the pipe roughness coefficient and nodal demand of the hydraulic model, the genetic algorithm was applied based on the following steps [62]:  
1. Preparation of hydraulic parameters of the existing water network (information of nodes and network pipes). 2. Implementing genetic algorithm for determining the parameters with uncertainty. 3. Conducting the optimization process for calibration by calculating the mean absolute percentage error (MAPE) using Equation (11). \[\text{MAPE}=\frac{1}{\text{m}}\sum\limits_{i=1}^{\text{m}}\frac{|\text{Actual }_{i}-\text{Forecast}_{i}|}{\text{Actual}_{i}}\times 100 \tag{11}\]  
In this formula, \(\text{m}\) is the number of data, and \(\text{Actual}_{i}\) and \(\text{Forecast}_{i}\) are the measured and simulated value of considered parameters at point i. 4. Comparing the empirical and calculated results at each iteration. 5. Calculating the objective function and finally obtaining the optimal solution in which the defined conditions for calibration is satisfied. This process was performed using two consumption scenarios (normal and fire flow). To calculate the considered variables (Hazen-Williams roughness coefficient and nodal demand), pressure head measurements at 20 nodes for Baharestan water network were used for EPANET calibration. The MAPE factor was used to evaluate the results. Based on the results, the Hazen-Williams coefficient was estimated to be 130. The schematic of the network is presented in Figure 3. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Node** & **Elevation (m)** & **Base Demand (L/s)** & **Node** & **Elevation (m)** & **Base Demand (L/s)** & **Node** & **Elevation (m)** & **Base Demand (L/s)** \\ \hline
1 & 1592 & 8 & 25 & 1551 & 8 & 49 & 1565 & 4 \\
2 & 1575 & 3 & 26 & 1556 & 16 & 50 & 1571 & 2 \\
3 & 1583 & 8 & 27 & 1566 & 15 & 51 & 1573 & 2 \\
4 & 1572 & 7 & 28 & 1570 & 6 & 52 & 1585 & 4 \\
5 & 1585 & 1 & 29 & 1569 & 8 & 53 & 1586 & 2 \\
6 & 1585 & 8 & 30 & 1566 & 13 & 54 & 1556 & 4 \\
7 & 1592 & 7 & 31 & 1563 & 10 & 55 & 1555 & 4 \\
8 & 1588 & 7 & 32 & 1566 & 5 & 56 & 1559 & 4 \\
9 & 1588 & 7 & 33 & 1565 & 5 & 57 & 1559 & 3 \\
10 & 1584 & 5 & 34 & 1562 & 9 & 58 & 1571 & 4 \\
11 & 1569 & 7 & 35 & 1554 & 10 & 59 & 1573 & 1 \\
12 & 1568 & 12 & 36 & 1596 & 4 & 60 & 1576 & 4 \\
13 & 1562 & 12 & 37 & 1598 & 4 & 61 & 1557 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Information on Baharestan’s nodes. The data needed to run the water section of the model were gathered (Table 3). The values of some parameters (e.g., leakage in the basic situation, burst frequency in the basic situation, leakage exponent, burst exponent, and the base demand of each node and related information) were gathered from data of previous years. These data and the data used for \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Node** & **Elevation (m)** & **Base Demand (L/s)** & **Node** & **Elevation (m)** & **Base Demand (L/s)** & **Node** & **Elevation (m)** & **Base Demand (L/s)** \\ \hline
14 & 1553 & 13 & 38 & 1561 & 3 & 62 & 1586 & 5 \\
15 & 1590 & 2 & 39 & 1563 & 4 & 63 & 1586 & 4 \\
16 & 1559 & 3 & 40 & 1589 & 4 & 64 & 1567 & 4 \\
17 & 1552 & 7 & 41 & 1586 & 1 & 65 & 1567 & 5 \\
18 & 1550 & 4 & 42 & 1574 & 9 & 66 & 1556 & 2 \\
19 & 1552 & 7 & 43 & 1572 & 9 & 67 & 1554 & 1 \\
20 & 1566 & 4 & 44 & 1563 & 3 & 68 & 1561 & 6 \\
21 & 1584 & 8 & 45 & 1563 & 10 & 69 & 1561 & 2 \\
22 & 1554 & 8 & 46 & 1568 & 5 & 70 & 1579 & 2 \\
23 & 1551 & 12 & 47 & 1569 & 2 & 71 & 1579 & 4 \\
24 & 1565 & 5 & 48 & 1563 & 5 & & & \\ \hline \hline \end{tabular}
\end{table}