A Parallelization Method for Dynamic Simulation of Surface Water Based on Pipeline Networks

By improving the Manning formula and combining it with CUDA technology, the surface water dynamic simulation method is parallelized, which solves the problems of accuracy and response efficiency in surface water dynamic simulation and realizes efficient and fast watershed runoff simulation.

CN115600448BActive Publication Date: 2025-10-31ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210079159.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-10-31
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

Existing methods for simulating surface water dynamics cannot meet the growing demands for accuracy and real-time response efficiency. The calculation process is complex and computationally intensive, resulting in low response efficiency.

Method used

An improved Manning formula based on pipeline networks is adopted, which is combined with terrain parameters (topographic humidity index, slope length factor and streamline curvature) to estimate flow velocity. CUDA is used to parallelize the flow velocity estimation function and the runoff simulation function, forming a high-precision and high-efficiency parallel method.

Benefits of technology

It achieves high-precision and high-efficiency dynamic simulation of surface water, improves simulation accuracy and significantly enhances response speed, especially showing a significant speedup in watershed runoff simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115600448B_ABST
    Figure CN115600448B_ABST
Patent Text Reader

Abstract

This invention discloses a parallelized method for surface water dynamic simulation based on a pipeline network. First, it constructs a water flow path from the water source to the watershed outlet, simplifying the three-dimensional surface into a one-dimensional pipeline network. Then, it improves the classic Manning formula using topographic parameters to estimate the flow velocity of each water flow path. Combined with a preset travel time, it simulates the surface runoff. Finally, it uses parallel computing to parallelize the velocity estimation function and the surface runoff simulation function, resulting in a high-precision and high-efficiency parallelized method for surface water dynamic simulation. This invention not only considers the influence of topographic parameters on runoff velocity in surface water dynamic simulation but also applies the parallel technology CUDA to the field of surface water dynamic simulation. While ensuring the accuracy of the surface water dynamic simulation algorithm, it improves the real-time response efficiency of surface water dynamic simulation, laying the foundation for scientific land planning, water resource management, and natural disaster response strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of surface water dynamic simulation, and specifically relates to a parallelization method for surface water dynamic simulation based on pipeline networks. Background Technology

[0002] Early simulations often used simplified empirical formulas to model surface water dynamics (Dietrich et al., 1993, see background 1; Jia et al., 2005, see background 2). With the development of digital terrain modeling and numerical analysis technologies, it has become possible to use physical models to predict surface water processes under specific environmental conditions (Bourdin et al., 2012, see background 3; Zhang et al., 2018, see background 4).

[0003] The key to dynamic simulation of surface water lies in the estimation of surface runoff velocity (Djokic & Maidment, 1993, see background reference 5). Beven et al. used the finite element method to simulate the movement of surface water and groundwater (Beven et al., 1980, see background reference 6). Tachikawa et al. used cubic spline functions to plot the slope of a three-dimensional model to simulate one-dimensional surface water processes (Tachikawa et al., 1994, see background reference 7). Shen Xiaodong et al. used the water balance equation and Muskingan method for linear reservoirs to simulate runoff at arbitrary locations and times (Shen Xiaodong et al., 1995, see background reference 8). Arnold et al. used the SCS curve method to simulate runoff for each HRU individually, accumulated the runoff to obtain the total runoff of the watershed, and used the variable storage coefficient method for runoff calculation (Arnold et al., 1998, see background reference 9). Ren Liliang et al. used the Xin'anjiang model to simulate runoff generation and the segmented Muskingen method to simulate confluence processes, forming a loosely coupled hydrological model (Ren Liliang et al., 2000, see background reference 10). Qu and Duffy used the semi-discrete finite volume method (FVM) to couple hydrological processes, generating a constrained optimal Delaunay triangulation based on given constraints (such as river network, watershed boundary, elevation, ecological zone, hydraulic properties, and climate zone), and simulating the dynamic processes of surface water based on the approximate equations of two-dimensional diffused waves (Qu & Duffy, 2007, see background reference 11). López-Vicente et al. used eight different cumulative discharge calculation methods to simulate confluence processes in different spatial patterns (López-Vicente et al., 2013, see background reference 12). Chen et al. used the fixed slope and aspect of each triangular facet on the TIN, combined with the water source point, to connect the maximum slope direction of adjacent triangular faces to form the water flow path, and proposed a method to simulate the surface runoff using the Manning formula along the water flow path on the TIN surface (Chen et al., 2014, see background reference 13).

[0004] Despite extensive research, the computational complexity in surface water dynamics simulation results in a large computational load and low real-time response efficiency. Surface water dynamics simulation methods not only involve estimating surface runoff velocity; they also require the preservation of important topographic features and the ability to integrate a large number of topographic parameters (topographic humidity index, slope length factor, and streamline curvature) and hydrological elements (such as flow rate, velocity, and soil factors) stored in raster form to rapidly estimate flow velocity. This is the key to achieving effective surface water dynamics simulation.

