Optimization of Multi-zone Cooling System of Complex Pipe Network Based on Particle Swarm and Genetic Algorithm

. The cooling pipe network system of the power plant has the characteristics of multiple users, multiple working conditions, and complex topological structure. The division of water supply to the pipe network can simplify the topological structure of the pipe network, facilitate flow regulation, and adapt to the requirements of multiple working conditions. District water supply can be divided into districts according to flow, pressure and structure. The user allocation of pipe network water supply system is a typical combined optimization problem. When the system is relatively complex and the number of users is huge, conventional enumeration methods, dynamic programming and other methods are often unable to solve such problems. The combined algorithm of particle swarm algorithm and genetic algorithm can obtain approximate solutions to such problems. By using a combination of particle swarm algorithm and genetic algorithm to analyze and determine the distribution of pipe network user traffic, it is possible to avoid the waste of energy in the distribution of pipe network users based on experience. The combined algorithm proposed in this paper has high stability, can change the number of partitions to adjust user allocation according to actual needs, and has strong versatility. For the case described in this article, when the number of partitions is 2, compared to the cases where the number of partitions is 3 and 4, the flow rate and pressure drop of each partition are not much different, which can better meet the reliability and maintainability requirements


Introduction
The complex cooling pipe network system has the characteristics of multiple users, multiple working conditions, and complex topological structure. The division of water supply to the pipe network can simplify the topological structure of the pipe network, facilitate flow adjustment, and adapt to the requirements of multiple working conditions. District water supply can be divided into districts according to flow, pressure and structure [1][2][3].
The pipe network of the complex cooling system is a tree-like network, and each subsystem user branch adopts a parallel structure, and each branch provides water supply through the main pipe and is discharged by a sea valve. The user branch is composed of users, inlet and outlet valves, linked pipelines and other pipeline accessories as shown in fig.1 . In each partition subsystem, each user adopts the form of parallel connection, and the water supply system of the pipe network should choose the same type of pump, which can improve the maintainability of the entire system, facilitate mutual replacement, and enhance the reliability of the system [4][5].
a. Partition according to flow The water supply pipe network can be divided into several areas according to the flow demand of each user and combined with the rated flow of the centrifugal pump. Suppose there is a user, and the rated flow of each user is, then there is the following relationship between the rated flow of the initially selected pump and the number of partitions: b. Partition according to branch pressure In the zoning subsystem, each user adopts the form of parallel connection, and the pressure drop caused by the corresponding flow of each branch is the same. If the flow is to be accurately distributed among the users, users with similar pressure drops under the rated flow should be allocated in one Inside the partition.
c. Partition according to the topology of the pipe network 2 Models and algorithms

System model
The working medium of the system is seawater. The density is between 1.006×10 3 kg/m 3 and 1.027×10 3 kg/m 3 and kinematic viscosity of seawater is between 1.06×10 -6 m2/s and 2×10 -6 m 2 /s as water temperature is between 274K and 305K, the average density of seawater is set as 1025kg/m 3 .
The resistance coefficient of the seawater cooling user and the filter and the effective flow diameter D of the pipeline are known. In the simulation, the seawater cooling user is equivalent to the throttle.
Based on Bernoulli equation: Ignore the height difference between the inlet and outlet, and consider that the diameter of the inlet and outlet pipes connected to the cooling pipeline of the seawater cooling user is the same, so under the condition of no leakage, the average inlet and outlet speeds are equal. thereby: The formula for calculating local resistance is: Then we can get following equation, Under the condition that the relationship between the pressure drop and the flow rate of the cooling user's cooling pipeline is known, the corresponding drag coefficient can be obtained for different flow crosssectional areas. 1 2 2 ( ). , q p p p q f dp k dp k Formula for flow gain parameter: According to calculations, the water flow in the seawater cooling pipeline system is mostly turbulent. In the element mathematical model, when the flow pattern is turbulent, Cq reaches the maximum value of 0.7. When the valve local resistance coefficient and the pipe inner diameter are given, take Cq to the maximum value of 0.7, and the maximum opening equivalent of each valve in the system can be calculated Cross-sectional area.
The valve is equivalent to a throttle, the calculation formula is: Therefore, the resistance coefficient of the valve is known by the formula: (8) 2 2 2 Where Ag is the cross-sectional area of the pipeline. The mathematical model of the two-position twoway valve is: Where, Af is the equivalent orifice area. The equivalent orifice area calculation formula can be obtained: According to calculations, the water flow in the seawater cooling pipeline system is mostly turbulent. In the element mathematical model, when the flow pattern is turbulent, Cq reaches the maximum value of 0.7. When the valve local resistance coefficient and the pipe inner diameter are given, take Cq to the maximum value of 0.7, and the maximum opening equivalent of each valve in the system can be calculated Cross-sectional area.
By simplifying the problem and considering the actual situation, we take the branch pressure close to the optimal goal. Assuming that the number of users is, the number of partitions is, and the pressure drop generated by each user is, here, the model of the problem of user allocation in the pipe network can be simplified as: In formula (3), there can only one element in the column of the matrix equal 1, and the rest are all 0.
The partition optimization of the pipe network is a typical combined optimization problem. When the number of users is large, the enumeration method is obviously inappropriate. Dynamic programming can solve the knapsack problem very well, but it does not seem to give a good answer to the case of multiple partitions. To this end, we use a heuristic group intelligence algorithm to solve this problem.

