Irregular grid design and optimization system and method based on Synxflow hydrodynamic model

By introducing irregular grid design and optimization systems into the Synxflow hydrodynamic model, the problem that traditional regular grids are difficult to portray complex terrain is solved, the simulation accuracy and calculation efficiency are improved, and rapid calculation and real-time update are achieved.

CN119578308APending Publication Date: 2025-03-07ECCOM NETWORK SYST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411800079.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The traditional Synxflow hydrodynamic model is based on a regular grid structure, making it difficult to accurately characterize complex terrain changes, resulting in a decrease in the accuracy of the simulation results, an increase in the calculation amount and low efficiency.

Method used

The irregular mesh design and optimization system is adopted, and the DEM elevation data is converted into the input data required by the Synxflow model through the data processing conversion module, and the irregular mesh data structure and algorithm are designed and optimized. The Synxflow model processing method is improved through the parallel processing and operator optimization module, gradient calculation and shallow water equation operator are optimized, and the cuda flow processing module is introduced to improve the data processing method.

Benefits of technology

The simulation accuracy of the hydrodynamic model in complex terrain areas is improved, the error accumulation caused by grid division is reduced, the calculation efficiency is improved, and rapid calculation and real-time update are realized to adapt to dynamically changing terrain and hydrological conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578308A_ABST
    Figure CN119578308A_ABST
Patent Text Reader

Abstract

The invention provides an irregular grid design and optimization system and method based on a Synxflow hydrodynamic model. The method comprises the steps that 1, an irregular grid topological structure relation is generated; 2, grid boundary points are judged, and Hash mapping is established; 3, constructing a scalar field and a vector field of the hydrodynamic model; 4, constructing a scalar field and a vector field on cuda; step 5, realizing self-adaption under the irregular-shaped grid; step 6, calculating a reconstruction direction gradient; 7, reconstructing a diving equation operator; and step 8, cuda data stream processing is realized. According to the method, the irregular grid design is introduced on the basis of an original regular grid structure, so that complex terrain features can be described more accurately, and the simulation precision of a hydrodynamic model in a complex terrain area is improved; through more accurate terrain description, error accumulation caused by grid division is reduced, and the reliability and accuracy of a simulation result are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hydrodynamic models, and in particular to an irregular grid design and optimization system and method based on a Synxflow hydrodynamic model. Background Art

[0002] Hydrodynamic model is a computational tool used to simulate the movement of water bodies. It is widely used in hydrology, water resources, environmental protection, river and coastal engineering and other fields. Traditional hydrodynamic models are mainly based on regular grid structures. They use numerical calculations to solve a series of partial differential equations to describe the changes of water flow in different spaces and times. These models simulate physical quantities such as water flow velocity, depth and pressure in two-dimensional and three-dimensional space to predict and analyze phenomena such as floods, tides and waves.

[0003] As a traditional hydrodynamic model, the Synxflow model usually adopts a regular grid structure, that is, the simulation area is divided into grid units of uniform shape and size. This method is simple to calculate and convenient for numerical solution and parallel calculation. However, when dealing with areas with complex terrain and drastic changes, regular grids are difficult to accurately depict subtle terrain changes in complex terrain areas, resulting in a decrease in the accuracy of simulation results. In order to improve the simulation accuracy, the grid density needs to be increased, resulting in a sharp increase in the amount of calculation, a long time consumption, and low efficiency.

[0004] Patent application document CN117933127A discloses a rapid modeling system and method for a hydrological and hydrodynamic model of a small watershed of mountain torrents, the system comprising: a data preprocessing unit, a model building and operation unit, a model parameter optimization unit and a data analysis and visualization unit; the data preprocessing unit is used to read and process the mountain torrent modeling data; the model building and operation unit is used to couple the hydrological model and the hydrodynamic model, and obtain the sub-basin characteristic parameters required for the hydrological model parameter estimation, and calculate the hydrodynamic model; the model parameter optimization unit is used to couple the hydrological model parameter set and the hydrodynamic model parameter set, and assign parameters to the hydrological model and the hydrodynamic model respectively according to the hydrological model parameter set and the hydrodynamic model parameter set, and optimize the parameters of the hydrological model and the hydrodynamic model by using an optimization algorithm; the data analysis and visualization unit is used to evaluate the simulation effect of the hydrological and hydrodynamic model and the flood disaster. However, this patent cannot completely solve the existing technical problems, nor can it meet the needs of the present invention. Summary of the invention

