Grid-free airfoil flow field prediction method based on self-attention geometric coding

Through the meshless method of self-attention geometric coding and implicit neural expression, the problem of low computational efficiency of traditional computational fluid dynamics under complex geometry and multi-scale phenomena is solved, and efficient airfoil flow field prediction is achieved, which is suitable for large-scale applications. Scale grids and multiscale phenomena.

CN118673835APending Publication Date: 2024-09-20SICHUAN UNIV
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202410721087.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Traditional computational fluid dynamics methods have low computational efficiency when dealing with complex geometries, multi-scale and multi-physical phenomena, and grid-based neural networks have limited applications in large-scale grids and multi-scale phenomena, and cannot effectively adapt to GPU memory and Information transfer.

Method used

A meshless airfoil flow field prediction method based on self-attention geometric coding is adopted. The object surface feature points are obtained through data preprocessing and random sampling. The implicit neural expression and self-attention mechanism are used to construct a neural network for geometric coding and flow. Prediction of field physical quantities reduces iterative calculations and resource consumption.

Benefits of technology

It achieves efficient learning of multi-scale results in large-scale flow fields, improves geometric generalization capabilities, improves the prediction accuracy and efficiency of airfoil flow fields, and provides a quick reference for airfoil design optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_3
    Figure SMS_3
  • Figure SMS_4
    Figure SMS_4
Patent Text Reader

Abstract

The invention discloses a meshless airfoil flow field prediction method based on self-attention geometric coding, and the method comprises the following steps: carrying out the data preprocessing of steady flow data on a plurality of sets of grids, obtaining the geometric information of grid nodes, and marking the points, which are attached to a geometric surface and have a geometric distance of 0, in the grid nodes as object surface feature points; selecting object surface feature points from each data field, and sampling geometric information of part of grid nodes and corresponding flow field information; a neural network forward process is constructed, different weights are given to object surface feature points through an attention mechanism based on grid node input, the object surface feature points are weighted through the weights to obtain geometric codes, and the geometric codes are spliced with spatial positions to be decoded into flow field physical quantities through implicit neural expression; after the neural network is output, obtaining an optimal prediction neural network parameter through a loss function back propagation training model; and inputting object surface feature points and flow field space coordinates, calculating geometric information, and splicing incoming flow velocity and attack angle to carry out flow field prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computational fluid dynamics and artificial intelligence, is a data point sampling learning method, can be applied to larger-scale grid problems, and specifically relates to a gridless airfoil flow field prediction method based on self-attention geometric coding. Background Art

[0002] Wing design is an important direction of computational fluid dynamics (CFD) application. In order to describe and simulate fluid problems, partial differential equations (PDEs) are usually required to be solved. The design process maximizes the lift-to-drag ratio by solving the partial differential equations of the entire grid, and special emphasis is placed on the surface where various multi-scale phenomena occur. The focus is on finding the optimal shape of the wing to minimize the force required for flight. However, traditional numerical methods such as finite difference method, finite element method and finite volume method face significant computational efficiency challenges when dealing with complex geometry, multi-scale and multi-physical phenomena, and boundary conditions. This is mainly due to the high computational overhead caused by high-quality grid generation and the coupling effects of various physical quantities. The simulation accuracy will also decrease with the complexity of the physical scene being solved.

[0003] Many neural network alternatives have been proposed for representation learning of CFD data. Currently, most of the more effective methods rely on grid-based methods: Convolutional neural networks (CNNs) face problems when processing irregular grid data used in computational fluid dynamics; Graph neural networks (GNNs) show good prospects for modeling flow fields, but when dealing with large-scale grids, GNNs have limitations in terms of receptive field size and information transmission of distant nodes. When the grid density is too large, GNNs cannot fit into the GPU's memory, so subsampling is necessary. This limitation limits their application in situations where large grids and multi-scale phenomena are prevalent.

