Abstract
Due to recent increasing water demand, planning and projecting of water resources has resulted in increased costs. There-fore, it is important to obtain optimum results in project planning. In this study, dimensioning of open channels used espe-cially for irrigation purposes has been studied using a particle swarm optimization algorithm to investigate optimum base width, channel height, and slope angles. The results are summarized in graphs and tables. In the study, it was found that the optimum slope angle varied between 0 . 20⌣0 . 450. Furthermore, it was found that increasing the slope angle significant-ly increased costs. Finally, the increase in flow increases costs but the rate of increase diminishes.
Introduction
The transportation of water from one point to another has been an important issue historically, and in recent years in particular an increasing need for water has made the issue even more im-portant. Water transmission is necessary for dif-ferent purposes such as agricultural use, general use, energy generation, or flood control. The most common method of water transmission is through channels, and whilst the development of technolo-gy has led to changes in the materials used in these channels, they remain the most common method of water transmission. In open channels, which can be constructed according to various geome-tries, the water surface is in contact with the at-mosphere. Examples of such open channel flows include rivers, irrigation channels, drainage chan-nels, free surface flows in pipes, tunnels, galleries, and sewer networks. Various factors such as base width, depth, and lateral slope affect the design of open channels, and minimizing the cost of canal construction by providing the optimum balance between these factors has become an important issue in engineering.
Open channels have been studied frequently [1, 2], with some researchers interested in speed and flow parameters in open channels, and others focused on channel sizing. Khuntia et al. [3] used multiple regression analysis to estimate the depth-dependent mean velocity of flow in rectangular and trapezoidal open channels. Asnaashari et al. [4] examined the variables of flow in channels with cross-section changes. Easa [5] proposed elliptical cross-sections to open channels. This was found to reduce construction costs compared to other sections. Tofiq and Guven [6] investigat-ed the impact of the ratio of width to depth on the cost of trapezoidal channels. Trout [7] proposed an algebraic technique to design the cross-section of channels with minimum material cost. Guo and Hughes [8] determined the dimensions of a trape-zoidal open channel that minimizes construction costs by keeping hydraulic efficiency high using optimization. Loganathan [9] presented an optimal design solution for parabolic channels.
In recent years, studies with heuristic optimiza-tion methods have become important in this field [10]. Channel sizing was achieved using a genetic algorithm [11–13], particle swarm opti-mization (PSO) [14–16], genetic programming [17, 18], genetic expression programming [19, 20], and loaded system search [21].
In this study, the aim is to optimally dimension open channels. The study was considered in two stages. In the first stage, parameters related to base width, height, and slope angle were determined without restriction and the best slope angle range was established. In the second stage, slope con-stant values were taken. The effect of fixed slope channels on cost and dimensioning was investi-gated. While optimizing the dimensions, PSO, one of the heuristic optimization techniques, was used.
Material and methods
Particle swarm optimization
PSO is an optimization technique inspired by the movements of living creatures [22, 23]. Organ-isms traveling in groups can reach their goals more easily by random movement. Each living thing in the swarm benefits from the experience of both its own and other individuals. In PSO, parameters are determined according to the type of problem. For each parameter, initial positions and speeds are determined in Eqs. (1) and (2), respectively. Com-pliance values between the limit values of all par-ticles are calculated in Eq. (3). The local best (pbest) values are calculated at the end of each iteration. In addition, the global best (gbest) is de-termined within the available values. The velocity of all particles is updated in Eq. (4). During this process, pbest and gbest values are effective in determining the velocity. The previous particle position is updated by adding it with the obtained velocity in Eq. (5). In the codes to be written, the speed and position should not go beyond the lim-its. (Figure 2).
Where Xid is the position, V id is the speed value, W is the inertia weight value, and c1 and c2 are the scaling factors.
When the W value is set to 1, the particle rates increase and the optimum result becomes difficult due to the overshoot. The majority of studies demonstrated good results, obtaining values be-tween 0.2 and 0.9. This reduces the maximum speed, but increases the number of iterations. In a solution with uncomplicated problems with less parameters, the w value can be high, whereas in complex structures w should be lower [24].
The Wilcoxon test is a nonparametric test that examines the normal distribution between two or more paired groups. It is used to determine wheth-er two dependent samples drawn from the popula-tion show the same distribution. To perform the Wilcoxon test, two hypotheses are first estab-lished:
H0: It is identical to the paired-sample t-test.
H1: It is not equal to the paired-sample t-test.
Then, the differences between the results of the paired tests are determined algebraically, and these differences are placed in the order of magni-tude regardless of their signs, with this order taken as the ranking score of each difference. Positive and negative ranking scores are col-lected separately. The absolute smallest of these sums is called the W statistic (Eq. 6). While sort-ing the differences, the average of the ranking val-ues is given to those equal to each other.
H0: The effects of all the conditions compared are the same.
H1: The effects of some of the compared condi-tions are different from each other [25–27].
In channel sizing (Figure 2), the projected dis-charge should be passed at minimum cost. There-fore, constraint and purpose functions should be determined. Constraint functions are determined as the desired flow rate (Eq. 12) and the Froude number (Eq. 14), which is the river regime crite-rion and Reynolds coefficient (Eq. 15) that pre-sents the laminar flow criterion. The objective function is the equation obtained by multiplying and adding the minimum concrete and minimum excavation functions, Eq. 17 and Eq. 18, re-spectively, with certain coefficients in Eq. 19.

