Search

CN-122021414-A - Two-dimensional hydrodynamic model grid partition optimization method based on hybrid neural network

CN122021414ACN 122021414 ACN122021414 ACN 122021414ACN-122021414-A

Abstract

The invention relates to a two-dimensional hydrodynamic model grid partition optimization method based on a hybrid neural network, which comprises the steps of generating two-dimensional quadrilateral grids based on physical boundaries, storing grid topological structure data, splitting grids to be optimized into a plurality of sub-grids, storing common edge data of a sub-grid set and a residual grid set, conducting grid orthogonality optimization on grids in the residual grid set, conducting orthogonality optimization on sub-networks in the sub-grid set sequentially by using a physical information neural network, constructing a bidirectional data updating mechanism of adjacent sub-grids, achieving cooperative linkage of sub-grid optimization, and combining the optimized sub-grid set and the residual grid set according to rules to obtain an optimized quadrilateral grid. The hydrodynamic model is divided into the sub-grids and the residual grids through the partition optimization strategy, so that the calculated amount is obviously reduced, the optimization efficiency is improved, and the optimization quality is improved by combining the hybrid optimization mode of the physical information neural network and the traditional grid correction algorithm, so that local optimization is avoided.

Inventors

  • LI WENDA
  • CAO HUI
  • CHEN HONG
  • ZHAO XU
  • REN YUFENG

Assignees

  • 中国长江电力股份有限公司
  • 河海大学

Dates

Publication Date
20260512
Application Date
20260114