[0005] In addition, scholars have proposed numerous parallel computing methods, such as MPI, OpenMP, cloud computing, and the Unified Computing Device Architecture (CUDA). Compared to multi-core CPU parallel computing, GPU-based CUDA parallel methods enable simpler large-scale parallel computing in a PC environment, making high-performance single-machine processing possible (NIVIDA Corporation, 2010, see background reference 14; Mielikainen et al., 2013, see background reference 15; Schenk et al., 2008, see background reference 16). CUDA is suitable for algorithms with large data volumes, low data coupling, and high computational density, which are also characteristics of pipelined network-based surface water dynamic simulation methods. With the development of GPU hardware and the improvement of CUDA, the development cost and difficulty of parallel computing have been greatly reduced, and the degree of parallelization has been continuously improved. As a result, CUDA has been widely used in many research fields, such as environmental modeling (Abouali et al., 2013, reference 17; Xia & Liang, 2016, reference 18; Zhu et al., 2020, reference 19), remote sensing image enhancement (Gegout et al., 2014, reference 20; Liu et al., 2015, reference 21; Chang et al., 2016, reference 22; Wang et al., 2019, reference 23), terrain analysis (Ortega & Rueda, 2010, reference 24; Qin & Zhan, 2012, reference 25; Rueda et al., 2016, reference 26), etc. Meanwhile, it also has wide applications in hydrological simulation. For example, Zhao Xianghui et al. used CUDA to improve the algorithm for drawing isochrones of watersheds based on DEM in parallel, realizing the rapid drawing of watershed confluence curves (Zhao Xianghui et al., 2010, see background reference 27). Carlotto et al. used CUDA to process the finite difference model for simulating two-dimensional groundwater flow in parallel, and obtained an efficient parallel algorithm for groundwater flow simulation. Experiments showed that the speedup of this parallel algorithm was as high as 56.0 (Carlotto et al., 2018, see background reference 28).

[0006] Based on the above understanding, no method was found to improve the classic Manning formula using topographic parameters (topographic humidity index, slope length factor, and streamline curvature) and embed it into CUDA for surface water simulation. Therefore, this invention aims to use a pipeline network as a framework, estimate the flow velocity from a water source to the watershed outlet based on the improved Manning formula, combine travel time, simulate surface runoff, and then use CUDA to parallelize the velocity estimation function and the surface runoff simulation function, ultimately achieving the goal of rapidly completing dynamic surface water simulation while ensuring simulation accuracy.

[0007] Background literature:

[0008] 1. Dietrich, W., Wilson, C., Montgomery, D., & McKean, J. (1993). Analysis of Erosion Thresholds, Channel Networks, and Landscape Morphology Using a Digital Terrain Model [J]. The Journal of Geology, 101(2), 259–278. https: / / doi.org / 10.1086 / 648220;

[0009] 2. Jia Yangwen, Wang Hao, Ni Guangheng, Yang Dawen, Wang Jianhua, Qin Dayong. 2005. Principles and Practice of Distributed Watershed Hydrological Models [M]. Beijing: China Water Resources and Hydropower Press;

[0010] 3.Bourdin,DR,Fleming,SW,&Stull,RB(2012).Streamflow Modelling:APrimer on Applications,Approaches and Challenges[J].Atmosphere-Ocean,50(4),507–536;

[0011] 4. Zhang, F., Zhou, Q., Li, Q., Wu, G., & Liu, J. (2018). An enhanced approach for surface flow routing over drainage-constrained triangulated irregular networks [J]. Transactions in GIS, 22(1), 43–57. https: / / doi.org / 10.1111 / tgis.12294;

[0012] 5.Djokic,D.,&Maidment,DR(1993).Application of GIS network routines for water flow andtransport[J].Journal of Water Resources Planning andManagement,119(2),3456.https: / / doi.org / 10.1061 / (ASCE)0733-9496(1993)119:2(229);

[0013] 6.Beven,K.,Warren,R.,&Zaoui,J.(1980).SHE:towards a methodology for physically-based distributed forecasting in hydrology[J].HydrologicalForecasting(IAHS Publication),129,133–137;

[0014] 7. Tachikawa, Y., Shiiba, M., & Takasao, T. (1994). Development of a basingeomorphic information system using a TIN-DEM data structure [J]. WaterResources Bulletin, American Water Resources Association, 30(1), 9–17. https: / / doi.org / 10.2208 / prohe.36.677;

[0015] 8. Shen Xiaodong, Wang Lachun. (1995). Watershed rainfall-runoff model based on raster data [J]. Acta Geographica Sinica, 50(3):264-271;

