Distributed hydrodynamic calculation model implementation method

By adding distributed computing functions to the hydrodynamic calculation software, the problems of high occupancy of computing resources and slow calculation speed of traditional hydrodynamic models are solved, and efficient distributed computing of hydrodynamic models are realized to meet the real-time computing needs of large river basins.

CN119416706AInactive Publication Date: 2025-02-11CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510018452.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional hydrodynamic model calculations are difficult to meet the needs of real-time hydrodynamic calculations due to complex boundary conditions, large calculation amounts and high calculation complexity.

Method used

By adding dynamic input of boundary conditions of IFMS software model, real-time communication of one- and two-dimensional hydrodynamic model calculation process, transmission and integration of hydrodynamic model calculation results in the existing hydrodynamic calculation software, the distributed calculation of hydrodynamic model can be realized. ability.

Benefits of technology

The calculation efficiency of the hydrodynamic model is improved, so that the computing resources can be expanded elastically to meet the needs of real-time hydrodynamic calculation in large river basins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416706A_ABST
    Figure CN119416706A_ABST
Patent Text Reader

Abstract

The invention provides a distributed hydrodynamic calculation model implementation method. The method comprises the steps that a central processing unit receives model calculation task calling and puts tasks into a waiting queue; dividing the calculated hydrodynamic model by the central processing unit, and issuing the divided hydrodynamic model as a calculation task to a calculation node; registering information of the computing nodes to a central processing unit, and waiting for task allocation; the central processing unit matches the server to perform task allocation according to the size of the current calculation task and the current condition of the calculation node; the computing node receives the computing task and judges whether the local model is the latest hydrodynamic model or not; the calculation node dynamically sets calculation parameters set by a user into a calculation model through a program according to the calculation task, and model calculation is started; the calculation node performs calculation and synchronizes model data to the central processing unit; the central processing unit receives model calculation data and performs fusion processing on calculation process data; and the central processing unit sends the data to a message queue and synchronizes the data to an application system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of hydrodynamic model calculation, and in particular to a method for realizing a distributed hydrodynamic calculation model. Background Art

[0002] In the traditional hydrodynamic model calculation process, due to the complex boundary conditions, large model calculation amount and high calculation complexity, the current mainstream hydrodynamic calculation software is often based on single-machine calculation and static model calculation, which has the problem of high resource usage and slow calculation speed. When the calculation basin area is relatively large and the number of calculation tasks increases, it will cause the accumulation of calculation tasks, and in serious cases, it may cause the calculation server to crash. With the surge in dynamic risk map business, the traditional hydrodynamic single-machine calculation mode is becoming increasingly difficult to solve this problem.

[0003] The Chinese invention patent application with application number CN113392489A discloses a method for calculating a distributed hydrodynamic model of a river system, the method comprising: obtaining water system distribution information, a water system distribution data set and a water system relationship network; obtaining data information of each tributary according to the water system distribution information, and further obtaining a hydrodynamic model database; obtaining a model calculation sequence according to the water system relationship network and the hydrodynamic model database, combining the distributed computing device information to obtain a computing device matching sequence, performing calculations according to the computing device matching sequence, obtaining a water system calculation result, and finally obtaining flood control dispatch information. The disadvantage of this method is that each computing node can only support a single model calculation at the same time, and cannot realize parallel calculation of multiple models, and the efficiency is relatively low.

[0004] The Chinese invention patent application with application number CN104200045A discloses a parallel computing method for a large-scale water system distributed hydrodynamic model of a basin, which uses regular grids as basic computing units and block areas as computing nodes to implement a parallel implementation method for a distributed numerical model of a large-scale basin. Through the division of the basin water system area and distributed cluster computing, the problem of the 2G memory array limitation of the win32 program in the large-scale basin simulation is solved, and a fine model of the large-scale basin is realized; by constructing the overlapping area of ​​adjacent blocks and exchanging data based on a distributed message passing model, the error correction of the block boundary data of each node is realized to ensure the consistency and accuracy of the whole basin simulation; based on the OPENMP and MPI parallel general protocols, the calculation of each block node and the internal node is parallelized to achieve efficient and fine simulation of the large-scale basin. The disadvantage of this method is the computing efficiency of the computing node. Load balancing is closely related to the model partitioning. If the calculation amount of the model partition is unreasonable, the calculation time of the entire model will be longer. Summary of the invention