Claims (10)

  1. 1. The two-dimensional hydrodynamic model grid partition optimization method based on the hybrid neural network is characterized by comprising the following steps of: S1, acquiring a river channel physical boundary, extracting physical boundary entity data, and storing coordinates and global index values of river channel boundary nodes; S2, generating a two-dimensional quadrilateral mesh based on the physical boundary, digitizing the quadrilateral mesh, and storing topological structure data and physical coordinate data of the quadrilateral mesh; s3, calculating and judging the global orthogonality of the grids based on the quadrilateral grids, and determining whether the grids need to be optimized or not; S4, dividing the two-dimensional quadrilateral grids to be optimized into a plurality of fixed-size sub-grids as far as possible to obtain a sub-grid set, marking the remaining grids which cannot be divided into the fixed-size sub-grids as remaining grid sets, and storing common edge data of the sub-grid sets and the remaining grid sets; S5, grid orthogonality optimization is carried out on grids in the rest grid set by using a grid correction algorithm, and optimized public edge data are fed back to the sub-grid set; S6, constructing a physical information neural network for optimizing grid orthogonality, wherein the input of the neural network is a sub-grid, the output of the neural network is the sub-grid after grid orthogonality optimization, and the physical boundary of the river channel is used as the constraint of the physical information neural network; based on the topological data structure and the physical coordinate data of the quadrilateral mesh, quantizing the orthogonality of the mesh and determining a loss function; s7, sequentially performing orthogonality optimization on the sub-networks in the sub-grid set by using the physical information neural network, and feeding back the public edge data of the optimized sub-grids to the sub-grids which are not optimized; And S8, combining the optimized sub-grid set and the rest grid set according to a preset arrangement rule to obtain an optimized quadrilateral grid.
  2. 2. The method for grid partition optimization of two-dimensional hydrodynamic model according to claim 1, wherein in step S1, the set of boundary nodes is , Representing a set of all boundary coordinate points, The set of index values representing the coordinates of the node.
  3. 3. The method for optimizing grid partition of two-dimensional hydrodynamic model according to claim 2, wherein step S2 specifically comprises: s2.1, generating a two-dimensional quadrilateral mesh based on a physical boundary; s2.2, extracting topological structure data of the grid and grid node coordinate data; grid node coordinates and global index values are noted as , ; Wherein the method comprises the steps of Representing a set of all coordinate points, A global index value representing a grid node, Representing a set of index values for the grid nodes; the global index value of other nodes connected with the grid node is recorded as , ; Wherein, the A global index value representing the current node, A global index representing other nodes to which the current node is connected; the global index number of a grid and the index numbers of adjacent grids are marked as , ; Wherein, the , The global index number representing each grid, Global index values representing other grids to which the grid is connected; The global index values of the four nodes of each grid are noted as , ; Wherein, the Representing the global index values of the four nodes on each grid.
  4. 4. The method for optimizing grid partition of two-dimensional hydrodynamic model according to claim 3, wherein step S3 specifically comprises: s3.1, taking the absolute value of cosine value of the included angle between two edges corresponding to the grid nodes as a quantization index of grid orthogonality, and calculating the global average orthogonality of the grid , ; Wherein, the Represent the first The size of the orthogonality of the corresponding edges of the grid nodes, Representing the number of included angles in the grid; s3.2 if The grid quality is excellent, the grid is output, otherwise, the grid is optimized.
  5. 5. The method for grid partition optimization of two-dimensional hydrodynamic model according to claim 4, wherein step S4 specifically comprises: S4.1, splitting a two-dimensional quadrilateral grid to be optimized into a plurality of m x n sub-grids as far as possible, wherein the sub-grids are mutually nested, m represents the number of grid cells contained in the transverse direction, and n represents the number of grid cells contained in the longitudinal direction; S4.2, numbering the sub-grids, and storing the following data: The number of the sub-grid and the number of the sub-grid connected with the current sub-grid are recorded as , ; Wherein, the For the number of the current sub-grid, Respectively numbering three sub-grids connected with the current sub-grid, Numbering sets for all sub-grids; the coordinates and global index of grid nodes inside the sub-grid are recorded as , ; Wherein, the An index matrix representing grid nodes inside the sub-grid; Grid node coordinates on common edges of the sub-grids and global indexes of the nodes are recorded as ; S4.3, marking the remaining non-detachable quadrilateral grids as a remaining grid set M2, and storing the following data: the coordinates and global index of grid nodes in the rest grid set are marked as ; Grid node coordinates and global indexes of nodes on common edges of the sub-grid set M1 and the rest grid set M2 are recorded as 。
  6. 6. The method for grid partition optimization of a two-dimensional hydrodynamic model according to claim 5, wherein in step S4.2, when m=8, n=8, ; Wherein the method comprises the steps of Is a grid node in a sub-grid Is used to determine the global index value of (c), The transverse sequence number of the grid node in the sub-grid is represented, and j represents the transverse sequence number of the grid node in the sub-grid.
  7. 7. The two-dimensional hydrodynamic model mesh partition optimization method according to claim 5, wherein in step S5, the remaining mesh set M2 is optimized using a conventional mesh correction algorithm, and the common edge data of M1 and M2 is updated And a sub-grid set M1.
  8. 8. The method for grid partition optimization of two-dimensional hydrodynamic model according to claim 5, wherein step S6 specifically comprises: S6.1, quantifying grid orthogonality by using the method of the step S3.1; S6.2, constructing a loss function containing physical information: ; Wherein, the Representing a maximum grid orthogonality quantization value; The loss function not only considers the global effect and the local effect of grid orthogonality optimization, but also contains physical information; s6.3, constructing a physical information neural network; the size of the sub-grid is The size of the input layer and the output layer of the physical information neural network is The channel 1 of the input layer and the output layer is the global index value of the grid node, the channel 2 is the abscissa of the grid node, and the channel 3 is the ordinate of the grid node; s6.4, constructing two constraints on the convolutional neural network: 1) Grid nodes after sub-grid optimization cannot exceed the physical boundary of a river channel; 2) The difference between the distances between the grid nodes before optimization and the grid nodes after optimization cannot exceed one fourth of the average side length of the grid; S6.5, a training set and a testing set of the physical information neural network are established, and training and testing are carried out on the training set and the testing set; Generating sub-grid samples with various shapes and good grid orthogonality with the same specification as the sub-grid by using professional software, artificially reducing the grid orthogonality, respectively taking the sub-grid samples with the artificially reduced grid orthogonality and the sub-grid samples with the good grid orthogonality as the input and the output of the physical information neural network, constructing a sub-grid sample data set, taking 70% of sub-grid sample data as a training set and the rest 30% of sub-grid sample data as a test set, and respectively training and testing the physical information neural network by using the training set and the test set until the physical information neural network meets the precision requirement of the neural network model.
  9. 9. The method according to any one of claims 1 to 8, wherein in step S6, the physical information neural network is constructed based on a convolutional neural network CNN.
  10. 10. The two-dimensional hydrodynamic model grid partition optimization method according to claim 5 or 6 or 7 or 8, wherein in step S7, the sub-grid set M1 is optimized using a physical information neural network and the optimization result is fed back, specifically comprising: optimizing sub-grids using physical information neural networks And update Coordinates and global index of grid nodes inside a sub-grid of (a) Based on updated Updating sub-grid common edge dataset Using Updating A kind of electronic device ,i>1; Optimizing sub-grids using physical information neural networks And update A kind of electronic device And Using Updating again A kind of electronic device 。

