The numerical development of MOC for analyzing the inclined pipelines using the experimental network of Babol Noshirvani University as a case study

Despite the applications of the Method of Characteristics (MOC) for analyzing the unsteady flows, using this method in networks with variable elevations still has many challenges. In this paper, by developing modified correlations as a computer code, the possibility of analyzing inclined pipelines has been evaluated. For validation and calibration, the results of MOC were compared with the results of EPANET software as well as experimental data. To extract experimental data, the water network of Babol Noshirvani University of Technology (NIT) with a constant head of 7 m three loops, and four inclined branches were employed. While evaluating the capabilities of the developed computer code, the results show that for all pipes, as the number of pressure fluctuations in a specific period increases, the intensity of the pressure fluctuations decreases, and the damping speed increases as well. Moreover, in inclined pipes, unlike non-inclined pipes, the intensity of pressure fluctuations will increase as the elevation increases and the cross-sectional distance from the transient event increases as well. The evaluation of the effect of space steps on the accuracy of the solution to the MOC shows that in the study network, considering 20 segments for each pipe, the fastest response time with an error of less than 1% is obtained.


GRAPHICAL ABSTRACT INTRODUCTION
The presentation and developments of models that can precisely simulate the flow in the pipes and water distribution networks (WDNs) are significantly important (Kapelan ). Nowadays, different methods have been presented for hydraulic analysis of WDNs with various purposes, such as estimating the amount of leakage (Negharchi & Shafaghat ). To select a method or an optimized tool for analyzing the flow in WDNs, the flow state in terms of being steady or unsteady is considerably determining. Different tools in software packages have been developed that present accurate and reliable results for analyzing steady flows. EPANET and Watergems are some of these software packages. It is noteworthy that usually, in WDNs, considering the unsteady pressure and quick changes in the flow rate is essential.     • The water level in the tank is 7 m higher than the end of the network. In this situation, higher flow rates with fewer fluctuations can be obtained in transient conditions.
• By adjusting the outlet valve, a transient event is formed in the network.
• The pipe lengths are equal (with reasonable precision); thus, their Courant number is identical.
• The intersection where the valves and sensors are installed (using a bifurcation belt) is placed on points that are a multiple of the obtained space step based on the Courant number.
• A turbine flowmeter is installed at the end of the system.  Wide operating temperature range À20 C to 60 C assuming a control volume and using the Reynolds transport theorem, these equations can be extracted as Equations (1) and (2) for a differential element of the fluid flow (Chaudhry where, x: coordinate along the pipe axis The MOC has solved the set of differential equations. Completing the space step calculations, the boundary conditions of upstream (the tank with constant pressure) and downstream (the valve that creates the transient event) are considered.

Method of characteristics
In this method, momentum and continuity equations are rewritten, then by applying the pipe resistance factor, the partial differential equations are simplified (Chaudhry C n , C a , and C p are constants that depend on the used numerical approach for expressing steady-state friction, the The 0 , ″, and 000 are related to the steady-state friction, unsteady-state friction, and mechanical behavior of the pipes. The numerical definition for each of the coefficients has been presented in Table 1 by Soares et al. (). The B parameter is a function of the fluid and pipe properties: And for the laminar and turbulent flows, R (the pipe resistance factor) is defined as follows (Covas ): The solution algorithm of the network using the MOC has been shown in Figure 3. In the examinations, the following assumptions were considered for the pipes: • The behavior of the pipe wall material is linear-elastic, and the pipe material is high-density polyethylene (HDPE).
• The fluid is homogenous, single-phase, and compressible.
• The pipe diameter is constant, completely uniform, and constrained against all axial or lateral movements.
• The flow is under pressure.
• The influence of cavitation (including the separation of the fluid column and the trapped air bubbles), leaks, and the interaction of fluid and the structure are ignored.

Estimating friction loss
To estimate the steady-state loss, different methods have been employed. In this research, for the laminar flow condition (Re < 2,000), this loss was estimated in a quasisteady state using Hagen-Poiseuille explicit correlations (Equation (11)) and for the turbulent flow (Re > 4,000) the where k 0 is the Brunone friction factor, θ is the Relaxation coefficient, and the sign operator is the signal function.
The flow parameter in the i section and for the j time for all of the inner sections of the pipe is modeled as follows: Also, for the two ends of each pipe, some extra correlations that define the boundary conditions should be specified (Covas ).

Developing the correlations for an inclined pipe underpressure
As it was discussed before, one of the conventional conditions in the WDNs is the presence of slope in the pipelines. Considering the structure of the experimental model in this paper, and the presence of slope in some pipes of this network, by defining the slope in the pipeline as Equation (18), Equations (5) and (6) are modified as Equations (19) and (20), respectively: In which Sl is the slope of the pipeline, and 1 and 0 subscripts show the final and initial points of the pipe. The schematic of the mathematical model of Equations (19) and (20) is presented in Figure 4.

Validation of the computer code
As discussed, for calibrating the studied network, the local losses from the fittings and the correct roughness values of the pipes have been applied. The equivalent length can be used to calculate the pressure loss fittings (Covas ). For this purpose, at first, using the EPANET.2 hydraulic analysis software, the system condition was simulated without considering the losses. Based on the initial conditions, the network was modeled in the computer code using the MOC solution method. Based on Table 2, using both of these methods, the distributed flow in each branch was calculated as identical values.
The flow rate through each of these branches was measured and recorded using portable ultrasonic flowmeters three times.
To perform a calibration process and make the model conditions more realistic, all of the fittings were considered pipes so that instead of a three-way tee, three pipes that are connected were used. Thus, the typical structure of the network, which included 10 nodes and 12 pipes, was modeled with 32 nodes and 34 branches ( Figure 5); then the equivalent length of each of these added pipes was considered, and finally, the

RESULTS AND DISCUSSION
In this research, the hydraulic conditions of steady and unsteady flows have been studied for a pipe network with   shows the magnification for a part of the time interval (from 1 to 1.6 s). Examining Figure 7 shows that the number of pressure fluctuations in each pipe negatively affects these fluctuations' intensity. Therefore, in the pipe networks, with a higher distance from the transient event, the number of pressure fluctuations in a specific period will be higher, although their intensity reduces. Also, as this distance increases, the damping speed rises.
To evaluate the damping speed of the pressure fluctuations in different parts of the network, the criteria fluctuation amplitude for the pressure fluctuations is considered to be 0.2 m (Figure 8).
Influence of slope on the intensity and number of pressure fluctuations     Comparing the solution behavior with different space steps for nodes 3, 15, and 22 for the first 3 s has been presented in Figure 10. As it can be observed, Figure 10 Figure 11, the solution with N s ¼ 4 exhibits high error values, so that the error in node 15 reaches up to 9%. On the other hand, when N s ¼ 20 is used, the error is always lower than 1%, and that verifies the reliability of the solution.

CONCLUSION AND FUTURE WORKS
The hydraulic analysis of steady and unsteady flows using MOC is a powerful solution for many practical applications, and the development of this method has always been an area of interest for many researchers. • The losses were specified as the equivalent length and the network was calibrated by transforming the fittings to a pipe structure.
• The C þ and C À equations in the MOC were developed and introduced for inclined pipes. This method is used in the hydraulic analysis of WDNs to manage pressure, reduce leakage, etc.
• In the pipe networks with a higher distance between the pipe and the transient event, the number of pressure fluctuations in a specified period increases, but the intensity of these fluctuations decreases. Also, as this distance increases, the damping speed rises.
• In the inclined pipes, lower pressure fluctuations are observed at the end of the pipe, meaning that it is closer than the transient event but has a lower elevation.
• After some time, the pressure difference in different pipe sections becomes closer to the final pressure difference.
In the pipe, with higher pressure fluctuation intensity, this happens earlier.
• The number and duration of each pressure fluctuation are identical in different space steps.
• The changes of N s in the range of 4-40 have been examined.
Based on the examinations, even with one segment, acceptable results can be obtained. Also, it was observed that increasing N s leads to numerical results closer to the real values.
• To increase the solution speed and get acceptable solution accuracy, the proper space step was selected. The results indicated that by choosing a space step (x ¼ 0.1 m or smaller), results with less than 1% error can be obtained.
Analysis of changes in the intensity and number of pressure fluctuations in a specific longitudinal range to detect leakage (as a transient event) can be considered as an important goal of this research in future work. Also, combining the two methods of using metaheuristic algorithms and modeling by specifying a proper space step can be considered to improve the solution speed of the MOC method.

DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.