[0005] In order to solve the above-mentioned technical problems, the present invention proposes a method for realizing a distributed hydrodynamic calculation model, which is based on the existing hydrodynamic calculation software and adds functions such as dynamic input of boundary conditions of the IFMS software model, real-time communication of the one- and two-dimensional hydrodynamic model calculation process, and transmission and integration of hydrodynamic model calculation results, so as to realize the distributed computing capability of the hydrodynamic model.

[0006] The object of the present invention is to provide a distributed hydrodynamic calculation model implementation method, comprising a central processing unit receiving a model calculation task call through an interface and placing the task into a waiting queue, and further comprising the following steps: Step 1: The central processing unit divides the calculated hydrodynamic model into watersheds according to the characteristics of the one-dimensional hydrodynamic model and the two-dimensional hydrodynamic model, and sends the divided areas as computing tasks to the computing nodes; Step 2: After the computing node is started, the computing node information is registered to the central processing unit and waits for task allocation. The computing node information includes computing resource details, idle status and server IP; Step 3: The central processing unit matches the appropriate computing node for task allocation according to the size of the current computing task and the computing resources and idle status of the computing node; Step 4: The computing node receives the computing task and determines whether the local model is the latest hydrodynamic model for the computing task according to the task status assigned by the central processing unit. If it is not the latest model, the latest model file is synchronized from the model server. Step 5: The computing node starts the model. According to the computing parameters, one-dimensional boundary conditions and two-dimensional boundary conditions of the computing task, the computing parameters set by the user are dynamically set into the computing model through the program, and the model calculation is started. Step 6: The computing node calculates the hydrodynamic model process and synchronizes the model data to the central processing unit; Step 7: After receiving the model calculation data, the central processing unit performs fusion processing on the calculation process data; Step 8: After the central processing unit processes the calculation result data, it sends the data to the message queue and synchronizes it to the application system.

[0007] Preferably, the method for dividing the one-dimensional hydrodynamic model includes dividing the mainstream area and the tributary area separately.

[0008] In any of the above solutions, preferably, the division principle of the main stream area includes: 1) The difference in the number of sections between regions is less than 2%; 2) Each area includes at least 2 monitoring stations.

[0009] In any of the above solutions, preferably, the division principle of the tributary area includes: 1) When the cross-sections of a tributary are less than 300, the tributary is designated as a separate area; 2) When the number of tributary sections is greater than or equal to 300, the tributary should be divided into 2-3 sub-areas according to the main stream division principle.

[0010] In any of the above schemes, preferably, step 1 also includes connecting the sub-regions after the region division is completed according to the division method of the one-dimensional hydrodynamic model, and configuring at least one set of connecting sections at the connection between the main and tributary regions and at the entrance where the tributaries merge into the main stream.

[0011] In any of the above schemes, it is preferred that the regional modeling range of the two-dimensional hydrodynamic model is in towns and key flood control areas, and when performing grid division, it is divided into grids of 10-20 meters in key towns and 50-200 meters in non-town areas.

[0012] In any of the above solutions, preferably, the division principle of the two-dimensional hydrodynamic model is: 1) The deviation of the number of grids between the divided sub-areas is less than the deviation threshold; 2) The calculated load difference of each sub-area is less than the load threshold; 3) The amount of grid data connected between sub-regions is less than the quantity threshold.

[0013] In any of the above schemes, preferably, step 1 also includes, after the area division is completed according to the division method of the two-dimensional hydrodynamic model, selecting adjacent grids between the areas as connecting grids between the areas, and in the distribution calculation process, transmitting the water level, water depth, flow velocity, and flow direction information of the two-dimensional calculation results of each area to each other through the grid connection information, and calculating the mutual influence between the grids.