Description

Two-dimensional hydrodynamic model grid partition optimization method based on hybrid neural network Technical Field The invention belongs to the technical field of grid optimization in hydrodynamic numerical simulation, and particularly relates to a two-dimensional hydrodynamic model grid partition optimization method based on a hybrid neural network. Background The two-dimensional hydrodynamic model is an important tool in the fields of river basin flood control, cascade reservoir scheduling, river remediation scheme optimization and the like. The hydrodynamic modeling requires spatial dispersion of the computational domain, which is subdivided into triangular and quadrilateral meshes. Because quadrilateral grids are superior to triangular grids in terms of computational efficiency, data structure, computational accuracy, and the like, quadrilateral grids are widely used in constructing two-dimensional hydrodynamic models. Grid quality is a necessary condition for ensuring accurate operation of a model, and orthogonality is a key index for evaluating grid quality. The accuracy of the orthogonality of the quadrilateral grids and the hydrodynamic numerical simulation is tightly hooked, the worse the orthogonality of the grids is, the worse the calculation accuracy of the model is, and the optimization of the orthogonality of the quadrilateral grids is of great importance to the simulation accuracy of the two-dimensional hydrodynamic model. When the number of grids is increased, the calculated amount of the traditional grid orthogonality optimization algorithm is obviously increased, and the grid is easy to sink into local optimum, so that the grid optimization efficiency is low and the effect is poor. Disclosure of Invention The invention aims to solve the problems and provide a grid partition optimization method of a two-dimensional hydrodynamic model based on a hybrid neural network, which is characterized in that the two-dimensional hydrodynamic model is divided into a plurality of sub-grids according to a specific partition method, the sub-grids are optimized sequentially by using the hybrid neural network containing physical constraints, the calculation amount of quadrilateral grid optimization is reduced, and the optimization efficiency and the optimization quality are improved. In order to achieve the above purpose, in one aspect, the present invention provides a two-dimensional hydrodynamic model grid partition optimization method based on a hybrid neural network, comprising the following steps: S1, acquiring a river channel physical boundary, extracting physical boundary entity data, and storing coordinates and global index values of river channel boundary nodes; S2, generating a two-dimensional quadrilateral mesh based on the physical boundary, digitizing the quadrilateral mesh, and storing topological structure data and physical coordinate data of the quadrilateral mesh; s3, calculating and judging the global orthogonality of the grids based on the quadrilateral grids, and determining whether the grids need to be optimized or not; s4, dividing the two-dimensional quadrilateral grids to be optimized into a plurality of fixed-size sub-grids as far as possible to obtain a sub-grid set, marking the remaining grids which cannot be divided into the fixed-size sub-grids as remaining grid sets, and storing common edge data of the sub-grid sets and the remaining grid sets; S5, grid orthogonality optimization is carried out on grids in the rest grid set by using a grid correction algorithm, and optimized public edge data are fed back to the sub-grid set; S6, constructing a physical information neural network for optimizing grid orthogonality, wherein the input of the neural network is a sub-grid, the output of the neural network is the sub-grid after grid orthogonality optimization, and the physical boundary of the river channel is used as the constraint of the physical information neural network; based on the topological data structure and the physical coordinate data of the quadrilateral mesh, quantizing the orthogonality of the mesh and determining a loss function; s7, sequentially performing orthogonality optimization on the sub-networks in the sub-grid set by using the physical information neural network, and feeding back the public edge data of the optimized sub-grids to the sub-grids which are not optimized; And S8, combining the optimized sub-grid set and the rest grid set according to a preset arrangement rule to obtain an optimized quadrilateral grid. Further, in step S1, the set of boundary nodes is,Representing a set of all boundary coordinate points,The set of index values representing the coordinates of the node. Preferably, step S2 specifically includes: s2.1, generating a two-dimensional quadrilateral mesh based on a physical boundary; s2.2, extracting topological structure data of the grid and grid node coordinate data; grid node coordinates and global index values are noted as , ; Wherein