Based on a biological particle model to predict the trace behavior of fish

A biological particle model is used to predict the upward trajectory of fish under a dam, the biological particle model refers to a fish as a particle and considers the flow rate, velocity gradient and turbulent energy of the fish, as a condition of retrospective behaviour, a control equation is used to simplify the fish’s retroactive behaviour and establish a model programmed in MATLAB to develop a fish traceability prediction program. According to the program, the upward trajectory of the fish under the dam is predicted, there are three types of up-tracking channels under the dam according to the average widths of the up-tracking channels along the right bank of the channel, along the middle of the channel, and along the left bank of the channel and the average widths are 10, 14 and 7 m, respectively. The three existing fish import locations in the fishway project are evaluated, and optimization recommendations are provided, it is recommended to add a fishway inlet along the right bank of the upstream channel. In addition, this paper provides a feasible technical methodology by which a biological particle model can be used to predict the upward trajectory of fish in similar fishway projects.


INTRODUCTION
The construction of water conservancy projects has actively played a role in power generation, flood control, irrigation and the supply of water, but these projects change the natural hydrological situation of the original river channel, thereby affecting the connectivity of natural rivers to a certain extent, blocking fish's upward access and affecting fish survival and genetic communication (An et al. 2016). The construction of fishways can effectively solve the above problems, helping the fish under the dam to successfully overcome the dam barrier and successfully complete a migration (Lindberg et al. 2013;Song et al. 2019).
For fishways, the key issue is attracting fish targets, the primary problem faced when attracting fish is determining the fishway import location, which lies at the core of the effective operation of fishways (Zheng et al. 2018). When building a fishway, it is important to choose a suitable location where the fish can accurately find the entrance (Williams et al. 2012). There are many studies on the migration behavior of fish near the fishway, and some researches focus on how the discharge regime was adjusted to attract fish to a fishway entrance according to the swimming performances of the fish (Chen et al. 2019); some researches were devoted to optimizing the structural design of fishways to improve their passability for fish (An et al. 2016;Quaranta et al. 2017). Xie (2017) used numerical simulation to calculate the hydraulic conditions of the inlet water flow at two different fishway inlets and found that the fishway inlet formed by the diversion wall and the bank slope is more capable of attracting fish. Abad et al. (2015) used FLOW-3D to research the relationship between fishway inlets and downstream river channels, and make suggestions on the selection of fishway inlets and the optimization of fishway structure through k-ε model and VOF method. A comparative experiment was conducted by Li et al. (2021) in vertical slot fishways to analyze the behavior of Schizothorax prenanti in response to different flow patterns, found that a flow pattern with a guide wall length-to-pool width ratio of P/B ¼ 0.25, in which it can immediately find the sidewall, is suitable for fish migration.
Regarding the study of fish's retrospective behavior, many researchers focus on the correlation between fish's retrospective behavior and hydrodynamic conditions, such as the flow velocity, velocity gradient and turbulent energy. Scott & Magoulick (2008) studied the swimming ability of various fishes, obtaining the relationship between the roughness of the bottom material and the preference of fish velocity, Kemp & O'Hanley (2010) found that the design velocity of the vertical slot inside the fishway should not exceed the critical swimming speed. The velocity gradient may be different in the same area of the river channel, the difference in velocity gradient will affect the fish's retrospective behavior, it plays a role in 'navigation' and helps fish find suitable areas according to the flow rate, thereby affecting the fish's retrospective behavior. When the turbulent energy is large, fish find it difficult to maintain their normal swimming posture during the retrospective process, and serious physical damage may occur. Andersson et al. (2012) found that the salmon can use the turbulent structure of the vortex to save energy to complete the retrospective process, but the size of the vortex cannot be too large, so that salmon can recognize the upward direction. Tritico & Cotel (2010) conducted experiments in a rectangular tank and found that the vortex has the greatest effect on fish swimming behavior; when the vortex radius is equal to the length of the fish body, it has the greatest impact on fish swimming behavior, which is mainly reflected in the fish's ability to maintain balance.
In this paper, a bio-particle model is used to obtain the upward trajectory of fish under various working conditions; the simulated range is 800-250 m from the river section under the dam, we obtained three types of up-tracking channels and the success rate of fish traced back to the tailrace. Furthermore, we hope to discuss the feasibility of this method for designing and optimizing entrances to fishway facilities.