[0014] In any of the above solutions, preferably, step 2 includes inputting model parameters and boundary conditions into the model in a dynamic manner after the computing node initializes the model.

[0015] In any of the above schemes, preferably, the calculation parameters include the start and end time of the calculation scheme, the scheme step size and the output step size.

[0016] In any of the above solutions, preferably, step 7 includes the following sub-steps: Step 71: The central processing unit records the upstream and downstream relationships of all regions of the one-dimensional model and the two-dimensional model, the region division information, the region connection information, the cross section and the grid index information; Step 72: After receiving the data calculated by each node, the central processing unit stores the cross-section and grid results in the corresponding index results according to the recorded index information, and merges the one- and two-dimensional calculation result data of each area according to the upstream and downstream, main and tributary rivers according to the recorded overall model information to form the hydrodynamic result data of the entire basin; Step 73: The central processing unit determines whether the connection section and grid calculation data need to synchronize the results to the connection area based on the current calculation results and regional connection information. When the current calculation results have an impact on other connected areas, the central processing unit transmits the calculation results of the connection section or grid to the affected connection area.

[0017] In any of the above solutions, preferably, the method for judging whether the current calculation result has an impact on other connected areas is that water in the sections and grids at the connection flows or overflows to the connected sections and grids.

[0018] In any of the above solutions, preferably, the central processing unit is used to store the upstream and downstream relationship of the entire model area, area division information, area connection information, cross section and grid index information.

[0019] In any of the above schemes, it is preferred that the central processing unit is also used to, after each step of data calculation is completed, the central control interface receives the calculation result data of the calculation node, and according to the section and grid index information, promptly fuse and merge the calculation result data of each calculation node to form an overall calculation result.

[0020] In any of the above schemes, preferably, the calculation result data includes cross-section and grid water depth, water level, flow velocity, flow direction, flow area and ground elevation.

[0021] The present invention proposes a distributed hydrodynamic calculation model implementation method, which improves the calculation efficiency of the hydrodynamic model and enables elastic expansion of computing resources to meet the needs of real-time hydrodynamic calculations in large river basins. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 The present invention is a flowchart of a preferred embodiment of a method for implementing a distributed hydrodynamic calculation model according to the present invention.

[0023] Figure 2 A system structure diagram of a preferred embodiment of the distributed hydrodynamic calculation model implementation method according to the present invention.

[0024] Figure 3 The present invention is a flow chart of another preferred embodiment of the method for implementing the distributed hydrodynamic calculation model according to the present invention. DETAILED DESCRIPTION

[0025] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0026] Example 1 like Figure 1 As shown, step 100 is executed, the central processing unit receives a model calculation task call through an interface and puts the task into a waiting queue.

[0027] Execute step 110, the central processing unit divides the calculated hydrodynamic model into watersheds according to the characteristics of the one-dimensional hydrodynamic model and the two-dimensional hydrodynamic model, and sends the divided areas as computing tasks to the computing nodes.

[0028] The method for dividing the one-dimensional hydrodynamic model includes dividing the mainstream area and the tributary area respectively.

[0029] The principles for dividing the main stream area include: 1) The difference in the number of sections between regions is less than 2%; 2) Each area includes at least 2 monitoring stations.

[0030] The principles for dividing the tributary areas include: 1) When the cross-sections of a tributary are less than 300, the tributary is designated as a separate area; 2) When the number of tributary sections is greater than or equal to 300, the tributary should be divided into 2-3 sub-areas according to the main stream division principle.

[0031] After the area division is completed according to the division method of the one-dimensional hydrodynamic model, the sub-areas are connected, and at least one set of connection sections is configured at the connection points between the main stream and the tributary areas and at the entrance where the tributary merges into the main stream.

[0032] The regional modeling scope of the two-dimensional hydrodynamic model is in towns and key flood control areas. When performing grid division, key towns are divided into grids of 10-20 meters in size, and non-town areas are divided into grids of 50-200 meters in size.

