Deep learning-based airfoil flow field rapid prediction method
Technical Field
The invention relates to the field of computational fluid mechanics and the field of artificial intelligence, in particular to a method for quickly predicting an airfoil flow field based on deep learning.
Background
The airfoil optimization design usually selects the same series of airfoils derived from a reference airfoil. The wing profile optimization design method is mainly developed from early wind tunnel experiments to Computational Fluid Dynamics (CFD), so that the design period is greatly shortened, but the wing profile optimization process based on the CFD technology has a large number of flow field calculation problems and needs to consume a large amount of calculation time and resources. The airfoil flow field as a system has the characteristics of the airfoil flow field, and the repeated CFD calculation ignores the characteristics, so that the efficiency is reduced. The deep learning has strong learning ability on high-order complex functions, has unique advantages in the aspect of feature extraction, and can carry out rapid and accurate prediction. A multilayer perceptron (MLP) model is built by utilizing a deep learning technology, and the model is applied to prediction of a wing-shaped flow field, so that time cost and resource consumption can be greatly reduced, and the method is a new idea which is feasible and has wide application prospect.
Disclosure of Invention
In order to solve the problem of large amount of flow field calculation in the process of optimizing the airfoil profile under the same reference airfoil profile, the invention provides a method for quickly predicting the airfoil profile flow field based on deep learning. The method can highly extract the characteristics of the airfoil flow field, realize the rapid and accurate prediction of the airfoil flow field, and greatly reduce the consumption of calculation time and resources.
The technical scheme of the invention is as follows:
the method for quickly predicting the airfoil flow field based on deep learning comprises the following steps:
step 1: generating a sample data set required by building a neural network;
step 2: building and training a deep learning neural network model based on the sample data set;
and step 3: and the built deep neural network is used for quickly predicting the airfoil flow field.
Further, the step 1 of generating the sample data set required for building the neural network comprises the following steps:
step 1.1: parameterizing the reference airfoil profile, and superposing disturbance on the reference airfoil profile to obtain a new airfoil profile to obtain a series of airfoil profile samples;
step 1.2: generating an airfoil computational grid; mapping the grid from the physical space to a computational space by coordinate transformation; carrying out CFD numerical simulation on the airfoil sample obtained in the step 1.1 to obtain flow field parameters of the airfoil sample; and intercepting airfoil and flow field parameters in the grid area with obvious airfoil near-field flow parameter change as a sample data set of each airfoil sample for training and testing a neural network model.
Further, in step 1.1, parameterizing the reference airfoil profile by adopting a class shape function transformation method, and superposing and disturbing the CST equation design parameters of the reference airfoil profile by adopting a CST disturbance method to derive a new airfoil profile to obtain a series of airfoil profile samples.
Further, in step 1.2, an elliptic partial differential equation is adopted to generate an airfoil computational grid; mapping the grid from a physical space to a computing space which is a uniform rectangular grid in a plane through coordinate transformation; and intercepting the parameters of the airfoil and the flow field in the circular grid area with the geometric centroid of the airfoil as the center of a circle and the chord length of the airfoil as the radius as a sample data set of each airfoil sample for training and testing a neural network model.
Further, in step 2, building and training a deep learning neural network model based on the sample data set comprises the following steps:
step 2.1: building a deep learning neural network model by adopting a multilayer perceptron neural network, taking the airfoil parameter vectors in the sample data set obtained in the step 1 and the coordinates of the grid points in a calculation space as input, and outputting the input as flow field parameters of the grid points;
step 2.2: training a deep learning neural network: and (3) taking the root mean square error of the flow field parameters as a loss function, and performing iterative optimization on the neural network by using an Adam optimization algorithm, wherein the optimization target is the minimum loss function until the loss function of the training sample data set is not reduced any more, and completing training.
Further, in step 1.1, the upper and lower edge surfaces of the airfoil are respectively fitted by using a 9-order function, 20 design parameters are used for describing the airfoil, the disturbance range of each design parameter is +/-0.1, and 1000 airfoils are extracted in a design space by adopting a Latin hypercube sampling method to serve as airfoil samples.
Further, in step 2.1, the input layer contains 22 parameters, which are the coordinates (xi, η, P) of the airfoil parameter vector and the grid point obtained in step 1 in the calculation space1,P2,...,P20) Where (ξ, η) are the coordinates of the grid point in the computation space, (P)1,P2,...,P20) Is an airfoil parameter vector.
Further, in step 2.1, the hidden layer comprises 8 layers, and the number of neurons is 200, 400, 800, 400, respectively.
Further, in step 2.1, the output layer contains 3 neurons, and outputs flow field parameters (P, u, v) of grid points, where P denotes pressure, u is a velocity component in the x direction, and v is a velocity component in the z direction.
Advantageous effects
Compared with the prior art, the invention has the following advantages:
1. the invention only intercepts the grids with obvious airfoil profile near-field flow parameter change for training and testing the neural network model, and compared with the prior art, the invention can reduce the data point number and time consumption as much as possible and improve the efficiency while ensuring the accuracy of flow field characteristic extraction and flow field parameter prediction.
2. Compared with the prior art, the multilayer perceptron (MLP) neural network model built by the invention can depict more complex nonlinear relations, improve the resolution of the characteristics of the airfoil flow field and contribute to the accurate identification of the characteristics of the flow field.
3. The invention aims to provide a series of wing profile structures derived from the same reference wing profile and a training neural network with high pertinence, so that the same series of wing profile flow fields can be quickly and accurately predicted.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a sample set of airfoils.
FIG. 2 is an airfoil computational grid.
Fig. 3 is a coordinate transformation. (a) Is a physical space, and (b) is a computational space.
FIG. 4 is a diagram of a deep learning model.
Fig. 5 shows the result of flow field prediction for the airfoil No. 487 training case. (a) A pressure calculated for the CFD, (b) a pressure predicted for the deep learning model, (c) an error in the pressure predicted for the deep learning model, (d) an x-direction velocity component calculated for the CFD, (e) an x-direction velocity component predicted for the deep learning model, (f) an error in the x-direction velocity component predicted for the deep learning model, (g) a z-direction velocity component calculated for the CFD, (h) a z-direction velocity component predicted for the deep learning model, and (i) an error in the z-direction velocity component predicted for the deep learning model.
Fig. 6 shows the flow field prediction results for test case No. 38 airfoil. (a) A pressure calculated for the CFD, (b) a pressure predicted for the deep learning model, (c) an error in the pressure predicted for the deep learning model, (d) an x-direction velocity component calculated for the CFD, (e) an x-direction velocity component predicted for the deep learning model, (f) an error in the x-direction velocity component predicted for the deep learning model, (g) a z-direction velocity component calculated for the CFD, (h) a z-direction velocity component predicted for the deep learning model, and (i) an error in the z-direction velocity component predicted for the deep learning model.
Detailed Description
The following detailed description of embodiments of the invention is intended to be illustrative, and not to be construed as limiting the invention.
The method for quickly predicting the airfoil flow field based on deep learning in the embodiment comprises the following steps: generating a sample data set; building a deep learning neural network model based on the data set; and the built deep neural network is used for quickly predicting the airfoil flow field. The method comprises the following specific steps:
step 1: generating a sample data set required for building a neural network:
1) in the embodiment, a Rae2822 airfoil is used as a reference airfoil, a class shape function transformation (CST) method is used for parameterizing the reference airfoil, 9-order function fitting is respectively used for the upper and lower edge surfaces of the airfoil, namely 20 design parameters are used for describing the airfoil, the disturbance range of each design parameter is +/-0.1, and 1000 airfoils are extracted in a design space by a latin hypercube sampling method to serve as an airfoil sample set, as shown in fig. 1. And (3) numbering the wing profiles of the sample set, wherein the wing profiles numbered from 1 to 800 are used as a training set, and the wing profiles numbered from 801 and 1000 are used as a verification set.
2) An airfoil computational grid is generated using elliptical partial differential equations, as shown in FIG. 2.
3) The grid is mapped from physical space to a computational space that is a uniform rectangular grid in the plane by coordinate transformation, as shown in fig. 3.
4) Numerical simulation is carried out on the airfoil sample by adopting an open source solver NASA CFL3D, and a series of flow field parameters of the sample set are obtained. The calculation conditions in this embodiment are: re ═ 6.5X 106,Ma=0.73,T∞460 ° R, α 4 °, boundary layer first layer height 4 × 10-6,y+Is less than 1. Intercepting a grid with obvious changes of airfoil near-field flow parameters, and taking a circular grid region with an airfoil geometric centroid as a circle center and an airfoil chord length as a radius for training and testing a neural network model; the final truncated grid size is 292 × 77 (circumferential × radial).
Step 2: building a deep learning neural network model:
1) whole deep learning neural netThe neural network adopts a multilayer perceptron (MLP) neural network, and comprises an input layer, a hidden layer and an output layer. The input layer contains 22 parameters, and coordinates (xi, eta, P) of the airfoil parameter vector and the grid point obtained in the step 1 in a calculation space1,P2,...,P20) Where (ξ, η) are the coordinates of the grid point in the computation space, (P)1,P2,...,P20) Designing parameters for the airfoil profile; the hidden layer comprises 8 layers, and the number of the neurons is respectively 200, 400, 800 and 400; the output layer contains 3 neurons and outputs flow field parameters (P, u, v) at grid points, where P represents pressure, u is the x-direction velocity component, and v is the z-direction velocity component. The model schematic is shown in fig. 4.
2) Training a deep learning neural network, taking the root mean square error of flow field parameters as a loss function, and performing iterative optimization on the neural network by using an Adam optimization algorithm, wherein the optimization target is the minimum loss function, the initial learning rate is set to be 1 multiplied by 10-3And finishing training until the loss function of the training set is not reduced any more.
And step 3: fast prediction of an airfoil flow field:
and testing the trained neural network model by adopting the data of the training set and the verification set, and if the test is successful, quickly predicting the airfoil flow field. The flow field prediction results of the airfoils of training case 487 and test case 38 are shown in fig. 5 and 6.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention.