Graph neural network simulation method for wave equation simulation

Through the graph neural network simulation method, the calculation efficiency and simulation accuracy problems of wave equations in complex scenarios are solved, efficient wave equation simulation is realized, and the dependence on high-precision data sets is reduced.

CN119940120APending Publication Date: 2025-05-06SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510026783.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, when solving the fluctuation equation, especially in complex scenarios, the computational efficiency is low and the simulation accuracy is reduced, and traditional methods are difficult to directly apply to non-structural grids.

Method used

The graph neural network simulation method is adopted to construct the graph neural network model, and the non-structural grid is converted into graph structures, and a physical constraint loss function of numerical differential is introduced to optimize the model prediction accuracy.

Benefits of technology

It improves the calculation efficiency and simulation accuracy of the wave equation, can effectively deal with the wave equation propagation problem in complex scenarios, and reduces the dependence on high-precision data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940120A_ABST
    Figure CN119940120A_ABST
Patent Text Reader

Abstract

The invention discloses a graph neural network simulation method for wave equation simulation, and the method comprises the following steps: building a plurality of unstructured grids, and converting the plurality of unstructured grids into a storable graph structure; constructing a graph neural network model, establishing a forward process, and inputting key parameters of the wave equation into a graph neural network; after the graph neural network is output, using a numerical discretization process based on a finite volume method to introduce a loss function, and establishing a physical constraint type objective function; iteratively training the graph neural network model to obtain optimal graph neural network parameters; and selecting one piece of initial field data and inputting the initial field data into the trained graph neural network model to obtain a predicted wave field result. The problem that wave equation propagation in a complex scene cannot be efficiently solved when a traditional PINN wave equation is used is solved, physical equation loss is added into a loss function, unsupervised training is used, dependence on a high-precision data set of the wave equation is eliminated, and therefore expenditure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of machine learning simulation, and specifically relates to a graph neural network simulation method for wave equation simulation. Background Art

[0002] The wave equation deeply reveals the propagation mechanism of different types of waves, from mechanical waves, electromagnetic waves to sound waves. The study and solution of the wave equation is of immeasurable value for our in-depth understanding of the core principles of the physical world. In many fields such as acoustics, geophysics, electromagnetism, fluid dynamics, etc., the application research of the wave equation is particularly active, covering many aspects such as earthquake source location, underground structure assessment, electromagnetic field simulation, aerodynamic noise simulation and fluid noise simulation. Since the wave equation is essentially a nonlinear partial differential equation, and the wave problems in practical applications are usually accompanied by complex physical phenomena, such as inhomogeneous media, nonlinear effects and multidimensional space problems, these factors make it extremely difficult to obtain explicit analytical solutions. Therefore, we rely more on numerical methods to obtain approximate solutions to the equation.

[0003] Among the numerical methods for solving wave equations, the commonly used ones include the finite difference method (FDM), the finite element method (FEM), the finite volume method (FVM), and the spectral method. However, these traditional numerical methods usually need to rely on extremely fine grid units to ensure calculation accuracy and stability during the calculation process. They will encounter significant computational efficiency challenges when facing complex geometry, multi-scale and multi-physical phenomena, and boundary conditions. What is more difficult is that as the complexity of the physical scene being solved increases, its simulation accuracy will often decrease accordingly.