Study site
In the simulation, a power station is located on a river, the power station consists of a concrete gravity dam and a dam-type factory building. The design flow rate of the power station is 106 m 3 /s, and a total of 6 generator sets are installed. The layout of the power station is shown in Figure 1. The fishway project is arranged on the right bank of the power station channel, and its import location has three fishway inlets labelled 1#-3#, which are all located in the tailwater channel under the power station dam. The elevations of the three imported floor plates are 3,241.00 m, 3,243.00 m and 3,245.60 m.

Target fish
In this paper, typical fishes in the cold regions of a plateau, such as Schizothorax macropogon, Schizothorax oconnori, and Schizothorax waltoni, are considered for predicting the up-track behavior in a river section under a power station dam. Through the test of the swimming ability of the target fish, the induction velocity, critical swimming velocity and bursting velocity of the typical fishes are 0.04 m/s, 0.07 m/s, 0.08 m/s, 0.83 m/s, 0.95 m/s, 0.91 m/s, and 1.22 m/s, 1.53 m/s, 1.37 m/s, respectively.  Water Supply Vol 21 No 8,4045 Relationship between fish ecological behavior and hydraulics

Flow rate
The flow rate is the most direct and primitive parameter of fish stimulation: most ecological behaviors of fish are closely related to the flow rate, different fish populations, even individuals of the same population, will exhibit different flow rate preferences and different flow rates, leading to different swimming behaviors. Therefore, the flow rate is the most important hydraulic factor affecting the fish's up-tracking process (Lindmark & Gustavsson 2008). The flow rate value can usually be directly extracted by Tecplot software.

Flow rate gradient
The velocity gradient reflects the interpolation of the spatial velocity, which is used to describe the degree of dispersion of the flow field. The velocity gradient plays an important role in fish retrogression, it plays a role in 'navigation' and helps fish find suitable areas according to the flow rate. Therefore, the flow gradient is the second most important hydraulic factor affecting the fish up-tracking process (Han et al. 2013).
For fish traceability behavior, a change in the lateral flow gradient is more obvious to the fish lateral tube nerve hill, which causes fish to adjust the swimming direction, therefore, the flow rate of the water flow in the lateral direction should receive more attention in the simulation (Parker & Paine 2005). A differential method is used to determine the lateral change rate of the combined flow velocity in the Y direction. As long as the step size Y is sufficiently small, we can assume that the rate of change is the lateral flow velocity gradient. The lateral flow gradient formula is: where dV is the local velocity and dY is the local grid size in this study.

Turbulent energy
The turbulent energy reflects the characteristics of the pulsating flow velocity amplitude and the turbulent state of the water flow (Smith et al. 2006). When the turbulent energy is large, fish cannot maintain a normal swimming posture, lose balance, and have even experience degrees of damage. Unlike the stimulation of fish by the flow rate and velocity gradient, turbulent energy does not play a 'navigation' role in the direction of the fish's retrogression, turbulent energy is used as an indicator to measure the energy consumption during the fish's retrogression, priority is given to regions with less turbulent kinetic energy when the flow rate and flow rate gradient are satisfied. Therefore, turbulent energy is a hydraulic influence factor that is less important in fish traceability than the flow rate and velocity gradient. The turbulent water flow tested in this paper uses the root mean square of the pulsating flow velocity as the water flow turbulence intensity Tu, namely: The turbulent energy calculation formula is: pulsating flow velocity, in units of m/s; T u , T v , and T w are the turbulence intensities in three directions, in units of m/s, and k is turbulent energy, in units of m 2 /s 2 (Brannon 2006).