[0033] The division principle of the two-dimensional hydrodynamic model is: 1) The deviation of the number of grids between the divided sub-areas is less than the deviation threshold. In this embodiment, the deviation threshold is 10%; 2) The calculated load difference of each sub-area is less than the load threshold. In this embodiment, the load threshold is 5%; 3) The amount of grid data connected between the sub-regions is less than a quantity threshold. In this embodiment, the quantity threshold is 10%.

[0034] The deviation threshold, load threshold, and quantity threshold can be adjusted as needed.

[0035] After the regions are divided according to the division method of the two-dimensional hydrodynamic model, adjacent grids are selected between the regions as connecting grids between the regions. During the distribution calculation process, the water level, water depth, flow velocity, and flow direction information of the two-dimensional calculation results of each region are transmitted to each other through the grid connection information to calculate the mutual influence between the grids.

[0036] Execute step 120. After the computing node is started, the information of the computing node is registered to the central processing unit and waits for task allocation. The information of the computing node includes computing resource details, idle status and server IP. After the computing node initializes the model, the model parameters and boundary conditions are input into the model in a dynamic manner.

[0037] Execute step 130, the central processing unit matches the appropriate computing node for task allocation according to the size of the current computing task and the computing resources and idle status of the computing node.

[0038] Execute step 140, the computing node receives the computing task, and determines whether the local is the latest hydrodynamic model of the computing task according to the task status assigned by the central processing unit. If it is not the latest model, synchronize the latest model file from the model server.

[0039] Execute step 150, the computing node starts the model, and according to the computing parameters of the computing task, the one-dimensional boundary conditions and the two-dimensional boundary conditions, the computing parameters set by the user are dynamically set into the computing model through the program, and the model calculation is started. The computing parameters include the start and end time of the computing scheme, the scheme step size and the output step size.

[0040] Executing step 160, the computing node calculates the hydrodynamic model process and synchronizes the model data to the central processing unit.

[0041] Execute step 170, after receiving the model calculation data, the central processing unit performs fusion processing on the calculation process data, including the following sub-steps: Execute step 171, the central processing unit records all the upstream and downstream relationships of the one-dimensional model and the two-dimensional model, the regional division information, the regional connection information, the cross section and the grid index information; Execute step 172, after receiving the data calculated by each node, the central processing unit stores the cross-section and grid results into the corresponding index results according to the recorded index information, and merges the one- and two-dimensional calculation result data of each area according to the upstream and downstream, main and tributary streams according to the recorded overall model information to form the hydrodynamic result data of the entire basin; Execute step 173, the central processing unit determines whether the connection section and grid calculation data need to synchronize the results to the connection area according to the current calculation results and the regional connection information, and when the current calculation results have an impact on other connected areas, the central processing unit transmits the calculation results of the connection section or grid to the affected connection area. The method for determining whether the current calculation results have an impact on other connected areas is that the water of the connection section and grid flows or overflows to the connected section and grid.

[0042] Execute step 180, after the central processing unit processes the calculation result data, it sends the data to the message queue and synchronizes it to the application system.

[0043] The central processing unit is used to store the upstream and downstream relationship of the entire model area, area division information, area connection information, cross section and grid index information.

[0044] The central processing unit is also used to fuse and merge the calculation result data of each calculation node in time according to the section and grid index information after each step of data calculation is completed, and form an overall calculation result.

[0045] The calculation result data include cross-section and grid water depth, water level, flow velocity, flow direction, flow area and ground elevation.

[0046] Example 2 like Figure 2 As shown, the distributed computing system of the present invention includes a model storage server, a message queue, multiple computing nodes, expansion nodes and a computing central control node (central processing unit). The computing node can be one or more computers, which perform calculations through a hydrodynamic model. The hydrodynamic model is established based on the physical principles and mathematical models of water flow movement, and can simulate various water flow scenes, such as rivers, lakes, oceans, etc. The computing node receives input parameters, uses the hydrodynamic model to perform calculations, and transmits the calculation information to the central processing unit and transmits the calculation data to the message queue.