[0005] In view of the defects in the prior art, the object of the present invention is to provide an irregular grid design and optimization system and method based on the Synxflow hydrodynamic model.

[0006] The irregular grid design and optimization system based on the Synxflow hydrodynamic model provided by the present invention comprises:

[0007] Data processing and conversion module, used to convert DEM elevation data into input data required by Synxflow hydrodynamic model;

[0008] Irregular grid data structure generation module, used to design and optimize the data structure and algorithm for processing irregular grids;

[0009] Parallel processing and operator optimization module, which is used to improve the original serial processing mode of Synxflow hydrodynamic model, process it in asynchronous parallel mode, and optimize the gradient calculation and shallow water equation SWES operator in the hydrodynamic model to adapt to irregular grids;

[0010] The cuda stream processing module is used to improve the data processing method of the Synxflow hydrodynamic model, replace the original file interaction model with a data stream processing model, and process it in the form of data stream on the cuda video memory.

[0011] Preferably, the data processing and conversion module includes:

[0012] Obtain the grid longitude and latitude coordinates, initial water level, initial flow velocity, and boundary conditions of DEM data;

[0013] Constructing an irregular grid structure, wherein the irregular grid structure includes three data structures: a point data structure, an edge data structure, and a grid data structure;

[0014] The point data structure records the attributes of each point on the grid, including the grid number, edge number and longitude and latitude coordinates;

[0015] The edge data structure records the attributes of each edge, including the grid number and the numbers of the two points that make up the edge;

[0016] The grid data structure records the attributes of each grid, including the numbers of the edges and points that make up the grid, the grid area, the initial water level, the initial water flow rate, and the average terrain height.

[0017] Preferably, the irregular grid data structure generating module comprises:

[0018] Calculate the degree of the grid to determine whether the grid is a boundary grid;

[0019] The relationship between grids and edges is stored using hashes, and a hash map of grids and edges is established to obtain the neighborhood coordinates of each grid.

[0020] The irregular grid design and optimization method based on the Synxflow hydrodynamic model provided by the present invention comprises the following steps:

[0021] Step 1: Generate irregular grid topological structure relationship;

[0022] Step 2: Determine the grid boundary points and establish a hash map;

[0023] Step 3: Construct the scalar field and vector field of the hydrodynamic model;

[0024] Step 4: Construct scalar field and vector field on CUDA;

[0025] Step 5: Realize the adaptation under irregular shape grid;

[0026] Step 6: Reconstruct directional gradient calculation;

[0027] Step 7: Reconstruct the diving equation operator;

[0028] Step 8: Implement cuda data stream processing.

[0029] Preferably, the step 1 comprises:

[0030] Establishing topological relationships among grid points, grid edges, and grid cells, including adjacent relationships and connection relationships;

[0031] Each grid edge consists of two grid points, and the information of the points can be queried directly through the edge; each grid consists of multiple edges, and the information of each edge can be queried through the grid number;

[0032] The topological structure of the entire irregular grid is expressed as an undirected connected graph composed of multiple irregular grid units. The connection relationship of the grids is established through the commonly used edges. The data structure adjacency list is used to store the topological information. The size of each grid in the adjacency list is the number of domain grids and also the degree of the grid.

[0033] Preferably, step 2 includes: traversing grid points and grid edges. If the degree of the grid stored in the adjacency table does not match the number of grid edges, it means that the grid is a boundary point. Using hash mapping technology, the boundary point is mapped to the corresponding boundary condition, and the neighborhood grid flow rate is set to 0; otherwise, it is an internal point, and the data of all neighborhood grids are calculated normally.

[0034] Preferably, step 3 includes: using a shared smart pointer to manage the basic irregular grid topology structure, combining the initial water level and the longitude and latitude coordinate data of the grid points input by the data stream to construct scalar data; combining the initial flow velocity data input by the data stream to construct vector field data;

[0035] The step 4 includes: uploading the constructed scalar field and vector field data to the GPU memory, using cuda to perform parallel computing, and writing cuda kernel functions to achieve parallel computing and updating of the scalar field and the vector field.