Numerical simulation
In the numerical simulation study, the range of the three-dimensional model is as follows: the range in the X direction is À600-900 m, the range in the Y direction is À80-500 m, and the range in the Z direction (elevation) is 3,210-3,340 m. Chen et al. (2019) shows a three-dimensional mathematical model of a power station, it adopts a hexahedral structured grid, and the regions of the tail drain, the stilling pool and the spillway are partially encrypted to ensure the calculation accuracy of the region. The total number of meshes is approximately 5.65 million, the smallest dimensions in the X, Y, and Z directions are 1 m, and the largest sizes are 6 m, 7.8 m, and 2.8 m, respectively.

Simulation conditions
The representative working conditions are selected as the numerical simulation conditions, and the working conditions should comprehensively consider the fish pass season, the power station dispatching operation mode and the typical period of cluster monitoring. First, the typical operating conditions during the monitoring period are selected as the inversion conditions under the dam, according to the results of monitoring under the dam, a large number of fish are observed, and the cluster characteristics are obvious on May 15th, therefore, this day is considered as working condition 1 of numerical simulation calculation. At the same time, according to the historical operation data of the fish pass period, we set the operating condition which is the more common in dispatching operation mode in the fish passage season from March to June to working condition 2. In addition, June is associated with both the fish pass of the fishway and the flood season. Therefore, the inversion of the flow field under the flood discharge flow is necessary to analyse the flow field under the dam in the whole fish season, so it is set to working condition 3.
Since the daytime flow of the power station is relatively stable, the above conditions are considered when calculating the average flow rate of 12 hours during the day as the flow control condition for each working condition. The three-dimensional numerical simulation conditions of the hydropower station are set as shown in Table 1, the turbine arrangement is from the 1F to 6F turbine from the left bank to the right bank, correspondingly.

Biological particle model
In this paper, a fish is regarded as a particle, and ecological hydraulic conditions such as flow velocity and velocity gradient are used as constraints that affect the fish's retrogressive behavior; then, a series of governing equations are used to simplify the fish's up-track behavior and establish a biological particle model, the biological particle model is realized in MATLAB, and a program is constructed to predict the fish's retrogressive behavior. This article does not consider the rest, foraging and other behaviors caused by accidental factors during the fish's retrospective process.

Model principle
The biological particle model is based on the centroid of the fish body, a fish is treated as a particle, and the fish's retrogressive behavior is replaced by the particle. Fine meshing of the flow field is used in the area where fish are located, with each grid representing a certain hydraulic value, including the flow rate, flow rate gradient, and turbulent energy. The fish sideline has a certain range of perception, in the flow field represented by the mesh within its sensing range, the fish will choose the grid with its preferred hydraulic characteristics according to its preference for hydraulic conditions, the position of the swimming step is completed in this cycle (Wei et al. 2013). Figure 2 shows a schematic diagram of the model.

Model governing equation
The main governing equations of the biological particle model are the preference degree transformation equation and the search equation, which are used to quantify the fish's preference for the flow field and determine the fish's perception range for the flow field.
Preference degree transformation equation. The role of the preference degree transformation equation is to quantify the river flow field as a weight field of the fish's preference for the flow field and regard the fish's up-track behavior in the water flow field as the up-track behavior in the weight field, the complex choice of the flow field translates into the choice of a single variable, the choice of weights. Specifically, the flow field data at each grid point are converted into a specific weight value according to the preference of different hydraulic conditions in the fish traceback process, the weight value represents the degree of preference of a particular location flow field for the fish in the retrospective process. The degree of preference conversion equation is : where s is 1, 2, and 3 for the three hydraulic factors of flow velocity, flow velocity gradient, and turbulent kinetic energy, respectively; fw s indicates the degree of preference of fish for the specific value of the s hydrodynamic factor; a s indicates the degree of preference of the hydraulic factor; that is, the weight value; p s represents the hydraulic value within the perceived radius; u s is the most preferred hydraulic value for fish. In this paper, the preferred flow velocity of fish is set to 0.67 m/s; the preferred velocity gradient of fish is set to 0.92 s À1 , and the preferred turbulent energy of fish is set to 0.044 m 2 /s 2 . In addition, s 2 s represents the variance of the normal function, and indicates the size of the selection of each factor. The greater the degree of preference calculated using equation F above, the greater the likelihood that the fish will move to that location in the next moment.
Search equation. It has been suggested that the range of fish perception is a three-dimensional space with the centre of mass as the origin (Goodwin et al. 2006). This paper focuses on the upward behavior of fish in a two-dimensional plane, thus ignoring the perception and swimming behavior in the vertical direction. In this paper, the flow field search equation is used to describe the fish's perceptual range. The circular equation of R is the circular equation for the flow field search equation, and the weight of the ownership within the perceived range is used as the potential target motion position of where x n and y n are the boundary coordinates of the fish's perceived circle; x nÀ1 and y nÀ1 represent the centroid coordinates of the fish body; R represents the perceived radius of the fish; and the perceived radius depends on the accuracy of the mesh division.