[0047] The computing central control node can be one or more computers, which are responsible for summarizing and analyzing the computing results. The central processing unit receives the computing results from the computing nodes and integrates and processes them. The central processing unit can also send instructions to the computing nodes to control their allocation and scheduling of computing tasks.

[0048] In order to achieve the above-mentioned purpose of the invention, the present invention adopts the following technical solutions: like Figure 3 As shown, the distributed computing method of the present invention comprises the following steps: (1) The central processing unit receives the model calculation task. If there is no idle node at present, the calculation task is stored in the waiting queue; The central processing unit provides Socket, REST and other interfaces to receive model calculation calls from users or external systems. The interface call parameters include information such as the calling model, boundary condition settings, and model startup parameters. The central interface determines whether there are currently available computing node resources. If there are no available resources, the computing tasks are stored in the first-in-first-out waiting queue, and the model calculation allocation starts after the computing resources are released.

[0049] (2) The watershed scenario is divided into multiple computational regions. The boundary conditions of the hydrodynamic model can be set separately for each region, and the central processing unit can assign the divided regional model to a computational node separately. The model calculation area is divided logically or physically, and the division principle is mainly based on the watershed. The one-dimensional model area division can be divided according to the river level, and the two-dimensional model can be divided according to the small watershed. The boundary conditions of the divided area are set, so that the divided models can be coupled together to form an overall hydrodynamic model.

[0050] (3) After the computing node is started, it connects to the central processing unit and registers the computing node information; After the computing node is started, it connects to the central processing unit through the socket, indicating that the computing node has completed startup and is waiting for the central processing unit to assign computing tasks. The central processing unit adds the computing node to the computing resource list and sets the current computing node status to idle. If there is a computing task, the waiting computing area or computing task is assigned to the current node to start computing.

[0051] (4) The computing node pulls the corresponding hydrodynamic model engineering file from the model sharing server according to the scheduling information and starts the hydrodynamic model; The file server uses the Minio distributed file storage component to store all the used hydrodynamic model files according to certain naming rules. After receiving the calculation task, the computing node first determines whether the calculated model file is stored in the current model path. If not, it synchronizes the model file from the file server, and then starts and initializes the model by region.

[0052] (5) After the hydrodynamic model is started, the boundary conditions of the hydrodynamic model are set according to the boundary conditions of the hydrodynamic model scheduled by the central processing unit, and the model calculation is started after the model is initialized; After the hydrodynamic model is started, the startup parameters and boundary condition data are obtained from the central processing unit. Dynamic startup parameters and boundary conditions support all boundary condition settings of IFMS software. After the settings are completed, the calculation is started and the status information is synchronized to the central processing unit. The central processing unit changes the current node status to model calculation.

[0053] (6) Each computing node uses the hydrodynamic model to perform calculations and transmits the calculation results to the central processing unit. The central processing unit receives the calculation results, summarizes and analyzes them. Finally, the integrated results are sent to the message queue; Each computing node uses the hydrodynamic model in the calculation process, and uses multi-threading to calculate. If the computing node has GPU hardware resources, it can be configured to use GPU acceleration to perform hydrodynamic calculations. GPU acceleration can significantly improve the calculation efficiency. Each computing node synchronizes the calculation results of each step to the central processing unit in Socket mode.

[0054] (7) The intermediate control node sends the integrated calculation results to the efficiency queue for consumption by the application; After receiving the calculation results of all nodes, the central processing unit will fuse and merge the calculated cross-section and grid water depth, water level, flow velocity, flow direction, flow area, ground elevation and other information. After completion, the calculation results will be sent to the message queue and synchronized to the application system for further application of the data.

[0055] (8) After the task calculation is completed, the computing node synchronizes the calculation status to the central processing unit. The central processing unit determines whether there are any tasks waiting to be calculated in the task waiting queue. If there are waiting tasks, it takes out the earliest task in the queue and sends the task to the idle computing node to start the new task calculation.

