A mechanical component three-dimensional physical field construction method, system, device and medium
By employing graph-structured modeling and graph neural network training in the design of mechanical components, combined with voxel bin coarsening and patch connectivity, the problem of low efficiency in acquiring 3D physics fields was solved, enabling rapid iteration and high-accuracy 3D physics field construction to meet engineering requirements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-05
Smart Images

Figure CN122154472A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of engineering three-dimensional simulation technology, and in particular to a method, system, device and medium for constructing three-dimensional physical fields of mechanical components. Background Technology
[0002] In the process of strength and aerodynamic design of mechanical components, three-dimensional physical fields (such as temperature field, pressure field, velocity field, stress / strain field, etc.) are important bases for evaluating structural safety, aerodynamic performance and thermal reliability. In engineering practice, numerical simulation methods such as finite element method and finite volume method are usually used to obtain the above field quantities, and based on this, scheme comparison, parameter sensitivity analysis and multi-objective optimization are carried out. However, high-fidelity simulation often requires complex geometric preprocessing, mesh generation and convergence control. The calculation process is time-consuming and resource-intensive, making it difficult to maintain high efficiency in rapid iterative design with multiple working conditions and multiple schemes, thus limiting the iterative speed and response capability of integrated strength and aerodynamic design.
[0003] To improve the efficiency of field acquisition, data-driven rapid prediction methods have emerged in recent years. By learning from historical simulation or experimental data, these methods can map geometric and operating parameters to physical fields, thereby reducing the number of repeated simulations to some extent.
[0004] Data-driven prediction methods typically construct graph structures directly on fine meshes. However, this is inefficient due to the high overhead of storing adjacency relationships, organizing sparse matrices, and batch training. Therefore, this approach usually involves simply reducing the dimensionality of the fine mesh and shrinking the details to form a coarse mesh, then constructing a 3D model on the coarse mesh, and finally mapping the coarse mesh results to the fine mesh through simple backfilling. However, when constructing on the coarse mesh after simple dimensionality reduction, the output is essentially a set of spatially discrete data points (i.e., a discrete point cloud). If the coarsening process fails to adaptively preserve strong gradient / abrupt regions, it will lead to the loss of inherent local abrupt changes and strong gradient features in the physical field, resulting in misjudgments. Furthermore, during simple backfilling, all details within the same coarse cluster are assigned the same predicted value, which can lead to blocky discontinuities or local gradient distortion, ultimately making it difficult to construct a highly accurate 3D physical field. Summary of the Invention
[0005] This invention provides a method, system, device, and medium for constructing a three-dimensional physical field for mechanical components, which can solve the problems existing in the prior art.
[0006] This invention provides a method for constructing a three-dimensional physical field for a mechanical component, comprising the following steps: Obtain the structural parameters of the mechanical component, establish a finite element simulation model of the mechanical component based on the structural parameters, and obtain fine mesh data of the mechanical component under multiple working conditions through finite element simulation; For each working condition of the mechanical component, each detail point in the fine mesh is mapped to a preset voxel mesh according to its coordinates. Detail points located in the same voxel mesh are aggregated into a coarse node cluster. At the same time, a mapping relationship from detail points to coarse node clusters is established, and detail points within each coarse node cluster are aggregated into a coarse node. Based on the cell faces on the fine mesh, the fine edges between each detail point are extracted. Each fine edge is converted into a coarse edge between each coarse node according to the mapping relationship from detail points to coarse node clusters. A coarse graph adjacency matrix describing the topological connection relationship between coarse nodes is constructed based on the coarse edges between each coarse node. Based on the coarse graph adjacency matrix corresponding to each working condition and the true physical field value corresponding to each coarse node, a pre-trained graph neural network model is used to predict the physical field prediction value of each coarse node. Based on the physical field prediction values of each coarse node under each working condition, and based on the mapping relationship from detail points to coarse node clusters, a predicted physical field value is assigned to each detail point; the physical field prediction value assigned to each detail point is used as the scalar data of each vertex of the original fine mesh unit surface, and the scalar data of each vertex of the fine mesh unit surface is rendered to obtain a three-dimensional surface cloud map characterizing the three-dimensional physical field distribution of the mechanical component.
[0007] Preferably, acquiring fine-mesh data of mechanical components under multiple operating conditions includes: For the total number of Under the working conditions, the connection relationship between the mesh nodes and the unit surfaces of the mechanical components is obtained, forming a set of detailed points, physical field quantities of detailed points, and set of unit surfaces of the fine mesh; The set of detail points is represented as follows: , ; in: Indicates the total number of nodes in the fine mesh; Indicates the index of detail points. ; Indicates the first The three-dimensional coordinate vector of each detail point; Represents coordinate components; Represents the three-dimensional real number space; The physical field quantities at the detailed points are expressed as follows: ; in: Indicates the first True values of physical quantities at a specific point; Represents the set of real numbers; The set of unit surfaces is represented as follows: , ; in: Indicates the first A sequence of vertices of a unit surface; Indicates the cell face index; This indicates the index of the detail point corresponding to the cell face; This indicates the number of vertices on a unit face.
[0008] Preferably, the construction of the preset voxel mesh includes: Preset a voxel mesh and obtain the minimum or maximum coordinates, bounding box scale and volume of the voxel mesh bounding box, as well as the initial value of the voxel edge length of the voxel mesh. The minimum or maximum coordinates of the bounding box are represented as follows: , ; in: and These represent the minimum and maximum vectors of the detail point coordinates in the three directions, respectively; The bounding box dimensions are expressed as follows: ; in: This indicates the side lengths of the bounding box in three directions; This indicates an attempt to avoid the occurrence of extremely small positive numbers with zero scale; The volume of the bounding box is expressed as: ; The initial value of the voxel side length is expressed as: ; in: Indicates the initial value of the voxel side length; Indicates the target number of coarse nodes.
[0009] Preferably, the acquisition of the coarse node cluster and the aggregated coarse nodes includes: For each detail The three-dimensional integer index of a voxel is represented as: ; in: Indicates the current voxel side length; This indicates rounding down by component; Represents a node The three-dimensional integer index of the voxel; Represents a three-dimensional integer space; Let the number of cells in each direction of the voxel mesh be: ; in: This indicates taking the maximum value for each component of the voxel index of all nodes; This indicates the method used to convert the maximum index to the total number of cells; Encode each cell within the voxel grid, with the encoding key represented as: ; in: Represents a node The unique code of the voxel grid to which it belongs; After encoding each cell within the voxel grid, for all After removing duplicates, a unique set of voxels is obtained, and the cluster mapping is defined as follows: ; Based on the defined cluster mapping, the number of clusters is represented as follows: ; in: Indicates deduplication; Indicates the number of elements in the set; express After deduplication Index in the list; Indicate details Cluster number; Indicates the total number of coarse nodes; After obtaining the number of clusters, define the clusters. The set of nodes is represented as: ; in: Indicates a clustered index; Indicates belonging to a cluster A collection of detail point indexes; The coordinates of the coarse nodes after each coarse node cluster is aggregated into coarse nodes are determined according to the centroid of each coarse node cluster, and are represented as follows: ; The true physical field values of all detail points within each coarse node cluster are averaged to obtain the field label for the corresponding coarse node, represented as: ; in: Cluster The coarse node coordinates; Cluster The thick node label; This indicates the number of nodes within the cluster.
[0010] Preferably, obtaining the coarse graph adjacency matrix includes: For each cell face within the fine mesh By using Faces or Elms to pair adjacent vertices to form edges, and taking the union of all unit faces, a set of thin edges is obtained. ; Each thin edge is transformed into a thick edge between each thick node based on the mapping relationship from the fine details to the thick node cluster, represented as: ; After removing duplicates from all thick edges, we obtain the set of thick edges, represented as: ; Adding a self-looping edge to the set of thick edges is represented as: ; in: Represents the set of edges in the coarse graph; Indicates a self-loop edge; Based on the set of edges in the coarse graph, construct a coarse graph adjacency matrix that describes the topological connections between coarse nodes.
[0011] Preferably, the prediction of the physical field prediction value for each coarse node includes: Let the coarsened graph be ,in For a set of nodes, Let it be the set of edges; For any coarse node in the coarsened graph The input feature vector is constructed as follows: ; in: Indicates coarse node features; Indicates the coordinates of the coarse node; Indicates the first Design / boundary parameter vectors for each working condition; Indicates the dimensions of design parameters; This indicates vector concatenation; For the For each working condition, construct a coarsening diagram. Node feature matrix ,Will The data is fed into a pre-trained graphical neural network, and after message passing, it outputs the predicted physics of all coarse nodes. .
[0012] Preferably, obtaining the three-dimensional surface cloud map characterizing the three-dimensional physical field distribution of the mechanical component includes: In the set of coarse nodes In this study, the KNN inverse distance weighted IDW interpolation method is used to perform interpolation for each detail point. Query The set of nearest neighbor coarse nodes ; Details Query The set of nearest neighbor coarse nodes Substances are assigned after weighted average. and obtain details Predicted scalar data , is represented as: ; Predicting scalar data from detail points Attached as node data to the vertex of the cell face; For any element surface After rendering the detail point prediction scalar data, at any point inside the cell surface... The displayed value is as follows: ; in: Represents points inside a facet The field quantity displayed value; Indicates the in-plane difference coefficient; Based on the displayed values inside the detail points of all unit faces of the fine mesh, a three-dimensional surface cloud map representing the three-dimensional physical field distribution of the mechanical component is obtained.
[0013] This invention also provides a three-dimensional physics field construction system for mechanical components, comprising: The data processing and graph construction module is used to obtain the structural parameters of mechanical components, establish a finite element simulation model of the mechanical components based on the structural parameters, and obtain fine mesh data of the mechanical components under multiple working conditions through finite element simulation. For each working condition of the mechanical component, each detail point in the fine mesh is mapped to a preset voxel mesh according to its coordinates. Detail points located in the same voxel mesh are aggregated into a coarse node cluster. At the same time, a mapping relationship from detail points to coarse node clusters is established, and detail points within each coarse node cluster are aggregated into a coarse node. Based on the cell faces on the fine mesh, the fine edges between each detail point are extracted. Each fine edge is converted into a coarse edge between each coarse node according to the mapping relationship from detail points to coarse node clusters. A coarse graph adjacency matrix describing the topological connection relationship between coarse nodes is constructed based on the coarse edges between each coarse node. The network training and fast inference module is used to predict the physical field prediction value of each coarse node based on the coarse graph adjacency matrix corresponding to each working condition and the physical field truth value corresponding to each coarse node using a pre-trained graph neural network model. The post-processing reconstruction and continuous surface display module is used to assign a predicted physical field value to each detail point based on the physical field prediction value of each coarse node under each working condition and the mapping relationship from detail points to coarse node clusters. The physical field prediction value assigned to each detail point is used as the scalar data of each vertex of the original fine mesh unit surface, and the scalar data of each vertex of the fine mesh unit surface is rendered to obtain a three-dimensional surface cloud map that characterizes the three-dimensional physical field distribution of the mechanical component.
[0014] This invention also provides an electronic device, including a memory and a processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the method for constructing a three-dimensional physical field for a mechanical component as described above.
[0015] This invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of a method for constructing a three-dimensional physical field for a mechanical component as described above.
[0016] This invention provides a method, system, device, and medium for constructing a three-dimensional physical field for mechanical components. Compared with the prior art, its advantages are as follows: This invention first aggregates spatially adjacent detail points into "supernodes," which are the coarse nodes corresponding to the aggregated coarse node clusters. Each aggregated coarse node can retain the statistical characteristics of the regional physical field to the greatest extent. Each thin edge of the fine grid is converted into a coarse edge between each coarse node according to the mapping relationship from detail points to coarse node clusters. A coarse graph adjacency matrix is also established. Thus, when predicting the physical field of the coarse nodes, the statistical characteristics of the regional physical field retained by the coarse nodes can completely preserve the inherent local mutations and strong gradient features in the physical field. While predicting the physical field according to the coarse graph adjacency matrix, the predicted value of each coarse node integrates the physical field mutations and gradient features in a certain topological neighborhood to preserve the integrity of the information. When the coarse prediction results are backfilled to the fine grid, the continuity of the physical field is naturally restored by using spatial distance weights to smoothly and continuously reconstruct the coarse node prediction values onto each original fine grid node. This reconstruction is based on the spatially reasonable distribution of coarse node values, rather than a simple mathematical interpolation of the original sparse data, ensuring the physical continuity and fidelity of the reconstructed field. Finally, a high-accuracy three-dimensional physical field is constructed for application.
[0017] Furthermore, after the present invention aggregates details into "supernodes", the number of "supernodes" is less than the number of details, which can significantly reduce the construction cost of the entire process. Attached Figure Description
[0018] Figure 1This is a schematic diagram of the overall process of a method for constructing a three-dimensional physical field for a mechanical component, provided by an embodiment of the present invention. Figure 2 This is a schematic diagram of voxel coarsening and coarse map construction for a three-dimensional physics field construction method for mechanical components provided in an embodiment of the present invention. Detailed Implementation
[0019] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0020] In the strength and aerodynamic design of mechanical components, three-dimensional physical fields (such as temperature, pressure, velocity, stress / strain, etc.) are crucial for evaluating structural safety, aerodynamic performance, and thermal reliability. In engineering practice, numerical simulation methods such as finite element method and finite volume method are typically used to obtain these field quantities, and based on this, scheme comparison, parameter sensitivity analysis, and multi-objective optimization are conducted. However, high-fidelity simulation often requires complex geometric preprocessing, mesh generation, and convergence control, resulting in time-consuming and resource-intensive computations. This makes it difficult to maintain high efficiency in rapid iterative design under multiple operating conditions and schemes, thus limiting the iterative speed and response capability of integrated strength and aerodynamic design.
[0021] To improve the efficiency of field acquisition, data-driven rapid prediction methods have emerged in recent years. These methods learn from historical simulation or experimental data to map geometric and operating parameters to physical fields, thereby reducing the number of repetitive simulations to some extent. However, for complex mechanical components, the mesh node scale often reaches hundreds of thousands or more, and the mesh topology is complex. When directly constructing the graph structure and training the model on a fine mesh, the storage of adjacency relationships, sparse matrix organization, and memory / GPU memory overhead for batch training are significant, easily leading to memory overflow during the graph construction stage or insufficient efficiency during the training stage. At the same time, the field quantities change drastically under different operating conditions, and if the model lacks effective utilization of mesh topology information, it is often difficult to balance prediction accuracy and generalization ability.
[0022] Furthermore, engineering applications not only require "predicted values" but also emphasize a result presentation method consistent with existing post-processing practices. If the prediction results are only given on a dimensionality-reduced or coarsened mesh, they often appear as discrete point clouds, making it difficult to observe clear surface cloud maps and conduct local numerical evaluations in key areas, and also hindering comparison and verification with the results displayed by commercial software. Even if the coarsened results are simply backfilled onto a fine mesh, problems such as blocky discontinuities and local gradient distortion may occur, affecting the credibility of design decisions. Therefore, there is an urgent need for a post-processing method that can achieve rapid prediction of three-dimensional physical fields under large-scale mesh conditions, and can effectively reconstruct the prediction results onto a fine mesh and output continuous surface cloud maps to support efficient iteration of mechanical component strength and aerodynamic design.
[0023] To address the problems of long computation time, high resource consumption, and difficulty in supporting rapid iteration of multiple schemes and operating conditions caused by the reliance on high-fidelity numerical simulation for obtaining the 3D physics field in the strength and aerodynamic design of existing mechanical components, as well as the shortcomings of existing data-driven methods under large-scale mesh conditions, such as high memory overhead for graph construction, insufficient training / inference efficiency, and inability to meet the post-processing display requirements of continuous surface cloud maps in engineering, this invention provides a method for rapid prediction and post-processing of the 3D physics field for complex mechanical components; such as Figure 1 As shown, this invention achieves stable and efficient graph neural network training and inference on a coarse graph by performing graph-structured modeling and coarsening mapping on a fine mesh. After prediction, the field quantity results of the coarse mesh are reconstructed to the original fine mesh nodes by cluster backfilling or nearest-neighbor weighted interpolation. Combined with the patch connectivity, a continuous surface cloud map is output. This significantly improves the efficiency of 3D physics field acquisition and post-processing while ensuring engineering usability, supporting rapid iteration and optimization decisions in strength and aerodynamic design. Specifically, it includes: Module 1, Data Processing and Graph Construction: Constructing a trainable coarse graph dataset from fine-grid data.
[0024] Module 2, Network Training and Fast Inference: Train graph convolutional neural networks on coarse graphs and quickly predict the field quantities of coarse nodes.
[0025] Module 3, Post-processing Reconstruction and Continuous Surface Display Module: Reconstructs coarse predicted field quantities to fine mesh and outputs continuous surface cloud maps based on surface nodes.
[0026] 1. The overall process of the data processing and graph construction module is as follows: Figure 2 As shown.
[0027] 1.1 Fine-grid data acquisition and reconstruction.
[0028] For each working condition (total) ), read the connection relationship between the mesh nodes and patches / elements of the mechanical parts, and form: (1) Set of details: , .
[0029] in: Indicates the total number of nodes in the fine mesh; For detailed point indexing, ; For the first The three-dimensional coordinate vector of each detail point; Its coordinate components; It represents the three-dimensional real number space.
[0030] (2) Detail point physical field quantities (taking scalar fields as an example, such as temperature / pressure / equivalent stress): .
[0031] in: For the first True values of physical quantities at a specific point; Let be the set of real numbers.
[0032] (3) Faces / Elems, each face consists of vertex indices: , .
[0033] in: Indicates the first A sequence of vertices of a patch (or unit face); For patch indexing; This is the index of the detail points corresponding to this patch; The number of vertices of the face (can be triangular, quadrilateral, or polygonal).
[0034] All of the above data can be output from finite element analysis software. This step is simply to organize the output software data.
[0035] 1.2 Conversion from fine mesh to coarse mesh: voxel coarsening.
[0036] To reduce fine mesh To address the overhead of adjacency matrix construction and training memory caused by excessively large adjacency matrices, this invention employs voxel binning coarsening to map minutiae points to... A coarse cluster (supernode), among which Approaching the target value .
[0037] (1) Initial values for bounding box and voxel side lengths: Calculate the minimum / maximum coordinates of the bounding box: , .
[0038] in: and These are the minimum and maximum vectors of the detail point coordinates in the three directions, respectively.
[0039] Enclosing box dimensions: .
[0040] in: Let be the side lengths of the bounding box in three directions; To avoid the occurrence of extremely small positive numbers with zero scale.
[0041] Bounding box volume: .
[0042] Initial values for voxel side lengths: .
[0043] in: The initial value for the voxel side length; This represents the target number of coarse nodes (target number of clusters).
[0044] (2) Map detail points to voxel lattice indices: For every detail : .
[0045] in: This represents the current voxel side length; This indicates rounding down by component; For nodes The three-dimensional integer index of the voxel; It is a three-dimensional integer space.
[0046] (3) The voxel index is encoded as a unique key, and the cluster number is obtained: Let the number of grid cells in each direction be: .
[0047] in: This indicates taking the maximum value for each component of the voxel index of all nodes; Used to convert the maximum index into the total number of cells.
[0048] Encoding key: .
[0049] in: For nodes The unique code of the voxel lattice to which it belongs.
[0050] For all After removing duplicates, a unique set of voxels is obtained, and a cluster mapping is defined: .
[0051] And obtain the number of clusters: .
[0052] in: Indicates deduplication; Indicates the number of elements in the set; express After deduplication Index in the list (starting from 0); details Cluster number; This represents the total number of coarse nodes (clusters).
[0053] (4) Adaptive iteration of voxel side length, so that Approaching the target : To make the number of clusters obtained by coarsening Approaching the target number of clusters Set tolerance threshold When the following conditions are met: .
[0054] If the coarsening result converges, the iteration is terminated; otherwise, the voxel edge length update step is entered. To avoid infinite iteration in extreme cases, the maximum number of iterations, max_iter, can be set. When the number of iterations reaches max_iter, the iteration is terminated and the current coarsening result is output.
[0055] The current number of clusters is Update ratio: .
[0056] Voxel side length update: .
[0057] 1.3 Cluster Aggregation: Coarse Node Coordinates and Coarse Field Labels.
[0058] Define cluster The set of nodes: .
[0059] in: For clustered indexes; Belongs to cluster A collection of detail point indices.
[0060] The coordinates of coarse nodes are determined according to the centroid of each cluster: .
[0061] Coarse nodal field quantity labels (intra-cluster average): .
[0062] in: For clusters The coarse node coordinates; For clusters The thick node label; This represents the number of nodes within the cluster.
[0063] 1.4 Construction of the adjacency matrix of the coarse graph: Construct the mapping from thin edges to thick edges.
[0064] The adjacency matrix is one of the inputs to a graph convolutional network, used to aggregate the connection relationships between graph nodes; when a detail node is transformed into a coarse node, the adjacency relationship also changes accordingly.
[0065] Construct a set of thin edges using Faces / Elems For each piece of dough Pairing adjacent vertices to form edges, for example And take the union of all the patches to get .
[0066] Map the thin edge to the thick edge: .
[0067] Deduplication yields the set of thick edges: .
[0068] And add a self-loop: .
[0069] in: For the set of edges in the coarse graph; Self-loop edges ensure that node information retains its own items in graph convolution.
[0070] 1.5 Multi-condition data splicing and batch indexing.
[0071] because Each working condition shares the same topology and coordinates, and the set of thick edges. It is reusable; only the corresponding data needs to be aggregated for each operating condition. .
[0072] All coarse nodes of the operating conditions are stitched together into a batch of image data; let the first... The node offset for each working condition is: .
[0073] The edge index translation is then: .
[0074] Batch vectors are defined as: .
[0075] in: Used to shift the coarse edge index of each working condition to the global node number after stitching; This indicates that the node after splicing belongs to the first... One working condition sample.
[0076] 2. Network training and fast inference module.
[0077] 2.1 Training data construction and normalization.
[0078] Construct the graph neural network input from the coarse graph data; for each coarse node, construct the input feature vector: .
[0079] in: Features of coarse nodes; Coarse node coordinates; For the first Design / boundary parameter vectors for each working condition; For design parameter dimensions; This indicates vector concatenation.
[0080] Various normalization methods can be used here. Taking min-max normalization as an example, it is mapped to... : .
[0081] Inverse normalization is: .
[0082] in: Represents any one-dimensional feature or label component; , These represent the minimum and maximum values of the component in the training data, respectively. This is the result of normalization.
[0083] 2.2 Structure of Graph Neural Networks
[0084] This invention employs a graph neural network to perform node-level regression prediction on the coarsening graph; let the coarsening graph be... ,in For a set of nodes, Let be the set of edges; for any node Its input feature vector is denoted as ,in It can be obtained as needed by splicing together node coordinates, working condition / boundary parameters, geometric or material properties, etc. For the feature dimension; for the , For each working condition, construct a coarsening diagram. Node feature matrix ,Will The data is fed into a pre-trained graphical neural network, and after message passing, it outputs the predicted physics of all coarse nodes. .
[0085] (1) Message passing layer (graph convolutional layer).
[0086] A graph convolutional neural network consists of multiple message-passing layers; the first In the layer, nodes The neighborhood aggregation result is defined as: .
[0087] in: For nodes In the Neighborhood aggregation results of the layer; Indexed by the central node; For nodes The neighbor node index; For nodes The set of neighbors; For neighboring nodes In the Layer feature representation; For aggregation operators, options include mean, sum, maximum, or attention-weighted aggregation; to facilitate subsequent node updates, let's denote... For nodes In the The feature representation of the layer, and the input layer satisfies .
[0088] The next layer of features is then obtained through a learnable linear transformation and update function: .
[0089] .
[0090] in: , For the first Learnable parameters of the layer; Indicates the method of fusion between the central node and its neighboring information (options include splicing, addition, gating fusion, etc.); This is the activation function.
[0091] (2) Activation function settings.
[0092] Activation function Optional algorithms include ReLU, LeakyReLU, GELU, and ELU, which can be used to improve the nonlinear expressive power of the network; for example, GELU can be represented as: .
[0093] in: The cumulative distribution function is the standard normal distribution; the specific selection of the activation function can be determined according to the data distribution, convergence speed and prediction accuracy requirements.
[0094] (3) Skip connections and multi-scale structures.
[0095] To enhance the stability of deep networks and improve gradient propagation, residual connections or skip connections in a U-shaped encoder-decoder structure can be introduced; for example, in certain layers: .
[0096] in: This refers to the skip connection feature from the previous or symmetrical layer; when skip connections are not used, it can be set as follows: Hyperparameters such as the number of network layers, the number of hidden channels, and whether to use hop connections can be adaptively set according to the task scale and hardware conditions.
[0097] (4) Output layer (node-level regression).
[0098] go through After layer message passing, the final node features are obtained. The regression head outputs the nodal physics field prediction: .
[0099] in: For nodes Predicted physical field quantities; For linear layers or small multilayer perceptrons; This is the set of model parameters.
[0100] 2.3 Loss function and training objective.
[0101] Let the truth value of the node be... The predicted value is This invention uses node-level regression loss for training; the basic loss function can be the mean squared error (MSELoss). .
[0102] in: Represents the set of nodes in a graph.
[0103] To emphasize the prediction accuracy of key areas (such as boundaries, stress concentration zones, and the area around cooling holes), a weighted term can be introduced to form a weighted mean square error: .
[0104] in: The node weights can be determined based on the region type, physical importance, or engineering focus, and can be set as constant weights or spatially distributed weights as needed.
[0105] 2.4 Optimization methods and training process.
[0106] (1) Parameter optimization.
[0107] The network parameters are updated using gradient descent-based optimization methods, such as Adam and Adamamax; for the th... In the next iteration, the parameter update can be represented as: .
[0108] in: For the learning rate, a constant learning rate or an adaptive / scheduling strategy (such as cosine annealing, step decay, exponential decay, etc.) can be used.
[0109] (2) Batch training and verification.
[0110] Training data can be divided into training set, validation set and test set according to working conditions. Mini-batch training is used to improve training stability and computational efficiency. The validation set is used to monitor overfitting and select the optimal model parameters.
[0111] (3) Reasoning output.
[0112] After training, when the same coarse map data in the same format is input for new operating conditions, the network can output coarse node predictions of the physical field. It then proceeds to the subsequent fine mesh reconstruction and surface display post-processing module.
[0113] 3. Post-processing reconstruction and continuous surface display module.
[0114] This section introduces two fine-mesh reconstruction methods: intra-cluster constant backfilling or the KNN inverse distance weighting method.
[0115] 3.1 Fine-mesh reconstruction method 1: Intra-cluster constant backfilling.
[0116] Using the mapping from detail points to clusters The coarse prediction is directly assigned to all detail points within its cluster: .
[0117] in: For details Belonging to the coarse node (cluster) The predicted value.
[0118] The computational cost of the above method is extremely low, but it may exhibit blocky discontinuities in strong gradient regions. It can be used as a quick preview or as an initial value for subsequent interpolation.
[0119] 3.2 Fine-mesh reconstruction method 2: KNN inverse distance weighted (IDW) difference.
[0120] In the set of coarse nodes In, for each detail Query The set of nearest neighbor coarse nodes .
[0121] (1) Definition of distance: .
[0122] in: For details To coarse nodes Euclidean distance, This refers to the 2-norm operation.
[0123] (2) Unnormalized inverse distance weights: .
[0124] in: The inverse distance weighted exponent can be manually selected. It is an extremely small amount.
[0125] (3) Weight normalization: .
[0126] Thus satisfying .
[0127] (4) Minute point prediction and reconstruction: .
[0128] When multiple operating conditions share the same fine / coarse node geometry and It can be pre-calculated and reused across operating conditions, thereby further reducing post-processing time.
[0129] 3.3 Continuous surface display: In-plane linear interpolation, used to output surface contour plots.
[0130] Predicting scalars at detail points Node data is attached to the vertices of faces; for any face... any point inside the sheet The displayed value at this location can be represented as: .
[0131] in: Points inside the surface The field quantity displayed value; This is the in-plane difference coefficient.
[0132] For triangular facets , The centroid coordinate coefficients can be chosen to satisfy: .
[0133] For quadrilateral or polygonal surfaces, linear shape functions can be used, or the surfaces can be triangulated before applying the above two formulas.
[0134] As shown in the above formula, the color / value within a face is obtained by linear interpolation of vertex scalars. Therefore, as long as the detail point scalars are used... If the spatial distribution is reasonable, the surface cloud map can present a more continuous distribution of physical fields.
[0135] 3.4 Post-processing error field.
[0136] When comparative verification is required, the error field is more intuitive. This is especially true when fine-grid ground truth values are present. At that time, the error field can be defined:
[0137] (1) Difference error: .
[0138] (2) Relative error: .
[0139] (3) Relative error: .
[0140] in: To prevent extremely small amounts from being divided by zero.
[0141] This invention achieves rapid prediction of 3D physical fields from geometric / condition features by constructing an end-to-end inference model based on graph neural networks on a mesh graph. Compared with traditional high-fidelity numerical simulation, it reduces the acquisition time of a single field quantity from "minutes / hours" to "seconds / sub-seconds" for inference computation. This invention proposes a graph coarsening strategy for a large number of node meshes, mapping a large number of fine mesh nodes to a small number of coarse mesh nodes. Adjacency construction and model training are performed on the coarse graph, significantly reducing memory usage and computational complexity, and improving training stability and scalability. This invention also proposes a method for reconstructing coarse prediction results to fine meshes, which can employ intra-cluster backfilling or weighted interpolation based on K-nearest neighbors. Coarse-node predicted field quantities are projected onto the original fine-mesh nodes, making the results spatially continuous. Combined with the original patch information, a continuous surface cloud map is output, meeting the surface display and local numerical observation needs commonly used in engineering software. This invention is not limited to specific field types and is applicable to the rapid prediction and post-processing of various three-dimensional physical fields such as temperature, pressure, velocity, and stress. It is not limited to specific mechanical objects and can be used in the strength and aerodynamic design iteration process of various complex mechanical components. When multiple working condition samples share the same mesh topology and node positions, coarsening mapping, adjacency, and interpolation weights can be pre-calculated and reused across working conditions, further reducing the overall time consumption of batch evaluation and improving the efficiency of design iteration.
[0142] The voxel coarsening strategy of this invention is an intelligent dimensionality reduction that preserves spatial topology and geometric features. It is not a simple random sampling, but rather aggregates spatially adjacent detail points into "supernodes" (coarse nodes). Under the premise of preserving the statistical features of the physical field of the region (such as the position of the centroid and the mean of the field) to the greatest extent, it reduces the size of the computation graph by 1-2 orders of magnitude.
[0143] In the reconstruction of coarse prediction results to fine meshes, this invention uses KNN inverse distance weighted interpolation to smoothly and continuously reconstruct the coarse node prediction values onto each original fine mesh node. This process utilizes spatial distance weights to naturally restore the continuity of the physical field and eliminate "blocky" artifacts. Crucially, this interpolation is based on the predicted coarse node values that are reasonably distributed in space, rather than a simple mathematical interpolation of the original sparse data, thus ensuring the physical rationality of the reconstructed field. When generating continuous surface cloud maps, based on the reconstructed fine mesh node data and combined with the original patch connectivity, in-plane linear interpolation rendering is performed to directly generate continuous surface cloud maps that are fully compatible with commercial CAE software. This allows for direct extraction of node / element data, plotting of path curves, and calculation of extreme values and average values in specific regions during subsequent processing, all in complete consistency with traditional simulation results.
[0144] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for constructing a three-dimensional physical field for a mechanical component, characterized in that, Includes the following steps: Obtain the structural parameters of the mechanical component, establish a finite element simulation model of the mechanical component based on the structural parameters, and obtain fine mesh data of the mechanical component under multiple working conditions through finite element simulation; For each working condition of the mechanical component, each detail point in the fine mesh is mapped to a preset voxel mesh according to its coordinates. Detail points located in the same voxel mesh are aggregated into a coarse node cluster. At the same time, a mapping relationship from detail points to coarse node clusters is established, and detail points within each coarse node cluster are aggregated into a coarse node. Based on the cell faces on the fine mesh, the fine edges between each detail point are extracted. Each fine edge is converted into a coarse edge between each coarse node according to the mapping relationship from detail points to coarse node clusters. A coarse graph adjacency matrix describing the topological connection relationship between coarse nodes is constructed based on the coarse edges between each coarse node. Based on the coarse graph adjacency matrix corresponding to each working condition and the true physical field value corresponding to each coarse node, a pre-trained graph neural network model is used to predict the physical field prediction value of each coarse node. Based on the physical field prediction values of each coarse node under each working condition, and based on the mapping relationship from detail points to coarse node clusters, a predicted physical field prediction value is assigned to each detail point. The predicted physical field value assigned to each detail point is used as the scalar data of each vertex of the original fine mesh cell surface. The scalar data of each vertex of the fine mesh cell surface is then rendered to obtain a three-dimensional surface cloud map that characterizes the three-dimensional physical field distribution of the mechanical component.
2. The method for constructing a three-dimensional physical field for a mechanical component according to claim 1, characterized in that, The acquisition of fine-grid data of mechanical components under multiple operating conditions includes: For the total number of Under the working conditions, the connection relationship between the mesh nodes and the unit surfaces of the mechanical components is obtained, forming a set of detailed points, physical field quantities of detailed points, and set of unit surfaces of the fine mesh; The set of detail points is represented as follows: , ; in: Indicates the total number of nodes in the fine mesh; Indicates the index of detail points. ; Indicates the first The three-dimensional coordinate vector of each detail point; Represents coordinate components; Represents the three-dimensional real number space; The physical field quantities at the detailed points are expressed as follows: ; in: Indicates the first True values of physical quantities at a specific point; Represents the set of real numbers; The set of unit surfaces is represented as follows: , ; in: Indicates the first A sequence of vertices of a unit surface; Indicates the cell face index; This indicates the index of the detail point corresponding to the cell face; This indicates the number of vertices on a unit face.
3. The method for constructing a three-dimensional physical field for a mechanical component according to claim 2, characterized in that, The construction of the preset voxel mesh includes: Preset a voxel mesh and obtain the minimum or maximum coordinates, bounding box scale and volume of the voxel mesh bounding box, as well as the initial value of the voxel edge length of the voxel mesh. The minimum or maximum coordinates of the bounding box are represented as follows: , ; in: and These represent the minimum and maximum vectors of the detail point coordinates in the three directions, respectively; The bounding box dimensions are expressed as follows: ; in: This indicates the side lengths of the bounding box in three directions; This indicates an attempt to avoid the occurrence of extremely small positive numbers with zero scale; The volume of the bounding box is expressed as: ; The initial value of the voxel side length is expressed as: ; in: Indicates the initial value of the voxel side length; Indicates the target number of coarse nodes.
4. The method for constructing a three-dimensional physical field for a mechanical component according to claim 3, characterized in that, The acquisition of the coarse node cluster and the aggregated coarse nodes includes: For each detail The three-dimensional integer index of a voxel is represented as: ; in: Indicates the current voxel side length; This indicates rounding down by component; Represents a node The three-dimensional integer index of the voxel; Represents a three-dimensional integer space; Let the number of cells in each direction of the voxel mesh be: ; in: This indicates taking the maximum value for each component of the voxel index of all nodes; This indicates the method used to convert the maximum index to the total number of cells; Encode each cell within the voxel grid, with the encoding key represented as: ; in: Represents a node The unique code of the voxel grid to which it belongs; After encoding each cell within the voxel grid, for all After removing duplicates, a unique set of voxels is obtained, and the cluster mapping is defined as follows: ; Based on the defined cluster mapping, the number of clusters is represented as follows: ; in: Indicates deduplication; Indicates the number of elements in the set; express After deduplication Index in the list; Indicate details Cluster number; Indicates the total number of coarse nodes; After obtaining the number of clusters, define the clusters. The set of nodes is represented as: ; in: Indicates a clustered index; Indicates belonging to a cluster A collection of detail point indexes; The coordinates of the coarse nodes after each coarse node cluster is aggregated into coarse nodes are determined according to the centroid of each coarse node cluster, and are represented as follows: ; The true physical field values of all detail points within each coarse node cluster are averaged to obtain the field label for the corresponding coarse node, represented as: ; in: Cluster The coarse node coordinates; Cluster The thick node label; This indicates the number of nodes within the cluster.
5. The method for constructing a three-dimensional physical field for a mechanical component according to claim 4, characterized in that, The acquisition of the coarse graph adjacency matrix includes: For each cell face within the fine mesh By using Faces or Elms to pair adjacent vertices to form edges, and taking the union of all unit faces, a set of thin edges is obtained. ; Each thin edge is transformed into a thick edge between each thick node based on the mapping relationship from the fine details to the thick node cluster, represented as: ; After removing duplicates from all thick edges, we obtain the set of thick edges, represented as: ; Adding a self-looping edge to the set of thick edges is represented as: ; in: Represents the set of edges in the coarse graph; Indicates a self-loop edge; Based on the set of edges in the coarse graph, construct a coarse graph adjacency matrix that describes the topological connections between coarse nodes.
6. The method for constructing a three-dimensional physical field for a mechanical component according to claim 5, characterized in that, The predicted physical field values for each coarse node include: Let the coarsened graph be ,in For a set of nodes, Let it be the set of edges; For any coarse node in the coarsened graph The input feature vector is constructed as follows: ; in: Indicates coarse node features; Indicates the coordinates of the coarse node; Indicates the first Design / boundary parameter vectors for each working condition; Indicates the dimensions of design parameters; This indicates vector concatenation; For the For each working condition, construct a coarsening diagram. Node feature matrix ,Will The data is fed into a pre-trained graphical neural network, and after message passing, it outputs the predicted physics of all coarse nodes. .
7. The method for constructing a three-dimensional physical field for a mechanical component according to claim 6, characterized in that, The process of obtaining a three-dimensional surface cloud map characterizing the three-dimensional physical field distribution of a mechanical component includes: In the set of coarse nodes In this study, the KNN inverse distance weighted IDW interpolation method is used to perform interpolation for each detail point. Query The set of nearest neighbor coarse nodes ; Details Query The set of nearest neighbor coarse nodes Substances are assigned after weighted average. and obtain details Predicted scalar data , is represented as: ; Predicting scalar data from detail points Attached as node data to the vertex of the cell face; For any element surface After rendering the detail point prediction scalar data, at any point inside the cell surface... The displayed value is as follows: ; in: Represents points inside a facet The field quantity displayed value; Indicates the in-plane difference coefficient; Based on the displayed values inside the detail points of all unit faces of the fine mesh, a three-dimensional surface cloud map representing the three-dimensional physical field distribution of the mechanical component is obtained.
8. A three-dimensional physics field construction system for mechanical components, characterized in that, include: The data processing and graph construction module is used to obtain the structural parameters of mechanical components, establish a finite element simulation model of the mechanical components based on the structural parameters, and obtain fine mesh data of the mechanical components under multiple working conditions through finite element simulation. For each working condition of the mechanical component, each detail point in the fine mesh is mapped to a preset voxel mesh according to its coordinates. Detail points located in the same voxel mesh are aggregated into a coarse node cluster. At the same time, a mapping relationship from detail points to coarse node clusters is established, and detail points within each coarse node cluster are aggregated into a coarse node. Based on the cell faces on the fine mesh, the fine edges between each detail point are extracted. Each fine edge is converted into a coarse edge between each coarse node according to the mapping relationship from detail points to coarse node clusters. A coarse graph adjacency matrix describing the topological connection relationship between coarse nodes is constructed based on the coarse edges between each coarse node. The network training and fast inference module is used to predict the physical field prediction value of each coarse node based on the coarse graph adjacency matrix corresponding to each working condition and the physical field truth value corresponding to each coarse node using a pre-trained graph neural network model. The post-processing reconstruction and continuous surface display module is used to assign a predicted physical field value to each detail point based on the physical field prediction value of each coarse node under each working condition and the mapping relationship from detail points to coarse node clusters. The predicted physical field value assigned to each detail point is used as the scalar data of each vertex of the original fine mesh cell surface. The scalar data of each vertex of the fine mesh cell surface is then rendered to obtain a three-dimensional surface cloud map that characterizes the three-dimensional physical field distribution of the mechanical component.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the method for constructing a three-dimensional physical field of a mechanical component as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the steps of a method for constructing a three-dimensional physical field for a mechanical component as described in any one of claims 1 to 7.