Model parameter setting
In addition to hydraulic indicators such as flow velocity, velocity gradient and turbulent kinetic energy, there are also nonhydraulic parameters such as the grid accuracy in the numerical simulation, fish sensing range and up-tracking direction. It is necessary to set the non-hydraulic parameters and quantify the degree of preference of fish for various hydraulic conditions; that is, the weight of each hydraulic condition.
Determining the search radius. The prediction of fish up-track behavior requires coupling the objective flow field and fish behavior, the accuracy of the flow field depends on the accuracy and computational efficiency of the mathematical model, the choice of the motion position within the fish perception range depends on the numerical simulation meshing, the more meshes in the sensing range, the more accurate the fish's perception of the water flow will be if the perceived radius is not too large; otherwise, it will deviate too much from the actual results. The smallest planar mesh size employed in this paper is 1 m Â 1 m. Based on a lack of the perceptual radius of typical fish in a plateau cold region and considering the influence of the grid size and perceptual radius on the fish's perception ability, the fish's perceptual radius is taken as 5 m.
Sensitivity analysis. The search radius of fish varies for different types of fish and different body types, and the search radius represents the fish's perception ability. Considering the influence of the grid size on the biological particle model, the search radius is 5 m, and the fish's up-track behavior predicts that the search radius is in the range of 1-10 m, the prediction results show that when the radius is greater than 5 m, the fish's upward trajectory is basically the same as the search radius of 5 m, when the search radius is less than 5 m, since the minimum size of the mesh is 1 m, the grid points within the search radius are very small, and the prediction program enters an endless loop or stops predicting. Therefore, this paper chooses a search radius of 5 m to predict the fish's retrogressive behavior, which is the minimum value that can be predicted by the bioparticle model with the current meshing accuracy.
Weight calculation. In this paper, we use the normal function of σ to calculate the weights of different values of the three hydraulic factors of flow velocity, velocity gradient and turbulent kinetic energy. The up-track behavior of fish is sensitive to different hydraulic indexes; therefore, determining the weight of each hydraulic index plays an important role in simulating the up-track behavior, based on the calculated hydraulic weight, it is superimposed and calculated according to its sensitivity to obtain a comprehensive weight. The sensitivity of fish up-tracking behavior to various hydraulic indicators can be determined by the Analytic Hierarchy Process (AHP) (Saaty 2003). This paper only analyses the hydraulic factors that affect the fish's retrogressive behavior. The preference for the hydraulic characteristics of a certain grid position in fish up-tracking behavior is decomposed into three indexes: the flow velocity, turbulent kinetic energy and flow velocity gradient, which are represented by A 1 , A 2 and A 3 , respectively. According to the importance of these three indicators regarding the impact of the retroactive behavior, a thirdorder matrix is constructed for a pairwise comparison, and the results are quantified. The pairwise comparison matrix is: Water Supply Vol 21 No 8,4049 The eigenvectors and their index weights are calculated and normalized. The weights of the fish's up-tracking behaviors for each hydraulic index; that is, the sensitivity, are obtained. The weights of the obtained flow velocity, velocity gradient and turbulent kinetic energy are 0.72, 0.19 and 0.09, respectively.
To prove the rationality of the AHP, the consistency of the analysis results is tested, and the random consistency ratio is calculated. The formula is as follows (Khan et al. 2018): where CI is the consistency index, calculated as 0.0329, RI is the average random consistency index; it can be seen from the table that is taken as 0.52 (Raka & Liangrokapart 2017). CR is the random consistency ratio. According to the test result, CR is 0.06 , 0.1. Therefore, the weight of the fish traceability obtained by the analytic hierarchy process is reasonable for each hydraulic index.