[0036] Preferably, step 5 includes: selecting an irregular grid obtained from existing surveying and mapping through a configuration file, or dynamically selecting a regular grid for segmentation, and adjusting the grid density; during the simulation process, adjusting the grid distribution in real time to ensure calculation accuracy and efficiency while adapting to dynamically changing terrain and hydrological conditions.

[0037] Preferably, step 6 includes: using a method of weighting the center and then obtaining the average value to obtain the center point coordinates of the irregular grid, calculating the gradient values ​​in the dx direction and dy direction of the neighborhood grid to replace the vectors of the fixed regular grid in the original Synxflow; implementing parallel gradient calculation on cuda, and using the computing power of GPU to accelerate the gradient calculation process;

[0038] The step 7 includes: changing the neighborhood grid in the original operator to be obtained from the adjacency table topological structure, replacing the calculation of the direction vector with the geometric mean, optimizing the numerical stability and calculation accuracy of the operator, and ensuring that the simulation results under the irregular grid are accurate and reliable.

[0039] Preferably, the step 8: uses cuda streams and events to manage parallel computing tasks, optimizes the data stream processing process, combines memory caching and data stream control technology, ensures the efficiency and stability of data stream processing, and supports real-time simulation and dynamic update.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] 1) By introducing irregular grid design on the basis of the original regular grid structure, the complex terrain features can be described more accurately, thereby improving the simulation accuracy of the hydrodynamic model in complex terrain areas; through more accurate terrain description, the error accumulation caused by grid division is reduced, ensuring the reliability and accuracy of the simulation results;

[0042] 2) The use of efficient data structures and algorithms, combined with CUDA parallel computing technology, greatly improves the computational efficiency of the model, enabling fast calculation and real-time updates in large-scale hydrodynamic simulations;

[0043] 3) Introducing a streaming processing mechanism to enhance the model’s adaptability in processing dynamically changing terrain data, ensuring that simulation results can reflect terrain changes in a timely manner and improving reliability and practicality in practical applications;

[0044] 4) By optimizing resource scheduling and allocation during the computing process, the hardware resources can be utilized to the maximum extent, computing efficiency can be improved, and energy consumption and costs can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0046] Figure 1 It is a schematic diagram of the system structure;

[0047] Figure 2 This is a diagram of the irregular grid topological relationship structure. DETAILED DESCRIPTION

[0048] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0049] Example

[0050] The present invention provides an irregular grid design and optimization system based on Synxflow hydrodynamic model, comprising:

[0051] The data processing and conversion module converts the DEM elevation data obtained from the survey into input data that can be used by Synxflow. The grid longitude and latitude coordinates, initial water level, initial flow rate, and boundary conditions of the DEM data are obtained to construct an irregular grid structure in preparation for grid construction. The irregular grid is constructed using the three data structures of points, edges, and grids and the data of the file data. The first data structure records the grid number and edge number of each point on the grid, as well as the longitude and latitude coordinates of each point. The second data structure records the grid number to which each edge belongs and the numbers of the two points that make up the edge. The third data structure records the numbers of the edges and points that make up each grid, the area of ​​the grid, the initial water level of the grid, the initial water flow rate of the grid, and the average terrain height.

[0052] Irregular grid data structure generation module, design and optimize the data structure and algorithm for processing irregular grids to ensure efficient calculation and storage. The degree of the grid is calculated through the relationship between the grid and the edge to determine whether the grid is a boundary grid, and the subscript is stored using a hash, and a hash map of the grid and the edge is established to obtain the neighborhood coordinates of each grid. The calculation rules for the degree of the grid are explained, and the data structure of the edge is traversed. If an edge is used by two grids at the same time, the degree of the grid is increased by one. When the size of the degree is lower than the number of edges of the grid, it means that at least one edge is a boundary, and the grid is recorded as a boundary grid.

[0053] The parallel processing and operator optimization module changes the original serial processing of scalar and vector data files in the Synxflow hydrodynamic model to asynchronous parallel processing, giving full play to the multi-core performance of the CPU. It can read the scalar and vector files required by the hydrodynamic model while constructing irregular grids on CUDA. It optimizes the adaptation of gradient calculation and shallow water equation SWES operators on irregular grids.