[0004] With the rapid development of computer hardware technology and the continuous advancement of graphics processing units (GPUs), the computing power of neural networks in the field of deep learning has been greatly improved. In this context, partial differential equation solving methods based on deep neural networks, such as Physics-Informed Neural Network (PINN), have achieved remarkable results in solving partial differential equations, including wave equations. However, most of these PINN-based methods are built on a simple model such as a multi-layer perceptron (MLP), and rely on the automatic differentiation (AD) mechanism of the deep learning framework to reconstruct physical field derivatives and propagate physical laws in the neural network. The use of automatic differentiation methods will cause the network to generate large tensors when facing high-order derivatives, thereby consuming a large amount of video memory resources. In order to overcome this challenge, researchers have tried to introduce more advanced neural network architectures, such as convolutional neural networks (CNNs) and graph neural networks (GNNs), and combined them with the traditional numerical methods mentioned above for differential approximation. However, these methods have certain limitations in practical applications. For example, methods based on CNN and finite differences must be mapped to equidistant grids to ensure the accuracy of the difference method, or a structured grid combined with a physical domain to computational domain coordinate system transformation method is used to adapt to the CNN network, but this may introduce large errors when dealing with complex flow field boundaries; for finite element methods or spline interpolation methods, although they can be operated on unstructured grids, they rely on the automatic differentiation mechanism of the deep learning framework to solve the physical related derivatives, which consumes a lot of computing resources. In summary, a neural network method is needed that is directly applied to unstructured grids and uses numerical differentiation to approximate the derivatives of physical equations, thereby introducing physical inductive bias. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a graph neural network simulation method for wave equation simulation, which uses a graph neural network to simulate unstructured grids and introduces a wave equation prediction neural network that introduces equation characteristics and physical information. The prediction accuracy of the model is enhanced by introducing a physical constraint loss function of numerical differentiation, which solves the problem that the wave equation calculation consumes a lot of time and computing resources. At the same time, the physical characteristics of the wave equation are input in the forward process to achieve generalization of the calculation scenario.

[0006] In order to solve the above technical problems, the present invention is implemented in the following ways:

[0007] A graph neural network simulation method for wave equation simulation comprises the following steps:

[0008] S1. Establish multiple unstructured grids and convert the multiple unstructured grids into a storable graph structure;

[0009] S2. Build a graph neural network model, establish a forward process, and input the graph structure into the graph neural network in combination with the key parameters of the wave equation;

[0010] S3. After the output of the graph neural network, a loss function is introduced using a numerical discretization process based on the finite volume method to establish a physically constrained objective function.

[0011] S4, iteratively training the graph neural network model to obtain neural network parameters with optimal prediction accuracy;

[0012] S5. Select an initial field data and input it into the trained graph neural network model to obtain the predicted wave field results.

[0013] Furthermore, the step S1 includes the following sub-steps:

[0014] S11, converting the vertices, edges, and cells in the unstructured grid data into three graph structures respectively, wherein the first graph structure uses the grid vertices as graph nodes, and the edges connecting the grid vertices are converted into graph edges, the second graph structure uses the centers of the grid edges as graph nodes, and the lines connecting the centers of the grid edges are used as graph edges, and the third graph structure uses the centroids of the cells as graph nodes, and the lines connecting the centroids are used as graph edges;

[0015] S12. Calculate the unit normal vector, unit side length, and unit area of ​​each edge of each unit pointing to the outside of the unit and save them in the structure respectively.

[0016] Furthermore, the step S2 includes the following sub-steps:

[0017] S21, the graph neural network includes three parts: Encoder-Processor (GN)-Decoder, the Encoder includes nb_encoder module and eb_encoder module, the nb_encoder module represents the node encoder, which is responsible for encoding the node information into a latent vector, and the eb_encoder module represents the edge encoder, which is responsible for encoding the edge information into a latent vector;

[0018] Processor (GN) includes Node Block module and Edge Block module. Node Block connects each node hidden vector input by nb_encoder with the edge to which it is connected, and Edge Block connects each edge hidden vector input by eb_encoder with the point to which it is connected. Node Block and Edge Block exchange information between nodes and edges alternately.

[0019] Decoder is responsible for decoding the node hidden vector into the value of the wave field;

[0020] S22, the forward process represents the value velocity u of the parameter in the wave equation at each node i. i and v i , pressure p i , wave speed c i , density ρ i and the code η representing the node type i Input nb_encoder in the network; the pressure difference Δp between nodes i and j on each edge ij , speed difference Δu ij and Δv ij , the length of the side composed of ij and the difference between relative coordinates ||Δx ij ||The eb_encoder in the input network is output as the pressure and speed values ​​of the node through the graph neural network;

[0021] Furthermore, the wave equation expression in step S22 is as follows:

[0022]

[0023] Among them, p represents pressure flux, u represents velocity in the x direction, v represents velocity in the y direction, c represents wave speed, and ρ represents density.

[0024] Furthermore, the step S3 includes the following sub-steps:

[0025] S31, after the pressure and velocity at the network output node in step S2, the grid unit corresponding to each node is obtained using the graph structure in step S1, the wave equation is numerically discretized using the finite volume method, and the gradient value required in the wave equation is obtained using the least squares method, and the physical constraint loss function is obtained as follows;

[0026]

[0027] Among them, p t Indicates the pressure at the current moment, p t-dt Indicates the pressure at the previous moment, u t Indicates the x-direction velocity at the current moment, u t-dt represents the x-direction velocity at the previous moment, v t Indicates the current y-direction velocity, v t-dt represents the y-direction velocity at the previous moment, ΔV represents the area of ​​the grid cell in the two-dimensional case, and dt represents the time step;

[0028] S32. Multiply the loss function by the weight coefficient to obtain the final loss function, which is expressed as follows:

[0029] L total =C pL p +C u L u +C v L v

[0030] Among them, C p , C u , C v are hyperparameters and are all set to 1.

[0031] Furthermore, the step S4 includes the following sub-steps:

[0032] S41, iterative training network, each training iteration step will randomly select the wave field data of a time step in the data set, as well as the three pictures composed of the current grid, and use the Adam optimization algorithm to optimize the learnable parameters of the graph neural network;

[0033] S42. In the iteration step of each data set, an inner iteration is added, with a maximum of 50 steps. The inner iteration refers to taking a data from the data pool and performing a forward process, and then calculating the value of the current loss function. If the value is less than a given value or the number of inner iteration steps reaches the maximum value, it is put back into the data pool and the next data is extracted. Otherwise, the current data continues to be used for training.

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

[0035] The graph neural network simulation method of the present invention uses a forward structure, optimizes the memory and computing requirements of the graph network model when processing grid edge features, and inputs equation features into the neural network, which helps the neural network learn the characteristics of wave propagation and the complexity of propagation in different scenarios; at the same time, it solves the problem that the propagation of wave equations in complex scenarios cannot be efficiently solved when using traditional PINN wave equations, and adds physical equation losses to the loss function. Using unsupervised training can get rid of the dependence on high-precision data sets of wave equations, thereby reducing overhead, and the addition of internal iterations enhances data stability and ensures relatively accurate predictions. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 It is a schematic diagram of the flow chart of the graph neural network simulation method of the present invention;

[0038] Figure 2A schematic diagram of a network structure in a graph neural network simulation method of the present invention;

[0039] Figure 3 A schematic diagram of edge and node information exchange in the graph neural network simulation method of the present invention;

[0040] Figure 4 It is a schematic diagram of the forward process of the graph neural network simulation method of the present invention. DETAILED DESCRIPTION

[0041] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0042] like Figure 1 As shown, a graph neural network simulation method for wave equation simulation includes the following steps:

[0043] S1. Establish multiple unstructured grids and convert the multiple unstructured grids into a storable graph structure, including the following steps:

[0044] S11, converting the vertices, edges, and cells in the unstructured grid data into three graph structures respectively, wherein the first graph structure uses the grid vertices as graph nodes, and the edges connecting the grid vertices are converted into graph edges, the second graph structure uses the centers of the grid edges as graph nodes, and the lines connecting the centers of the grid edges are used as graph edges, and the third graph structure uses the centroids of the cells as graph nodes, and the lines connecting the centroids are used as graph edges;

[0045] S12. Calculate the unit normal vector, unit side length, and unit area of ​​each edge of each unit pointing to the outside of the unit and save them in the structure respectively.

[0046] S2. Build a graph neural network model, establish a forward process, and input the graph structure into the graph neural network in combination with the key parameters of the wave equation, including the following steps:

[0047] S21, as attached Figure 2 As shown, the graph neural network includes three parts: Encoder-Processor (GN)-Decoder. The Encoder includes the nb_encoder module and the eb_encoder module. The nb_encoder module represents the node encoder, which is responsible for encoding the node information into a latent vector. The eb_encoder module represents the edge encoder, which is responsible for encoding the edge information into a latent vector.

[0048] Processor (GN) includes Node Block module and Edge Block module, such as Figure 3 As shown in the figure, Node Block connects each node hidden vector input by nb_encoder with the edge to which it is connected, and Edge Block connects each edge hidden vector input by eb_encoder with the point to which it is connected. Node Block and Edge Block exchange information between nodes and edges alternately.

[0049] Decoder is responsible for decoding the node hidden vector into the value of the wave field;

[0050] S22, such as Figure 4 As shown, the forward process converts the value velocity u of the parameter in the wave equation at each node i into i and v i , pressure p i , wave speed c i , density ρ i and the code η representing the node type i Input nb_encoder in the network; the pressure difference Δp between nodes i and j on each edge ij , speed difference Δu ij and Δv ij , the length of the side composed of ij and the difference between relative coordinates ||Δx ij ||The eb_encoder in the input network passes through the three parts of the graph neural network and then outputs the pressure and speed values ​​of the node, completing a complete forward process;

[0051] Furthermore, the wave equation expression in step S22 is as follows:

[0052]

[0053] Among them, p represents pressure flux, u represents velocity in the x direction, v represents velocity in the y direction, c represents wave speed, and ρ represents density.

[0054] S3. After the output of the graph neural network, a loss function is introduced using a numerical discretization process based on the finite volume method to establish a physically constrained objective function, including the following steps:

[0055] S31, after the pressure and velocity at the network output node in step S2, the grid unit corresponding to each node is obtained using the graph structure in step S1, the wave equation is numerically discretized using the finite volume method, and the gradient value required in the wave equation is obtained using the least squares method, and the physical constraint loss function is obtained as follows;

[0056]

[0057] Among them, p t Indicates the pressure at the current moment, p t-dt Indicates the pressure at the previous moment, u t Indicates the x-direction velocity at the current moment, u t-dt represents the x-direction velocity at the previous moment, v t Indicates the current y-direction velocity, v t-dt represents the y-direction velocity at the previous moment, ΔV represents the area of ​​the grid cell in the two-dimensional case, and dt represents the time step;

[0058] S32. Multiply the loss function by the weight coefficient to obtain the final loss function, which is expressed as follows:

[0059] L total =C p L p +C u L u +C v L v

[0060] Among them, C p , C u , C v are hyperparameters and are all set to 1.

[0061] S4. Iteratively train the graph neural network model to obtain neural network parameters with optimal prediction accuracy, including the following steps:

[0062] S41, iteratively train the network. In each training iteration, the wave field data of a time step is randomly selected from the data set consisting of the wave field samples participating in the network training, as well as the three pictures formed by the current grid, and the learnable parameters of the graph neural network are optimized using the Adam optimization algorithm.

[0063] S42. In the iteration step of each data set, an inner iteration is added, with a maximum of 50 steps. The inner iteration refers to taking a data from the data pool and performing a forward process, and then calculating the value of the current loss function. If the value is less than a given value or the number of inner iteration steps reaches the maximum value, it is put back into the data pool and the next data is extracted. Otherwise, the current data continues to be used for training.

[0064] S5. Select an initial field data and input it into the trained graph neural network model to obtain the predicted wave field results.

[0065] The above description is only an implementation mode of the present invention. It is stated again that for ordinary technicians in this technical field, several improvements can be made to the present invention without departing from the principle of the present invention. These improvements are also included in the protection scope of the claims of the present invention.

Claims

1. A graph neural network simulation method for wave equation simulation, characterized in that: The following steps are involved: S1. Establish multiple unstructured grids and convert the multiple unstructured grids into a storable graph structure; S2. Build a graph neural network model, establish a forward process, and input the graph structure into the graph neural network in combination with the key parameters of the wave equation; S3. After the output of the graph neural network, a loss function is introduced using a numerical discretization process based on the finite volume method to establish a physically constrained objective function. S4, iteratively training the graph neural network model to obtain neural network parameters with optimal prediction accuracy; S5. Select an initial field data and input it into the trained graph neural network model to obtain the predicted wave field results.