Fish traceability prediction program
Based on the biological particle model, this paper develops a program to simulate traceback behavior in MATLAB. The basic idea is to regard the fish as a particle, taking the starting point of the particle as the first centre point, drawing the perceived left semicircle according to its perceptual radius and finding the grid point with the largest weight in its search range. For the next moment, move the point, use that point as the second centre point, and then search for the third centre point according to the second centre point, the passed centre point no longer appears in the next search and continues to cycle, and save the coordinates of the centre point and search for all the centre points. Then, draw the centre curve, which is the trajectory of the fish in the downstream to upstream direction. The calculation flow chart is shown in Figure 3.

RESULTS AND DISCUSSION
The up-track behavior under the fish dam can be divided into two stages. The first stage is the retrospective stage, which occurs at a distance from the downstream channel to the lower part of the dam, the fish is subject to the trend of the convective flow and continues to flow upward in this stage. The second stage is the cluster distribution stage, it occurs within a certain range under the dam, due to the blockage by the dam, the up-track behavior of the fish is affected in this stage, so the clusters are distributed in areas with better habitats under the dam to form a cluster effect. The starting section for the fish is the 800 m channel section under the dam, and the end section is the 250 m channel section under the dam, a retrospective simulation is carried out every 4 m along the section, for a total of 23 times, and the simulations are recorded as a successful up-track in the tailwater channel. To simplify the fish's retrospective behavior, the fish's rest behavior, physical fitness, foraging behavior and other accidental situations that may be encountered during the retrospective process are not considered. Therefore, the statistical success rate of the fish up to the tailwater channel has a certain deviation from the real situation. To achieve a fish upward trajectory that is closer to the real situation, the 20% deviation from the above accidental situation is corrected, and the success rate back to the tailwater channel is recorded.

Model validation
Based on the results of the prototype observations, this paper will compare the calculated flow velocity with the measured flow velocity of the 0.5 m water depth flow field under the measurement section to verify. An acoustic Doppler current profiler (ADCP) was deployed in the downstream to collect field flow data, and it collected 105 points in total, the simulation result at a 0.5 m depth was extracted from the same position. Because the water flow is all discharged by the 3F, 4F and 5F turbines and the spillway was not working, the flow velocity was not greater than 0.30 m/s in the measurement area. Analysis of error table is given in Table 2. Figure 4 provides a comparison between measured and calculated velocity values (a) and velocity direction (b) of the 0.5 m depth, the dashed line represents 20% error. The minimum velocity of the measured results was 0.02 m/s; the maximum velocity was 0.30 m/s, and the average velocity among all the measured points was 0.20 m/s. The minimum velocity of simulation results in the same area was 0.04 m/s; the maximum velocity was 0.28 m/s, and the average velocity was 0.18 m/s. The maximum absolute error was 0.09 m/s, and the root mean error was 0.04 m/s. Due to the influence of accidental factors such as instrument and environment, there are larger errors in some points. However, the flow field generated by numerical simulation is basically consistent with the real situation. fish in the middle area of the river migrate by the main stream and the area close to the right bank of the river, fish migrate up the right bank of the river to 680 m below the dam, with velocity increases, and the fish change their direction to the main stream and trace upwards on the right bank of the river. The flow in these areas is characterized by moderate velocity, low turbulent kinetic energy, and high velocity gradient, the range of velocity is 0.40-0.80 m/s, the range of flow velocity gradient is 0.05-0.15 s À1 , and the range of turbulent kinetic energy is 0-0.015 m 2 /s 2 . There is a fish upstream channel in working condition 1. Considering the accidental factors, the success rate up to the tailwater channel is 80%. The migration route 1 is located in the middle of the river channel, and the average width is approximately 14 m, the channel leads from the downstream of the stilling pool to the right bank of the tailwater channel, the fish are clustered on the right bank of the tailwater channel with good habitats. Fish under the dam can follow the migration route 1 to the area where the habitat is better suited in the tail channel.

