A method for improving the efficiency and accuracy of three-dimensional high-precision flow field analysis
By combining a deep learning model with a SOM neural network to generate a high-quality 3D adaptive mesh, the problem of high computational cost and low efficiency of the 3D mesh adaptive method in CFD calculation is solved, and efficient and accurate flow field analysis is achieved.
Patent Information
- Application Number
- CN202410919459.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Existing 3D mesh adaptive methods suffer from high computational cost and low efficiency in CFD calculations, especially under complex geometry and boundary conditions, making it difficult to reduce computational resource requirements while ensuring high accuracy.
A deep learning model combined with a SOM neural network is used to generate a high-quality three-dimensional adaptive mesh through flow field condition parameters. The initial three-dimensional flow field data and mesh data are used to train a sample database, and an end-to-end mapping is constructed to generate an adaptive mesh that conforms to the flow field structure.
While ensuring high-precision three-dimensional flow field calculation, it reduces the computational cost and time of mesh adaptation, improves the efficiency and accuracy of flow field analysis, and avoids the high computational burden of traditional methods.
Smart Images

Figure CN118917232B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional grid adaptation in computational fluid dynamics, in particular to a method for improving the efficiency and accuracy of three-dimensional high-precision flow field analysis. BACKGROUND
[0002] In computational fluid dynamics (CFD), the numerical calculation accuracy is highly dependent on the quality of the grid, especially when dealing with three-dimensional problems, the importance of grid quality is more prominent. The complexity of three-dimensional problems lies in the increase of spatial dimensions, which leads to a sharp increase in the number of nodes and grids and an increase in the difficulty of boundary treatment, thereby increasing the difficulty of calculation and resource demand. In order to obtain high-precision results at the lowest possible calculation cost, high-quality three-dimensional grids should be dense in high-gradient areas of the flow field solution, and relatively sparse in low-gradient areas. Therefore, an efficient and stable three-dimensional grid adaptation method is crucial for accurate simulation of complex flow fields.
[0003] Currently, the adaptive grid techniques widely used in the field of CFD mainly include local refinement method and moving grid method. The local refinement method optimizes the grid layout by increasing grid nodes in areas with large solution gradients. Although this method can improve the calculation accuracy of local areas, it also complicates the topology of the grid and increases the computational burden. On the other hand, the moving grid method moves nodes to areas with large solution changes without changing the total number of nodes and the topology of the grid, which can improve the efficiency and accuracy of numerical calculation without significantly increasing the calculation amount.
[0004] Although traditional methods have shown certain effects on two-dimensional problems, when faced with three-dimensional problems, these adaptive methods often come with high cost and low efficiency, especially under complex geometry and boundary conditions. In addition, most existing moving grid methods also need to construct auxiliary grid partial differential equation models, which increases the additional computational burden in CFD calculation. Any change in the target flow field requires the reconstruction of these auxiliary models, further increasing the demand for manpower and computing resources. Therefore, solving the technical challenges of three-dimensional grid adaptation and optimizing its efficiency and cost are of great significance to support research and application in the field of CFD. How to reduce the calculation cost and time of grid adaptation while ensuring high-precision three-dimensional flow field calculation has become a topic that needs further research and optimization. SUMMARY
[0005] Embodiments of the present application provide a method for improving the efficiency and accuracy of three-dimensional high-precision flow field analysis, which can reduce the calculation cost and time of grid adaptation while ensuring high-precision three-dimensional flow field calculation.
[0006] To achieve the above-mentioned purpose, the embodiments of the present application adopt the following technical solutions:
[0007] A method for improving the efficiency and accuracy of three-dimensional high-precision flow field analysis, comprising:
[0008] Step 1, a center receives a service request, the service request comprising: initial three-dimensional grid data and flow field condition parameters, wherein the flow field condition parameters at least include: geometric shape parameters and Mach number Ma and angle of attack AOA of the flow field;
[0009] Step 2, according to the flow field condition parameters, the initial three-dimensional flow field data is calculated on the initial three-dimensional grid, and then the initial three-dimensional flow field data is used to generate a three-dimensional adaptive grid with node density distribution consistent with the flow field structure;
[0010] Step 3, according to the flow field condition parameters and the three-dimensional adaptive grid, a sample database is constructed;
[0011] Step 4, training a deep learning model using the sample database;
[0012] Step 5, input the condition parameters of the flow field to be analyzed into the trained deep learning model, and obtain a three-dimensional grid consistent with the flow field structure of the flow field to be analyzed;
[0013] Step 6, determine the client sending the service request, and send and display the three-dimensional grid obtained in step 5 to the client.
[0014] Specifically, in step 2, the initial three-dimensional flow field data is generated according to the flow field condition parameters, which includes: using the flow field condition parameters to perform CFD simulation calculation on the initial three-dimensional grid, wherein the initial three-dimensional flow field data obtained by CFD simulation calculation is stored in the three-dimensional flow field library; Specifically, the specific method of using the flow field condition parameters to perform CFD simulation calculation on the initial three-dimensional grid in this embodiment can adopt the general grid adaptation method for CFD that has been developed, such as "a general grid adaptation method for CFD", which can calculate the flow field numerical calculation result meeting the accuracy requirement and return to the client. It can effectively improve the problem that the node distribution of the initial CFD grid is not reasonable enough, and make the grid nodes move to the area where the flow field solution changes dramatically and meets the high gradient distribution as much as possible. The three-dimensional adaptive grid with node density distribution consistent with the flow field structure is generated by using the initial three-dimensional flow field data, which includes: adjusting the initial three-dimensional grid by three-dimensional SOM grid adaptation method, and storing the adaptive adjustment result as the three-dimensional adaptive grid consistent with the initial three-dimensional flow field structure in the three-dimensional grid library.
[0015] The adaptive adjustment of the initial 3D mesh using the 3D SOM mesh adaptive method includes: Step 101: Acquiring SOM neural network training data; Step 102: Constructing the SOM neural network structure based on the SOM neural network training data and the initial 3D mesh; Step 103: Training the constructed SOM neural network and then updating the weights of neurons in the competitive layer; Step 104: Repeating steps 101 to 103 until the maximum number of iterations is reached to obtain the adaptive adjustment result. The final adaptive optimization result is then obtained and stored in a 3D mesh library.
[0016] In step 101, the following steps are included: a single sample is retrieved from the three-dimensional flow field library and the three-dimensional mesh library to train a multilayer perceptron (MLP); then, the trained MLP is used to predict the spatial flow field solution in a high-resolution three-dimensional uniform background mesh; the prediction result is used as training data for the SOM neural network. The high resolution is defined as a node density that is 5 times or more than that of the initial three-dimensional mesh. The three-dimensional uniform background mesh is generated within the space of the initial three-dimensional mesh, and the sampling range is determined based on the boundary size of the initial three-dimensional mesh. min :x max ,y min :y max ,z min :z max ], where x min ,x max ,y min ,y max ,z min ,z max These are the minimum and maximum values of the initial 3D mesh in the x, y, and z directions, respectively; a 3D high-resolution uniform background mesh is constructed within the sampling range; the flow field solution on all nodes in the 3D uniform background mesh is predicted using a trained multilayer perceptron; and the node gradient is calculated. I i Let i be the gradient of the i-th node in the three-dimensional uniform background mesh, where i and N are both positive integers and i < N. s The gradient of all nodes arranged in descending order. For the first Gradient of each node, threshold This is the preset threshold.
[0017] In step 102, constructing the SOM neural network structure includes: projecting the initial 3D mesh onto the competing layer of the SOM neural network, where the mesh nodes of the SOM neural network are defined as neurons in the competing layer, the adjacency relationships between neurons in the competing layer correspond to the topological connectivity relationships between the initial 3D mesh nodes, and the topological distance between neurons in the competing layer is: floor(·) represents the floor function, Sij Euclidean distance from the i-th neuron to the j-th neuron, i, j are positive integers; the input layer of the SOM neural network is defined as the constructed training data set sample library, the number of neurons of the input layer corresponds to the dimension of the training data, and the number of neurons of the input layer is 3 for three-dimensional grid self-adaptive optimization; the neuron weight of the competition layer of the SOM neural network corresponds to the three-dimensional grid node coordinates, and the output dimension of the competition layer is 3, wherein the initial three-dimensional grid node coordinates X 0 For initializing the neuron weight ξ 0 And the initial three-dimensional flow field data is obtained by CFD calculation on the initial three-dimensional grid.
[0018] Specifically, the step 3 comprises: using the initial three-dimensional flow field data generated in the step 2 and the three-dimensional adaptive grid to form an input-output data sample pair, and storing the input-output data sample pair to the sample database.
[0019] Specifically, in the step 4, the training deep learning model comprises: a flow field feature extraction link, a flow field grid feature interaction link and a three-dimensional grid self-adaptive link; the flow field feature extraction link comprises: twelve grid convolution layers; the flow field grid feature interaction link comprises: four perception feature pooling layers; in the flow field grid feature interaction link, the four layers of features in the flow field feature extraction link are cascaded, and are fused after being aligned through the perception feature pooling layers with the input node features of the three-dimensional grid self-adaptive link. The three-dimensional grid self-adaptive link comprises: fifteen grid convolution layers and eight grid attention layers. In the three-dimensional grid self-adaptive link, the mapping relationship from the flow field condition to the high-quality three-dimensional adaptive grid is learned.
[0020] The hidden output dimensions of the first two layers of grid convolution in the flow field feature extraction link are 64 and 128 respectively, the hidden output dimensions of the middle seven layers of grid convolution are all 256, and the hidden output dimensions of the last three layers of grid convolution are 128, 64 and 1 respectively; the hidden output dimensions of the four perception feature pooling layers in the flow field grid feature interaction link are 64, 128, 256 and 64 respectively; the hidden output dimensions of the first thirteen layers of graph convolution in the three-dimensional grid self-adaptive link are all 256, the hidden output dimension of the fourteenth layer of graph convolution is 128, the hidden output dimension of the fifteenth layer of graph convolution is 3, and the hidden output dimensions of the eight layers of grid attention layers are all 256.
[0021] The input node features of the three-dimensional grid self-adaptive link comprise three-dimensional grid node mean coordinates F m And local node density F d ; in the process of training the deep learning model, the loss function adopted is: L=L ada +λL rec , Lada represents a grid loss function function, L rec a flow field reconstruction loss function, λ is L ada and L rec The balance coefficient.
[0022] The method for improving the efficiency and accuracy of three-dimensional high-precision flow field analysis provided by the embodiment of the application provides initial three-dimensional grid data and flow field condition parameters by the client, performs modeling analysis from the flow field condition to the adaptive grid on the server side, first acquires initial three-dimensional grid and initial flow field data, uses the data to generate high-quality adaptive grid using the SOM three-dimensional grid adaptive technology and constructs a sample database, trains a deep learning model, according to the flow field condition parameters and the initial three-dimensional grid provided by the client, the model predicts and generates a three-dimensional adaptive grid according to the flow field condition parameters and the initial grid provided by the client, and finally returns the high-quality grid with node density distribution conforming to the flow field structure to be predicted to the client and displays. Thus, while ensuring high-precision three-dimensional flow field calculation, the calculation cost and time of grid adaptation are reduced. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0024] Figure 1 The system architecture diagram provided by the embodiment of the present application is shown in the figure.
[0025] Figure 2 The method flowchart provided by the embodiment of the present application is shown in the figure.
[0026] Figure 3 The flowchart of the SOM three-dimensional grid adaptive method provided by the embodiment of the present application is shown in the figure.
[0027] Figure 4 The schematic diagram of the deep learning model provided by the embodiment of the present application is shown in the figure.
[0028] Figure 5 The logical flowchart for three-dimensional adaptive grid prediction provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0029] For those skilled in the art to better understand the technical solutions of the present application, the present application will be described in further detail below in combination with the drawings and specific embodiments. Hereinafter, the embodiments of the present application will be described in detail, and the examples of the embodiments are shown in the drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present application, and cannot be explained as a limitation of the present application. Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an" and "the" used herein can also include the plural forms. It should be further understood that the phrase "comprising" used in the specification of the present application means that the features, integers, steps, operations, elements and / or components exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we say an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be an intermediate element. In addition, "connected" or "coupled" used herein can include wireless connection or coupling. The phrase "and / or" used herein includes any one of the associated listed items and all combinations thereof. Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as that generally understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted with idealized or overly formal meanings unless defined as such.
[0030] The embodiment of the present application provides a method for optimizing high-precision flow field analysis, as shown in the figure, comprising: Figure 1
[0031] Step 1, a center for calculating service request, the service request includes initial three-dimensional grid data and flow field condition parameters, wherein the flow field condition parameters at least include: geometric shape parameters and Mach number Ma and angle of attack AOA of flow field.
[0032] Wherein, the calculation center can receive the service request sent by the client, and the calculation center can be deployed with server devices, databases and other devices, and the calculation center can also be called data center, which can be built by using the existing technology. For example, it can be applied in Figure 1 The illustrated scenario architecture, wherein the client provides initial grid data and flow field condition parameters; the server uses the given information from the client to complete the initial flow field data simulation calculation and adaptive grid generation, thereby constructing a sample database; using the sample database to construct a deep learning network structure, then training the deep learning model; finally, the server completes the predicted flow field data simulation calculation according to the initial grid and flow field condition parameters provided by the client, and then uses the predicted flow field condition parameters, the initial three-dimensional grid and the trained deep learning model to predict the high-quality three-dimensional adaptive grid data and return it to the client.
[0033] Specifically, the flow field condition parameters at least include: three-dimensional geometric shape parameters, Mach number Ma and angle of attack α of the flow field; the flow field condition parameters also include the Reynolds number Re of the flow field; the initial grid data can be various three-dimensional grid data commonly understood by people in the industry, including structured grid, unstructured grid, tetrahedral grid and hexahedral grid, etc.
[0034] Step 2, generate initial three-dimensional flow field data according to the flow field condition parameters, and then generate three-dimensional adaptive grid with node density distribution consistent with the flow field structure using the initial flow field data;
[0035] The structure of the deep learning network is constructed according to the sample database, which is used to establish an end-to-end mapping from the flow field condition parameters to the three-dimensional adaptive grid. The deep learning network structure refers to the specific constituent links of the deep learning model.
[0036] Specifically, the three-dimensional adaptive grid consistent with the flow field structure can be generated by the SOM three-dimensional grid adaptive method. The SOM three-dimensional grid adaptive method refers to a mobile grid method based on self-organizing competitive mapping neural network, which constructs SOM network training data according to the flow field solution, and updates the competitive layer neuron weight to obtain three-dimensional adaptive grid according to the training data and initial three-dimensional grid data. By training the neural network, high-quality three-dimensional adaptive grid with constant node number and grid topology structure can be obtained.
[0037] Step 3, construct a sample database according to the initial flow field data and the generated three-dimensional adaptive grid;
[0038] Step 4, train the deep learning model using the sample database.
[0039] The structure of the deep learning network is constructed according to the sample database, which is used to establish an end-to-end mapping from the flow field condition parameters to the three-dimensional adaptive grid. The deep learning network structure refers to the specific constituent links of the deep learning model.
[0040] Step 5, input the to-be-predicted flow field condition parameters into the trained deep learning model, and simultaneously predict the three-dimensional flow field and the three-dimensional adaptive grid to obtain a high-quality three-dimensional grid conforming to the structure of the to-be-predicted flow field.
[0041] In the step 5, the to-be-predicted flow field condition parameters are input into the trained deep learning model, and the deep learning model outputs the predicted three-dimensional adaptive grid result, wherein the server synchronously inputs the flow field condition parameters and the initial three-dimensional grid data into the deep learning model. Figure 5 The method for predicting a three-dimensional adaptive grid shown in the figure, so as to obtain a high-quality three-dimensional grid conforming to the structure of the to-be-predicted flow field and send it to the client; wherein the three-dimensional adaptive grid is predicted according to the to-be-predicted flow field condition parameters, the initial three-dimensional grid and the trained deep learning model, and then the high-quality three-dimensional adaptive grid predicted by the deep learning model is returned to the client.
[0042] Step 6, determine the client sending the service request, and send and display the three-dimensional grid obtained in the step 5 to the client.
[0043] In the step 2, according to the flow field condition parameters and the initial three-dimensional grid data, CFD simulation calculation is performed on the initial three-dimensional grid by using the flow field condition, and the result is stored in the three-dimensional flow field library; according to the result of the CFD simulation calculation, the initial three-dimensional grid is adaptively optimized by using the SOM three-dimensional grid adaptive method, and the optimization result is stored in the three-dimensional grid library.
[0044] In the step 3, the three-dimensional flow field data in the three-dimensional flow field library and the optimization result in the three-dimensional grid library are used to form an input-output data sample pair, and the input-output data sample pair is stored in the sample database.
[0045] The sample database further includes that the initial three-dimensional grid input by the client can be any specified type of three-dimensional grid data, including structural grid, unstructured grid, tetrahedral grid and hexahedral grid, etc. The server performs CFD simulation calculation on the initial three-dimensional grid according to the flow field condition parameters input by the client to obtain corresponding initial flow field data. Then, the initial flow field data and the initial three-dimensional grid input by the client are used to form an input training sample of the deep learning model. Figure 3 The SOM three-dimensional grid adaptive flow shown in the figure is used to perform grid adaptive optimization on the initial three-dimensional grid by using the SOM three-dimensional grid adaptive technology, and the generated high-quality three-dimensional grid is used as a label for supervised deep learning training.
[0046] In this embodiment, the adaptive optimization of the initial 3D mesh using the SOM 3D mesh adaptive method includes:
[0047] Step 101: Collect SOM neural network training data;
[0048] Specifically, step 101 includes:
[0049] A single sample pair is taken from the three-dimensional flow field library and the three-dimensional mesh library to train a multilayer perceptron. Then, the trained multilayer perceptron is used to predict the spatial flow field solution in a high-resolution three-dimensional uniform background mesh.
[0050] The multilayer perceptron uses training data composed of a single three-dimensional flow field data and three-dimensional grid node coordinates to train an artificial neural network consisting of multiple hidden layers, thereby fitting the complex flow field laws in the three-dimensional grid space.
[0051] The three-dimensional uniform background mesh is generated within the initial three-dimensional mesh space, and the sampling point range is determined according to the size of the initial three-dimensional mesh boundary [x]. min :x max ,y min :y max ,z min :z max ], where x min ,x max ,y min ,y max ,z min ,z max These represent the minimum and maximum values of the initial 3D mesh in the x, y, and z directions, respectively. A 3D high-resolution uniform background mesh is constructed within this range. A trained multilayer perceptron is used to predict the flow field solution at all nodes in this high-resolution background mesh, and the nodal gradients are calculated. A threshold is set. Training data with a distribution conforming to the high gradient characteristics of the flow field are sampled and input into the sample library: Where I i Let I be the gradient of the i-th node in the background mesh. s The gradient of all nodes arranged in descending order. For the first I of each node s I s It can be understood as a set that includes the gradients of all nodes, and For the first The gradient of each node, i.e. For set I s The first in gradient of each node
[0052] Step 102: Construct the SOM neural network structure based on the training data and the initial 3D mesh;
[0053] Specifically in step 102, the SOM neural network structure construction includes:
[0054] Project the initial three-dimensional grid to the SOM neural network competition layer, and define the grid nodes as the neurons of the competition layer. The adjacency relationship between the neurons is defined by the topological connection relationship between the initial three-dimensional grid nodes, and the topological distance between the neurons is defined as follows:
[0055]
[0056] Wherein, floor(·) represents the floor function, S ij is the Euclidean distance from the i-th neuron to the j-th neuron;
[0057] The SOM neural network input layer is defined as the constructed training data set sample library, and the number of input layer neurons is determined by the dimension of the training data. For three-dimensional grid self-adaptive optimization, the number of input layer neurons is 3; wherein, the sample content in the "training data sample library" can be the same as the sample content in the "sample database" in step 3, so the SOM neural network input layer defined as the constructed training data set sample library can be understood as: the SOM neural network input layer is defined as the initial three-dimensional grid and the initial three-dimensional flow field data.
[0058] The SOM neural network competition layer neuron weight corresponds to the three-dimensional grid node coordinate, and the initial three-dimensional grid node coordinate X 0 is used to initialize the competition layer neuron weight ξ 0 , and the competition layer output dimension is 3.
[0059] Step 103: training the SOM neural network and updating the competition layer neuron weight;
[0060] Specifically in step 102, the training SOM neural network includes:
[0061] Randomly collect a sample from the training data sample library as the input of SOM, and use the spatial position x t Select the winning neuron from the current competition layer Wherein t is the current iteration step, and the winning neighborhood is calculated according to the topological distance between the winning neuron and all neurons in the current competition layer Then calculate the learning rate δ t of the current competition layer neuron, and then calculate the center position of all cells in the current three-dimensional grid Add grid smoothing constraint to the neuron weight update, and finally update the neuron weight of the current competition layer:
[0062]
[0063] where λ is the smoothing rate, and the three-dimensional mesh node coordinates of the next iteration step are obtained: X t+1 = ξ t+1 , ξ t represents the three-dimensional mesh node coordinates of the current iteration step, x t represents the input point coordinates of the current iteration step.
[0064] Step 104: Repeat the above steps until the maximum number of iterations, obtain the final adaptive optimization optimization result and store it in the three-dimensional mesh library.
[0065] In this embodiment, the training of the deep learning model comprises a flow field feature extraction link, a flow field mesh feature interaction link and a three-dimensional mesh adaptive link; the flow field feature extraction link is configured to extract the global structural features of the three-dimensional flow field; the flow field feature extraction link comprises twelve grid convolution layers, the flow field mesh feature interaction link comprises four perception feature pooling layers, and the three-dimensional mesh adaptive link comprises fifteen grid convolutions; the flow field mesh feature interaction link comprises fusing the extracted flow field features with the mesh node features; and the three-dimensional mesh adaptive link comprises learning the mapping relationship from the flow field condition parameters to the high-quality three-dimensional adaptive mesh. In this embodiment, the flow field feature extraction link adopts the Unet architecture, and the flow field features output by the first, second, ninth and eleventh layers of grid convolution in the encoder are sequentially connected in a skip connection manner with the flow field features output by each layer of convolution of the generator. Therefore, the flow field feature extraction module can fully fuse the shallow features containing more spatial structure information with the deep features containing more semantic features, improve the accuracy of flow field reconstruction, and provide the subsequent three-dimensional mesh adaptive link with global structural features that reserve more fluid physical structure information.
[0066] The four perception feature pooling layers of the flow field mesh feature interaction link have hidden output dimensions of 64, 128, 256 and 64, respectively; the first thirteen graph convolutions of the three-dimensional mesh adaptive link have hidden output dimensions of 256, the fourteenth graph convolution has a hidden output dimension of 128, the fifteenth graph convolution has a hidden output dimension of 3, and the eight grid attention layers have hidden output dimensions of 256.
[0067] The weight function update function of the grid convolution layer is:
[0068]
[0069] where, is an activation function, K is the number of neurons in the lth layer, N i is the number of first-order adjacent points of the ith node, b[n] l is the bias of the nth neuron in the lth layer. ωl,n,k The weights connecting the k-th neuron in layer l and the n-th neuron in layer (l+1) are... Let l be the weight of the k-th neuron in the l-th layer connecting the j-th neighbor of the i-th node to the n-th neuron in the (l+1)-th layer of the i-th node, where l is a positive integer. This represents the features of the i-th node in the l-th layer and its j-th neighbor on the k-th neuron. This represents the feature of the i-th node in the l-th layer on the k-th neuron.
[0070] Specifically, such as Figure 4 As shown, the flow field feature extraction stage takes flow field condition parameters as input and outputs flow field features and a 3D reconstructed flow field. The flow field mesh feature interaction stage takes flow field features and initial mesh node features as input and outputs fused mesh node features. The 3D mesh adaptation stage takes mesh node features as input and outputs adaptively optimized mesh node coordinates. The flow field feature extraction stage can be divided into an encoder and a generator. The encoder takes the initial flow field condition parameters as input and the flow field features as output. The generator takes the flow field features as input and the reconstructed 3D flow field as output. In this embodiment, the initial flow field and the reconstructed flow field are distinguished; the more similar they are, the more global structural information of the flow field is retained by the flow field features extracted by the encoder. The flow field mesh feature interaction stage takes flow field features and initial mesh node features as input and uses a fully connected network for feature alignment and fusion through a perceptual feature pooling layer. The 3D mesh adaptation stage takes the fused mesh node features and the initial 3D mesh as input and outputs a predicted high-quality 3D adaptive mesh through aggregation and dimensionality reduction learning with fifteen layers of mesh convolution. The deep learning model is implemented in a computer language, and the training results are stored on the server for later use.
[0071] In this embodiment, during the training of the deep learning model, the initial grid node features of the input flow field grid feature interaction stage include:
[0072] 3D mesh node mean coordinate F m The mean coordinates of the i-th node are mvc i for:
[0073]
[0074] Among them, w k ξ represents the weight between the i-th node and the k-th boundary point, where n is the number of boundary points in the 3D mesh. i Let ξ be the spatial coordinate of the i-th node. k Let |ξ| be the spatial coordinates of the k-th boundary point. k -ξ i || represents the Euclidean distance from the i-th node to the k-th boundary point, and α is the distance from the i-th node to the k-th boundary point.k is an angle k ξ i is an angle k+1 is an angle k-1 is an angle k-1 ξ i is an angle k is an angle. The three-dimensional mesh node mean coordinates provide the deep learning model with generalization to different geometric shapes and far-field boundaries.
[0075] The local mesh density is F d , and the local density F i d is:
[0076]
[0077] where N a is the number of adjacent cells of the i-th node, and |E j | is the volume of the j-th adjacent cell of the i-th node. The local mesh density enhances the model's resolution capability for different regions in the physical domain.
[0078] In this embodiment, the loss function used in the process of training the deep learning model is:
[0079] L = L ada + λL rec , where L ada represents the mesh loss function, L rec is the flow field reconstruction loss, and λ is used to balance the two loss functions. The mesh loss function is used to supervise the training process from the initial three-dimensional mesh to the three-dimensional adaptive mesh; the flow field reconstruction loss is used to supervise the training process of the flow field condition parameters to the reconstructed three-dimensional flow field.
[0080] Specifically, the mesh loss function is:
[0081]
[0082] where N is the number of initial three-dimensional mesh nodes, ξ is the node coordinates of the predicted three-dimensional mesh of the deep learning model, and the node coordinates of the labeled mesh optimized by the SOM three-dimensional mesh adaptive method.
[0083] The flow field reconstruction loss is:
[0084]
[0085] where F i pthe predicted flow field data on the i-th node for the deep learning model, the initial flow field data on the i-th node, i.e., the CFD calculation simulation value on the initial three-dimensional mesh.
[0086] In practical applications, the embodiment uses the data provided by the client to perform high-quality three-dimensional adaptive mesh prediction on the server side, first acquires the initial three-dimensional mesh and the initial flow field data of the simulation calculation, constructs a training sample database suitable for deep learning, constructs a deep learning network structure suitable for three-dimensional adaptive mesh prediction according to the training sample database, trains a deep learning model, generates a corresponding three-dimensional adaptive mesh according to the initial three-dimensional mesh and the flow field condition parameters to be predicted provided by the client user, and finally sends a high-quality three-dimensional mesh with a node density distribution consistent with the flow field structure to the client for use.
[0087] The embodiment has the advantages that high-quality three-dimensional adaptive meshes are successfully generated directly from flow field condition parameters, and the high computational cost and time consumption of traditional methods in processing three-dimensional problems are avoided. The deep learning model involved in the present application efficiently processes three-dimensional mesh data and flow field data, is easy to implement, and fully utilizes the complex structure information of the flow field. Various problems such as mesh entanglement and uneven distribution of density are avoided during model training. Once the model is trained, it can efficiently and accurately capture the complex flow characteristics of high-dimensional flow field data and generate high-quality three-dimensional adaptive meshes corresponding to the initial flow field condition parameters.
[0088] The method for improving the efficiency and precision of three-dimensional high-precision flow field analysis provided by the embodiment of the present application acquires initial three-dimensional mesh data and flow field condition parameters provided by the client, performs modeling analysis from the flow field condition to the adaptive mesh on the server side, first acquires the initial three-dimensional mesh and the initial flow field data, generates high-quality adaptive meshes using the SOM three-dimensional mesh adaptive technology and constructs a sample database using the data, trains a deep learning model, and according to the initial three-dimensional mesh and the flow field condition parameters to be predicted provided by the client, the model predicts and generates a three-dimensional adaptive mesh according to the flow field condition parameters and the initial mesh provided by the client, and finally returns the high-quality mesh with a node density distribution consistent with the structure of the flow field to be predicted to the client and displays it. The deep learning model involved in the present scheme is easy to implement, and the cooperative training of these sub-steps effectively utilizes the flow field data information of the sample database, thereby not only providing a reliable optimization direction for training and improving the accuracy of three-dimensional mesh prediction, but also realizing fast prediction from the flow field condition parameters to the three-dimensional adaptive mesh and effectively improving the accuracy of CFD calculation and the speed of three-dimensional adaptive mesh optimization. Thus, while ensuring high-precision three-dimensional flow field calculation, the computational cost and time of mesh adaptation are reduced.
[0089] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The above descriptions are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for improving the efficiency and accuracy of three-dimensional high-precision flow field analysis, characterized in that, include: Step 1: The computing center accepts a service request, which includes: initial 3D mesh data and flow field condition parameters, wherein the flow field condition parameters include at least: geometric shape parameters and the Mach number Ma and angle of attack AOA of the flow field; Step 2: Calculate the initial three-dimensional flow field data on the initial three-dimensional grid based on the flow field condition parameters, and then use the initial three-dimensional flow field data to generate a three-dimensional adaptive grid with node density distribution that matches the flow field structure. Step 3: Construct a sample database based on the flow field condition parameters and the three-dimensional adaptive mesh; Step 4: Train a deep learning model using the sample database; Step 5: Input the conditional parameters of the flow field to be analyzed into the trained deep learning model to obtain a three-dimensional mesh that conforms to the flow field structure of the flow field to be analyzed. Step 6: Determine the client that will send the service request, and send the 3D mesh obtained in Step 5 to the client; In step 4, the training of the deep learning model includes: a flow field feature extraction stage, a flow field grid feature interaction stage, and a 3D grid adaptation stage; the flow field feature extraction stage includes: twelve grid convolutional layers; the flow field grid feature interaction stage includes: four perceptual feature pooling layers; the 3D grid adaptation stage includes: fifteen grid convolutional layers and eight grid attention layers. The flow field feature extraction stage adopts the Unet architecture. The flow field features output by the first, second, ninth and eleventh layer grid convolution in the encoder are sequentially concatenated with the flow field features output by each layer convolution in the generator through a skip connection method. The implicit output dimensions of the first two grid convolutional layers in the flow field feature extraction stage are 64 and 128, respectively; the implicit output dimensions of the middle seven grid convolutional layers are all 256; and the implicit output dimensions of the last three grid convolutional layers are 128, 64, and 1, respectively. The implicit output dimensions of the four perceptual feature pooling layers in the flow field grid feature interaction stage are 64, 128, 256, and 64, respectively. The implicit output dimensions of the first thirteen graph convolutional layers in the three-dimensional grid adaptation stage are all 256; the implicit output dimension of the fourteenth graph convolutional layer is 128; the implicit output dimension of the fifteenth graph convolutional layer is 3; and the implicit output dimension of the eight grid attention layers is all 256. The update function for the weights of the grid convolutional layer is: ,in, For activation function, For the first The number of neurons in the layer, For the first The number of first-order adjacent nodes of a node For the first Layer Bias of each neuron To connect the first Layer The first neuron and the second Layer The weights of each neuron, To connect the first The node of the first The first neighboring point Layer The first neuron and the second The node of the first Layer The weights of each neuron, where l is a positive integer. Indicates the first Layer The node and its first The neighboring point is at the th Features on each neuron Indicates the first Layer The node at the th Features on each neuron; During the training of a deep learning model, the initial grid node features in the input flow field grid feature interaction stage include: 3D mesh node mean coordinates , of which Mean coordinates of each node for: ,in, Indicates the first The node and the first The weights between the boundary points This represents the number of boundary points of the 3D mesh. This is the first Spatial coordinates of each node For the first Spatial coordinates of the boundary points For the first The node to the first Euclidean distance between boundary points For angle The value, For angle Angle value; Local mesh density is Specifically, the first Local density of nodes for: , For the first The number of adjacent cells of a node. For the first The node of the first The volume of adjacent cells; In the process of training a deep learning model, the loss function used is: , Represents the mesh loss function. Flow field reconstruction loss, The two loss functions are used to balance the training process from the initial 3D mesh to the 3D adaptive mesh, and the flow field reconstruction loss is used to supervise the training process from the flow field condition parameters to the reconstructed 3D flow field. in, , This represents the initial number of 3D mesh nodes. 3D mesh for prediction of deep learning models The node coordinates, The label mesh optimized by the SOM 3D mesh adaptive method The node coordinates; , For deep learning models in the first Predicted flow field data at each node For the first Initial flow field data at each node.
2. The method according to claim 1, characterized in that, In step 2, generating initial three-dimensional flow field data based on the flow field condition parameters includes: CFD simulation calculations are performed on an initial three-dimensional grid using the aforementioned flow field condition parameters, wherein the initial three-dimensional flow field data obtained from the CFD simulation calculations are stored in a three-dimensional flow field library. The process of generating a three-dimensional adaptive mesh with node density distribution that matches the flow field structure using the initial three-dimensional flow field data includes: adaptively adjusting the initial three-dimensional mesh using a three-dimensional SOM mesh adaptive method, and storing the result of the adaptive adjustment as a three-dimensional adaptive mesh that matches the initial three-dimensional flow field structure in a three-dimensional mesh library.
3. The method according to claim 2, characterized in that, The adaptive adjustment of the initial 3D mesh using the 3D SOM mesh adaptive method includes: Step 101: Collect SOM neural network training data; Step 102: Construct the SOM neural network structure based on the SOM neural network training data and the initial 3D mesh; Step 103: Train the constructed SOM neural network, and then update the weights of neurons in the competitive layer; Step 104: Repeat steps 101 to 103 above until the maximum number of iterations is reached, to obtain the result of the adaptive adjustment.
4. The method according to claim 3, characterized in that, Step 101 includes: A single sample is taken from the three-dimensional flow field library and the three-dimensional mesh library to train a multilayer perceptron. Then, the trained multilayer perceptron is used to predict the spatial flow field solution in a high-resolution three-dimensional uniform background mesh. The prediction result is used as the training data of the SOM neural network. The high resolution means that the node density is 5 times or more than the initial three-dimensional mesh.
5. The method according to claim 4, characterized in that, The three-dimensional uniform background mesh is generated within the initial three-dimensional mesh space, and the sampling point range is determined based on the size of the initial three-dimensional mesh boundary. ,in These are the initial 3D meshes at... , and Minimum and maximum values in the direction; A three-dimensional high-resolution uniform background grid is constructed within the sampling area. A trained multilayer perceptron is used to predict the flow field solution at all nodes in the three-dimensional uniform background grid, and the node gradient is calculated. in, , The third in the three-dimensional uniform background mesh The gradient of each node, where i and N are both positive integers and i < N. The gradient of all nodes arranged in descending order. For the first Gradient of each node, threshold This is the preset threshold.
6. The method according to claim 4, characterized in that, In step 102, constructing the SOM neural network structure includes: The initial 3D mesh is projected onto the competing layer of the SOM neural network. The adjacency relationships between neurons in the competing layer correspond to the topological connectivity relationships between nodes in the initial 3D mesh. The topological distance between neurons in the competing layer is: , This represents the floor function. For the first The first neuron to the second The Euclidean distance between neurons, where i and j are both positive integers; The input layer of the SOM neural network is defined as the constructed training dataset sample library, and the number of neurons in the input layer is 3. The neuron weights in the competitive layer of the SOM neural network correspond to the coordinates of three-dimensional grid nodes, and the output dimension of the competitive layer is 3.
7. The method according to claim 1, characterized in that, Step 3 includes: Using the initial three-dimensional flow field data generated in step 2 and the three-dimensional adaptive mesh, input-output data sample pairs are formed, and the input-output data sample pairs are stored in the sample database.
Citation Information
Patent Citations
General grid adaptive method for CFD
CN113283186A
Method for optimizing high-precision flow field analysis
CN117010292A