2. A graph neural network simulation method for wave equation simulation according to claim 1, characterized in that: The step S1 comprises the following sub-steps: S11, converting the vertices, edges, and cells in the unstructured grid data into three graph structures respectively, wherein the first graph structure uses the grid vertices as graph nodes, and the edges connecting the grid vertices are converted into graph edges, the second graph structure uses the centers of the grid edges as graph nodes, and the lines connecting the centers of the grid edges are used as graph edges, and the third graph structure uses the centroids of the cells as graph nodes, and the lines connecting the centroids are used as graph edges; S12. Calculate the unit normal vector, unit side length, and unit area of ​​each edge of each unit pointing to the outside of the unit and save them in the structure respectively.

3. The graph neural network simulation method for wave equation simulation according to claim 1, characterized in that: The step S2 comprises the following sub-steps: S21, the graph neural network includes three parts: Encoder-Processor (GN)-Decoder, the Encoder includes nb_encoder module and eb_encoder module, the nb_encoder module represents the node encoder, which is responsible for encoding the node information into a latent vector, and the eb_encoder module represents the edge encoder, which is responsible for encoding the edge information into a latent vector; Processor (GN) includes Node Block module and Edge Block module. Node Block connects each node hidden vector input by nb_encoder with the edge to which it is connected, and Edge Block connects each edge hidden vector input by eb_encoder with the point to which it is connected. Node Block and Edge Block exchange information between nodes and edges alternately. Decoder is responsible for decoding the node hidden vector into the value of the wave field; S22, the forward process represents the value velocity u of the parameter in the wave equation at each node i. i and v i , pressure p i , wave speed c i , density ρ i and the code η representing the node type i nb_encoder in the input network; The pressure difference Δp between nodes i and j on each edge ij , speed difference Δu ij and Δv ij , the length of the side composed of ij and the difference between relative coordinates ||Δx ij ||The eb_encoder in the input network is output as the pressure and speed values ​​of the node through the graph neural network; Furthermore, the wave equation expression in step S22 is as follows: Among them, p represents pressure flux, u represents velocity in the x direction, v represents velocity in the y direction, c represents wave speed, and ρ represents density.

4. A graph neural network simulation method for wave equation simulation according to claim 3, characterized in that: The step S3 comprises the following sub-steps: S31, after the pressure and velocity at the network output node in step S2, the grid unit corresponding to each node is obtained using the graph structure in step S1, the wave equation is numerically discretized using the finite volume method, and the gradient value required in the wave equation is obtained using the least squares method, and the physical constraint loss function is obtained as follows; Among them, p t Indicates the pressure at the current moment, p t-dt Indicates the pressure at the previous moment, u t Indicates the x-direction velocity at the current moment, u t-dt represents the x-direction velocity at the previous moment, v t Indicates the current y-direction velocity, v t-dt represents the y-direction velocity at the previous moment, ΔV represents the area of ​​the grid cell in the two-dimensional case, and dt represents the time step; S32. Multiply the loss function by the weight coefficient to obtain the final loss function, which is expressed as follows: L total =C p L p +C u L u +C v L v Among them, C p , C u , C v is a hyperparameter.

5. The graph neural network simulation method for wave equation simulation according to claim 1, characterized in that: The step S4 comprises the following sub-steps: S41, iterative training network, each training iteration step will randomly select the wave field data of a time step in the data set, as well as the three pictures composed of the current grid, and use the Adam optimization algorithm to optimize the learnable parameters of the graph neural network; S42. In the iteration step of each data set, an inner iteration is added, with a maximum of 50 steps. The inner iteration refers to taking a data from the data pool and performing a forward process, and then calculating the value of the current loss function. If the value is less than a given value or the number of inner iteration steps reaches the maximum value, it is put back into the data pool and the next data is extracted. Otherwise, the current data continues to be used for training.