Prediction results for working condition 2
For working condition 2, the predicted flow rate results, flow velocity gradient and turbulent kinetic energy for the fish up-track behavior are shown in Figure 6. The fish began to search for suitable hydraulic conditions from the initial section. Because the mainstream velocity of the river channel was higher, the fishes at the right bank of the river migrated along the uptracking channel 2, and the fishes at the right bank of the river migrated along the uptracking channel 1. The flow in these areas is characterized by moderate velocity, low turbulent kinetic energy, and high velocity gradient, the range of velocity is 0.40-0.80 m/s, the range of flow velocity gradient is 0.05-0.15 s À1 , and the range of turbulent kinetic energy is 0-0.02 m 2 /s 2 .
Considering the accidental factors, the success rate up to the tailwater canal is 58.26%. The migration route 1 is located on the right bank of the river channel with an average width of approximately 14 m, it leads to the middle of the tailrace and forms a cluster effect. The migration route 2 is located on the left bank of the river channel with an average width of approximately 13 m, it leads to the stilling pool. Fish under the dam can follow the migration route 1 to the area where the habitat is better suited in the tail channel.

Prediction results for working condition 3
For working condition 3, the predicted flow rate results, flow velocity gradient results and turbulent kinetic energy results for the fish up-track behavior are shown in Figure 7. In the beginning, the fish search for reasonable hydraulic condition areas, due to the mainstream velocity of the river being higher, exceeding 1 m/s, the fishes at the right bank of the river migrated along the uptracking channel 2, and the fishes at the right bank of the river migrated along the uptracking channel 1. The range of velocity is 0.40-0.80 m/s, the range of flow velocity gradient is 0.05-0.15 s À1 , and the range of turbulent kinetic energy is 0-0.05 m 2 /s 2 . When the fishes migrated along the uptracking channel 2 to 300 m below the dam, due to the extremely high velocity in the spillway, a velocity barrier was formed, and fishes could only gather in the spillway 300 m below the dam. And when the fishes migrated along the uptracking channel 1 to 400 m below the dam, affected by the high velocity water from the discharge pool, the upward direction was changed to avoid the impact of the high velocity water flow, and finally they gather at the end of the guide wall on the right side of the discharge pool.
There are two up-tracking channels, and the success rate up to the tailwater channel is 30% considering the accidental factors. The migration route 1 is located in the middle of the river channel, and the average width is approximately 10 m, it leads to the middle of the tail of the stilling basin. The migration route 2 is located on the left bank of the river channel with an average width of approximately 6 m, it forms a cluster area from the initial section along the left bank of the channel to the smaller flow velocity in the spillway. Due to the flood discharge in working condition 3, the flow rate is too large. Therefore, there is no cluster area with better habitat suitability under the dam.

Future perspectives
This paper aims to simulate the up-tracking of fish by simulating the fish's retroactive behavior, consider that the specific movement of the fish in the up-tracking process, including the speed of motion and the time step, has no effect on the final up-tracking, thus, the paper does not consider the specific movement speed and time step of the fish during the retrospective process, aiming to simplify the biological particle model. And the paper does not consider the rest, foraging and other behaviors caused by accidental factors during the fish's retrospective process. Future research should consider these factors mentioned above to improve the accuracy of simulation.