Particle swarm algorithm and genetic algorithm
Particle swarm optimization (PSO) is a swarm intelligence optimization algorithm proposed by Barnhart and Kennedy in 1995. The algorithm is derived from the study of bird predation. When birds are preying, it is the easiest to find food. An effective method strategy is to search the surrounding area of the bird that is currently closest to the food. Each particle in the algorithm represents a potential solution of the problem, and each particle corresponds to a fitness value determined by the fitness function. The speed of the particle determines the direction and distance of the particle's movement, and the speed is dynamically adjusted according to the movement experience of itself and other particles, so as to realize the optimization of the individual in the feasible solution space.
The particle swarm algorithm is a computational intelligence field. In addition to the ant colony algorithm and the fish swarm algorithm, each particle updates its own speed and position according to its own optimal position and the global optimal position of the group. Due to the influence of the global optimal position of the group, each particle quickly converges to the vicinity of the global optimal position, which is fast, effective and robust, and has no continuous different requirements for the optimization function, and strong versatility.
The standard particle swarm algorithm completes the optimization of the extreme value by following the individual extreme value and the group extreme value. As the number of iterations increases, while the population converges and concentrates, each particle will get closer and closer, and may fall into a local optimal solution. And unable to jump out.
The genetic algorithm (GA) was proposed by Holland et.al. Its basic principle is to use the solution population as the working space, and use the principle of "natural selection by nature, survival of the fittest" imitating biological evolution to guide search and Improve goals. The algorithm encodes the problem parameters into chromosomes, and then uses iterative methods to perform operations such as selection, crossover, and mutation to exchange information about chromosomes in the population, and finally generate chromosomes that meet the optimization goals. Genetic algorithm has the characteristics of high efficiency, strong robustness, versatility and flexibility.
The swarm intelligence algorithm is very powerful in solving practical engineering problems. In this paper, an improved particle swarm algorithm and genetic algorithm will be used to give a partition optimization plan for the pipe network. The flow chart of the algorithm is shown as fig.2.
Putting users who are close to each other in the same partition can reduce the total length of the pipeline, saving space and cost.
(1) Particle coding Individual particles are coded by integers, and each element of each particle can be any integer in between. For example, when, the particle code means that the first user is divided into zone 1, and the second user is divided into zone 4. The third user is divided into zone 2, and so on.
(2) Fitness function The fitness of the particle is taken as the derivative of the maximum value of the difference between the pressure drop of the users in the same area and the difference of each element in the set. The calculation formula is (3) Cross operation Particles are updated through the intersection of individual extreme values and group extreme values, and the intersection positions are randomly selected and exchanged.
(4) Mutation operation The particle randomly selects the mutation position and the mutation value through the individual extreme value and the group extreme value, and replaces it.

Results and discussion
There are 15 users in the pipe network, and the cooling water demand of each user under different operating conditions is shown in the following table 1. The biggest difference in water consumption under different working conditions is about 13.3%, and user 13 has the most critical influence.
Taking operating condition A as an example, the pressure drop of cooling water through each user is shown in the following table 2. The user with the largest pressure drop is No.1 and the user with the smallest pressure drop is No.7.  When the system is divided into three cooling zones, the calculating results of water demand of each zone are as shown in table 4. The pressure drop of each zone is also nearly same. And the total pressure drop of the whole system is also nearly same as that in table 3.
When the system is divided into four cooling zones, the calculating results of water demand of each zone are as shown in table 5.  The pressure drop of each zone is not nearly same with a relative large pressure drop in zone III. While the total pressure drop of the whole system is also nearly same as that in table 3 and table 4.
Relationship between total pressure drop and iteration number is as shown in fig. 3. As iteration number grows up, the maximum pressure drop decreases and goes stable while the iteration number is larger than 50. This shows that the algorithm proposed in this paper can quickly obtain stable calculation partition results

Conclusion
Through the use of particle swarm algorithm and genetic algorithm to analyze the distribution of pipe network users, the conventional method of assigning pipe network users based on experience is effectively improved. The algorithm has a high degree of stability, the number of partitions can be changed according to actual needs to adjust the user allocation, and it is versatile. At the same time, it can be noticed that when the number of zones is 2, compared with the cases where the number of zones is 3 and 4, the flow and pressure drop of each zone are not much different, which can better meet the reliability and maintainability requirements.