[0054] The cuda stream processing module changes the original file interaction model of the Synxflow hydrodynamic model to data stream processing, avoiding a large amount of tedious local file IO reading and writing, and processing the data on the cuda video memory, so that Snyxflow can interact with hydrology and other modules more smoothly.

[0055] The present invention provides a method for generating an irregular grid and a grid point and grid edge data structure algorithm of a Synxflow hydrodynamic model, including calculation of grid topological structure relationship and in-degree and out-degree and construction of irregular grid vector and scalar field; adaptive function of Synxflow under any irregular shape grid; adaptation of directional gradient, hydrodynamic diving equation, friction source calculation and boundary conditions under irregular grid, and the specific steps are as follows:

[0056] Step 1: Generate irregular grid topological structure relationships. Establish topological relationships between grid points, grid edges, and grid units, including adjacent relationships and connection relationships. Each grid edge consists of two grid points, and the information of the points can be directly queried through the edge; each grid consists of multiple edges, and the information of each edge can be queried through the grid number. The topological structure of the entire irregular grid is expressed as an undirected connection graph composed of multiple irregular grid units. The connection relationship of the grid is established through the commonly used edges. There are as many domain grids as there are edges belonging to two grids. Use the data structure adjacency list to store topological information for fast retrieval and update. Ensure the integrity and consistency of the topological relationship and provide a basis for subsequent calculations. The size of each grid in the adjacency list is the number of domain grids, which is also the degree of the grid.

[0057] Step 2: Grid boundary point judgment and hash mapping. Traverse the grid points and grid edges. If the degree of the grid stored in the adjacency table obtained in step 1 does not match the number of grid edges, it means that the grid is a boundary point. Use hash mapping technology to quickly map boundary points to corresponding boundary conditions to reduce search time. Process boundary points and internal points separately. The neighborhood grid data missing from the boundary grid, such as the neighborhood grid flow rate, is set to 0. If it is an internal point, the data of all neighborhood grids is calculated normally. Ensure the correct application of boundary conditions and the calculation efficiency of internal points.

[0058] Step 3: Construction of scalar and vector fields of the hydrodynamic model. Use shared smart pointers to manage the basic irregular grid topology, and construct scalar data by combining the initial water level and longitude and latitude coordinates of the grid points from the data stream; construct vector field data by combining the initial flow velocity from the data stream.

[0059] Step 4: Construction of scalar field and vector field on cuda. ​​Upload the constructed scalar field and vector field data to GPU memory and use cuda for parallel computing. Write cuda kernel functions to realize parallel computing and updating of scalar field and vector field. Optimize cuda memory management, reduce data transmission delay, and ensure computing efficiency and stability.

[0060] Step 5: Adaptive meshing of irregular shapes. To achieve adaptive meshing of the Synxflow model, you can select the irregular mesh obtained from the existing survey through the configuration file, or dynamically select the regular mesh for segmentation and adjust the mesh density. During the simulation process, the mesh distribution is adjusted in real time to ensure the calculation accuracy and efficiency, while adapting to the dynamically changing terrain and hydrological conditions.

[0061] Step 6: Reconstruction of Synxflow directional gradient calculation. Reconstruct the directional gradient calculation method under irregular grids to ensure the accuracy and stability of gradient calculation. Use the method of weighted center and then average value to add up the coordinates of each point on the grid and divide by the number of points to get the coordinates of the center point of the irregular grid; the components of the neighborhood grid in the x-axis direction and the components in the y-axis direction replace the vectors of the fixed regular grid in the original Synxflow. Implement parallel gradient calculation on cuda and use the computing power of GPU to accelerate the gradient calculation process. The simplified calculation formula of the two-dimensional hydrodynamic grid gradient is as follows:

[0062] L∈Number of neighborhood grids

[0063] Among them, T L The difference between the physical quantity representing the neighborhood grid, such as the elevation value, and the physical quantity of the grid is divided by the displacement in the x and y directions, and the gradient is obtained by taking the minimum value in all neighborhood grid calculations.

[0064] Step 7: Reconstruction of the Synxflow diving equation operator. According to the characteristics of irregular grids, the diving equation operator in the Synxflow model is reconstructed. The specific reconstruction method is to change the neighborhood grid in the original operator to be obtained from the adjacency table topology structure, and the calculation of the direction vector is replaced by the geometric mean. Ensure its applicability under irregular grids, optimize the numerical stability and calculation accuracy of the operator, and ensure that the simulation results under irregular grids are accurate and reliable.