[0016] 9.Arnold,JG,Srinicasan,R.,Muttiah,RS,&Williams,JR(1998).Largearea hydrologic modeling and assessment part I:model development[J].Journal of the American Water Resources Association, 34(1), 73–89. https: / / doi.org / 10.1111 / j.1752-1688.1998.tb05961.x;

[0017] 10. Ren Liliang, Liu Xinren. 2000. Simulation of hydrophysical processes based on DEM [J]. Geographical Research, 19(4):369-376;

[0018] 11. Qu, Y., & Duffy, CJ (2007). A semidiscrete finite volume formulation for multiprocess watershed simulation. Water Resources Research, 43(8), W08419;

[0019] 12. López-Vicente, M., Navas, A., Gaspar, L., & Machín, J. (2013). Impact of the new common agricultural policy of the EU on the runoff production and soilmoisture content in a Mediterranean agricultural system [J]. Environmental Earth Sciences, 71(10), 4281–4296;

[0020] 13.Chen,Y.,Zhou,Q.,Li,S.,Meng,F.,Bi,X.,Wilson,J.P.,et al.(2014).Thesimulation of surface flow dynamics using a flow-path network model[J].International Journal of Geographical Information Science,28(11),2242–2260.https: / / doi.org / 10.1080 / 13658816.2014.917312;

[0021] 14.NVIDIA Corporation.NVIDIA CUDA C Programming Guide[M].Santa Clara,CA,2010;

[0022] 15.Mielikainen,J.,Huang,B.,Wang,J.,Allen Huang,H.L.,&Goldberg,M.D.(2013).Compute unified device architecture(CUDA)-based parallelization of WRFKessler cloud microphysics scheme[J].Computers and Geosciences,52,292–299;

[0023] 16.Schenk,O.,Christen,M.,&Burkhart,H.(2008).Algorithmic performancestudies on graphics processing units.Journal of Parallel and DistributedComputing,68(10),1360–1369;

[0024] 17.Abouali,M.,Timmermans,J.,Castillo,J.E.,&Su,B.Z.(2013).A highperformance GPU implementation of Surface Energy Balance System(SEBS)based onCUDA-C[J].Environmental Modelling and Software,41,134–138.https: / / doi.org / 10.1016 / j.envsoft.2012.12.005;

[0025] 18.Xia,X.,&Liang,Q.(2016).A GPU-accelerated smoothed particlehydrodynamics(SPH)model for the shallow water equations.EnvironmentalModelling and Software,75,28–43.https: / / doi.org / 10.1016 / j.envsoft.2015.10.002;

[0026] 19.Zhu,H.,He,L.,Leeke,M.,&Mao,R.(2020).WolfGraph:The edge-centricgraph processing on GPU[J].Future Generation Computer Systems,111,552–569.https: / / doi.org / 10.1016 / j.future.2019.09.052;

[0027] 20.Gegout,P.,Oberlé,P.,Desjardins,C.,Moyard,J.,&Brunet,PM(2014).Ray-Tracing of GNSS Signal Through the Atmosphere Powered by CUDA,HMPP andGPUs Technologies[J].IEEE Journal of Selected Topics in Applied EarthObservations and Remote Sensing,7(5),1592–1602.https: / / doi.org / 10.1109 / JSTARS.2013.2272600;

[0028] 21. Liu Yang, Fu Zhengye, Zheng Fengbin. (2015). Research progress on target classification and recognition in high-resolution remote sensing images [J]. Journal of Geoinformation Science, 17(9), 1080–1091. https: / / doi.org / 10.3724 / SP.J.1047.2015.01080;

[0029] 22. Chang Fangzheng, Zhao Yindi, Liu Shanlei. (2016). Design of CUDA parallel algorithm for CVA change monitoring of remote sensing images [J]. Journal of Remote Sensing, 20(1), 114–128;

[0030] 23. Wang Hao, Wang Hanyu, Yang Mingyu, Xu Yongsen. (2019). Implementation of Retinex image enhancement on GPU platform [J]. Journal of Geoinformation Science, 21(4), 623-629. https: / / doi.org / 10.12082 / dqxxkx.2019.180576;

[0031] 24. Ortega, L., & Rueda, A. (2010). Parallel drainage network computation on CUDA[J]. Computers and Geosciences, 36(2), 171–178. https: / / doi.org / 10.1016 / j.cageo.2009.07.005;

[0032] 25.Qin,C.,&Zhan,L.(2012).Parallelizing flow-accumulation calculationson graphics processing units-From iterative DEM preprocessing algorithm torecursive multiple-flow-direction algorithm[J].Computers and Geosciences,43,7–16.https: / / doi.org / 10.1016 / j.cageo.2012.02.022;

[0033] 26. Rueda, AJ, Noguera, JM, & Luque, A. (2016). A comparison of native GPUcomputing versus OpenACC for implementing flow-routing algorithms inhydrological applications [J]. Computers and Geosciences, 87, 91–100. https: / / doi.org / 10.1016 / j.cageo.2015.12.004;

