A propeller flow field prediction method based on spatiotemporal graph neural network with virtual and real data fusion
Through the spatiotemporal graph neural network method of virtual and real data fusion, combined with E(n) and other variable graph neural network and Transformer model, the shortcomings of numerical simulation and physical experiments in the prediction of the wake flow field of the ship propeller are solved, and high-precision prediction of complex flow fields are achieved.
Patent Information
- Application Number
- CN202510669280.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-23
AI Technical Summary
In the prediction of the wake flow field of ship propeller, numerical simulation has high-precision grid simulation requirements and large deviations. Physical tests can only measure sparse scattered point data, resulting in unsatisfactory prediction accuracy and the inability to effectively capture the spatial topological characteristics and distribution rules of complex flow fields.
The spatiotemporal graph neural network method of virtual and real data fusion is adopted to construct grid nodes and flow field scatter feature sets, and a local enhancement sub-graph structure is established using the K-nearest neighbor strategy, combining E(n) and other variable graph neural networks and Transformer models, model training is carried out, propeller rotation prior function is introduced, unified graph structure data is constructed, and polynomial total loss function is optimized.
The prediction accuracy of the complex wake field of the ship propeller is improved, and the rotation area of the propeller is dynamically simulated, taking into account the global coverage of simulation data and the local enhancement of physical tests is improved, which improves the accuracy and accuracy of prediction.
Smart Images