[0065] Step 8: CUDA data stream processing. Implement the CUDA data stream processing mechanism to handle real-time calculation and update of large-scale data streams. Use CUDA streams and events to manage parallel computing tasks and optimize the data stream processing process, that is, read and write file data into memory, and efficiently process different types of data files in parallel through CUDA's asynchronous processing framework. Combine memory cache and data stream control technology to ensure the efficiency and stability of data stream processing, and support real-time simulation and dynamic updates.

[0066] from Figure 1 It can be seen that the method of the present invention mainly includes four parts: data stream input and preprocessing optimization, irregular grid variable vector field construction, hydrodynamic model operator adaptation design, and output data stream processing optimization. The file interaction input of the original Synxflow model is changed to data stream input, which is provided through other system integration modules; then the obtained flow data is used to construct the scalar field and vector field of the hydrodynamic model, and a more comprehensive overload is performed on the algorithm data structure; secondly, the constructed data is modified and adapted in the operator calculation, and finally the data stream is output in parallel and interactively.

[0067] from Figure 2 The design of the core data structure can be analyzed. Figure 1 and Figure 2 Describe how to quickly implement this method.

[0068] 1) You need to prepare the Synxflow source code, create a build directory, download dependencies such as cmake and cuda, and prepare for compilation.

[0069] 2) Modify the original data file reading process from the local to use the cudaMemcpyAsync function in cuda to transfer the video memory address, avoiding the repeated copy construction that occupies a large amount of storage.

[0070] 3) Build an irregular grid infrastructure, traverse all irregular grid indexes, start from the north direction, and establish a hash map between each grid index and edge. When the grid index is i and the edge index is j, the value k represents the kth edge whose j is i.

[0071] 4) Determine the out-degree of the grid. If the subscript of an edge is mapped once when establishing the hash map, it means that at least one edge of the grid is not shared by other grids, and it is marked as a boundary grid.

[0072] 5) Construct a scalar vector field, fill the water level, flow velocity, elevation, Manning coefficient and other data in the data stream on the basis of the basic boundary grid, and copy the address in the data stream to the constructed scalar or vector field.

[0073] 6) Adapt the original Synxflow operator. The original operator targets regular grids. The normal vector and dx and dy data can be processed as fixed values ​​by pre-processing the data. Now the geometric mean of the coordinates of each grid point is calculated as the center point coordinate, and the normal vector of each grid and its neighboring grid center point coordinate is calculated instead.

[0074] 7) Data stream output processing, copying the data from cuda to other modules according to the parameters of the input configuration file for subsequent use such as rendering. At the same time, every time a line of data is generated, the output end can get the execution status of the current algorithm.

[0075] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.

[0076] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. An irregular grid design and optimization system based on Synxflow hydrodynamic model, characterized in that: include: Data processing and conversion module, used to convert DEM elevation data into input data required by Synxflow hydrodynamic model; Irregular grid data structure generation module, used to design and optimize the data structure and algorithm for processing irregular grids; Parallel processing and operator optimization module, which is used to improve the original serial processing mode of Synxflow hydrodynamic model, process it in asynchronous parallel mode, and optimize the gradient calculation and shallow water equation SWES operator in the hydrodynamic model to adapt to irregular grids; The cuda stream processing module is used to improve the data processing method of the Synxflow hydrodynamic model, replace the original file interaction model with a data stream processing model, and process it in the form of data stream on the cuda video memory.

2. The irregular grid design and optimization system based on Synxflow hydrodynamic model according to claim 1, characterized in that: The data processing conversion module includes: Obtain the grid longitude and latitude coordinates, initial water level, initial flow velocity, and boundary conditions of DEM data; Constructing an irregular grid structure, wherein the irregular grid structure includes three data structures: a point data structure, an edge data structure, and a grid data structure; The point data structure records the attributes of each point on the grid, including the grid number, edge number and longitude and latitude coordinates; The edge data structure records the attributes of each edge, including the grid number and the numbers of the two points that make up the edge; The grid data structure records the attributes of each grid, including the numbers of the edges and points that make up the grid, the grid area, the initial water level, the initial water flow rate, and the average terrain height.