[0004] In recent years, implicit neural representation (INR) has been successfully applied in physical problems. It uses coordinate-based networks to encode geometric information and physical fields into concise representations, and establishes a mapping between the problem's geometric variables and the corresponding physical fields in the representation space. It is robust to different grid sampling and can adapt to different geometric shapes. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention proposes a gridless airfoil flow field prediction method based on self-attention geometric coding, thereby reducing a large number of iterative calculations in the airfoil optimization process, reducing resource consumption, and saving time costs.

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

[0007] A meshless airfoil flow field prediction method based on self-attention geometric coding comprises the following steps:

[0008] S1. Preprocess the steady flow data on multiple sets of grids to obtain the geometric information of the grid nodes, and mark the points in the grid nodes that fit the geometric surface and have a geometric distance of 0 as object surface feature points;

[0009] S2, selecting object surface feature points from each data field, and randomly sampling the geometric information and corresponding flow field information of some grid nodes;

[0010] S3. Construct the forward process of the neural network. Based on the grid node input, different weights are assigned to the surface feature points through the attention mechanism. The surface feature points are weighted and summed to obtain geometric codes. After the geometric codes are spliced ​​with the spatial positions, they are decoded into flow field physical quantities through implicit neural expressions. After the neural network output, they are back-propagated with the true value data through the loss function to train the model and obtain the neural network parameters with the best prediction accuracy.

[0011] S4. Input the surface feature points, the spatial coordinate position of the flow field and calculate the geometric information, splice the incoming flow velocity and the angle of attack to predict the flow field.

[0012] Furthermore, the specific method of step S1 is as follows:

[0013] S11, selecting the airfoil geometry to adjust the angle of attack and the incoming flow velocity within a certain range, generating a grid and performing numerical simulation to obtain a flow field data set;

[0014] S12. Cut out the key area close to the airfoil from the flow field, generate the spatial position coordinates of the grid nodes, the closest distance between the grid nodes and the wing geometric surface, and the geometric normal required for the surface feature points; each grid node coordinate is spliced ​​with the wing attack angle and the relative speed of the incoming flow velocity, the closest distance to the geometric body and the normal, a total of 7 dimensions of features, x of all node features, the machine learning supervision item is the corresponding physical quantity y, and the data set input and supervision items are all Z-Score standardized.

[0015] Furthermore, the specific implementation method of step S2 is:

[0016] Select all the surface feature points x from each flow field geo , and randomly sample n grid node features x sampled And the corresponding flow field physical quantity y sampled , which is expressed as follows:

[0017] x geo ={x|Distance(x)=0}

[0018] (x sampled,y sampled )={(x,y)|RandSelect((x,y))}

[0019] Furthermore, the specific method of step S3 is as follows:

[0020] S31. The feature encoding vectors of all surface feature points xgeo corresponding to the grid node features in the flow field are mapped to key (K) and value (V) with high dimension as the self-attention mechanism through ReLU multi-layer perceptron. The specific expressions are as follows:

[0021] K=KeyEncoder(x geo )

[0022] V = ValueEncoder(x geo )

[0023] The feature encoding vector of the grid node feature is also mapped to a query (Q) of the same dimension as the self-attention module using a ReLU multi-layer perceptron. The specific expression is as follows:

[0024] Q = QueryEncoder(x)

[0025] S32, calculate the weighted geometric representation z of the grid node features and the object surface feature points g , which is expressed as follows:

[0026]

[0027] S33, the grid node features are mapped to a high-dimensional vector z through the ReLU multi-layer perceptron, and z and z g The splicing is sent to the implicit neural network INR for decoding into the flow field physical quantity predicted by the neural network Its expression is as follows:

[0028] z=Encoder(x sampled )

[0029]

[0030] S34, using the second norm as the loss function, giving different weights to the boundary loss and the internal flow loss, the loss function Loss expression is as follows:

[0031] Loss = αSurfLoss + VolLoss

[0032]