[0034] 27. Zhao Xianghui, Miao Qing, Fu Zhongliang, Su Chang, Li Xin. (2010). Research and method of parallel algorithm for CUDA-based confluence analysis [J]. Computer Applications Research, 27(7), 2445–2451;

[0035] 28.Carlotto,T.,da Silva,RV,&Grzybowski,JMV(2018).A GPGPU-accelerated implementation of groundwater flow model in unconfined aquifersfor heterogeneous and anisotropic media[J].Environmental Modelling andSoftware,101,64–72.https: / / doi.org / 10.1016 / j.envsoft.2017.12.004. Summary of the Invention

[0036] The problem this invention aims to solve is that existing surface water dynamic simulation methods cannot meet the increasing demands for accuracy and real-time response efficiency. This invention provides a parallelization method for surface water dynamic simulation based on pipeline networks. This invention is a parallelization method that can simulate surface water dynamic processes with high accuracy and high efficiency.

[0037] A parallelization method for dynamic simulation of surface water based on pipeline networks includes the following steps:

[0038] Step 1: Based on the existing ideas of surface water dynamic simulation methods, optimize the algorithm to obtain an improved surface water dynamic simulation method;

[0039] Step 2: Parallelize the improved surface water dynamics simulation method according to the parallel principle of CUDA, and obtain a parallelized method for surface water dynamics simulation based on pipeline networks. The specific steps are as follows:

[0040] Step 2.1: Use a program performance analysis tool to perform program performance analysis on the improved surface water dynamic simulation algorithm in Step 1, and obtain the functions with large computational load, long time consumption, and parallelizability.

[0041] Step 2.2 investigates the parallelization principle based on CUDA to derive a parallelization method for dynamic simulation of surface water. The entire parallelization process mainly includes data transmission, thread partitioning patterns in CUDA, and kernel function implementation. The specific steps are as follows:

[0042] Step 2.2.1: Based on the idea of ​​the improved surface water dynamic simulation method, design the data transmission process;

[0043] Step 2.2.2, the improved surface water dynamic simulation method uses a pipeline network as its architecture. The pipeline network is stored in the form of vector water flow paths, so the pipeline network is divided into thread modes.

[0044] Step 2.2.3: Based on the data transmission process in Step 2.2.1 and the thread partitioning mode in Step 2.2.2, the two functions in Step 2.1 are improved into two kernel functions in CUDA, thereby obtaining a high-precision and high-efficiency parallelization method for dynamic simulation of surface water based on pipeline networks; the two functions obtained in Step 2.1 that have large computational load and long time consumption but can be parallelized are the velocity estimation function and the surface runoff simulation function, respectively. Using CUDA, the above two functions are improved into the velocity estimation kernel function and the runoff simulation kernel function, respectively;

[0045] Following step 2, step 3 is performed to evaluate the accuracy and real-time response efficiency of the parallelized method for dynamic simulation of surface water based on pipeline networks. The specific steps are as follows:

[0046] Step 3.1: Evaluate the accuracy of the parallelization method for surface water dynamic simulation based on pipeline network, including comparing the surface runoff obtained from step 2 with the measured runoff from the observation station and evaluating the evaluation indicators, including Nash coefficient, correlation coefficient and water balance coefficient.

[0047] Step 3.2: Evaluate the real-time response efficiency of the pipeline network-based parallelization method for surface water dynamics simulation, including a comparison of the computation time of existing surface water dynamics simulation methods with that of the pipeline network-based parallelization method for surface water dynamics simulation, and calculate the speedup ratio.

[0048] Furthermore, the source code for the parallelization method for dynamic simulation of surface water is the source code in a predetermined development environment, in which a dynamic link library for a high-precision and high-efficiency parallelization method algorithm for dynamic simulation of surface water is generated through compilation.

[0049] Furthermore, the predetermined development environment is a development environment combining Visual Studio and CUDA.

[0050] The beneficial effects of this invention are as follows:

[0051] The parallelization method for surface water dynamic simulation based on pipeline networks provided by this invention can perform rapid simulation of surface water dynamic processes with high accuracy, thereby solving the problem that existing algorithms cannot meet the increasing demands for accuracy and real-time response efficiency, and enabling rapid simulation of surface runoff. Therefore, this invention is particularly applicable to the field of surface water dynamic simulation, enabling rapid simulation of surface water dynamic processes. Attached Figure Description

[0052] Figure 1 This is a flowchart of an embodiment of the present invention.

[0053] Figure 2 This is a sub-flowchart of step 1 in an embodiment of the present invention.

[0054] Figure 3 This is a sub-flowchart of step 2 in an embodiment of the present invention.

[0055] Figure 4 This is a sub-flowchart of step 3 in an embodiment of the present invention. Detailed Implementation