[0056] Example 3 A method for implementing distributed computing of a hydrodynamic model comprises the following steps: Step 1: The central processing unit receives a model calculation task call through an interface and puts the task into a waiting queue; Step 2: Divide the calculated hydrodynamic model by watershed, and send the divided areas to the computing nodes as computing tasks. There are two methods for area division based on the characteristics of one-dimensional and two-dimensional hydrodynamic models: 2.1 One-dimensional model area division method: When calculating the one-dimensional hydrodynamic model, the number of sections in the model directly affects the calculation speed of the one-dimensional hydrodynamic model. When the river is long, the model needs to be divided into regions, and the number of sections in each region does not exceed 300. When measuring the river section, in order to improve the calculation accuracy of key towns, the number of river sections measured at the location of key towns will be increased. When there are no towns on both sides of the river, the number of measured sections will be appropriately reduced. The main stream generally has more key towns and a higher section density, and the tributary sections are relatively few; the tributaries are the input of the main stream and are coupled with the main stream sections at the confluence point; so when dividing the one-dimensional model into regions, our idea is to divide the main stream and tributaries into regions separately.

[0057] Division of main stream areas: The main stream basin is generally long and has many sections. When dividing the main stream area, the number of sections should be uniform as much as possible. Each area should include at least 2-3 monitoring stations for later calibration and verification.

[0058] Principles for dividing the main stream area: 1) The difference in the number of sections between regions is less than 2%; 2) Each area includes at least 2 monitoring stations.

[0059] Division of tributary areas: Since the length of tributary basins is relatively short and the number of sections is small, generally a tributary can be divided into a separate area. If the tributary is relatively long, it can be divided into 2-3 sub-areas according to the division principle of the main stream.

[0060] Principles for tributary area division: 1) When the cross section of a tributary is less than 300, the tributary is designated as a separate area 2) When the cross section of the tributary is greater than 300, refer to the principle of dividing the main stream and divide it into 2-3 sub-areas. After the regional division is completed, the regions need to be connected. At least one set of connecting sections should be configured at the connection points between the main and tributary regions and at the entrances where the tributaries merge into the main stream. In this way, the calculation results between regions can be transferred to the downstream area through the connecting sections during the hydrodynamic calculation.

[0061] 2.2 Two-dimensional model region division method Principles of area division of two-dimensional model: 1) Divide the key urban areas into grids of 10-20 meters; 2) Divide the area without towns into grids of 50-200 meters; 3) The deviation of the number of divided regional networks is within 2%, so that the computing load of each region is relatively balanced; the amount of grid data connected between regions follows the principle of minimum.

[0062] Since the area of ​​the two-dimensional hydrodynamic model does not span multiple tributaries and main streams, the main modeling scope is in towns and key flood control areas. The calculation speed of the two-dimensional hydrodynamic model depends on the number of two-dimensional grids. The larger the number of grids, the slower the calculation speed. When the two-dimensional model is meshed, it is generally divided into 10-20 meter grids in key towns and 50-200 meter grids in non-town areas. Therefore, when the two-dimensional model is divided into regions, the area divided in key towns is relatively smaller, and the area divided in non-town areas is relatively larger. The main division principles are: try to make the number of network deviations in the divided regions not too large, and the calculation load of each region as balanced as possible; the amount of grid data connected between regions is as small as possible to reduce the network transmission volume of data communication between regions during distributed computing and improve overall efficiency.

[0063] After the two-dimensional area division is completed, adjacent grids are selected between each area as the connecting grids between the areas. During the distribution calculation process, the water level, water depth, flow velocity, and flow direction information of the two-dimensional calculation results of each area can be transmitted to each other through the grid connection information to calculate the mutual influence between the grids.

[0064] Step 3: After the computing node is started, the computing resource details (CPU, GPU resources), idle status, server IP and other information of the computing node are registered to the central processing unit, waiting for task allocation; the central processing unit will match the appropriate server for task allocation based on the size of the current computing task and the computing resources and idle status of the computing node; After the computing node initializes the model, the model parameters and boundary conditions are input into the model in a dynamic manner for real-time calculation, thus ensuring the dynamic calculation of the water conservancy model.