[0033] Among them, α represents the hyperparameter, k = |x surf |.

[0034] Furthermore, the specific method of step S4 is as follows:

[0035] S41, discretizing the airfoil geometry into a series of point coordinates as surface feature points by generating a grid;

[0036] S42, the grid generation method is also used to discretize in space to obtain the coordinates of the flow field position points of interest;

[0037] S43, using the spatial coordinate information of the grid nodes, calculate the shortest distance to the geometric surface of the wing and the geometric normal required for the feature points of the object surface, and splice each point with a total of 7 dimensions of the wing attack angle and the relative speed of the incoming flow velocity;

[0038] S44, the object surface feature points and flow field space coordinates which are combined with geometric information, incoming flow velocity and angle of attack are input into the model to obtain the corresponding flow field structure.

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

[0040] The flow prediction method proposed in the present invention can learn multi-scale results from a larger-scale flow field in a sampling manner. At the same time, the self-attention mechanism features of the grid node features to the surface feature points are used as geometric information, and an ordinary implicit neural expression network is introduced, so that the neural network can have a certain geometric generalization ability, and good results have been achieved in the pressure prediction of the geometric boundary and the velocity pressure prediction in the internal flow; it can provide a more efficient and rapid method for predicting the airfoil flow field, and provide flow field reference and guidance for subsequent applications such as airfoil design optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart of a gridless airfoil flow field prediction method based on self-attention geometric coding of the present invention;

[0042] Figure 2 Schematic diagram of the self-attention geometric encoding process of the present invention;

[0043] Figure 3 This is a schematic diagram of the CFD grid and key areas of this embodiment;

[0044] Figure 4 This is a visualization diagram of some data sets in this embodiment;

[0045] Figure 5 This is a schematic diagram of the network forward process of this embodiment;

[0046] Figure 6 Schematic diagram of flow field prediction results in this embodiment. DETAILED DESCRIPTION

[0047] The specific implementation of the present invention is further described in detail below with reference to the accompanying drawings and specific examples.

[0048] like Figures 1 to 6 As shown, a meshless airfoil flow field prediction method based on self-attention geometric coding includes the following steps:

[0049] S1. Preprocess the steady flow data on multiple grids to obtain the geometric information of the grid nodes (including the closest distance to the geometric surface), fit the grid nodes to the geometric surface, and mark the points with a geometric distance of 0 as surface feature points. The specific method is as follows:

[0050] S11, selecting the wing geometry to adjust the angle of attack and the incoming flow velocity within a certain range, generating a grid and performing numerical simulation to obtain a flow field data set;

[0051] S12. Cut out the key area close to the airfoil from the flow field, such as Figure 3 As shown in the figure, the spatial position coordinates of the grid nodes, the closest distance between the grid nodes and the wing geometric surface, and the geometric normal (other points are 0 vectors) are required to generate the feature points of the object surface; each grid node coordinate is spliced ​​with the wing attack angle and the relative speed of the incoming flow velocity, the closest distance to the geometric body, and the normal, a total of 7 dimensions of features, the x of all node features, the machine learning supervision item is the corresponding physical quantity y, and the data set input and supervision items are all Z-Score standardized.

[0052] S2, select the object surface feature points from each data field, and randomly sample the geometric information and corresponding flow field information of some grid nodes, take out the pre-processed data in step S1 as the input of the neural network, the input of the neural network is the object surface feature points and their geometric information, the randomly sampled grid nodes and their geometric information, the specific implementation method is:

[0053] Select all the surface feature points x from each flow field geo , and randomly sample n grid node features x sampled And the corresponding flow field physical quantity y sampled , which is expressed as follows:

[0054] x geo ={x|Distance(x)=0}

[0055] (x sampled ,y sampled )={(x,y)|RandSelect((x,y))}