PSO flowchart.

Channel section to be optimized.
Here, U shows the wetted perimeter, B the base width, m is the slope, area A, area Q, hydraulic radius n Manning coefficient and slope J.
As a criterion function, the Froude coefficient is less than 1, the Re value is less than 2500, and the resulting speed is greater than the minimum pre-dicted speed. Here, T is the surface water surface, Fris the Froude number, g is gravity acceleration and vis-cosity is ϑ.
Where F is air share, V c is concrete volume, V d is excavation volume, C is unit construction cost, ∝ 1 + ∝ 2 = 1is accepted if the building is constructed with 1m3concrete and 1m3 excavation. Term ∝1 is the ratio of building cost to total cost and ∝2 is the ratio of excavation cost to total cost. Thus, cost is dimensionless. Thanks to these coefficients, it is ensured that the model created is kept up to date in case the unit costs change.
In this model, the optimization method was repeated by changing the flow and slope gradients. The obtained results are summarized with tables and graphs. In this model, a dataset was created by running the model repeatedly for different flows and slopes (Figure 3).

Model flowchart.
The study consisted of two stages. In the first stage, the base width, height, and slope slope of the trapezoidal channel were optimized. For this purpose, variable discharges, constant base slope, and manning coefficients were used. In the second stage, the slope slopes were kept constant and the base width and channel height were both optimized. Graphs were generated for each slope slope value obtained. In both studies, the PSO algorithm was used for optimization of the problem. In the study, the number of iterations was selected as 200 and the number of particles was determined as 500 (Figure 4). In this study, cost function was used for optimization. The objective function was defined as minimizing Eq. 17. However, if the coefficients ∝1 and ∝2 used in this study changed, the dimensions obtained could also change. In this study, although the ∝1 and ∝2 coefficients were made by taking 0.5, it is possible for the model to work with different coefficients. In the first part of this study, the dimensions made for different flow rates indicated that in the most optimal results, b and h values had variable values. However, slope values were found to be very close to each other (see Table 1).

Example of model iterations results.
Comparison of PSO and optimum dimensions for different input parameters
Table 1 presents 10 of the 1024 different sce-narios completed in different combinations. As a result of these scenarios, it was evident that the cost increased while the flow increased and the cost decreased while the slope increased. In addi-tion, it can be said that the increase of the manning coefficient had a negative effect on the cost. It is evident that the change in base width B is quite high compared to the change in height and slope. It can be said that the slope angle varies between 0 . 20 and 0 . 450. This value is proportional to flow and slope; however, it is inversely proportional to the manning coefficient.
In the second part of the study, flow and cost changes were examined. For this purpose, constant slope angle, channel base slope, and roughness coefficient were used (Figure 5). In addition, the relations between flow and b and h were examined (Figure 6). In this scenario, j = 0.0006 was taken and the manning coefficient was taken as 0.016. Slope angle was selected with the values 0 . 10, 0 . 30, 0 . 50, 1 . 00, 1 . 50, 2 . 00, 2 . 50 and 3 . 00. When Figure 4 is examined, it is evident that the costs obtained for slope angles between 0 . 10 and 0 . 50 were very close to each other. All the obtained results were statistically analyzed (Table 2). In addition, Friedman and Wilcoxon signed-rank tests were performed (Table 3). Thus, it was evident that costs in the range of 0 . 10 to 0 . 50 were similar.

Flow-cost relationship for different slope angles.

Relation of b and h values with flow change for different slope angle values.
Descriptive Statistics
Results of Wilcoxon signed-rank test and Friedman test for Fig. 4
When Figure 5 is examined, it is evident that as the flow increases, the base width changes in di-rect proportion with the slope angle. However, it has a high inversely proportional effect. Another finding shows that the slope angle significantly increases the cost outside the 0 . 200 - 0 .450 range obtained in the first section.
Recently, increasing population and industriali-zation have caused the demand for water to in-crease. However, this can generate very high costs to meet this increase in demand. Although random sizing meets constraint functions, it does not meet the minimum requirements economically. For this purpose, many researchers have worked on opti-mum sizing. In this study, PSO was used for this purpose. The study consisted of two parts. In the first part, the costs were optimized using variable flow rates, constant base slope, and the manning coefficient. Accordingly, the flow was demon-strated to be directly proportional to the cost. However, the rate of increase in cost decreases with flow increase. The increase in slope increases costs significantly. It can be said that the optimum slope angle is between 0 . 20 - 0 .450 according to 1024 different scenarios. In the second section, base width and channel height were optimized according to the scenarios with the fixed values. According to this analysis, it was observed that the base width increased with increasing slope angle but the height of the channel decreased with in-creasing slope. In addition, the optimization meth-od can be used because it is fast and reduces costs. In this study, 100 particles were selected and 200 iterations were performed. With these particles, 2000 different size options can be analyzed in as little as 15 seconds to optimize the dimensions, whereas it takes a great deal of time to complete so many different calculations using classical meth-ods. In addition, the result obtained may not be optimal, as it is completed randomly rather than according to a specific rule.