Figure CN120197557B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the interdisciplinary field of computational fluid dynamics and deep learning, and in particular to a propeller flow field prediction method using a spatiotemporal graph neural network that fuses virtual and real data. Background Art
[0002] During ship navigation, the high-speed rotation of the propeller creates complex vortex structures and unsteady flow fields at the stern. Accurately predicting the propeller's wake is crucial for optimizing propulsion efficiency and controlling vibration and noise. Traditional techniques rely primarily on numerical simulation and physical testing. However, numerical simulation requires high-precision meshes in the propeller area, which can lead to errors, while physical testing typically only produces sparse, scattered data at localized locations.
[0003] In order to make up for the respective shortcomings of numerical simulation and physical experiments, as deep learning technology has made rapid progress in solving engineering fluid mechanics problems, many studies have adopted traditional random forest algorithms, multi-layer perceptrons, convolutional neural networks, and physical information-based neural networks to carry out reconstruction or prediction research on the flow field around ship propellers. However, these studies are generally unable to capture the spatial topological characteristics and distribution laws of complex flow fields, and therefore the prediction accuracy is not ideal. Summary of the Invention
[0004] In response to the above-mentioned problems and technical needs, this application proposes a propeller flow field prediction method based on a spatiotemporal graph neural network that integrates virtual and real data. The technical solution of this application is as follows:
[0005] A propeller flow field prediction method based on a spatiotemporal graph neural network with virtual and real data fusion, comprising: constructing a grid node feature set at any time using numerical simulation data of a ship propeller wake field; , using the physical test measurement data of the ship propeller wake field to construct the flow field scattered feature set at any time ; Among them, the grid node feature set at each moment Including the spatial structure characteristics between grid nodes and the simulation speed of the spatial coordinates of each grid node at the current moment, and the flow field scattered point feature set at each moment Including the spatial coordinates of each flow field scattered point and the measured velocity of each flow field scattered point at the current moment;
[0006] Using each grid node feature set Construct the main graph structure data and establish the current flow field scattered feature set based on the K-nearest neighbor strategy The local enhanced sub-graph structure between the main graph structure data is used to obtain the unified graph structure data of the current moment's virtual and real data fusion, in which each graph node has a corresponding speed value;
[0007] Any T Time and before M -1 The sequence of unified graph structure data at the latest moment in time sequence is used as sample input, T The unified graph structure data at time +1 is constructed as the sample output T The training samples corresponding to the time are constructed to form a training sample set. The integer parameter M ≥2;
[0008] For any T The training samples corresponding to the moment are used. The E(n) equivariant graph neural network model is used to capture the spatial structural features of the unified graph structure data at each moment in the training samples and output the updated node position and speed features of each graph node to form the velocity field features at the current moment. The feature time sequence composed of the velocity field features at each moment in the training samples is input into the multi-head self-attention mechanism of the Transformer model in the time sequence order to obtain T The predicted value of the velocity field feature at time +1 is used as the prediction result of the training sample;
[0009] The E(n) equivariant graph neural network model and Transformer model are trained using the training sample set in combination with the sample output and prediction results of each training sample. The ship propeller wake field is predicted using the trained E(n) equivariant graph neural network model and Transformer model.
[0010] Its further technical solution is to use the E(n) equivariant graph neural network model to output the velocity field characteristics at each moment, including:
[0011] Initialize the first layer of graph convolution of the E(n) equivariant graph neural network model according to the input unified graph structure data, and obtain any graph node in the unified graph structure data. j Node positions in the first layer of graph convolution and speed characteristics , Is a graph node j The node position in the unified graph structure data, Is a graph node j Speed values in unified graph structure data;
[0012] Introducing propeller rotation prior function from the first l Layer graph convolution to the l + 1 Layer graph convolution performs message passing, according to the l The spatial structure features of the layer graph convolution are updated to obtain the graph nodes j In thel + 1 Node positions in layer graph convolution and speed characteristics ;
[0013] The node position and velocity features of each graph node in the last layer of graph convolution are combined to obtain the velocity field features at the current moment.
[0014] Its further technical solution is to update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics include:
[0015] According to l The node position of each node in the layer graph convolution determines any graph node j Adjacent graph nodes, computation graph nodes j and any adjacent graph nodes i Message vector between ,in, Is a graph node i In the l Speed features in layer graph convolution, Is a graph node j and graph nodes i In the l Node distances in layer graph convolution, It is a learnable multi-layer perceptron;
[0016] According to the graph nodes j All its adjacent graph nodes i Message vector between Combined with propeller rotation prior function Update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics ; Among them, the propeller rotation prior function Determined by the kinematic function and related to the propeller speed And the propeller's rotation angle per unit time Related.
[0017] Its further technical solution is to update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics for:
[0018]
[0019] in, Is a graph node i In the l Node positions in layer graph convolution, , It is l Graph nodes in layer graph convolution j All its adjacent graph nodes i Message vector between The set composed of and They are respectively learnable multi-layer perceptrons.
[0020] Its further technical solution is to obtain the unified graph structure data of the current virtual and real data fusion including:
[0021] The grid node feature set at the current moment Each grid node in the main graph structure data is a graph node sim , the connections between the grid nodes form the corresponding graph nodes in the main graph structure data sim The bidirectional edges between them are used to construct the main graph structure data at the current moment, and the spatial coordinates of each grid node are used as the corresponding graph node in the main graph structure data. sim Node location , the simulated velocity at the grid node is used as the corresponding graph node sim The speed value at ;
[0022] For the current moment flow field scattered feature set Any flow field scattered point in the main graph structure data, when the spatial coordinates of the flow field scattered point are consistent with the graph nodes formed by the grid nodes in the main graph structure data sim When the node positions of the flow field coincide, the measured velocity at the scattered points is used. Overlapping graph nodes sim The speed value at Corrected to , where the fusion weight coefficient ;
[0023] When the spatial coordinates of the flow field scatter point do not coincide with the node positions of all graph nodes in the main graph structure data, the flow field scatter point is used as a new graph node. exp , the spatial coordinates of the flow field scatter points as the corresponding newly added graph nodes exp Node location , the measured velocity at the flow field scattered points as the corresponding newly added graph nodes exp The speed value at , and search for newly added graph nodes based on the K-nearest neighbor strategy exp Create new graph nodes for the neighbor graph nodes in the main graph structure data exp The bidirectional edges between each of its neighbor graph nodes form a local enhanced subgraph structure with the main graph structure data.
[0024] A further technical solution is to obtain unified graph structure data of virtual and real data fusion at the current moment, which also includes:
[0025] When a new graph node is added at any flow field scatter point a A graph node with its neighbors b Bidirectional edges established between Bidirectional edges already in the main graph structure data When crossing, on the bidirectional side With bidirectional edges Add a new graph node at the intersection of intp , and according to the graph nodes a , graph nodes b , graph nodes c and graph nodes d The respective node positions and velocity values are interpolated to obtain the graph nodes intp The node position and velocity values of the graph node c and graph nodes d It is a bidirectional edge Graph nodes at both ends.
[0026] Its further technical solution is to interpolate the graph nodes intp The node position and velocity values include:
[0027] According to the graph nodes a Node positions and neighbor graph nodes b The node position is calculated to get the bidirectional edge The parametric equations of the graph nodes c Node positions and graph nodes d The node position is calculated to get the bidirectional edge The parametric equation of the two-way edge Parametric equations and bidirectional edges The parametric equations of the intersection points are used as graph nodes. intp Node location ;
[0028] Interpolation determines graph nodes intp The speed value at for:
[0029]
[0030] in, Is a graph node a The speed value at Is a graph node b The speed value at Is a graph node c The speed value at Is a graph node d The speed value at .
[0031] Its further technical solution is to unify the graph structure data including A graph node formed by grid nodes sim 、 A graph node formed by flow field scattered points exp ,as well as New graph nodes added at intersections of bidirectional edges intp ; The spatiotemporal graph neural network propeller flow field prediction method also includes:
[0032] Adopting the neural network automatic differentiation mechanism according to the total loss function Perform model training, total loss function ;in, It is a graph node formed by grid nodes in a unified graph structure data sim The calculated numerical simulation data loss term is, It is a graph node formed by flow field scattered points in the unified graph structure data exp The calculated experimental scattered supervision items, It is to use the graph nodes newly added at the intersection of the bidirectional edges in the unified graph structure data intp The calculated interpolation node data error term, It is the regular term of the NS physical equation calculated by combining all graph nodes in the unified graph structure data with the NS physical equation; 、 、 are weight coefficients respectively.
[0033] Its further technical solution is that the total loss function The calculation formulas for each item in are:
[0034]
[0035]
[0036]
[0037]
[0038] in, is the node in the prediction result of the training sample j The predicted velocity value at is the sample output graph node of the training sample j Actual value of speed at It is a unified graph structure data formed by all the grid nodes. sim The set composed of It is a unified graph structure data formed by all the graph nodes of the flow field scattered points exp The set composed of It is a new graph node added at the intersection of all bidirectional edges in the unified graph structure data intp The set of components; is the number of collocation points of the NS physics equation, Is a graph node The predicted velocity value at It uses graph nodes The predicted velocity at Graph nodes calculated by combining NS physical equations The pressure value at is the Reynolds number, is the Laplace operator.
[0039] Its further technical solution is to use the trained E(n) equivariant graph neural network model combined with the Transformer model to predict the ship propeller wake field, including:
[0040] Obtain the propeller wake field of the ship at the initial first ~M The flow field data of consecutive moments is collected, and the actual graph structure data of the current moment is constructed based on the flow field data of each moment;
[0041] from t = M First, we use the E(n) equivariant graph neural network model according to t Time and before M -1 The actual graph structure data at the latest moment extracts the corresponding velocity field features and t Time and before M -1 The velocity field features extracted at the most recent moment are input into the multi-head self-attention mechanism of the Transformer model in a time sequence sequence to obtain t The velocity field characteristic prediction value at time +1 is used for autoregressive forecasting.
[0042] The beneficial technical effects of this application are:
[0043] The present application discloses a propeller flow field prediction method of a spatiotemporal graph neural network with virtual and real data fusion. The method uses a network structure of a combined E(n) equivariant graph neural network model combined with a Transformer model. When training the network structure, the physical test scattered data is integrated into the numerical simulation data through the K-nearest neighbor strategy to construct a unified graph structure data of virtual and real fusion. The unified graph structure data is then used to train the model. The unified graph structure data takes into account the global coverage of the simulation data and the local enhancement of the physical test scattered points, and also avoids the problem of low credibility when only using numerical simulation data to construct the training samples of the graph data structure. Combined with the network structure, the spatial topology and temporal evolution characteristics of the complex wake field of the ship propeller can be effectively captured, and the prediction accuracy of the complex wake field of the ship propeller can be improved.
[0044] When using the E(n) equivariant graph neural network model to capture spatial topological features, this method introduces a propeller rotation prior function in the message passing calculation process, which can dynamically update the node positions in the propeller rotation area, simulate the physical process closer to the actual situation, and further improve the accuracy and precision of flow field prediction.
[0045] The numerical simulation data loss term, experimental scatter point supervision term, interpolation node data error term and NS physical equation regularization term are combined to form a polynomial total loss function. Adjustable hyperparameter weights are introduced to enable the model to achieve the optimal balance between multi-source data and physical laws. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of a spatiotemporal graph neural network propeller flow field prediction method in one embodiment of the present application.
[0047] Figure 2 It is a schematic diagram of unified graph structure data obtained by fusion of virtual and real data in a local area of the wake field in an example.
[0048] Figure 3 This is a schematic diagram of layer-by-layer message passing between graph convolutions in the E(n) equivariant graph neural network model in one embodiment of the present application. DETAILED DESCRIPTION
[0049] The specific implementation of this application will be further described below with reference to the accompanying drawings.
[0050] This application discloses a propeller flow field prediction method based on a spatiotemporal graph neural network with virtual and real data fusion. Figure 1 The flow chart of the spatiotemporal graph neural network propeller flow field prediction method includes the following contents:
[0051] Step S1, using the numerical simulation data of the ship propeller wake field to construct the grid node feature set at any time , using the physical test measurement data of the ship propeller wake field to construct the flow field scattered feature set at any time .
[0052] The physical test measurement data is the physical quantity measurement value at different spatial coordinates in the propeller wake field of the ship obtained by physical testing in the test pool using the particle tracking velocimetry method. The physical quantity that can be measured by physical testing is mainly the velocity value. Therefore, in this application, the physical test measurement data obtained includes the velocity values measured at different spatial coordinates. This application refers to the measured velocity value as the measured velocity. The corresponding flow field scatter feature set at each moment is constructed It includes the spatial coordinates of each flow field scatter point and the measured velocity of the flow field scatter point at the current moment and is recorded as ,in, Indicates the The spatial coordinates of the scattered points in the flow field, Indicates that the The measured velocity at each scattered point in the flow field is , is the total number of flow field scattered points included in the physical test measurement data. Due to the limitations of physical experiments, the flow field scattered point feature set The total number of flow field scattered points in The spatial coordinates of relatively limited and different flow field scattered points are mainly distributed in the local area of the ship propeller wake field.
[0053] Numerical simulation data is the data output by numerically simulating the propeller wake field of a ship using various existing computational fluid dynamics (CFD) software. For example, in one example, the propeller wake field of the DTMB5415 public standard ship model is simulated using Star CCM+ computational fluid dynamics software to output numerical simulation data. Regardless of the specific data simulation method used, when performing numerical simulation, the computational domain of the ship propeller wake field is discretely meshed and then numerically simulated. The final output numerical simulation data includes mesh data and physical quantity data. The mesh data records the mesh unit division method, and the physical quantity data records the physical quantity simulation results at each mesh unit. Since this application will subsequently need to merge the physical quantity simulation results obtained by numerical simulation with the physical test measurement results, and the physical quantities measured in the physical test as mentioned above are mainly speed values, the physical quantity data included in the numerical simulation data is also the simulation result of speed, which is referred to as simulated speed in this application. The corresponding constructed grid node feature set at each moment It includes the spatial structural characteristics between grid nodes and the simulation speed of the spatial coordinates of each grid node at the current moment, expressed as , Indicates the The spatial coordinates of the grid nodes, Indicates the The simulated velocity at each grid node is Indicates the The grid node and The edge index of the connection between the grid nodes and , Indicates the The grid node and The distance between the lines of the grid nodes and . , and , is the total number of mesh nodes contained in the numerical simulation data, is an integer parameter. According to the characteristics of numerical simulation data, the grid node feature set The total number of grid nodes in The spatial coordinates of many different grid nodes are distributed across the global range of the ship propeller wake field. It should be noted that the physical quantity simulation results directly obtained from numerical simulation data are often the simulated velocity at the center of the grid cell. Simulated velocities at individual grid nodes can be calculated using methods such as mean calculation, which will not be discussed further here.
[0054] Step S2: Use the grid node feature set at each moment Construct the main graph structure data and establish the current flow field scattered feature set based on the K-nearest neighbor strategy The local enhanced subgraph structure between the main graph structure data is used to obtain the unified graph structure data of the current moment's virtual and real data fusion. The unified graph structure data constructed includes graph nodes, any graph node j Has a unique node location And graph node j There is a corresponding speed value ,The graph nodes are connected by bidirectional edges to form specific spatial structural characteristics.
[0055] In one embodiment, building unified graph structure data includes the following stages:
[0056] (1) Constructing the main graph structure data
[0057] The grid node feature set at the current moment Each grid node in the main graph structure data is a graph node sim , the connections between the grid nodes form the corresponding graph nodes in the main graph structure data simThe bidirectional edges between them are used to construct the main graph structure data at the current moment. This application refers to this type of graph node as a graph node formed by grid nodes. sim .
[0058] For the main graph structure data, the grid node feature set Any Grid nodes form a graph node sim , the graph node sim Node location That is the The spatial coordinates of the grid nodes , the graph node sim The speed value at That is the Simulated velocity at each mesh node , the graph node sim The bidirectional edge connection relationship between the nodes and other graph nodes is the same as the The connection relationship between each grid node and other grid nodes is consistent. Then the graph nodes formed by the grid nodes in the main graph structure data are sim The total number and grid node feature set The total number of grid nodes in .
[0059] In actual application, Python custom program is used to call Pytorch Geometry third-party function library to calculate the grid node feature set. Construct and obtain the main graph structure data.
[0060] (2) Establishing a flow field scattered feature set The local enhanced subgraph structure between the main graph structure data.
[0061] The scattered feature set of the flow field at the current moment Each flow field point in the process is processed in turn, and for any The flow field scattered points are processed in the following two cases:
[0062] (a) When the The spatial coordinates of the scattered flow points The graph nodes formed by the grid nodes in the main graph structure data sim When the node positions of the flow field are overlapped, the measured velocity at the scattered points of the flow field is used to correct the overlapped nodes. sim The speed value at . The spatial coordinates of the scattered flow points With any graph node sim If the Euclidean distance of the node positions is less than the distance threshold, the two nodes are determined to be coincident, otherwise they are determined not to be coincident. The flow field scatter points are not added to the main graph structure data, but are only used to correct the graph nodes that coincide with them. sim After the speed value is corrected, the graph node still belongs to the graph node formed by the grid nodes. sim .
[0063] In one embodiment, using The measured velocity at each scattered point in the flow field Correct the overlapping graph nodes sim The speed value at ,in, It is formed by grid nodes in the main graph structure data and is The graph nodes where the flow field scattered points coincide sim The speed value at It is with The graph nodes where the flow field scattered points coincide sim The corrected speed value, fusion weight coefficient In an application example, the fusion weight coefficient .
[0064] (b) When The spatial coordinates of the scattered flow points If the node position does not coincide with all the nodes in the main graph structure data, the A flow field scatter point is added as a new graph node exp , the The spatial coordinates of the scattered flow points As the corresponding newly added graph node exp Node location 、The The measured velocity at the flow field scattered points As the corresponding newly added graph node exp The speed value at .
[0065] Then search for the newly added graph node based on the K-nearest neighbor strategy exp The neighboring graph nodes in the main graph structure data, that is, the newly added graph nodes are selected in the main graph structure data. exp The graph nodes with the smallest Euclidean distance between them are used as neighboring graph nodes. The number of neighboring graph nodes can be customized. In one example, the three graph nodes with the smallest Euclidean distance are used as neighboring graph nodes. Then, the newly added graph nodes are created separately. exp The bidirectional edges between each of its neighbor graph nodes form a local enhanced subgraph structure with the main graph structure data.
[0066] For example, in one instance, due to the huge amount of data on the entire ship propeller wake field, only Figure 2 Taking the local wake field area of the propeller wake field of a ship as an example, the local diagram of the main graph structure data composed of the grid nodes in the local wake field area is as follows: Figure 2 As shown in (a), the main graph structure data in the local wake field area includes 12 graph nodes formed by grid nodes and represented by black circles. These 12 graph nodes formed by grid nodes are respectively recorded as s 1~ s 12. Flow field scattered feature collection There are 5 scattered flow points in the local wake field area, such as Figure 2 As shown in (b) in the figure. Figure 2 As can be seen from (a) and (b), different grid nodes are connected, but the flow field scatter points are discrete. The spatial coordinates of these five flow field scatter points do not coincide with the graph nodes in the main graph structure data, so these five flow field scatter points are added as new graph nodes. exp Add to the main graph structure data such as Figure 2 As shown in (c) in the figure, the five graph nodes formed by the flow field scattered points are recorded as e 1~ e 5 and is represented by a black diamond.
[0067] For the graph nodes formed by the flow field scattered points e 1. Search graph nodes based on K-nearest neighbor strategy e The three neighbor graph nodes of 1 are graph nodes s 8. s 9 and s 10, then establish graph nodes respectively e 1 and graph nodes s 8. s 9 and s 10. For the graph nodes formed by the flow field scatter points e 2. Search graph nodes based on K-nearest neighbor strategy e The three neighbor graph nodes of 2 are graph nodes s 5. s 6 and s 12, then establish graph nodes respectively e 2 and graph nodes s 5. s 6 and s 12. For bidirectional edges between graph nodes e 3. e 4 and e 5. The same process is performed. The schematic diagram after adding bidirectional edges is as follows Figure 2 As shown in (d) in the figure.
[0068] (3) Add interpolation nodes
[0069] When a bidirectional edge is established between a graph node formed by a flow field scatter point and its neighboring graph node, the bidirectional edge There may be intersections with existing bidirectional edges in the main graph structure data. For example, Figure 2 In the example of graph node e 1 and its neighbor graph nodes s 9, and the bidirectional edges established between the nodes in the main graph structure data s 8 and s 10. A two-way edge crossing between .
[0070] Then when a new graph node is added at any flow field scatter point a A graph node with its neighbors b Bidirectional edges established between Bidirectional edges already in the main graph structure data When crossing, on the bidirectional side With bidirectional edges Add a new graph node at the intersection of intp , and according to the graph nodes a , graph nodes b , graph nodes c and graph nodes d The respective node positions and velocity values are interpolated to obtain the graph nodes intp Node location and speed value Among them, the graph node c and graph nodes d It is a bidirectional edge Graph nodes at both ends. Determine the graph nodes intp Node location and speed value include:
[0071] First, according to the graph nodes a Node positions and neighbor graph nodes b The node position is calculated to get the bidirectional edge The parametric equations of the graph nodes c Node positions and graph nodes d The node position is calculated to get the bidirectional edge The parametric equation of the two-way edge Parametric equations and bidirectional edges The parametric equations of the intersection points are used as graph nodes. intp Node location , and They are the two coordinate values of the spatial coordinate system and the grid node feature set and flow field scattered feature set The form of the spatial coordinates in the graph remains consistent. Then we can further interpolate to determine the graph nodes intp The speed value at for:
[0072]
[0073] in, Is a graph node a The speed value at Is a graph node b The speed value at Is a graph node c The speed value at Is a graph node d The speed value at .
[0074] For example, Figure 2 In the example of graph node e 1 and its neighbor graph nodes s 9 bidirectional edges between graph nodes s 8 and s Add a new graph node at the intersection of the bidirectional edges between 10 intp Recorded as i 1. Through the calculation graph node e 1 and its neighbor graph nodes s 9 parametric equations for bidirectional edges between, and graph nodes s 8 and graph nodes s 10, and then calculate the intersection of the two bidirectional edge parametric equations to determine the graph node i 1 node position, further combined with the graph node e 1. Graph Node s 9. Graph Nodes s 8. Graph Nodes s A speed value of 10 will get the graph node i 1. Similarly, at the graph node e 2 and its neighbor graph nodes s 12 bidirectional edges between graph nodes s 5 and s Add a new graph node at the intersection of the bidirectional edges between 9 intp Recorded as i 2. In the graph node e 3 and its neighbor graph nodes s 6 Bidirectional edges between graph nodes s 1 and s Add a new graph node at the intersection of the bidirectional edges between 5 intp Recorded as i 3. In the graph node e 5 and its neighbor graph nodes s12 bidirectional edges between graph nodes s 4 and s Add a new graph node at the intersection of the bidirectional edges between 11 intp Recorded as i 4. 4 new graph nodes added at the intersection of bidirectional edges intp They are represented by red circles respectively.
[0075] After completing the operations in the above three stages, a unified graph structure data of virtual and real data fusion can be constructed, which can be expressed as , Record the node positions of all graph nodes, Record the velocity values at all graph nodes. Records the index information of all bidirectional edges formed by graph nodes. Through this index information, the graph nodes connected at both ends of each bidirectional edge can be determined. Record the lengths of all bidirectional edges formed by the graph nodes. Figure 2 In the example of , the unified graph structure data in the local wake field area is finally constructed as follows Figure 2 As shown in (e) in the figure. From the above introduction and examples, we can see that all the graph nodes included in the final unified graph structure data are mainly of three categories:
[0076] The first category: grid node feature set The graph nodes formed by the grid nodes in sim , a graph node formed by grid nodes sim Total and mesh node feature sets The number of grid nodes contained in is equal. This type of graph node is formed by grid nodes sim Node location It is the grid node feature set The spatial coordinates of the corresponding grid nodes. This type of graph node is formed by the grid nodes sim Speed value is the grid node feature set The simulation speed of the corresponding grid node, or the position of the node The simulated velocity is corrected by the measured velocity of the flow field scattered points at .
[0077] The second category: a collection of scattered flow field features Graph nodes formed by flow field scattered points in exp Since the flow field scattered points may overlap with the grid nodes, the graph nodes formed by the flow field scattered points exp Total Less than or equal to the flow field scattered feature set The number of scattered points in the flow field This type of graph node is formed by flow field scattered points exp Node location It is the flow field scattered feature set The spatial coordinates of the corresponding flow field scattered points. This type of graph node is formed by the flow field scattered points. exp Speed value It is the flow field scattered feature set The measured velocity of the corresponding flow field scattered points.
[0078] The third type: graph nodes inserted at the intersection of two-way edges intp , this type of graph node intp Total Determine the graph nodes inserted at the intersection of the bidirectional edges based on the actual graph structure data. intp Node location and speed value They are all calculated through interpolation algorithms.
[0079] Graph nodes formed by grid nodes sim The number of them that always exist accounts for the majority, and since it is usually not the case that all flow field scattered points coincide with grid nodes, there are always graph nodes formed by flow field scattered points. exp Due to the complexity of data distribution, there are often cases where bidirectional edges cross each other. Therefore, there are graph nodes inserted at the bidirectional edge crossing position. intp Therefore, in practical applications, the unified graph structure data finally formed often includes the above three types of graph nodes at the same time, and the total number of graph nodes is .
[0080] Step S3, with any T Time and before M -1 The sequence of unified graph structure data at the latest moment in time sequence is used as sample input, T The unified graph structure data at time +1 is constructed as the sample output T The training samples corresponding to the time are constructed to form a training sample set. The integer parameter M ≥2.
[0081] Step S4, for any T The training samples corresponding to the time are used to capture the spatial structure characteristics of the unified graph structure data at each moment in the training sample using the E(n) equivariant graph neural network model, and the updated node position and velocity characteristics of each graph node are output to form the velocity field characteristics at the current moment.
[0082] The E(n) equivariant graph neural network model includes multiple layers of graph convolution that perform message passing in sequence. The E(n) equivariant graph neural network model is used to capture the spatial structural features of the unified graph structure data at any moment to output the velocity field features at that moment, including:
[0083] First, the first layer of graph convolution of the E(n) equivariant graph neural network model is initialized according to the input unified graph structure data to obtain the unified graph structure data of any graph node j Node positions in the first layer of graph convolution and speed characteristics , Is a graph node j The node position in the unified graph structure data, Is a graph node j For the speed value in the unified graph structure data, the spatial structural features of the first layer of graph convolution and the speed values at each graph node are consistent with the unified graph structure data.
[0084] Then the propeller rotation prior function is introduced from the l Layer graph convolution to the l + 1 Layer graph convolution performs message passing, according to the l The spatial structure features of the layer graph convolution are updated to obtain the graph nodes j In the l + 1 Node positions in layer graph convolution and speed characteristics The propeller rotation prior function is introduced into the message transmission process of the E(n) equivariant graph neural network model, so that the E(n) equivariant graph neural network model can learn the translational or rotational characteristics of the nodes in the propeller rotation area, thereby ensuring that it conforms to the real flow deformation in space. Among them, the propeller rotation prior function Determined by the kinematic function and related to the propeller speed And the propeller's rotation angle per unit time Related.
[0085] In one embodiment, the graph node is updated j In the l + 1 Node positions in layer graph convolution and speed characteristics The process includes the following:
[0086] First, according to l The node position of each node in the layer graph convolution determines any graph node j adjacent graph nodes, and then calculate the graph nodes j and any adjacent graph nodes iMessage vector between In this formula, Is a graph node i In the l Speed features in layer graph convolution, Is a graph node j and graph nodes i In the l Node distances in layer graph convolution.
[0087] Then according to the graph nodes j All its adjacent graph nodes i Message vector between Combined with propeller rotation prior function Update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics , specifically:
[0088]
[0089] in, Is a graph node i In the l Node positions in layer graph convolution, , It is l Graph nodes in layer graph convolution j All its adjacent graph nodes i Message vector between The collection composed of.
[0090] In the above process, 、 and In one embodiment, the number of hidden layers of the multilayer perceptron is 2, the number of hidden neurons is set to 50, and the activation function is ReLU.
[0091] Please refer to Figure 3 , take the message transmission between graph node 0 and its three adjacent graph nodes 1, 2, and 3 as an example. Graph nodes 0, 1, 2, and 3 are in the l The node positions in the layer graph convolution are as follows Figure 3 As shown in (a) in the figure, the speed characteristics are 、 、 、 First, calculate the message vector and get 、 、 ,like Figure 3Then calculate the coordinate change And update the node position to , the updated node position is as follows Figure 3 As shown in (c), compared with (a), it can be seen that the node position has changed, and through Update the features and get the graph nodes 0, 1, 2, and 3 in the first l The speed features in the +1 layer of graph convolution are: 、 、 、 like Figure 3 As shown in (d) in .
[0092] The E(n) equivariant graph neural network model introduces a propeller rotation prior during message passing, simultaneously updating node position and velocity features. This allows for dynamic capture of the spatial position changes and physical laws of nodes caused by the interaction between propeller rotation and the fluid. After message passing through multiple layers of graph convolution within the E(n) equivariant graph neural network model, the node position and velocity features of each graph node in the final layer of graph convolution are combined to obtain the velocity field features at that moment. This velocity field feature represents the result of the E(n) equivariant graph neural network model's learning of the spatial distribution of the propeller tail flow field. This method allows the E(n) equivariant graph neural network model to be used to extract the velocity field features at each moment in a training sample.
[0093] Step S5: T The velocity field features at each moment in the training sample corresponding to the moment are input into the multi-head self-attention mechanism of the Transformer model in a time sequence sequence. T The predicted value of the velocity field characteristic at time +1 is taken as T The prediction result of the training sample corresponding to the time.
[0094] Will T Time and before M -1 characteristic time series consisting of the velocity field characteristics at the most recent moment The multi-head self-attention mechanism of the input Transformer model mines the temporal association and predicts the ship propeller wake field. T + 1 Predicted value of velocity field characteristics at time .
[0095] In one embodiment, the number of heads of the multi-head self-attention mechanism is 4, and the number of network layers is 2.
[0096] Step S6, combining the sample output and prediction results of each training sample with the training sample set to train the E(n) equivariant graph neural network model and the Transformer model, including: calculating the total loss function based on the sample output and prediction results of each training sample , using the neural network automatic differentiation mechanism according to the total loss function The model parameters of the E(n) equivariant graph neural network model and the Transformer model are adjusted and iterative training and optimization are performed until the model converges.
[0097] In one embodiment, the total loss function , these four items are introduced as follows:
[0098] (1) It is a graph node formed by grid nodes in a unified graph structure data sim The calculated numerical simulation data loss term is calculated as follows:
[0099]
[0100] (2) It is a graph node formed by flow field scattered points in the unified graph structure data exp The calculated test scattered supervision item is calculated as follows:
[0101]
[0102] (3) It is to use the graph nodes newly added at the intersection of the bidirectional edges in the unified graph structure data intp The calculated interpolation node data error term is calculated as follows:
[0103]
[0104] The above three items are the data errors of three different types of graph nodes in the unified graph structure data. is the node in the prediction result of the training sample j The predicted velocity value at is the sample output graph node of the training sample j The actual speed value at . It is a unified graph structure data formed by all the grid nodes. sim The set composed of It is a unified graph structure data formed by all the graph nodes of the flow field scattered points exp The set composed of It is a new graph node added at the intersection of all bidirectional edges in the unified graph structure data intp The collection composed of.
[0105] (4) It is the regular term of the NS physical equation obtained by combining all graph nodes in the unified graph structure data with the NS physical equation. Its calculation formula is:
[0106]
[0107] in, is the number of collocation points of the NS physical equation, the number of collocation points It may be equal to or different from the total number of graph nodes in the unified graph structure data. Is a graph node The predicted velocity value at It uses graph nodes The predicted velocity at Graph nodes calculated by combining NS physical equations The pressure value at . is the Reynolds number, is the Laplace operator, t By encoding the NS equations as a loss function in a neural network, the pressure field can be automatically learned based on physical formulas. This is also an important role of embedding the NS equations. In the absence of the original pressure field, the pressure field can be reconstructed using the NS equations by inputting velocity field data.
[0108] 、 、 are weight coefficients respectively, thus forming a polynomial total loss function, and this adjustable hyperparameter weight coefficient enables the model to achieve the best balance between multi-source data and physical laws. In one example, , , .
[0109] Step S7, after the training is completed, the model can be saved, and the trained E(n) equivariant graph neural network model combined with the Transformer model is used to predict the ship propeller wake field, including:
[0110] Obtain the propeller wake field of the ship at the initial first ~M The flow field data of consecutive moments is collected, and the actual graph structure data of the current moment is constructed based on the flow field data of each moment. t = M First, we use the E(n) equivariant graph neural network model according to t Time and before M -1 The actual graph structure data at the latest moment extracts the corresponding velocity field features and t Time and before M-1 The velocity field features extracted at the most recent moment are input into the multi-head self-attention mechanism of the Transformer model in a time sequence sequence to obtain t The velocity field characteristic prediction value at time +1. Then we can continue to perform autoregressive prediction, that is, according to t Construction of velocity field characteristic prediction value at time +1 t +1 time actual graph structure data, then let t = t +1 and repeat the above process to continue to obtain the forecast results of the flow field data at the next moment, and the cycle is repeated to realize the autoregressive forecast.
[0111] The above description is only a preferred embodiment of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and variations directly derived or imagined by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the scope of protection of the present application.
Claims
1. A propeller flow field prediction method based on spatiotemporal graph neural network with virtual and real data fusion, characterized by: The spatiotemporal graph neural network propeller flow field prediction method includes: Constructing the grid node feature set at any time using the numerical simulation data of the ship propeller wake field , using the physical test measurement data of the ship propeller wake field to construct the flow field scattered feature set at any time ; Among them, the grid node feature set at each moment Including the spatial structure characteristics between grid nodes and the simulation speed of the spatial coordinates of each grid node at the current moment, and the flow field scattered point feature set at each moment Including the spatial coordinates of each flow field scattered point and the measured velocity of each flow field scattered point at the current moment; Using each grid node feature set Construct the main graph structure data and establish the current flow field scattered feature set based on the K-nearest neighbor strategy The local enhanced sub-graph structure between the main graph structure data is used to obtain the unified graph structure data of the current moment's virtual and real data fusion, in which each graph node has a corresponding speed value; Any T Time and before M -1 The sequence of unified graph structure data at the latest moment in time sequence is used as sample input, T The unified graph structure data at time +1 is constructed as the sample output T The training samples corresponding to the time are constructed to form a training sample set. The integer parameter M ≥2; For any T The training samples corresponding to the time are respectively captured by the E(n) equivariant graph neural network model at each moment in the training samples, and the updated node position and velocity features of each graph node are output to form the velocity field features of the current moment; the velocity field features of each moment in the training samples are input into the multi-head self-attention mechanism of the Transformer model according to the time sequence to obtain the feature time sequence sequence. T The predicted value of the velocity field characteristic at time +1 is taken as T The prediction result of the training sample corresponding to the time; Combine the sample output and prediction results of each training sample and use the training sample set to train the E(n) equivariant graph neural network model and the Transformer model: Obtain the propeller wake field of the ship at the initial first ~M The flow field data of consecutive moments is collected, and the actual graph structure data of the current moment is constructed based on the flow field data of each moment; t = M At the beginning, the trained E(n) equivariant graph neural network model is used according to t Time and before M -1 The actual graph structure data at the latest moment extracts the corresponding velocity field features and t Time and before M -1 The velocity field features extracted at the most recent moment are input into the multi-head self-attention mechanism of the trained Transformer model in a time sequence sequence. t The velocity field characteristic prediction value at time +1 is used for autoregressive forecasting.
2. The spatiotemporal graph neural network propeller flow field prediction method according to claim 1 is characterized in that: The velocity field features at each moment output by the E(n) equivariant graph neural network model include: Initialize the first layer of graph convolution of the E(n) equivariant graph neural network model according to the input unified graph structure data, and obtain any graph node in the unified graph structure data. j Node positions in the first layer of graph convolution and speed characteristics , Is a graph node j The node position in the unified graph structure data, Is a graph node j Speed values in unified graph structure data; Introducing propeller rotation prior function from the first l Layer graph convolution to the l + 1 Layer graph convolution performs message passing, according to the l The spatial structure features of the layer graph convolution are updated to obtain the graph nodes j In the l + 1 Node positions in layer graph convolution and speed characteristics ; The node position and velocity features of each graph node in the last layer of graph convolution are combined to obtain the velocity field features at the current moment.
3. The spatiotemporal graph neural network propeller flow field prediction method according to claim 2 is characterized in that: Update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics include: According to l The node position of each node in the layer graph convolution determines any graph node j Adjacent graph nodes, computation graph nodes j and any adjacent graph nodes i Message vector between ,in, Is a graph node i In the l Speed features in layer graph convolution, Is a graph node j and graph nodes i In the l Node distances in layer graph convolution, It is a learnable multi-layer perceptron; According to the graph nodes j All its adjacent graph nodes i Message vector between Combined with propeller rotation prior function Update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics ; Among them, the propeller rotation prior function Determined by the kinematic function and related to the propeller speed And the propeller's rotation angle per unit time Related.
4. The spatiotemporal graph neural network propeller flow field prediction method according to claim 3 is characterized in that: Update the graph node j In the l + 1 Node positions in layer graph convolution and speed characteristics for: in, Is a graph node i In the l Node positions in layer graph convolution, , It is l Graph nodes in layer graph convolution j All its adjacent graph nodes i Message vector between The set composed of and They are respectively learnable multi-layer perceptrons.
5. The spatiotemporal graph neural network propeller flow field prediction method according to claim 1, characterized in that: The unified graph structure data obtained by fusion of current virtual and real data includes: The grid node feature set at the current moment Each grid node in the main graph structure data is a graph node sim , the connections between the grid nodes form the corresponding graph nodes in the main graph structure data sim The bidirectional edges between them are used to construct the main graph structure data at the current moment, and the spatial coordinates of each grid node are used as the corresponding graph node in the main graph structure data. sim Node location , the simulated velocity at the grid node is used as the corresponding graph node sim The speed value at ; For the current moment flow field scattered feature set Any flow field scattered point in the main graph structure data, when the spatial coordinates of the flow field scattered point are consistent with the graph nodes formed by the grid nodes in the main graph structure data sim When the node positions coincide with each other, the measured velocity at the flow field scatter points is used. Overlapping graph nodes sim The speed value at Corrected to , where the fusion weight coefficient ; When the spatial coordinates of the flow field scatter point do not coincide with the node positions of all graph nodes in the main graph structure data, the flow field scatter point is used as a new graph node. exp , the spatial coordinates of the flow field scatter points are used as the corresponding newly added graph nodes exp Node location , the measured velocity at the flow field scatter point is used as the corresponding new graph node exp The speed value at , and search for newly added graph nodes based on the K-nearest neighbor strategy exp Create new graph nodes for the neighbor graph nodes in the main graph structure data exp The bidirectional edges between each of its neighbor graph nodes form a local enhanced subgraph structure with the main graph structure data.
6. The spatiotemporal graph neural network propeller flow field prediction method according to claim 5, characterized in that: The unified graph structure data obtained by fusion of virtual and real data at the current moment also includes: When a new graph node is added at any flow field scatter point a A graph node with its neighbors b Bidirectional edges established between Bidirectional edges already in the main graph structure data When crossing, on the bidirectional side With bidirectional edges Add a new graph node at the intersection of intp , and according to the graph nodes a , graph nodes b , graph nodes c and graph nodes d The respective node positions and velocity values are interpolated to obtain the graph nodes intp The node position and velocity values of the graph node c and graph nodes d It is a bidirectional edge Graph nodes at both ends.
7. The spatiotemporal graph neural network propeller flow field prediction method according to claim 6, characterized in that: Interpolation to obtain graph nodes intp The node position and velocity values include: According to the graph nodes a Node positions and neighbor graph nodes b The node position is calculated to get the bidirectional edge The parametric equations of the graph nodes c Node positions and graph nodes d The node position is calculated to get the bidirectional edge The parametric equation of the two-way edge Parametric equations and bidirectional edges The parametric equations of the intersection points are used as graph nodes. intp Node location ; Interpolation determines graph nodes intp The speed value at for: in, Is a graph node a The speed value at Is a graph node b The speed value at Is a graph node c The speed value at Is a graph node d The speed value at .
8. The spatiotemporal graph neural network propeller flow field prediction method according to claim 6, characterized in that: Unified graph structure data includes A graph node formed by grid nodes sim 、 A graph node formed by flow field scattered points exp ,as well as New graph nodes added at intersections of bidirectional edges intp ; The spatiotemporal graph neural network propeller flow field prediction method further includes: Adopting the neural network automatic differentiation mechanism according to the total loss function Perform model training, total loss function ;in, It is a graph node formed by grid nodes in a unified graph structure data sim The calculated numerical simulation data loss term is, It is a graph node formed by flow field scattered points in the unified graph structure data exp The calculated experimental scattered supervision items, It is to use the graph nodes newly added at the intersection of the bidirectional edges in the unified graph structure data intp The calculated interpolation node data error term, It is the regular term of the NS physical equation calculated by combining all graph nodes in the unified graph structure data with the NS physical equation; 、 、 are weight coefficients respectively.
9. The spatiotemporal graph neural network propeller flow field prediction method according to claim 8, characterized in that: Total loss function The calculation formulas for each item in are: in, is the node in the prediction result of the training sample j The predicted velocity value at is the sample output graph node of the training sample j Actual value of speed at It is a unified graph structure data formed by all the grid nodes. sim The set composed of It is a unified graph structure data formed by all the graph nodes of the flow field scattered points exp The set composed of It is a new graph node added at the intersection of all bidirectional edges in the unified graph structure data intp The set of components; is the number of collocation points of the NS physics equation, Is a graph node The predicted velocity value at It uses graph nodes The predicted velocity at Graph nodes calculated by combining NS physical equations The pressure value at is the Reynolds number, is the Laplace operator.
Citation Information
Patent Citations
Real ship bare hull wake field reconstruction method based on limited indirect observation
CN117150921A
Multi-modal relation extraction method based on large model generation and knowledge graph integration
CN119990297A