[0056] S3. Construct the forward process of the neural network. Different weights are given to the surface feature points through the attention mechanism based on the grid node input. The surface feature points are weighted and summed to obtain geometric coding. After the geometric coding is spliced ​​with the spatial position, it is decoded into the flow field physical quantity through implicit neural expression. After the neural network output, it is back-propagated with the true value data through the loss function to train the model and obtain the neural network parameters with the optimal prediction accuracy. The specific method is as follows:

[0057] S31, the grid node features correspond to all the surface feature points xgeo feature encoding vectors of the flow field, such as Figure 5 As shown, they are mapped to key (K) and value (V) with high dimension as self-attention mechanism through ReLU multi-layer perceptron, and their specific expressions are as follows:

[0058] K=KeyEncoder(x geo )

[0059] V = ValueEncoder(x geo )

[0060] The feature encoding vector of the grid node feature is also mapped to a query (Q) of the same dimension as the self-attention module using a ReLU multi-layer perceptron. The specific expression is as follows:

[0061] Q = QueryEncoder(x)

[0062] S32, calculate the weighted geometric representation z of the grid node features and the object surface feature points g , which is expressed as follows:

[0063]

[0064] Where T represents transpose, d k Represents the dimension of K, which is used to scale the dot product to avoid getting too large a value;

[0065] S33, the grid node features are mapped to a high-dimensional vector z through the ReLU multi-layer perceptron, and z and z g The concatenation is sent to the implicit neural network INR (the first three layers are BatchNormal, and the last three layers have no neural network Normal operation) for decoding into the flow field physical quantity predicted by the neural network Its expression is as follows:

[0066] z=Encoder(x sampled )

[0067]

[0068] S34, using the second norm as the loss function, giving different weights to the boundary loss and the internal flow loss, the loss function Loss expression is as follows:

[0069] Loss = αSurfLoss + VolLoss

[0070]

[0071] Among them, α represents the hyperparameter, k = |x surf |,

[0072] During the sampling process, x sample There are two types of point sets: surface feature points or internal flow field nodes. One type is the sampling points with a distance geometry of 0, which is a subset of the surface feature points; the other type is the nodes of the internal flow field. In order to better train the prediction results of boundary pressure during training, different loss weights are given to the boundary and internal flow field separately.

[0073] S4. Input the feature points of the object surface, the spatial coordinate position of the flow field and calculate the geometric information, splice the incoming flow velocity and the angle of attack to predict the flow field. The specific method is as follows:

[0074] S41, discretizing the airfoil geometry into a series of point coordinates as surface feature points by generating a grid;

[0075] S42, the grid generation method is also used to discretize in space to obtain the coordinates of the flow field position points of interest;

[0076] S43, using the spatial coordinate information of the grid nodes, calculate the shortest distance to the geometric surface of the wing and the geometric normal required for the feature points of the object surface, and splice each point with a total of 7 dimensions of the wing attack angle and the relative speed of the incoming flow velocity;

[0077] S44, the object surface feature points and flow field space coordinates which are combined with geometric information, incoming flow velocity and angle of attack are input into the model to obtain the corresponding flow field structure.

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

Claims

1. A meshless airfoil flow field prediction method based on self-attention geometric coding, characterized by: The following steps are involved: S1. Preprocess the steady flow data on multiple sets of grids to obtain the geometric information of the grid nodes, and mark the points in the grid nodes that fit the geometric surface and have a geometric distance of 0 as object surface feature points; S2, selecting object surface feature points from each data field, and randomly sampling the geometric information and corresponding flow field information of some grid nodes; S3. Construct the forward process of the neural network. Based on the grid node input, different weights are assigned to the surface feature points through the attention mechanism. The surface feature points are weighted and summed to obtain geometric codes. After the geometric codes are spliced ​​with the spatial positions, they are decoded into flow field physical quantities through implicit neural expressions. After the neural network output, they are back-propagated with the true value data through the loss function to train the model and obtain the neural network parameters with the best prediction accuracy. S4. Input the surface feature points, the spatial coordinate position of the flow field and calculate the geometric information, splice the incoming flow velocity and the angle of attack to predict the flow field.

