Physical field gradient calculation method and system based on graph neural network
By constructing a learnable gradient operator space through graph neural networks, and combining directional decoupling dynamic gating and partitioning loss function, the problems of mesh defect compensation and boundary gradient estimation are solved, achieving robustness and accuracy improvement in gradient calculation of unstructured meshes, and making it suitable for high-precision simulation of complex physical fields.
Patent Information
- Application Number
- CN202511505127.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Existing technologies cannot adaptively compensate for mesh defects. There is an imbalance between the robustness and accuracy of gradient calculation in unstructured meshes. Traditional gradient estimation methods rely on mesh quality and have poor gradient estimation performance in boundary regions.
A learnable gradient operator space is constructed using a graph neural network. The gradient operator message passing process is optimized through a direction decoupling dynamic gating mechanism. Boundary constraints are strengthened by combining a partition loss function, thereby improving the robustness and accuracy of gradient calculation.
It significantly reduces the gradient estimation error of grids with different quality and density. The optimized gradient operator reduces the error of derivatives of all directions and orders by more than 33.19%, and exhibits an effective spatial frequency adaptation range of 0.88~1.94Hz in the transient heat conduction equation, providing a basis for high-precision gradient estimation.
Smart Images

Figure CN120995887B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of physical field gradient analysis, and in particular to a physical field gradient calculation method and system based on a graph neural network. BACKGROUND
[0002] In numerical analysis of fluid mechanics and structural mechanics, unstructured grids have become a core tool for numerical simulation of physical fields due to their high efficiency in discretizing complex geometric topologies. However, traditional gradient estimation methods, such as the Green-Gauss method and the weighted least squares method, have the following problems:
[0003] The accuracy of gradient estimation is highly dependent on grid quality, and low-quality grids can significantly increase errors;
[0004] The gradient estimation effect is poor in boundary areas, and errors are concentrated.
[0005] Graph neural networks (GNNs) provide a new data-driven paradigm for physical field modeling, and their graph structure representation capability is naturally compatible with unstructured grids, creating conditions for optimizing gradient operator models based on specific function spaces. However, existing graph neural network methods cannot dynamically correct grid geometry defects, and the isotropic feature aggregation mechanism conflicts with the directional sensitivity of physical field gradients, resulting in loss of directional resolution.
[0006] In summary, there is an urgent need for a new physical field gradient calculation method and system based on graph neural networks. SUMMARY
[0007] The main purpose of the present application is to provide a physical field gradient calculation method and system based on a graph neural network, which aims to solve the technical problems in the prior art that grid defects cannot be adaptively compensated, and the robustness and accuracy of unstructured grid gradient calculation are imbalanced.
[0008] To achieve the above purpose, the present application provides a physical field gradient calculation method based on a graph neural network, which comprises the following steps:
[0009] Obtain physical field data, which includes physical field information and grid topology relationships of the physical field, and the physical field at least includes the stress field of an engineering component;
[0010] Based on the grid topology relationship, obtain an original gradient operator;
[0011] Update the physical field data based on a graph neural network, and obtain a first gradient operator based on the grid topology relationship and the original gradient operator of the updated physical field data;
[0012] Decouple different directions of the physical field to set corresponding directional training weights;
[0013] obtaining a second gradient operator based on the original gradient operator, the first gradient operator and the direction training weight;
[0014] performing gradient calculation of the physical field based on the second gradient operator.
[0015] Preferably, the original gradient operator is obtained based on the mesh topology relationship, comprising:
[0016] reconstructing the gradient of each triangular element based on the discrete form of Green-Gauss theorem;
[0017] reconstructing the vertex gradient by area-weighted average of the gradients of all adjacent elements of the vertex, to approximate the continuous gradient field by the discrete mesh gradient;
[0018] separating the weight coefficient matrix of the discrete mesh gradient from the response field input, and recording the decomposed discrete mesh gradient weight coefficient matrix as the initial gradient operator;
[0019] The mesh of the physical field at least comprises an unstructured mesh, and the directed graph is constructed based on the unstructured mesh, comprising:
[0020]
[0021] wherein: is a node set and , is a node feature, and the initial gradient operator is encoded based on the node feature ; ; is an edge set and represents a node connection relationship, and an edge feature encodes the mesh topology relationship between nodes.
[0022] Preferably, the physical field data is updated based on the graph neural network, comprising:
[0023] based on the sending node , the receiving node and the edge feature before updating , the updated edge feature is output by a multi-layer perceptron :
[0024]
[0025] wherein, is the updated edge feature;
[0026] aggregating all adjacent edge features of the node , and combining the original node feature , by a multi-layer perceptron output updated node features:
[0027]
[0028] wherein, is the updated node feature.
[0029] As preferred, the grid topology relationship and the original gradient operator based on the updated physical field data obtain a first gradient operator, comprising:
[0030] updating the directed graph based on the updated edge feature and the updated node feature to obtain an updated directed graph:
[0031]
[0032] wherein: is the updated node set based on the updated node feature, and the first gradient operator is encoded based on the updated node set ; is the updated edge set based on the updated edge feature.
[0033] As preferred, the decoupling of different directions of the physical field to set corresponding directional training weights comprises:
[0034] the grid structure is direction and direction, the first directional training weight is set for direction, and the second directional training weight is set for direction.
[0035] As preferred, the second gradient operator is obtained based on the original gradient operator, the first gradient operator and the directional training weight, comprising:
[0036] adjusting the initial gradient operator and the first gradient operator based on a directional decoupling dynamic gating formula to obtain the second gradient operator; wherein the directional decoupling dynamic gating formula is:
[0037]
[0038] wherein, is the second gradient operator, is the first directional training weight, is the second directional training weight.
[0039] As preferred, the method further comprises the following steps:
[0040] obtain a partition loss function based on the boundary region of the physical field;
[0041] perform physical field gradient calculation based on the partition loss function and the second gradient operator iterative optimization.
[0042] Preferably, the partition loss function is specifically:
[0043]
[0044] wherein, is a weight parameter of the boundary node mean square error, is a weight parameter of the internal node mean square error, is a boundary loss, is an internal loss.
[0045] Preferably, the boundary loss and the internal loss are specifically:
[0046]
[0047] wherein, is the number of boundary nodes of the grid, is the number of internal nodes of the grid, is a gradient prediction value based on the gradient operator and the function is an analytical solution gradient or a high-precision gradient numerical solution.
[0048] To achieve the above purposes, the present application also provides a physical field gradient calculation system based on a graph neural network, which applies the physical field gradient calculation method based on the graph neural network as described above, and the system comprises:
[0049] a field data acquisition module for acquiring physical field data, wherein the physical field data comprises physical field information and grid topology relationship of a physical field, and the physical field at least comprises a stress field of an engineering component;
[0050] an original gradient operator module for obtaining an original gradient operator based on the grid topology relationship;
[0051] a first gradient operator module for updating the physical field data based on a graph neural network, obtaining a first gradient operator based on the grid topology relationship and the original gradient operator of the updated physical field data;
[0052] a decoupling module for decoupling different directions of the physical field to set corresponding directional training weights;
[0053] The second gradient operator module is used to obtain the second gradient operator based on the original gradient operator, the first gradient operator, and the direction training weights;
[0054] The gradient calculation optimization module is used to perform gradient calculation of the physical field based on the second gradient operator.
[0055] Beneficial effects:
[0056] (1) It has a significant effect on meshes of different quality and density, and the gradient estimation error of each derivative in each direction is reduced by more than 33.19%;
[0057] (2) The optimized second gradient operator exhibits an effective spatial frequency adaptation range of 0.88~1.94Hz;
[0058] (3) In the solution framework of the transient heat conduction equation, the second gradient operator obtained based on the present invention has good time stability, laying a high-precision gradient estimation foundation for the coupled simulation of complex physical fields. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 A flowchart of the physical field gradient calculation method based on graph neural networks provided in this embodiment of the invention. Figure 1 ;
[0061] Figure 2 A flowchart of the physical field gradient calculation method based on graph neural networks provided in this embodiment of the invention. Figure 2 ;
[0062] Figure 3 A schematic diagram of a low-quality unstructured mesh provided in an embodiment of the present invention;
[0063] Figure 4 The traditional gradient operator method based on low-quality unstructured meshes provided in this embodiment of the invention The first-order gradient results in the direction; where (a) is the true value, (b) is the value calculated by the traditional gradient method, and (c) is the error value;
[0064] Figure 5 The traditional gradient operator method based on low-quality unstructured meshes provided in this embodiment of the invention The first-order gradient results in the direction; where (a) is the true value, (b) is the value calculated by the traditional gradient method, and (c) is the error value;
[0065] Figure 6 The traditional gradient operator method based on low-quality unstructured meshes provided in this embodiment of the invention The second-order gradient results in the direction; where (a) is the true value, (b) is the value calculated by the traditional gradient method, and (c) is the error value;
[0066] Figure 7 The traditional gradient operator method based on low-quality unstructured meshes provided in this embodiment of the invention The second-order gradient results in the direction; where (a) is the true value, (b) is the value calculated by the traditional gradient method, and (c) is the error value;
[0067] Figure 8 The method based on low-quality unstructured mesh provided in this embodiment of the invention The first-order gradient results in the direction; where (a) is the true value, (b) is the calculated value in this embodiment, and (c) is the error value;
[0068] Figure 9 The method based on low-quality unstructured mesh provided in this embodiment of the invention The first-order gradient results in the direction; where (a) is the true value, (b) is the calculated value in this embodiment, and (c) is the error value;
[0069] Figure 10 The method based on low-quality unstructured mesh provided in this embodiment of the invention The second-order gradient results in the direction; where (a) is the true value, (b) is the calculated value in this embodiment, and (c) is the error value;
[0070] Figure 11 The method based on low-quality unstructured mesh provided in this embodiment of the invention The second-order gradient results in the direction; where (a) is the true value, (b) is the calculated value in this embodiment, and (c) is the error value;
[0071] Figure 12 A structural block diagram of a physical field gradient calculation system based on a graph neural network provided in an embodiment of the present invention;
[0072] Figure 13 This is a schematic diagram of a mesh and a comparison diagram of its corresponding gradient operators provided in an embodiment of the present invention; wherein, (a) is The first-order gradient result in the direction, (b) is The first-order gradient result in the direction is (c) the second-order gradient result in the direction (d) is the second-order gradient result in the direction (d) is
[0073] Figure 14 The physical field gradient calculation method based on the graph neural network provided in the embodiment has the following effects in the scene Figure 1 ; wherein (a) is the first-order gradient result in the direction (b) is the first-order gradient result in the direction (c) is the second-order gradient result in the direction (d) is the second-order gradient result in the direction (d) is
[0074] Figure 15 The physical field gradient calculation method based on the graph neural network provided in the embodiment has the following effects in the scene Figure 2 ; wherein (a) is the first-order gradient field in the direction (b) is the first-order gradient field in the direction (c) is the second-order gradient field in the direction (d) is the second-order gradient field in the direction (d) is
[0075] Figure 16 The physical field gradient calculation method based on the graph neural network provided in the embodiment has the following effects in the scene Figure 1 ; wherein (a) is the first-order gradient result in the direction (b) is the first-order gradient result in the direction (c) is the second-order gradient result in the direction (d) is the second-order gradient result in the direction (d) is
[0076] Figure 17 The physical field gradient calculation method based on the graph neural network provided in the embodiment has the following effects in the scene Figure 2 ; wherein (a) is the first-order gradient field in the direction (b) is the first-order gradient field in the direction (c) is the second-order gradient field in the direction (d) is the second-order gradient field in the direction (d) is
[0077] Figure 18 The flowchart of the method for optimizing gradient computing power based on the graph neural network and strengthening boundary constraint based on the partition loss function provided in the embodiment is shown in the figure.
[0078] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0079] It is to be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the scope of the application.
[0080] To solve the technical problems that the grid defects cannot be adaptively compensated in the prior art, and the robustness and accuracy of unstructured grid gradient calculation are imbalanced, there is a gradient calculation optimization for the grid in the prior art, which is usually an optimization for the generation of a gradient operator, such as the Green-Gauss method and the weighted least squares method, that is, an operator with higher accuracy is provided for a set of grids. However, the existing method is for the grid itself, and does not consider that the calculation accuracy of the gradient operator is different under different function backgrounds. Further, the traditional method is usually poor for grid models with poor grid quality, and has a high requirement for the quality of the generated grid. Some technologies combine graph neural networks and grid calculation, but they are more focused on generating better grids using graph neural networks and grid quality evaluation methods, rather than optimizing an existing low-quality grid.
[0081] To solve the above problems and phenomena, the embodiment proposes a graph neural network architecture that fuses physical priors, constructs a learnable gradient operator space, optimizes the gradient operator message passing process through a direction decoupling dynamic gating mechanism, realizes adaptive compensation for grid defects, and improves the robustness and accuracy of unstructured grid gradient calculation, to solve the problem that the gradient estimation accuracy is highly dependent on the grid quality, and low-quality grids can significantly increase the error.
[0082] As shown in Figure 1 The embodiment discloses a physical field gradient calculation method based on a graph neural network, which comprises the following steps:
[0083] S1: obtaining physical field data, the physical field data comprising physical field information of a physical field and a grid topology relationship, the physical field at least comprising a stress field of an engineering component;
[0084] S2: obtaining an original gradient operator based on the grid topology relationship;
[0085] S3: updating the physical field data based on a graph neural network, obtaining a first gradient operator based on the grid topology relationship of the updated physical field data and the original gradient operator;
[0086] S4: decoupling different directions of the physical field to set corresponding direction training weights;
[0087] S5: obtaining a second gradient operator based on the original gradient operator, the first gradient operator, and the direction training weights;
[0088] S6: performing gradient calculation of the physical field based on the second gradient operator.
[0089] In the embodiment, based on the physical field data, the node features and the edge features are obtained;
[0090] The node features encode the physical field information and the grid topology relationship, and the grid topology relationship at least includes coordinates, and the physical field information at least includes scalar field values;
[0091] The edge features fuse the grid topology relationship and the local geometric vector to represent the spatial relationship between nodes, and the local geometric vector at least includes a normal difference.
[0092] Specifically, based on the grid topology relationship, the original gradient operator is obtained, including:
[0093] The gradient of each triangular element is reconstructed based on the discrete form of the Green-Gauss theorem;
[0094] The vertex gradient is reconstructed by area-weighted average of the gradients of all adjacent elements of the vertex, and the approximation of the discrete grid gradient to the continuous gradient field is performed;
[0095] The weight coefficient matrix of the discrete grid gradient is separated from the response field input, and the decomposed discrete grid gradient weight coefficient matrix is recorded as the initial gradient operator;
[0096] The grid of the physical field at least includes an unstructured grid, and the directed graph is constructed based on the unstructured grid, and the directed graph is:
[0097]
[0098] Wherein: is a node set and , is a node feature, and the node feature is based on the node feature to encode the initial gradient operator ; is an edge set and represents a node connection relationship, and the edge feature encodes the grid topology relationship between nodes.
[0099] Specifically, the physical field data is updated based on the graph neural network, including:
[0100] Based on the sending node , the receiving node and the edge feature before updating , the updated edge feature is output by a multi-layer perception :
[0101]
[0102] Wherein, is the updated edge feature;
[0103] The aggregated nodeAll the adjacent edge features of , combined with the original node features , through the multi-layer perception Output the updated node features:
[0104]
[0105] wherein, is the updated node feature.
[0106] In this embodiment, the above update is based on the GNN Block, and the iterative execution of formulas (1)-(2) can realize the extraction of deep features.
[0107] Specifically, based on the updated grid topology relationship of the physical field data and the original gradient operator, a first gradient operator is obtained, including:
[0108] Based on the updated edge feature and the updated node feature, the directed graph is updated to obtain an updated directed graph:
[0109]
[0110] wherein: is the updated node set obtained based on the updated node feature, and the first gradient operator is encoded based on the updated node set ; is the updated edge set obtained based on the updated edge feature.
[0111] In this embodiment, first, the initial gradient operator of the discrete grid is taken as the basic physical constraint; second, based on the initial gradient operator and the high-precision gradient field response, a first gradient operator is constructed through the message passing process of the graph neural network. In particular, the node feature encodes the grid geometric attribute and the physical field information, such as the coordinates and the scalar field value, and the edge feature fuses the topological connection relationship and the local geometric vector, such as the normal difference, to jointly constitute the data basis of the graph structure.
[0112] Specifically, the different directions of the physical field are decoupled to set corresponding directional training weights, including:
[0113] The grid structure is divided into direction and direction, the first directional training weight is set for the direction, and the second directional training weight is set for the direction.
[0114] Specifically, based on the original gradient operator, the first gradient operator and the directional training weight, a second gradient operator is obtained, including:
[0115] adjust the initial gradient operator and the first gradient operator based on a direction decoupling dynamic gating formula to obtain a second gradient operator; wherein the direction decoupling dynamic gating formula is:
[0116]
[0117] wherein, is the second gradient operator, is the first direction training weight, is the second direction training weight.
[0118] In the embodiment, the design of the direction decoupling dynamic gating formula aims to dynamically balance the contradiction between global physical constraints and local data-driven, and is the key to improving the robustness and adaptability of unstructured grid gradient calculation. To balance the collaborative optimization of global physical constraints and local data-driven, and enhance the adaptability of spatial operators to complex grids and multiple physical fields, the embodiment proposes a direction decoupling dynamic gating formula in the revised gradient operator update stage. The formula independently allocates trainable weights and to each spatial direction, and dynamically adjusts the contribution proportion of the traditional gradient operator and the revised gradient operator. Finally, the second gradient operator after optimization is generated through the gating weighting mechanism , realizing the collaborative optimization of the first and second derivatives of the direction and the direction.
[0119] Further, considering that the gradient operator quality of the grid boundary region is usually poor and the gradient estimation is easy to be distorted, in order to solve the problem of poor gradient estimation effect and error concentration in the boundary region, the embodiment proposes a technical solution of constructing a loss function by using a partition weighted mean square error.
[0120] Specifically, as shown in Figure 2 , the method further includes the following steps:
[0121] S51: obtaining a partition loss function based on the boundary region of the grid;
[0122] S61: performing physical field gradient calculation based on the partition loss function and the second gradient operator iterative optimization.
[0123] Specifically, the partition loss function is specifically:
[0124]
[0125] wherein, is a weight parameter of the boundary node mean square error, is a weight parameter of the internal node mean square error, is a boundary loss, is an internal loss.
[0126] Specifically, the boundary loss and the internal loss are specifically:
[0127]
[0128] wherein, is the number of boundary nodes of the mesh, is the number of internal nodes of the mesh, is the gradient prediction value based on the gradient operator and the function is the analytical gradient or the high-precision gradient numerical solution.
[0129] It should be noted that the Adam optimizer is used to minimize the loss in the embodiment, and the initial learning rate , the momentum coefficient and are 0.9 and 0.999 respectively, and the weight decay coefficient is 0.
[0130] In order to verify the effectiveness of the above technical solutions, a set of low-quality unstructured mesh with 500 units, an average mesh quality of 0.420 and a minimum mesh quality of 0.232 is generated, as shown in Figure 3 .
[0131] The gradient calculation result of the Green Gauss method based on the traditional gradient operator method under the low-quality unstructured mesh as shown in Figure 3 is as follows:
[0132] The first-order gradient result in the direction, including the true value, the calculation value of the traditional gradient method and the error value, as shown in Figure 4 , wherein (a) shows the true value, (b) shows the calculation value of the traditional gradient method, and (c) shows the error value.
[0133] The first-order gradient result in the direction, including the true value, the calculation value of the traditional gradient method and the error value, as shown in Figure 5 , wherein (a) shows the true value, (b) shows the calculation value of the traditional gradient method, and (c) shows the error value.
[0134] The second-order gradient result in the direction, including the true value, the calculation value of the traditional gradient method and the error value, as shown in Figure 6 , wherein (a) shows the true value, (b) shows the calculation value of the traditional gradient method, and (c) shows the error value.
[0135] The second-order gradient result in the direction, including the true value, the calculation value of the traditional gradient method and the error value, as shown inFigure 7 The first-order gradient results of the direction include the true value, the calculated value of the embodiment, and the error value, as shown in FIG. 6, wherein (a) shows the true value, (b) shows the calculated value of the embodiment, and (c) shows the error value.
[0136] As shown in FIG. 7, the gradient calculation results based on the technical solution of the embodiment under the low-quality unstructured grid are as follows: Figure 3
[0137] The first-order gradient results of the direction include the true value, the calculated value of the embodiment, and the error value, as shown in FIG. 8, wherein (a) shows the true value, (b) shows the calculated value of the embodiment, and (c) shows the error value. Figure 8 The first-order gradient results of the direction include the true value, the calculated value of the embodiment, and the error value, as shown in FIG. 9, wherein (a) shows the true value, (b) shows the calculated value of the embodiment, and (c) shows the error value.
[0138] Figure 9 The second-order gradient results of the direction include the true value, the calculated value of the embodiment, and the error value, as shown in FIG. 10, wherein (a) shows the true value, (b) shows the calculated value of the embodiment, and (c) shows the error value.
[0139] The second-order gradient results of the direction include the true value, the calculated value of the embodiment, and the error value, as shown in FIG. 11, wherein (a) shows the true value, (b) shows the calculated value of the embodiment, and (c) shows the error value. Figure 10
[0140] The second-order gradient results of the direction include the true value, the calculated value of the embodiment, and the error value, as shown in FIG. 12, wherein (a) shows the true value, (b) shows the calculated value of the embodiment, and (c) shows the error value. Figure 11 Based on the comparison of
[0141] Figures 4 to 11 We draw the following conclusions: the gradient calculation using the technical solution of the embodiment can slightly reduce the first-order gradient error and can greatly reduce the second-order gradient error.
[0142] To solve the above technical problems, as shown in FIG. 13, the embodiment also discloses a physical field gradient calculation system based on a graph neural network, which applies the above-mentioned physical field gradient calculation method based on a graph neural network. Figure 12 The field data acquisition module is configured to acquire physical field data, wherein the physical field data includes physical field information and a grid topology relationship of the physical field, and the physical field at least includes a stress field of an engineering component.
[0143] The original gradient operator module is configured to obtain an original gradient operator based on the grid topology relationship.
[0144]
[0145] The first gradient operator module is used to update the physical field data based on the graph neural network. The first gradient operator is obtained based on the grid topology relationship of the updated physical field data and the original gradient operator.
[0146] The decoupling module is used to decouple different directions of the physical field in order to set the corresponding directional training weights.
[0147] The second gradient operator module is used to obtain the second gradient operator based on the original gradient operator, the first gradient operator, and the orientation training weights;
[0148] The gradient calculation optimization module is used to calculate the gradient of the physical field based on the second gradient operator.
[0149] It should be noted that the physical field gradient calculation system based on graph neural networks in this embodiment corresponds to the aforementioned physical field gradient calculation method based on graph neural networks. Therefore, any content not specifically described in the physical field gradient calculation method based on graph neural networks in this embodiment, including but not limited to functional definitions, working principles, and technical effects, can be referred to the description in the aforementioned physical field gradient calculation method based on graph neural networks, and will not be repeated here.
[0150] To verify the generalization ability of the technical solution in this embodiment in actual physical field simulation, we embed a typical partial differential equation (PDE) solution process. Based on, Figure 13 The grid shown and the corresponding second gradient operator are used to study the effect of the technical solution in this embodiment on the correction of spatial derivatives under unstructured grids and complex boundary conditions. The initial response field and initial gradient field of the high-precision PDE reference solution are calculated using a refined grid to ensure physical consistency.
[0151] based on Figure 13 The grid shown on the left, based on a preset test set, yields (a) as shown. The first-order gradient result in the direction, as shown in (b) The first-order gradient result in the direction, as shown in (c) The second-order gradient results in the direction and (d) are shown. The result of the second gradient in the direction.
[0152] Scenario 1: Simulation of transient heat conduction in a temperature stress field based on the transient heat conduction equation
[0153] based on Figure 13 The grid shown is used to verify the applicability of the technical solution in this embodiment to actual physical field simulation. This study first examines the transient heat conduction problem. The governing equation is defined as:
[0154]
[0155] wherein: is the temperature field; is the thermal diffusivity, reflecting the diffusion speed of heat in the material; aluminum is used as the material parameter, is the thermal conductivity, is the material density, is the constant pressure heat capacity. The calculation domain uses the Mode8 medium density grid , and the Dirichlet boundary condition is applied to the boundary , represents the final time of temperature field change.
[0156] Subsequently, based on the solved temperature field and its gradient, the temperature stress is calculated through the thermoelastic constitutive relation:
[0157]
[0158] wherein: is the stress tensor; C is the elastic matrix; is the strain tensor; is the thermal expansion coefficient. High-precision temperature gradient is the premise of accurately calculating thermal strain and finally obtaining reliable temperature stress field. is the unit tensor, which is used to convert this scalar expansion rate into a tensor form independent of the direction of the coordinate axis.
[0159] Numerical experiments show that the technical scheme of the embodiment exhibits significant gradient calculation optimization capability in the transient heat conduction-temperature stress coupling field. In the gradient estimation process of the transient heat conduction problem, the second gradient operator optimized compared to the initial gradient operator of the traditional Green-Gauss operator can significantly reduce the estimation error of spatial derivatives of different orders and different directions. As shown in Figure 14 and Figure 15 , in FIG. (14), (a) shows the MAE error reduction of the first derivative of the direction by 41.93%, (b) shows the MAE error reduction of the first derivative of the direction by 33.19%, (c) shows the MAE error reduction of the second derivative of the direction by 92.65%, and (d) shows the MAE error reduction of the second derivative of the direction by 91.19%. In the trained graph network, in scenario one, the direction weight parameter , This optimization is particularly significant in regions with drastic changes in boundary curvature, indicating that the directional decoupling gating mechanism adaptively enhances geometric defect compensation, providing high-precision gradient input for subsequent accurate calculations of temperature stress, and fundamentally improving the reliability of thermo-mechanical coupling analysis. Spatiotemporal stability analysis further reveals that, as... Figure 15 As shown, (a) is The true value of the direction, the first-order gradient field corresponding to the traditional gradient method and the method in this embodiment, (b) is The true value of the direction, the first-order gradient field corresponding to the traditional gradient method and the method in this embodiment, (c) is The true value of the direction, the second-order gradient field corresponding to the traditional gradient method and the method in this embodiment, (d) is The true value of the direction, the traditional gradient method, and the second-order gradient field corresponding to the method in this embodiment, when using The response field at time t is used as input, and the following is adopted: When the spatial gradient field at time step is used as the loss during training, the optimization operator is within the time range. The fact that the error reduction rate remains stable within the internal range proves that the technical solution of this embodiment is applicable to the calculation scenario of temperature stress caused by a gradually changing temperature field.
[0160] Scenario 2: Establishing a two-dimensional Poisson equation test scenario to meet the needs of steady-state physical field simulation.
[0161] based on Figure 13 For the grid shown, we establish a two-dimensional Poisson equation test scenario, with the governing equations as follows:
[0162]
[0163] in, The physical field to be solved, such as electric potential and temperature field; For the source term frequency parameter, and , The value is 3.14. A Mode8 mesh is used, and the optimized second gradient operator is verified through variable frequency source terms. Frequency adaptability.
[0164] Numerical experiments show that the technical solution in this embodiment exhibits significant gradient estimation optimization capabilities and adaptability to variable-frequency source terms in the two-dimensional Poisson equation. The sparse mesh Mode8, in the gradient estimation process of the two-dimensional Poisson problem, compared with the initial gradient operator of the traditional Green-Gaussian operator... The optimized second gradient operator It can significantly reduce the estimation error of spatial derivatives of different orders and in different directions. For example... Figure 16 and Figure 17 As shown, at time 1, at Figure 16In the middle, (a) shows First derivative of direction The MAE error decreased by 32.71%, as shown in (b). First derivative of direction The MAE error decreased by 34.66%, as shown in (c). Second derivative of direction The MAE error decreased by 97.06%, as shown in (d). Second derivative of direction The MAE error decreased by 89.76%. In the trained graph network, in the two-dimensional Poisson equation test scenario, the orientation weight parameters... , This optimization is particularly significant in regions with drastic changes in boundary curvature, indicating that the directional decoupling gating mechanism adaptively enhances the compensation for geometric defects, especially significantly reducing the estimation error of higher-order derivatives of functions. Frequency adaptation analysis shows that, as Figure 17 As shown, (a) is The true value of the direction, the first-order gradient field corresponding to the traditional gradient method and the method in this embodiment, (b) is The true value of the direction, the first-order gradient field corresponding to the traditional gradient method and the method in this embodiment, (c) is The true value of the direction, the second-order gradient field corresponding to the traditional gradient method and the method in this embodiment, (d) is The true value of the direction, the second-order gradient field corresponding to the traditional gradient method and the method in this embodiment, when the response field of a single-frequency source term is used as input and the spatial gradient field of the single-frequency source term is used as the loss loss for training, the optimization operator maintains the stability of error reduction within the range, which verifies the adaptability of the technical solution of this embodiment to different frequency spatial source terms, and provides a high-precision gradient estimation basis for physical field simulation with variable spatial source term input.
[0165] Figure 18 This embodiment illustrates the process of optimizing gradient computation based on graph neural networks and strengthening boundary constraints based on partitioning loss functions.
[0166] Based on the above, this embodiment makes the following creative optimizations to the existing gradient calculation:
[0167] Construct a learnable gradient operator space and reconstruct traditional static operators into trainable components of GNN (Graph Neural Network) to achieve dynamic correction;
[0168] Execution direction decoupling dynamic gating, along direction and Direction-independent weight optimization solves the direction sensitivity problem;
[0169] The partition loss function is constructed to strengthen the boundary constraint and improve the gradient estimation accuracy of the boundary.
[0170] The physical prior and data-driven fusion are combined, the global physical constraint is guided, the local data is corrected, and the accuracy and generalization are balanced.
[0171] Based on the above optimization, the embodiment at least realizes the following technical effects:
[0172] The embodiment has a relatively significant effect on grids with different quality and density, and the gradient estimation error of each order derivative in each direction is reduced by more than 33.19%.
[0173] The optimized second gradient operator shows an effective spatial frequency adaptation range of 0.88-1.94 Hz.
[0174] In the solving framework of the transient heat conduction equation, the second gradient operator obtained based on the embodiment has good time stability, lays a foundation for high-precision gradient estimation in complex physical field coupling simulation, and thus provides accurate data basis for structure analysis and other scenarios in civil engineering applications.
[0175] It should be understood that the above is only illustrative, and does not constitute any limitation on the technical solutions of the present application. In specific applications, those skilled in the art can set it according to the needs, and the present application does not limit it.
[0176] It should be noted that the above-described workflow is only illustrative and does not limit the scope of protection of the present application. In actual application, those skilled in the art can select part or all of them to achieve the purpose of the embodiment scheme according to actual needs, which is not limited here.
[0177] It should be noted that in this paper, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or system. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or system including the element.
[0178] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example method can be realized by means of software and a necessary general hardware platform, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk) and includes a number of instructions for causing an end device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in each embodiment of the present application.
[0179] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for calculating the gradient of a physical field based on a graph neural network, characterized in that, The method includes the following steps: Acquire physical field data, which includes physical field information and mesh topology relationships, and the physical field includes at least the stress field of the engineering component; Based on the aforementioned grid topology, the original gradient operator is obtained; The physical field data is updated based on the graph neural network, and the first gradient operator is obtained based on the grid topology relationship of the updated physical field data and the original gradient operator. Decouple the different directions of the physical field to set corresponding directional training weights; Based on the original gradient operator, the first gradient operator, and the direction training weights, the second gradient operator is obtained; The gradient of the physical field is calculated based on the second gradient operator; The process of obtaining the original gradient operator based on the grid topology includes: The gradient of each triangular unit is reconstructed in discrete form based on Green's-Gauss theorem; The vertex gradient is reconstructed by using an area-weighted average of the gradients of all adjacent cells of the vertex, thus approximating the continuous gradient field by the discrete grid gradient. The weight coefficient matrix of the discrete grid gradient is separated from the response field input, and the decomposed discrete grid gradient weight coefficient matrix is denoted as the initial gradient operator; The physical field grid includes at least an unstructured grid, and a directed graph is constructed based on the unstructured grid as follows: in: For a set of nodes and , For node features, based on the node features Encoding the initial gradient operator ; For edge set and Represents node connectivity and edge features. The mesh topology relationships between the encoding nodes; The method of updating the physical field data based on a graph neural network includes: Based on the sending node Receive node and edge features before update Through multilayer perceptron Output the updated edge features: in, The updated edge features; Aggregation Node All adjacent edge features Combined with the original node features Through multilayer perceptron Output the updated node features: in, This refers to the updated node features.
2. The physical field gradient calculation method based on graph neural networks as described in claim 1, characterized in that, The first gradient operator is obtained based on the updated physical field data, the grid topology, and the original gradient operator, including: The directed graph is updated based on the updated edge features and the updated node features, resulting in the following updated directed graph: in: The updated node set is obtained based on the updated node features, and the first gradient operator is encoded based on the updated node set. ; The updated edge set is obtained based on the updated edge features.
3. The physical field gradient calculation method based on graph neural networks as described in claim 2, characterized in that, The process of obtaining the second gradient operator based on the original gradient operator, the first gradient operator, and the direction training weights includes: The initial gradient operator and the first gradient operator are adjusted based on the directional decoupling dynamic gating formula to obtain the second gradient operator; wherein, the directional decoupling dynamic gating formula is: in, For the second gradient operator, The weights are trained for the first direction. The weights are used for training in the second direction.
4. The physical field gradient calculation method based on graph neural networks as described in claim 1, characterized in that, The method also includes the following steps: Based on the boundary region of the physical field, a partition loss function is obtained; The physical field gradient is calculated based on the partition loss function and the second gradient operator iterative optimization.
5. The physical field gradient calculation method based on graph neural networks as described in claim 4, characterized in that, The partitioning loss function is specifically as follows: in, The weighting parameters are the mean square error of the boundary nodes. The weighting parameter is the mean square error of the internal nodes. For boundary loss, This is an internal loss.
6. The physical field gradient calculation method based on graph neural networks as described in claim 5, characterized in that, The boundary loss and the internal loss are specifically as follows: in, The number of boundary nodes of the grid. The number of internal nodes of the grid. For gradient operators and functions gradient prediction value, This is for analytical gradient solutions or high-precision numerical gradient solutions.
7. A physical field gradient calculation system based on graph neural networks, employing the physical field gradient calculation method based on graph neural networks as described in any one of claims 1-6, characterized in that, The system includes: The field data acquisition module is used to acquire physical field data, which includes physical field information and mesh topology relationships of the physical field, and the physical field includes at least the stress field of the engineering component; The original gradient operator module is used to obtain the original gradient operator based on the mesh topology relationship; The first gradient operator module is used to update the physical field data based on the graph neural network, and to obtain the first gradient operator based on the grid topology relationship of the updated physical field data and the original gradient operator. The decoupling module is used to decouple different directions of the physical field in order to set corresponding directional training weights; The second gradient operator module is used to obtain the second gradient operator based on the original gradient operator, the first gradient operator, and the direction training weights; The gradient calculation optimization module is used to perform gradient calculation of the physical field based on the second gradient operator.
Citation Information
Patent Citations
Complex geometry meshless adaptive discretization method and system
CN117556557A
Network topology intelligent generation method and system based on deep learning and topology analysis
CN120416056A