[0065] The calculation acceleration method of the hydrodynamic model of the computing node adopts multi-threading and CPU acceleration to improve the speed and efficiency of distributed computing.

[0066] Step 4: The computing node receives the computing task and determines whether the local model is the latest hydrodynamic model of the computing task according to the task status assigned by the central processing unit. If it is not the latest model, the latest model file is synchronized from the model server. Step 5: The computing node starts the model. According to the computing parameters of the computing task (start and end time of the computing scheme, scheme step size, output step size, etc.), one-dimensional and two-dimensional boundary conditions, the computing parameters set by the user are dynamically set to the computing model through the program, and the model calculation is started; Step 6: The computing node uses mature multi-threading and CPU acceleration technology to calculate the hydrodynamic model process during the calculation process, and synchronizes the model data to the central processing unit; Step 7, after receiving the model calculation data, the central processing unit performs fusion processing on the calculation process data. The central processing unit records the upstream and downstream relationships of all regions of the one-dimensional model and the two-dimensional model, the regional division information, the regional connection information, the section and the grid index information. After receiving the data calculated by each node, the central processing unit stores the section and grid results in the corresponding index results according to the recorded index information, and merges the one-dimensional and two-dimensional calculation result data of each region according to the upstream and downstream, the main and tributary streams according to the recorded overall information of the model to form the hydrodynamic result data of the entire basin. At the same time, the central processing unit determines whether the connection section and grid calculation data need to synchronize the results to the connection area based on the current calculation results and regional connection information. If the current calculation results have an impact on other connected areas, that is, the water of the connection section and grid will flow or overflow to the connected section and grid, the central processing unit will transmit the calculation results of the connection section or grid to the connection area.

[0067] Step 8: After the central processing unit processes the calculation result data, it sends the data to the message queue and synchronizes it to the application system.

[0068] The central processing unit stores the upstream and downstream relationships of the entire model area, regional division information, regional connection information, section and grid index information. After each step of data calculation is completed, the central control interface receives the calculation result data of the calculation node, and according to the section and grid index information, timely integrates and merges the section and grid water depth, water level, flow velocity, flow direction, flow area, ground elevation and other data calculated by each node to form an overall calculation result; after sorting out the calculation results of the sections and grids at the regional connection, determine whether it affects the calculation results of the connected area. If the water in the sections and grids at the connection will flow or overflow to the connected sections and grids, the current connection section result information will be transmitted to the affected area to keep the calculation results between the regions synchronized.

[0069] In order to better understand the present invention, the above is described in detail in conjunction with the specific embodiments of the present invention, but it is not intended to limit the present invention. Any simple modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention. Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A distributed hydrodynamic calculation model implementation method, comprising a central processing unit receiving a model calculation task call through an interface and placing the task into a waiting queue, characterized in that: The following steps are also included: Step 1: The central processing unit divides the calculated hydrodynamic model into watersheds according to the characteristics of the one-dimensional hydrodynamic model and the two-dimensional hydrodynamic model, and sends the divided areas as computing tasks to the computing nodes; Step 2: After the computing node is started, the computing node information is registered to the central processing unit and waits for task allocation. The computing node information includes computing resource details, idle status and server IP; Step 3: The central processing unit matches the appropriate computing node for task allocation according to the size of the current computing task and the computing resources and idle status of the computing node; Step 4: The computing node receives the computing task and determines whether the local model is the latest hydrodynamic model for the computing task according to the task status assigned by the central processing unit. If it is not the latest model, the latest model file is synchronized from the model server. Step 5: The computing node starts the model. According to the computing parameters, one-dimensional boundary conditions and two-dimensional boundary conditions of the computing task, the computing parameters set by the user are dynamically set into the computing model through the program, and the model calculation is started. Step 6: The computing node calculates the hydrodynamic model process and synchronizes the model data to the central processing unit; Step 7: After receiving the model calculation data, the central processing unit performs fusion processing on the calculation process data; Step 8: After the central processing unit processes the calculation result data, it sends the data to the message queue and synchronizes it to the application system.