[0056] The core problem this invention aims to solve is to obtain a highly efficient and accurate parallelized method for simulating surface water dynamics. Based on the increasing application demands for precision and real-time response efficiency, topographic parameters (topographic humidity index, slope length factor, and streamline curvature) are obtained from a pipeline network. These topographic parameters are used to improve the classic Manning formula, estimating the flow velocity from a water source point along the flow path to the watershed outlet. Combined with travel time, this simulates surface runoff. Furthermore, CUDA (Compute Unified Device Architecture) is used to parallelize the velocity estimation function and the surface runoff simulation function, thereby accurately and quickly simulating surface water dynamic processes.

[0057] The parallelization method for dynamic simulation of surface water of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0058] Example 1

[0059] See appendix Figure 1 A parallelization method for dynamic simulation of surface water based on pipeline networks, comprising the following steps:

[0060] Step 1: Based on the existing ideas of surface water dynamic simulation methods, optimize the algorithm to obtain an improved surface water dynamic simulation method;

[0061] See appendix Figure 2 To facilitate implementation, the existing surface water dynamic simulation method in this invention adopts a TIN-based surface water dynamic simulation algorithm, which has high accuracy but slow response efficiency. First, the idea behind the TIN-based surface water dynamic simulation algorithm is introduced: ① Using the maximum threshold algorithm (Chang, 2007a) and the D8 algorithm (O'Callaghan and Mark, 1984), topographic feature points and river networks are extracted from a high-precision grid DEM. The river network is embedded into the topographic feature points to generate a river network-constrained TIN; ② Based on the slope aspect of the triangular faces on the TIN, a fixed water flow direction can be obtained on each triangular face. Combined with the water source point data, all flow direction points are calculated sequentially to trace the water flow path from each water source point to the watershed outlet; ③ Runoff data is assigned to the corresponding water source points by assigning the runoff of the grid cell containing the water source point; ④ Based on Manning's formula (v = R... 2 / 3 *S 1 / 2 / n, where v is the flow velocity (m / s), R is the hydraulic radius (m), S is the slope (m / m), and n is the Manning coefficient) simulates the flow velocity of raindrops along each water flow path; ⑤ combined with the preset travel time, the distance traveled is predicted, and the surface runoff at that moment is simulated. Therefore, it can be seen that the Manning formula only considers the influence of slope on flow velocity.

[0062] In practical implementation, the classic Manning formula is improved using topographic parameters (topographic humidity index, slope length factor, and streamline curvature) to enhance the accuracy of surface water dynamics simulation and optimize the TIN-based surface water dynamics simulation algorithm, thus obtaining an improved surface water dynamics simulation method. The improved Manning formula is as follows:

[0063]

[0064] In the formula, v is the flow velocity (m / s), R is the runoff depth, T is the topographic moisture index, L is the slope length factor, C is the streamline curvature, S is the slope, w1, w2, w3, and w4 are the corresponding weighting factors, and n is the Manning coefficient. The weighting factors for the topographic moisture index, slope length factor, and streamline curvature are obtained using the analytic hierarchy process (AHP). This invention uses DEM imagery of the Black Brook Watershed (BBW) basin in northwestern New Brunswick, Canada, as experimental data. The spatial resolution is 5m, the pixel size is 1284×942, and the data range is 67°43′–67°48′W, 47°05′–47°09′N, covering an area of ​​approximately 13 km². 2 The daily runoff in the BBW watershed in 2001 was used to simulate the daily runoff for that year. Experimental results showed that the improved surface water dynamics simulation method had higher simulation accuracy, with the Nash coefficient increasing by 6.49%, the correlation coefficient decreasing by 1.10%, and the water balance coefficient increasing by 19.08%.

[0065] Step 2: Parallelize the improved surface water dynamics simulation method according to the parallelism principle of CUDA, resulting in a parallelized surface water dynamics simulation method based on pipeline networks, such as... Figure 3 As shown, the specific steps are as follows:

[0066] Step 2.1: Use a program performance analysis tool to perform program performance analysis on the improved surface water dynamic simulation algorithm in Step 1, and obtain the functions with large computational load, long time consumption, and parallelizability.

[0067] In practice, Intel@V Tune can be used. TM The performance analyzer performed a program performance analysis on the improved surface water dynamics simulation method in step 1. It was found that the velocity estimation function and the surface runoff simulation function are the two functions with the largest computational load and the longest processing time, and that they are parallelizable. Therefore, CUDA was used to improve these two functions into a velocity estimation kernel function and a runoff simulation kernel function to improve simulation efficiency.

[0068] Step 2.2 involves studying the parallel principles based on CUDA to derive a parallelization method for dynamic simulation of surface water. The entire parallelization process mainly includes data transmission, thread partitioning, and kernel function implementation; see appendix. Figure 3 The specific steps are as follows:

[0069] Step 2.2.1: Based on the idea of ​​the improved surface water dynamic simulation method, design the data transmission process;

[0070] In practical implementation, the most important running devices in the CUDA programming model are the host and the devices. The CPU is typically used as the host (mainly because GPUs have limited branch control capabilities), and its primary task is device and data initialization. The GPU, a computing device capable of executing multiple threads, is considered a device, allowing it to process a large number of computationally intensive tasks in parallel. Furthermore, a system can have one host but multiple devices. CUDA defines functions as kernel functions. A kernel mainly consists of threads, thread blocks, and grids. Several threads form a thread block, and several thread blocks form a grid. When a kernel function runs, several threads execute the kernel function in parallel to improve efficiency. Before implementing the thread partitioning model and kernel function, the data transmission process needs to be designed. The specific process is as follows: ① Transfer the required data from the CPU to the GPU, including DEM data (row number, column number, minimum value in the x-direction, maximum value in the y-direction, and resolution), water flow source point data (coordinate values ​​in the x, y, and z directions), and pipeline network data (number of water flow paths, index number, and inflection point coordinates); ② Use the kernel function to iteratively simulate and obtain the runoff at any given time. Combining the DEM data, water flow source point data, and pipeline network data, based on the improved Manning formula, use the velocity estimation kernel function to obtain the flow velocity of raindrops on the water flow path; use the runoff simulation kernel function to obtain the runoff at that time; repeat this process to obtain the surface runoff at any given time; ③ Transfer the simulation results from the GPU to the CPU to complete the dynamic simulation of surface water.

[0071] Step 2.2.2, the improved surface water dynamic simulation method uses a pipeline network as its architecture. The pipeline network is stored in the form of vector water flow paths, so the pipeline network is divided into thread modes.

[0072] In practice, both the velocity estimation kernel and the flow rate simulation kernel are implemented in parallel using flow paths, with each thread processing one flow path. All flow paths are divided into multiple thread blocks. The number of threads in each thread block is allocated according to the GPU's computing power. When the kernel function runs, CUDA performs parallel computation using thread blocks as execution units, and calculates the threads in each thread block sequentially in a grouped manner.

[0073] Step 2.2.3: Based on the data transmission process in Step 2.2.1 and the thread partitioning mode in Step 2.2.2, the two functions in Step 2.1 are improved into two kernel functions in CUDA, thereby obtaining a high-precision and high-efficiency parallelization method for dynamic simulation of surface water based on pipeline networks.

[0074] In specific implementation, the velocity estimation kernel function is implemented as follows: ① Obtain the coordinates of the starting point of the flow path at x and y (assumed to be x0 and y0) from the pipeline network; ② Obtain the row and column numbers of the starting point within the raster cell based on x0 and y0; ③ Combine the flow source data to obtain the flow rate of the starting point; ④ Use the improved Manning formula to obtain the velocity of raindrops on the flow path; ⑤ Combine the preset travel time to simulate the inflow location of the starting point (assumed to be x1 and y1); ⑥ Calculate the row and column numbers of the inflow location on the DEM image based on x1 and y1, and assign its flow rate to the raster cell. The sink flow simulation kernel function is calculated as follows: ① Obtain the coordinates of all raindrops on the flow path based on the velocity estimation kernel function calculation results; ② Calculate the row and column numbers of the corresponding raster cell based on the coordinates of the raindrops; ③ Accumulate the flow rates of all raindrops within the raster cell to obtain the surface sink flow rate at that moment.

[0075] After step 2, step 3 is performed to evaluate the accuracy and real-time response efficiency of the parallelized method for dynamic simulation of surface water based on pipeline networks. Figure 4 As shown, the specific steps are as follows:

[0076] Step 3.1: Evaluate the accuracy of the parallelization method for surface water dynamic simulation based on pipeline network, including comparing the surface runoff obtained from step 2 with the measured runoff from the observation station and evaluating the evaluation indicators, including Nash coefficient, correlation coefficient and water balance coefficient.

[0077] See appendix Figure 4 In this example, the formula for calculating the Nash coefficient is as follows:

[0078]

[0079] In the formula, t refers to time. The measured flow rate at the observation station at time t. The simulated flow rate at time t. It is the average value of the measured flow rate. This refers to the average value of the simulated flow rate.

[0080] The formula for calculating the correlation coefficient is as follows:

[0081]

[0082] In the formula, t refers to time. The measured flow rate at the observation station at time t. The simulated flow rate at time t. It is the average value of the measured flow rate. This refers to the average value of the simulated flow rate.

[0083] The formula for calculating the water balance coefficient is as follows:

[0084]

[0085] In the formula, t refers to time. The measured flow rate at the observation station at time t. The simulated flow rate at time t. It is the average value of the measured flow rate. This refers to the average value of the simulated flow rate.

[0086] Step 3.2: Evaluate the real-time response efficiency of the pipeline network-based parallelization method for surface water dynamics simulation, including a comparison of the computation time of existing surface water dynamics simulation methods with that of the pipeline network-based parallelization method for surface water dynamics simulation, and calculate the speedup ratio.

[0087] In this example, the formula for calculating the speedup ratio is as follows:

[0088]

[0089] In the formula, t c The runtime of the comparison method, t p This refers to the runtime of the parallel method. For r, a larger value indicates higher instantaneous response efficiency. This invention selected DEM imagery of the Black Brook Watershed (BBW) basin in northwestern New Brunswick, Canada, as experimental data. The spatial resolution is 5m, the pixel size is 1284×942, and the data range is 67°43′–67°48′W, 47°05′–47°09′N, covering an area of ​​approximately 13km². 2The daily runoff in the BBW watershed in 2001 was used to simulate the daily runoff for that year. The GPU's computing power was 6.1, meaning the maximum number of threads per thread block was 1024. Each thread block could be allocated 32×32 flow paths, resulting in (number of flow paths / 1024+1) thread blocks. Experiments demonstrated that the parallelization method for dynamic surface water simulation achieved higher real-time response efficiency, with a speedup of up to 15.7.

[0090] The above description is merely one embodiment of the present invention and is not intended to limit the present invention. Any modifications or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A parallelization method for dynamic simulation of surface water based on pipeline networks, characterized in that... Includes the following steps: Step 1: Based on the existing ideas of surface water dynamic simulation methods, optimize the algorithm to obtain an improved surface water dynamic simulation method; Step 2: Parallelize the improved surface water dynamic simulation method according to the parallel principle of CUDA to obtain a parallelized method for surface water dynamic simulation based on pipeline network. Step 3: Evaluate the accuracy and real-time response efficiency of the parallelization method for dynamic simulation of surface water based on pipeline networks; The existing surface water dynamic simulation method in step 1 uses a TIN-based surface water dynamic simulation algorithm. The idea behind the TIN-based surface water dynamic simulation algorithm is: ① Use the maximum threshold algorithm and D8 algorithm to extract terrain feature points and river network from high-precision grid DEM, embed the river network into the terrain feature points, and generate a river network constrained TIN; ②Based on the slope of the triangular face of TIN, the fixed water flow direction on each triangular face can be obtained. Combined with the water flow source point data, all flow direction points are calculated in sequence, and the water flow path from each water flow source point to the watershed outlet is traced. ③ Assign the runoff data to the corresponding water source point. The assignment method is to assign the runoff volume of the grid cell where the water source point is located to the water source point. ④ Simulate the flow velocity of raindrops along each water flow path based on Manning's formula; Manning's formula: v = R 2 / 3 *S 1 / 2 / n, where v is the flow velocity (m / s), R is the hydraulic radius (m), S is the slope (m / m), and n is the Manning coefficient; ⑤ Combine the preset travel time to predict the distance traveled and simulate the surface runoff at that moment; thus, it can be seen that the Manning formula only considers the effect of slope on flow velocity. The improved surface water dynamic simulation method obtained in step 1 is as follows: This paper improves the classic Manning formula by utilizing topographic parameters to enhance the accuracy of surface water dynamics simulation and optimize the TIN-based surface water dynamics simulation algorithm, thus obtaining an improved surface water dynamics simulation method. The topographic parameters include topographic humidity index, slope length factor, and streamline curvature. The improved Manning formula is as follows: In the formula, v is the flow velocity (m / s), R is the runoff depth, T is the topographic humidity index, L is the slope length factor, C is the streamline curvature, S is the slope, w1, w2, w3 and w4 are the corresponding weighting factors, and n is the Manning coefficient. The weighting factors of the topographic humidity index, slope length factor and streamline curvature are obtained by the analytic hierarchy process.

2. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 1, characterized in that, Step 2: Parallelize the improved surface water dynamics simulation method according to the parallel principle of CUDA, and obtain a parallelized method for surface water dynamics simulation based on pipeline networks. The specific steps are as follows: Step 2.1: Use a program performance analysis tool to perform program performance analysis on the improved surface water dynamic simulation algorithm in Step 1, and obtain the functions with large computational load, long time consumption, and parallelizability. Step 2.2: The parallelization principle based on CUDA is studied to obtain a parallelization method for dynamic simulation of surface water. The entire parallelization process includes data transmission, thread partitioning mode in CUDA, and kernel function implementation. The specific steps are as follows: Step 2.2.1: Based on the idea of ​​the improved surface water dynamic simulation method, design the data transmission process; Step 2.2.2, the improved surface water dynamic simulation method uses a pipeline network as its architecture. The pipeline network is stored in the form of vector water flow paths, so the pipeline network is divided into thread modes. Step 2.2.3: Based on the data transmission process in Step 2.2.1 and the thread partitioning mode in Step 2.2.2, the function obtained in Step 2.1 is improved into a kernel function in CUDA, thereby obtaining a high-precision and high-efficiency parallelization method for dynamic simulation of surface water based on pipeline networks.

3. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 2, characterized in that, The program performance analysis tool used in step 2.1 is Intel@VTune. TM Performance analyzer, using Intel@VTune TM The performance analyzer performed a program performance analysis on the improved surface water dynamic simulation method in step 1, and found that the two functions with large computational load and long time consumption, and which are parallelizable, are the flow velocity estimation function and the surface runoff simulation function.

4. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 3, characterized in that, Step 2.2.1 involves designing the data transmission process, the specific steps of which are as follows: ① Transfer the required data from the CPU to the GPU, including DEM data, water flow source data, and pipeline network data. The DEM data includes row number, column number, minimum value in the x direction, maximum value in the y direction, and resolution. The water flow source data includes coordinate values ​​in the x, y, and z directions. The pipeline network data includes the number of water flow paths, index number, and vertex coordinate values. ② The runoff volume at any time is obtained by cyclically simulating the kernel function. Combining DEM data, water source data, and flowline network data, and based on the improved Manning formula, the velocity of raindrops on the water flow path is obtained by using the velocity estimation kernel function; the runoff volume at that time is obtained by using the runoff volume simulation kernel function; by cyclically executing, the surface runoff volume at any time can be obtained. ③ The simulation results are transferred from the GPU to the CPU to complete the dynamic simulation of surface water.

5. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 4, characterized in that, Step 2.2.2 involves dividing the pipeline network into thread modes, and the specific process is as follows: Both the flow rate estimation kernel and the flow rate simulation kernel are implemented in parallel mode using the flow path. Each thread processes one flow path. All flow paths are divided into multiple thread blocks. The number of threads in each thread block is allocated according to the GPU's computing power. When the kernel function runs, CUDA performs parallel computation using thread blocks as execution units and performs sequential computation on the threads in the thread block in a grouped manner.

6. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 5, characterized in that, In step 2.2.3, CUDA is used to improve the velocity estimation function and surface runoff simulation function into a velocity estimation kernel function and a runoff simulation kernel function; the implementation process of the velocity estimation kernel function is as follows: ① Obtain the coordinates of the starting point of the water flow path in x and y from the pipeline network, and set them as x0 and y0; ② Obtain the row and column numbers of the starting point within the grid cell based on x0 and y0; ③ Combine the water flow source data to obtain the flow rate at the starting point; ④ Use the improved Manning formula to obtain the flow velocity of raindrops along the water flow path; ⑤ Based on the preset travel time, simulate the inflow position from the starting point, and set it as x1 and y1; ⑥ Calculate the row and column numbers of the inflow location on the DEM image based on x1 and y1, and assign the flow rate to the raster cell; The calculation process of the sink flow simulation kernel function is as follows: ① Obtain the coordinates of all raindrops along the water flow path based on the calculation results of the flow velocity estimation kernel function; ② Calculate the row and column number of the corresponding grid cell based on the coordinate value of the raindrop; ③ The flow rates of all raindrops within the grid cell are summed to obtain the surface runoff at that moment.

7. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 6, characterized in that, After step 2, step 3 is performed to evaluate the accuracy and real-time response efficiency of the parallelization method for surface water dynamic simulation based on pipeline networks. The specific steps are as follows: Step 3.1, evaluate the accuracy of the parallelization method for surface water dynamic simulation based on pipeline networks, including comparing the surface runoff obtained from step 2 with the measured runoff from the observation station and evaluating the indicators, including the Nash coefficient, correlation coefficient and water balance coefficient. Step 3.2: Evaluate the real-time response efficiency of the pipeline network-based parallelization method for surface water dynamics simulation, including a comparison of the computation time of existing surface water dynamics simulation methods with that of the pipeline network-based parallelization method for surface water dynamics simulation, and calculate the speedup ratio.

8. The parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 7, characterized in that, In step 3.1, the formula for calculating the Nash coefficient is as follows: In the formula, t refers to time. The measured flow rate at the observation station at time t. The simulated flow rate at time t. It is the average value of the measured flow rate. The average value of the simulated flow rate; The formula for calculating the correlation coefficient is as follows: In the formula, t refers to time. The measured flow rate at the observation station at time t. The simulated flow rate at time t. It is the average value of the measured flow rate. The average value of the simulated flow rate; The formula for calculating the water balance coefficient is as follows: In the formula, t refers to time. The measured flow rate at the observation station at time t. The simulated flow rate at time t. It is the average value of the measured flow rate. This refers to the average value of the simulated flow rate.

9. A parallelization method for dynamic simulation of surface water based on pipeline networks according to claim 8, characterized in that, In step 3.2, the formula for calculating the acceleration ratio is as follows: In the formula, t c The runtime of the comparison method, t p This refers to the running time of the parallel method; for r, a larger value indicates higher instantaneous response efficiency.