A flow field prediction method based on multi-view generative discriminative learning
Through the multi-view generative discriminant learning method, combined with the Mask algorithm and the subcomponent analysis algorithm, the generator and discriminator are optimized, and the existing flow field prediction methods are solved in the shortcomings in high-dimensional aerodynamic performance and generalization, and more accurate and more universal flow field prediction.
Patent Information
- Application Number
- CN202410350721.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-03-26
AI Technical Summary
Existing flow field prediction methods can only calculate low-dimensional aerodynamic performance, and cannot provide flow field prediction under high-dimensional aerodynamic performance. Insufficient training samples and single-view learning lead to low generalization of the model.
Using a method based on multi-view generative discriminant learning, vectors of different views are generated through the Mask algorithm, combined with the subcomponent analysis algorithm for dimensionality reduction, and iterative optimization is used for generators and discriminators to generate more accurate flow field prediction results.
It improves the expression and generalization ability of the model, can predict supercritical, transsound flow fields more accurately, and reduces the bias impact of a single view data source, reducing the risk of overfitting.
Smart Images

Figure CN118378560B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of flow field prediction combining artificial intelligence and computational fluid dynamics, and more specifically, relates to a flow field prediction method based on multi-view generative discriminant learning. Background Art
[0002] Accurately simulating and predicting flow fields such as water flow, air flow, and ocean flow can help study and protect ecosystems and predict natural disasters such as floods and storm surges. By simulating and predicting flow fields, the design of buildings, vehicles, aircraft, etc. can be optimized, and the combustion process, cooling system, aerodynamic performance, etc. can be improved. Flow field prediction can be used to evaluate the safety of engineering structures, including the pressure distribution of airflow around buildings, the impact of wind loads on structures, etc.; it is also very important for turbulent phenomena, vortex structures, heat transfer processes, etc. in fluids. In the field of aerospace, flow field prediction is used to optimize the design and performance of aircraft, taking into account aerodynamic effects, wind resistance, and aerodynamic stability. Therefore, efficient and accurate acquisition of aerodynamic performance is of great significance to many areas of human research.
[0003] Aerodynamic performance is obtained through wind tunnel experiments or computational fluid dynamics (CFD) methods, but the results of wind tunnel experiments rely on the designer's prior knowledge, and only part of the aerodynamic characteristics are taken into account in the experiment. Computational fluid dynamics (CFD) is time-consuming and costly. At present, most machine learning models are "shallow" models, which can only fit a small subset in the original function space and have limited fitting of the entire complex function space. For data far away from the training data, "shallow" models lack generalization. During the training process, a large amount of data is usually required to enhance the generalization ability of the model for complex problems. In recent years, models trained in a deep way have performed well in the accurate prediction of flow fields, but this method depends on the ability to learn high-capacity models from large-scale data. Due to the high cost of CFD simulation, it is usually impossible to obtain enough training samples to cover the flow field prediction of all conditions. Insufficient training samples may reduce the generalization of the prediction. Generative adversarial networks (GANs) are used to increase test samples so that the model can be generalized to the flow field prediction of unseen conditions.
[0004] The flow field predicted by general generative adversarial networks (GANs) is represented by a generated low-resolution contour image rather than a pixel image with physical variables. This image can hardly describe areas with drastic changes such as boundary layers or shock waves, so the flow field is slightly different from the real data and cannot provide accurate predictions of supercritical and transonic flow fields. In addition, most of the model training of existing methods is single-view learning, and the generalization is insufficient. In general, existing flow field prediction methods have some common limitations: they can only predict low-dimensional aerodynamic performance, cannot provide accurate predictions of supercritical and transonic flow fields, have insufficient training samples, and are single-view learning, with low generalization. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a flow field prediction method based on multi-view generative discriminative learning, which solves the problems that the existing flow field prediction methods can only calculate low-dimensional aerodynamic performance, cannot provide flow field prediction under high-dimensional aerodynamic performance and in areas of drastic changes such as boundary layers or shock waves, and that training samples are insufficient and single-view learning leads to low generalization of the training model.
[0006] In order to solve the above technical problems, the present invention is implemented in the following ways:
[0007] A flow field prediction method based on multi-view generative discriminative learning includes the following steps:
[0008] S1, obtaining flow field data set;
[0009] S2, use the Mask algorithm to obtain vectors of different views from the dataset vectors;
[0010] S3, inputting the characteristic data in the form of flow field vector, and then using the subcomponent analysis algorithm to obtain the characteristic vector after dimension reduction;
[0011] S4, inputting the coupling result of the above vector into the generator to generate the result, and obtaining the characteristic vector of the flow field structure diagram;
[0012] S5, performing CFD software simulation on the coupling results of the above vectors to obtain another flow field structure diagram, and using an image feature extractor to obtain its feature vector;
[0013] S6, inputting the feature vector of the flow field structure diagram into the discriminator, calculating the loss value, and optimizing the generator and the discriminator through the loss value;
[0014] S7, repeat steps S3-S6, iteratively optimize the model until convergence;
[0015] S8. Input test data, and use the optimized model to execute steps S3-S4 to obtain output as the flow field prediction result.
[0016] Furthermore, the flow field data set in step S1 is parameterized data, wherein the parameters are the thickness distribution parameter, leading edge shape parameter, camber distribution parameter, trailing edge shape parameter, lift line camber parameter, angle of attack, surface roughness and Rayleigh number of the airfoil; the above parameters are represented as a 14-dimensional vector Y 1 , which is expressed as follows:
[0017]
[0018] Here, n represents the number of samples.
[0019] Furthermore, the specific method of step S2 is as follows:
[0020] Randomly generate two vectors M 1 and M 2 , which is expressed as follows:
[0021]
[0022] M 1 and M 2 The element values in are all 0 or 1; use M 1 and M 2 Vector Y 1 Perform the Mask algorithm to obtain the multi-view vector Y 2 and Y 3 , which is expressed as follows:
[0023]
[0024] Furthermore, in step S3, the characteristic data F of the flow field is input, and the subcomponent analysis algorithm is used to reduce the dimension of F to obtain Y 4 , the above vector expression is as follows:
[0025]
[0026] Among them, m represents the number of selected input features;
[0027] The specific steps of the subcomponent analysis algorithm are as follows:
[0028] 1) Decentralization: Subtract the average value of all elements in each row from the elements in each row of feature data F. Then, each element f in feature data F ij The calculation formula is as follows:
[0029]
[0030] Among them, f ij Represents the elements before the feature data is decentralized. Represents decentralized elements;
[0031] 2) Calculate the covariance matrix FF T
[0032] 3) Find the eigenvalues and eigenvectors of the covariance matrix, sort the eigenvalues from small to large, and find the eigenvector corresponding to the smallest eigenvalue
[0033] 4) After dimensionality reduction, we get vector Y 4 =P T F.
[0034] Furthermore, the step S4 is to convert the vector Y 4 Add to Y as a row vector 1 , Y 2 and Y 3 In the coupling, Y 14 , Y 24 and Y 34 , its specific expression is as follows:
[0035]
[0036] The vectors formed by coupling are input into the generator G respectively, and the characteristic vectors of a flow field structure diagram (in the form of three pictures) are obtained as follows:
[0037] G(Y 14 ), G(Y 24 ), G(Y 34 )
[0038] Among them, the generator G contains 7 deconvolution layers, the kernel size of each deconvolution layer is 3×3, the number of kernels is set to 512, and the generator G realizes the transformation from the airfoil to the corresponding flow field image.
[0039] Furthermore, the specific method of step S5 is as follows:
[0040] Perform CFD simulation on the coupling result in step S4 to obtain another flow field structure diagram, and then use the image feature extractor to extract the other flow field structure diagram to obtain the feature vector as follows:
[0041] X 14 , X 24 , X 34
[0042] Furthermore, the specific method of step S6 is as follows:
[0043] The objective function expression of the model is as follows:
[0044]
[0045] Among them, P data represents the potential distribution of real data X, θ represents the parameters of the network, Y represents the input vector, D(X) represents the output obtained by input X, and G(Y) represents the output obtained by input Y;
[0046] The loss function expressions of the generator G and the discriminator D are as follows:
[0047]
[0048]
[0049] Among them, X represents the feature vector of the flow field structure diagram simulated by CFD, M and N represent the length and height of the image respectively, the first term of the generator loss function represents the cross entropy between the generated image and the real image distribution, the second term represents the mean absolute error over the entire image, λ represents the hyperparameter, P r (X, Y) represents the joint distribution of X and Y, G(Y)|Y represents the combined input of G(Y) and Y, and X|Y represents the combined input of X and Y;
[0050] The loss value is calculated through the loss function of the above model, and the Adam optimizer is used to optimize the generator and discriminator. The specific expression is as follows:
[0051]
[0052]
[0053] in, Represents the optimized parameters of the generator, Represents the optimized parameters of the discriminator, and AdamOptimizer represents the reverse gradient optimizer.
[0054] Furthermore, the specific method of step S8 is as follows:
[0055] Enter test data and flow field characteristic data Using the subcomponent analysis algorithm, F test Dimensionality reduction Y * Add to Y as a row vector test Medium coupling formation The Y formed by the coupling 1 Input into the generator G and get the output G(Y 1 ), G(Y 1 ) is the flow field prediction result.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] The generative adversarial network of the present invention increases test data so that the model can be generalized to flow field predictions under unseen conditions; by fusing the features of different views, comprehensive information is provided to improve the expressiveness and generalization capabilities of the model, while using multiple views to reduce the bias impact of a single view data source, reduce overfitting, and provide more accurate prediction capabilities. The representative features of the flow field of the additional input test data of this application improve the prediction accuracy of the model in supercritical and transonic flow fields, and the use of the secondary component analysis algorithm (MCA) to compress the data dimension can improve the computational efficiency and ensure that the model learns the features of the test data. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a schematic diagram of the flow chart of the flow field prediction method of the present invention. DETAILED DESCRIPTION
[0059] The specific implementation of the present invention is further described in detail below with reference to the accompanying drawings and specific examples.
[0060] like Figure 1 As shown, a flow field prediction method based on multi-view generative discriminative learning includes the following steps:
[0061] S1, obtaining flow field data set;
[0062] S2, use the Mask algorithm to obtain vectors of different views from the dataset vectors;
[0063] S3, inputting the characteristic data in the form of flow field vector, and then using the subcomponent analysis algorithm to obtain the reduced dimension characteristic vector;
[0064] S4, inputting the coupling result of the above vector into the generator to generate the result, and obtaining the characteristic vector of the flow field structure diagram;
[0065] S5, performing CFD software simulation on the coupling results of the above vectors to obtain another flow field structure diagram, and using an image feature extractor to obtain its feature vector;
[0066] S6, inputting the feature vector of the flow field structure diagram into the discriminator, calculating the loss value, and optimizing the generator and the discriminator through the loss value;
[0067] S7, repeat steps S3-S6, iteratively optimize the model until convergence;
[0068] S8. Input test data, and use the optimized model to execute steps S3-S4 to obtain output as the flow field prediction result.
[0069] Further, the flow field data set in step S1 is parameterized data, wherein the parameters are thickness distribution parameters, leading edge shape parameters, camber distribution parameters, trailing edge shape parameters, lift line camber parameters, angle of attack, surface roughness and Rayleigh number of the airfoil;
[0070] The airfoil thickness distribution describes the thickness variation of the airfoil along the chord length direction, the airfoil leading edge shape describes the geometry of the airfoil leading edge, the airfoil camber distribution describes the curvature of the airfoil on the lift line, the airfoil trailing edge shape describes the geometry of the airfoil trailing edge, the lift line shape describes the geometry of the lift line of the airfoil, the angle of attack is the angle of the airfoil relative to the incoming flow direction, the airfoil surface roughness describes the smoothness of the airfoil surface, and the Reynolds number represents the relative importance of the inertial force and viscous force of the fluid in the calculation of the aerodynamic performance of the airfoil.
[0071] The above parameters are expressed as a 14-dimensional vector Y 1 , which is expressed as follows:
[0072]
[0073] Here, n represents the number of samples.
[0074] Furthermore, the specific method of step S2 is as follows:
[0075] Due to the lack of actual samples, the mask algorithm is used to generate vectors to simulate multiple views. The specific steps are: randomly generate two vectors M 1 and M 2 , which is expressed as follows:
[0076]
[0077] M 1 and M 2 The element values in are all 0 or 1; use M 1 and M 2 Vector Y 1 Perform the Mask algorithm to obtain the multi-view vector Y 2 and Y 3 , which is expressed as follows:
[0078]
[0079] Furthermore, in step S3, the characteristic data F of the flow field is input, and the secondary component analysis algorithm (MCA) is used to reduce the dimension of F to obtain Y 4 , the above vector expression is as follows:
[0080]
[0081] Among them, m represents the number of selected input features;
[0082] The specific steps of the subcomponent analysis algorithm are as follows:
[0083] 1) Decentralization: Subtract the average value of all elements in each row from the elements in each row of feature data F. Then, each element f in feature data F ij The calculation formula is as follows:
[0084]
[0085] Among them, f ij Represents the elements before the feature data is decentralized. Represents decentralized elements;
[0086] 2) Calculate the covariance matrix FF T
[0087] 3) Find the eigenvalues and eigenvectors of the covariance matrix, sort the eigenvalues from small to large, and find the eigenvector corresponding to the smallest eigenvalue
[0088] 4) After dimensionality reduction, we get vector Y 4 =P T F.
[0089] Furthermore, the step S4 is to convert the vector Y 4 Add to Y as a row vector 1 , Y 2 and Y 3 In the coupling, Y 14 , Y 24 and Y 34 , its specific expression is as follows:
[0090]
[0091] The vectors formed by coupling are input into the generator G respectively, and the characteristic vectors of a flow field structure diagram (in the form of three pictures) are obtained as follows:
[0092] G(Y 14 ), G(Y 24 ), G(Y 34 )
[0093] Among them, the generator G contains 7 deconvolution layers, no pooling layers and fully connected layers, the kernel size of each deconvolution layer is 3×3, the number of kernels is set to 512, and the generator G realizes the transformation from the airfoil to the corresponding flow field image.
[0094] Furthermore, the specific method of step S5 is as follows:
[0095] Perform CFD simulation on the coupling result in step S4 to obtain another flow field structure diagram (three flow field structure simulation diagrams), and then use the image feature extractor to extract the other flow field structure diagram. The feature extractor can use pre-trained RestNet, VGG model, etc. to obtain the feature vector as follows:
[0096] X 14 , X 24 , X 34
[0097] Furthermore, the specific method of step S6 is as follows:
[0098] The objective function expression of the model is as follows:
[0099]
[0100] Among them, P datarepresents the potential distribution of the real data X, θ represents the parameters of the network, Y represents the input vector, D represents the discriminator, D(X) represents the output obtained by taking X as input, G represents the generator, and G(Y) represents the output obtained by taking Y as input;
[0101] The loss function expressions of the generator G and the discriminator D are as follows:
[0102]
[0103]
[0104] Where X represents the feature vector of the flow field structure diagram simulated by CFD, M and N represent the length and height of the image respectively, the first term of the generator loss function represents the cross entropy between the generated image and the real image distribution, the second term represents the mean absolute error over the entire image, λ represents the hyperparameter that balances the cross entropy and the mean absolute error over the entire image, and P r (X, Y) represents the joint distribution of X and Y, G(Y)|Y represents the combined input of G(Y) and Y, and X|Y represents the combined input of X and Y;
[0105] The loss value is calculated through the loss function of the above model, and the Adam optimizer is used to optimize the generator and discriminator. The specific expression is as follows:
[0106]
[0107]
[0108] in, Represents the optimized parameters of the generator, Represents the optimized parameters of the discriminator, and AdamOptimizer represents the reverse gradient optimizer.
[0109] Furthermore, the specific method of step S8 is as follows:
[0110] Enter test data and flow field characteristic data Using the subcomponent analysis algorithm, F test Dimensionality reduction Y * Add to Y as a row vector test Medium coupling formation The Y formed by the coupling 1 Input into the generator G and get the output G(Y 1 ), G(Y 1 ) is the flow field prediction result.
[0111] 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 flow field prediction method based on multi-view generative discriminative learning, characterized by: The following steps are involved: S1, obtaining flow field data set; S2, use the Mask algorithm to obtain vectors of different views from the dataset vectors; S3, inputting the characteristic data in the form of flow field vector, and then using the subcomponent analysis algorithm to obtain the characteristic vector after dimension reduction; S4, the vectors obtained in step S2 and S3 are coupled, and the coupling result is input into the generator for result generation to obtain a characteristic vector of a flow field structure diagram; S5. Simulate the coupling results with CFD software to obtain another flow field structure diagram, and use the image feature extractor to obtain Its eigenvector; S6, inputting the feature vector of the flow field structure diagram obtained in steps S4 and S5 into the discriminator, calculating the loss value, and optimizing the generator and the discriminator through the loss value; S7, repeat steps S3-S6, iteratively optimize the model until convergence; S8. Input test data, and use the optimized model to execute steps S3-S4 to obtain output as the flow field prediction result.
2. According to claim 1, a flow field prediction method based on multi-view generative discriminative learning is characterized by: The flow field data set in step S1 is parameterized data, wherein the parameters are the thickness distribution parameter, leading edge shape parameter, camber distribution parameter, trailing edge shape parameter, lift line camber parameter, angle of attack, surface roughness and Rayleigh number of the airfoil; the above parameters are expressed as a 14-dimensional vector Y1, and the expression is as follows: Here, n represents the number of samples.
3. The flow field prediction method based on multi-view generative discriminative learning according to claim 2 is characterized by: The specific method of step S2 is as follows: Randomly generate two vectors M1 and M2, whose expressions are as follows: The element values in M1 and M2 are all 0 or 1; use M1 and M2 to perform the Mask algorithm on vector Y1 to obtain multi-view vectors Y2 and Y3, whose expressions are as follows:
4. The flow field prediction method based on multi-view generative discriminative learning according to claim 3 is characterized by: In step S3, the characteristic data F of the flow field is input, and the subcomponent analysis algorithm is used to reduce the dimension of F to obtain Y4. The above vector expression is as follows: Among them, m represents the number of selected input features; The specific steps of the subcomponent analysis algorithm are as follows: 1) Decentralization: Subtract the average value of all elements in each row from the elements in each row of the feature data F, then each element f in the feature data F ij The calculation formula is as follows: Among them, f ij Represents the elements before the feature data is decentralized. Represents decentralized elements; 2) Calculate the covariance matrix FF T 3) Find the eigenvalues and eigenvectors of the covariance matrix, sort the eigenvalues from small to large, and find the eigenvector corresponding to the smallest eigenvalue 4) After dimensionality reduction, we get vector Y4=P T F.
5. The flow field prediction method based on multi-view generative discriminative learning according to claim 4 is characterized in that: The step S4 is to add the vector Y4 as a row vector to Y1, Y2 and Y3 to form Y 14 , Y 24 and Y 34 , its specific expression is as follows: The vectors formed by coupling are input into the generator G respectively, and then the characteristic vectors of a flow field structure diagram are obtained as follows: G(Y 14 ),G(Y 24 ),G(Y 34 ) Among them, the generator G contains 7 deconvolution layers, the kernel size of each deconvolution layer is 3×3, the number of kernels is set to 512, and the generator G realizes the transformation from the airfoil to the corresponding flow field image.
6. The flow field prediction method based on multi-view generative discriminative learning according to claim 5, characterized in that: The specific method of step S5 is as follows: Perform CFD simulation on the coupling result in step S4 to obtain another flow field structure diagram, and then use the image feature extractor to extract the other flow field structure diagram to obtain the feature vector as follows: X 14 ,X 24 ,X 34 。 7. The flow field prediction method based on multi-view generative discriminative learning according to claim 1, characterized in that: The specific method of step S6 is as follows: The objective function expression of the model is as follows: Among them, P data represents the potential distribution of X, X represents the characteristic vector of the flow field structure diagram simulated by CFD, θ G ,θ D Denote the learnable parameters in the generator G and the discriminator D respectively, Y denotes the input vector, D(X) denotes the output obtained after inputting X into the discriminator D, and G(Y) denotes the output obtained after inputting Y into the generator G; The loss function expressions of the generator G and the discriminator D are as follows: Where M and N represent the length and height of the image, respectively, λ represents a hyperparameter, and P r (X, Y) represents the joint distribution of X and Y, G(Y)|Y represents the combined input of G(Y) and Y, and X|Y represents the combined input of X and Y; The loss value is calculated through the loss function of the above model, and the Adam optimizer is used to optimize the generator and discriminator. The specific expression is as follows: in, Represents the optimized parameters of the generator, Represents the optimized parameters of the discriminator, and AdamOptimizer represents the reverse gradient optimizer.
8. The flow field prediction method based on multi-view generative discriminative learning according to claim 1, characterized in that: The specific method of step S8 is as follows: Enter test data and flow field characteristic data Using the subcomponent analysis algorithm, F test Dimensionality reduction Y * Add to Y as a row vector test Medium coupling formation The Y formed by the coupling 1 Input into the generator G to obtain the flow field prediction result G(Y 1 ).
Citation Information
Patent Citations
Intra-channel flow field reconstruction method based on structured grid
CN110348059A
Analysis method for predicting high-precision airfoil flow field
CN115438575A