3. The irregular grid design and optimization system based on Synxflow hydrodynamic model according to claim 1, characterized in that: The irregular grid data structure generation module comprises: Calculate the degree of the grid to determine whether the grid is a boundary grid; The relationship between grids and edges is stored using hashes, and a hash map of grids and edges is established to obtain the neighborhood coordinates of each grid.

4. An irregular grid design and optimization method based on Synxflow hydrodynamic model, characterized in that: The irregular grid design and optimization system based on the Synxflow hydrodynamic model according to any one of claims 1 to 3 comprises the following steps: Step 1: Generate irregular grid topological structure relationship; Step 2: Determine the grid boundary points and establish a hash map; Step 3: Construct the scalar field and vector field of the hydrodynamic model; Step 4: Construct scalar field and vector field on CUDA; Step 5: Realize the adaptation under irregular shape grid; Step 6: Reconstruct directional gradient calculation; Step 7: Reconstruct the diving equation operator; Step 8: Implement cuda data stream processing.

5. The irregular grid design and optimization method based on Synxflow hydrodynamic model according to claim 4, characterized in that: The step 1 comprises: Establishing topological relationships among grid points, grid edges, and grid cells, including adjacent relationships and connection relationships; Each grid edge consists of two grid points, and the information of the points can be queried directly through the edge; each grid consists of multiple edges, and the information of each edge can be queried through the grid number; The topological structure of the entire irregular grid is expressed as an undirected connected graph composed of multiple irregular grid units. The connection relationship of the grids is established through the commonly used edges. The data structure adjacency list is used to store the topological information. The size of each grid in the adjacency list is the number of domain grids and also the degree of the grid.

6. The irregular grid design and optimization method based on Synxflow hydrodynamic model according to claim 4, characterized in that: The step 2 includes: traversing the grid points and grid edges. If the degree of the grid stored in the adjacency table does not match the number of grid edges, it means that the grid is a boundary point. Using hash mapping technology, the boundary point is mapped to the corresponding boundary condition and the neighborhood grid flow rate is set to 0; otherwise, it is an internal point and the data of all neighborhood grids are calculated normally.

7. The irregular grid design and optimization method based on Synxflow hydrodynamic model according to claim 4, characterized in that: Step 3 includes: using shared smart pointers to manage the basic irregular grid topology structure, combining the initial water level and the longitude and latitude coordinate data of the grid points input by the data stream to construct scalar data; combining the initial flow velocity data input by the data stream to construct vector field data; The step 4 includes: uploading the constructed scalar field and vector field data to the GPU memory, using cuda to perform parallel computing, and writing cuda kernel functions to achieve parallel computing and updating of the scalar field and the vector field.

8. The irregular grid design and optimization method based on Synxflow hydrodynamic model according to claim 4, characterized in that: The step 5 includes: selecting an irregular grid obtained from existing surveying and mapping through a configuration file, or dynamically selecting a regular grid for segmentation and adjusting the grid density; during the simulation process, adjusting the grid distribution in real time to ensure calculation accuracy and efficiency while adapting to dynamically changing terrain and hydrological conditions.

9. The irregular grid design and optimization method based on Synxflow hydrodynamic model according to claim 4, characterized in that: The step 6 includes: using a method of weighting the center and then obtaining the average value to obtain the center point coordinates of the irregular grid, calculating the gradient values ​​in the dx direction and the dy direction of the neighborhood grid to replace the vectors of the fixed regular grid in the original Synxflow; implementing parallel gradient calculation on cuda, and using the computing power of GPU to accelerate the gradient calculation process; The step 7 includes: changing the neighborhood grid in the original operator to be obtained from the adjacency table topology structure, replacing the calculation of the direction vector with the geometric mean, optimizing the numerical stability and calculation accuracy of the operator, and ensuring that the simulation results under the irregular grid are accurate and reliable.

10. The irregular grid design and optimization method based on Synxflow hydrodynamic model according to claim 4, characterized in that: Step 8: Use CUDA streams and events to manage parallel computing tasks, optimize the data stream processing process, combine memory caching and data stream control technology, ensure the efficiency and stability of data stream processing, and support real-time simulation and dynamic update.

Citation Information

Patent Citations

  • Mountain torrent small watershed hydrological hydrodynamic model rapid modeling system and method

    CN117933127A