2. A meshless airfoil flow field prediction method based on self-attention geometric coding as claimed in claim 1, characterized in that: The specific method of step S1 is as follows: S11, selecting the airfoil geometry to adjust the angle of attack and the incoming flow velocity within a certain range, generating a grid and performing numerical simulation to obtain a flow field data set; S12. Cut out the key area close to the airfoil from the flow field, generate the spatial position coordinates of the grid nodes, the closest distance between the grid nodes and the wing geometric surface, and the geometric normal required for the surface feature points; each grid node coordinate is spliced ​​with the wing attack angle and the relative speed of the incoming flow velocity, the closest distance to the geometric body and the normal, a total of 7 dimensions of features, x for all node features, the machine learning supervision item is the corresponding physical quantity y, and the data set input and supervision items are Z-Scored e Standardized processing.

3. The method for predicting a meshless airfoil flow field based on self-attention geometric coding according to claim 1, characterized in that: The specific implementation method of step S2 is: Select all the surface feature points x from each flow field geo , and randomly sample n grid node features x sampled And the corresponding flow field physical quantity y sampled , which is expressed as follows: x geo ={x|Distance(x)=0} (x sampled ,and sampled )={(x,y)|RandSelect((x,y))}。 4. The method for predicting a meshless airfoil flow field based on self-attention geometric coding according to claim 1, characterized in that: The specific method of step S3 is as follows: S31. The feature encoding vectors of all surface feature points xgeo corresponding to the grid node features in the flow field are mapped to key (K) and value (V) with high dimension as the self-attention mechanism through ReLU multi-layer perceptron. The specific expressions are as follows: K = KeyEncoder(xgeo) V=ValueEncoder(x geo ) The feature encoding vector of the grid node feature is also mapped to a query (Q) of the same dimension as the self-attention module using a ReLU multi-layer perceptron. The specific expression is as follows: Q = QueryEncoder(x) S32. Calculate the weighted geometric representation of mesh node features and surface feature points Zg , which is expressed as follows: S33, the grid node features are mapped to a high-dimensional vector z through the ReLU multi-layer perceptron, and z and z g The splicing is sent to the implicit neural network INR for decoding into the flow field physical quantity predicted by the neural network Its expression is as follows: z=Encoder(x sampled ) S34, using the second norm as the loss function, giving different weights to the boundary loss and the internal flow loss, the loss function Loss expression is as follows: LoSS=αSurfLoSS+VolLoSS Among them, α represents the hyperparameter, k = |x surf |.

5. The method for predicting meshless airfoil flow field based on self-attention geometric coding according to claim 1, characterized in that: The specific method of step S4 is as follows: S41, discretizing the airfoil geometry into a series of point coordinates as surface feature points by generating a grid; S42, the grid generation method is also used to discretize in space to obtain the coordinates of the flow field position points of interest; S43, using the spatial coordinate information of the grid nodes, calculate the shortest distance to the geometric surface of the wing and the geometric normal required for the feature points of the object surface, and splice each point with a total of 7 dimensions of the wing attack angle and the relative speed of the incoming flow velocity; S44, the object surface feature points and flow field space coordinates which are combined with geometric information, incoming flow velocity and angle of attack are input into the model to obtain the corresponding flow field structure.

Citation Information

Cited By

  • Wing flow field analysis method based on embedded physical information implicit flow neural network

    CN119830785A

  • Method for analyzing flow field of wing based on embedded physical information implicit flow neural network

    CN119830785B

  • System simulation modeling method based on combination of neural potential field model and physical constraint

    CN120724879A

  • A system simulation modeling method based on a neural potential field model combined with physical constraints

    CN120724879B

  • Airfoil flow field prediction method and system based on spectral domain residual error perception neural network

    CN121389342A