2. The distributed hydrodynamic calculation model implementation method according to claim 1, characterized in that: The method for dividing the one-dimensional hydrodynamic model includes dividing the mainstream area and the tributary area respectively.

3. The distributed hydrodynamic calculation model implementation method according to claim 2, characterized in that: The principles for dividing the main stream area include: 1) The difference in the number of sections between regions is less than 2%; 2) Each area includes at least 2 monitoring stations.

4. The distributed hydrodynamic calculation model implementation method according to claim 3, characterized in that: The principles for dividing the tributary areas include: 1) When the cross-sections of a tributary are less than 300, the tributary is designated as a separate area; 2) When the number of tributary sections is greater than or equal to 300, the tributary should be divided into 2-3 sub-areas according to the main stream division principle.

5. The distributed hydrodynamic calculation model implementation method according to claim 4, characterized in that: The step 1 also includes connecting the sub-regions after the region division is completed according to the division method of the one-dimensional hydrodynamic model, and configuring at least one set of connection sections at the connection points between the main and tributary regions and at the entrance where the tributaries merge into the main stream.

6. The distributed hydrodynamic calculation model implementation method according to claim 5, characterized in that: The regional modeling scope of the two-dimensional hydrodynamic model is in towns and key flood control areas. When performing grid division, key towns are divided into grids of 10-20 meters in size, and non-town areas are divided into grids of 50-200 meters in size.

7. The distributed hydrodynamic calculation model implementation method according to claim 6, characterized in that: The division principle of the two-dimensional hydrodynamic model is: 1) The deviation of the number of grids between the divided sub-areas is less than the deviation threshold; 2) The calculated load difference of each sub-area is less than the load threshold; 3) The amount of grid data connected between sub-regions is less than the quantity threshold.

8. The distributed hydrodynamic calculation model implementation method according to claim 7, characterized in that: The step 1 also includes, after the area division is completed according to the division method of the two-dimensional hydrodynamic model, selecting adjacent grids between the areas as connecting grids between the areas, and in the distribution calculation process, transmitting the water level, water depth, flow velocity, and flow direction information of the two-dimensional calculation results of each area to each other through the grid connection information, and calculating the mutual influence between the grids.

9. The distributed hydrodynamic calculation model implementation method according to claim 8, characterized in that: The step 2 includes inputting the model parameters and boundary conditions into the model in a dynamic manner after the computing node initializes the model.

10. The distributed hydrodynamic calculation model implementation method according to claim 9, characterized in that: The step 7 comprises the following sub-steps: Step 71: The central processing unit records the upstream and downstream relationships of all regions of the one-dimensional model and the two-dimensional model, the region division information, the region connection information, the cross section and the grid index information; Step 72: After receiving the data calculated by each node, the central processing unit stores the cross-section and grid results in the corresponding index results according to the recorded index information, and merges the one- and two-dimensional calculation result data of each area according to the upstream and downstream, main and tributary rivers according to the recorded overall model information to form the hydrodynamic result data of the entire basin; Step 73: The central processing unit determines whether the connection section and grid calculation data need to synchronize the results to the connection area based on the current calculation results and regional connection information. When the current calculation results have an impact on other connected areas, the central processing unit transmits the calculation results of the connection section or grid to the affected connection area.

Citation Information

Patent Citations

  • Parallel computing method for distributed hydrodynamic model of large-scale watershed system

    CN104200045A

  • Calculation method for distributed hydrodynamic model of riverway water system

    CN113392489A

  • GPU catchment runoff simulation distributed dispatching system and method

    CN108196951A

  • Cloud service system for multi-model coupling calculation in water industry

    CN109784708A

  • Water conservancy professional model integration and management method and device and storage medium

    CN118245515A