Flow field prediction of S-shaped shock vectoring nozzle with rear deck based on deep learning

The S-shaped shock wave vectoring nozzle with afterdeck can significantly improve the overall performance of the exhaust system, taking into account Thrust vectoring, infrared stealth and afterbody fusion. One of the technical difficulties in its design process lies in the complex flow field characteristics under different operating conditions. Currently, the mainstream method is to obtain nozzle flow field characteristics through CFD numerical simulation, but the CFD method is time-consuming and costly. Therefore, based on the depth learning principle, a depth Convolutional neural network based on U-NET framework is established to quickly predict the flow field of S-shaped shock wave vectoring nozzle with afterdeck. Using CFD data for training, the results show that the depth learning model has high prediction accuracy and can clearly predict the flow field characteristics inside the nozzle, especially the secondary flow and the complex wave structure near the afterdeck. The correction Coefficient of determination of the prediction model is greater than 0.97. And the time consumption is about 0.0689% of that of a conventional solver. It has good application prospects in quickly evaluating the flow field of S-shaped nozzles.


Introduction
With the continuous development of modern aviation technology, advanced fighter jets require exhaust systems with characteristics such as large maneuverability, high-speed range, and strong stealth, in order to ensure that fighter jets have the advantage of aerial combat and improve their survival ability in combat [1][2].Therefore, the design concept of aircraft engine exhaust system that comprehensively considers thrust vector and stealth (TVS) is gradually becoming a new trend in development [3].This has been fully demonstrated on the most advanced fighter/drone F-22, X-47B/C, and RQ-180 in the United States.However, for the next generation of high-speed stealth bombers and Blended wing body UAVs, the use of traditional mechanical vectors has many disadvantages, such as complex structure, large number of actuator parts in thermal environment, heavy weight, poor sealing performance, etc., which brings increasingly prominent adverse effects [4].The pneumatic vector Thompson [22] modified the solution of the Euler equation by using learning projection instead of pressure projection to generate a fast and non divergent flow field.
However, the application research of existing deep learning techniques in flow field prediction mainly focuses on geometric configurations with simple flow fields, including irregular rectangles, circles, and airfoils.The flow field does not have particularly complex wave systems, and the flow field is mostly subsonic, which can achieve good prediction results.However, in actual aerodynamic design, predictions of transonic or even supersonic flow fields are often encountered.For the tail nozzle of an aircraft, the gas flow is supersonic, and there are complex situations where strong cross-sections such as shock waves and various wave systems intersect in the flow field, and the flow field is very sensitive to geometry.In response to this issue, this article proposes a deep learning based method for predicting the flow field of S-shaped nozzles with a rear deck, drawing on the existing U-Net convolutional neural network framework.Input aerodynamic and geometric parameters of the nozzle, and perform deep neural network operations to obtain flow field data of the S-shaped nozzle.Verified the predictive accuracy of deep learning in complex flows.And using this method, the rationality of nozzle parameter selection can be quickly selected and evaluated through the flow field in the initial design stage, and a good range of aerodynamic/geometric parameter selection for nozzle flow field can be determined.It can reduce the extensive use of CFD calculations in the early stages of design, which consumes a lot of time.Through deep learning prediction, a reasonable parameter range was selected first, followed by subsequent refined CFD simulations.This improves design efficiency.

Flow field prediction model
At present, the calculation of the flow field of S-shaped nozzle is mainly obtained through numerical simulation.First, the nozzle and the far field need to be meshed, and then it is imported into the CFD solver for solution settings.The continuity equation, momentum equation, and energy equation are solved continuously and iteratively to obtain the flow field.The flow field prediction model used in this paper is a surrogate model, which is trained by existing data to obtain appropriate model parameters and predict the nozzle flow field with unknown parameters.The advantage of this method is that it can effectively save a lot of time required for grid partitioning and numerical iteration calculations.And the model has high accuracy.The flow field prediction model process is shown in Figure 1.

Figure 1. Flow Field Prediction Model.
The flow field prediction model in this paper is a supervised learning model, which is trained by inputting a labeled data set.Its core is a back-propagation algorithm: the input parameters are propagated forward through the calculation of the neural network, the predicted values of the label and the output layer are compared, the error is calculated according to the defined loss function, and the gradient of the learning parameters in the network is back-propagated layer by layer, The network automatically adjusts parameters based on gradients.By iterating parameter updates repeatedly, the mapping relationship between the S-shaped shock vector nozzle with different parameters and the flow field with a rear deck is established.

Convolutional neural networks
Convolution neural network (CNN) is a kind of feedforward neural network with convolution computation and deep structure, which is one of the representative algorithms of deep learning.Due to the ability of convolutional neural networks to consider the spatial correlation of data, thus mining data features.Therefore, it is widely used in computer vision, natural language processing and other fields [23][24][25].

Convolutional layer.
Convolutional layers play an important role in CNN.This layer is composed of several learnable convolutional units, namely the kernel.The function of the convolutional layer is to perform convolution operations on the input data by sliding the kernel at certain intervals to extract different features of the input.Initially, the convolutional layer may only be able to extract low-level features, but as the number of convolutional layers increases, it can iteratively extract more complex features from low-level features.Each convolutional layer has many kernels, and each kernel has an independent scalar product.Each kernel performs convolution operations with input parameters, adds them with bias, and overlays them on the depth dimension through nonlinear activation units.The output result serves as the input for the next layer of convolution, as shown in Figure 2. Its mathematical expression is Where Yi,j are the output, f (•) is the activation function, I is the input, w is the kernel weight, and the kernel size is l1×l2.b is offset.The size of the kernel affects the scale of feature extraction, and its quantity affects the amount of feature extraction, usually determined by specific input features and experience.

Batch normalization layer.
Batch Normalization was proposed by Loffe and Szegedy in 2015 and has been widely used in deep learning [26].Its purpose is to standardize the batch output of the middle layer of the neural network, making it meet the data distribution of mean 0 and variance 1, thereby making the output of the middle layer more stable.The mathematical formula for the batch processing layer is as follows.
Where B is the input batch data and γ, β is the training parameter.The specific operation first calculates the meanand varianceof 2 the input data, then normalizes each data in the input data using the mean and variance, and finally multipliesand γ adds β each data in the input data to restore the normalized features.
The essence of neural network learning is to learn the distribution of data.If the distribution of training data and test data is consistent, then the trained network can achieve good results in the test set.The batch normalization layer can ensure that each batch of data input to the neural network has the same distribution, and the neural network does not need to adapt to different data distributions during training, thereby accelerating network training and convergence speed.At the same time, the batch processing layer can also effectively inhibit the gradient explosion and gradient disappearance.The batch processing layer can make the sample have a certain gradient when passing through the activation function before the activation function, so as to avoid the value being too large and entering the saturation zone, resulting in very small gradient, which is not conducive to gradient decline.

Network structure and configuration
According to the existing applications of deep learning in flow field prediction, it can be seen that convolutional neural networks have good performance in flow field prediction, especially the U-Net network architecture, which has been proven to be effective in mapping geometric shapes to velocity and pressure fields [18-20] .So the network of the flow field prediction model in this article is based on the U-Net structure, and the convolutional neural network of the U-Net structure has been widely used in image segmentation in the medical field.
The network used in the flow field prediction model in this article is an improved U-Net variant.In the encoding section, the image is gradually downsampled by step convolution, and abstract information of more and more input data is extracted through increasing feature channels.Through feature stitching, each level of encoder downsampled data is fed into the decoder, integrating multi-level and multi-scale low-dimensional features into the decoding upsampling process, Effectively doubling the number of channels in each decoding block can avoid data loss during the encoding and decoding process.The network structure is shown in Figure 3.Each level of encoder and decoder includes a convolutional layer, a batch normalization layer, and a nonlinear activation function layer.The activation function used by the encoder is LeakyReLU, with a slope of 0.2,.The activation function used by the decoder is ReLU.During the network training process, an Adam optimizer is used, with a learning rate of 0.0006 selected and gradually decreasing as the training rounds increase to ensure that the early network training accelerates and approaches the local or global optimal solution faster.However, in the later stage of network training, there will be no significant fluctuations, thus approaching the optimal solution more closely.The mean square error function is selected as the loss function, and its mathematical expression is In the formula, N is the number of samples, O is the predicted value, and P is the target value.

CFD simulation
The geometric modeling of the S-shaped shock vectoring nozzle with the afterdeck is shown in Figure 4, and the values of the geometric parameters of the nozzle are shown in Table 1.In the flow field prediction study of the S-shaped shock vectoring nozzle with the afterdeck in this paper, except for the geometric parameters of the afterdeck, the geometric parameters of the S-shaped section, the expansion section, and the secondary flow nozzle are fixed.The design variables of the nozzle include two aerodynamic parameters and two geometric parameters: (1) nozzle drop pressure ratio (NPR): the ratio of the total pressure at the nozzle inlet to the back pressure at the nozzle outlet; (2) Secondary flow pressure ratio (SPR): the ratio of total pressure at secondary flow inlet to total pressure at nozzle mainstream inlet; (3) Dimensionless length of the rear deck (Ld/A8): the ratio of the length of the rear deck to the height of the nozzle throat; (4) Rear deck angle (α): The angle between the rear deck and the positive x-axis direction.CEM is used to divide the structured grid of S-shaped shock wave vector nozzle with afterdeck, and the grid near the wall, secondary flow and afterdeck is densified.The wall y + is controlled near 1, and the grid height of the first layer is set to 0.005mm, as shown in Figure 5. Import the computational grid into FLUENT for solution, choose the second-order upwind format for discretization, and use SST k-ω for turbulence model Model.The mainstream boundary of the nozzle is set as the pressure inlet, and the total pressure is given according to the requirements of the nozzle drop pressure ratio, with a total temperature of 300K; The secondary flow boundary is set as the pressure inlet, the total pressure is given according to the demand of the nozzle secondary flow pressure ratio, and the total temperature is 300K; The pressure far field boundary condition is selected for the external flow field, and the outlet environmental pressure is 101325 Pa.Turbulence Models.From the above two comparisons, it can be seen that using SST k-ω The numerical simulation results are in good agreement with the experimental results, so the numerical simulation method used in this article has high computational accuracy.

Dataset preparation
The selection and preparation of training data for neural networks are crucial for network training, as the distribution of training sets determines the effective space for network prediction.The dataset of the flow field prediction model in this article is derived from CFD calculation results.In order to improve the learning and generalization of the training network, a large range of sample parameters were selected to establish the dataset, with the selection range of the mainstream pressure ratio NPR ranging from 6 to 14; The selection range of secondary flow pressure ratio SPR is 0.4~1.Before inputting the dataset into the neural network, it needs to undergo preprocessing, that is, normalization, so that all parameters are between 0-1.Data normalization can standardize the data features to unified attributes, prevent the neural network from overly emphasizing or relying on certain features, and improve the convergence speed and accuracy of the prediction model.

Model performance analysis
After a total of 400 rounds of training and a total of 1.08×10 5 iteration steps, the model's residual converges stably.The variation of training and validation losses with training rounds is shown in Figure 10.The loss of both the training and validation sets is less than 10 -5, meeting the accuracy requirements.

Flow field analysis
In order to verify the accuracy and generalization of the model, the trained model was tested with a total of 50 samples in the test set.Two secondary flow injection conditions on the upper wall and two secondary flow injection conditions on the lower wall in the test set were selected for model prediction, and the cloud chart comparison of prediction results and numerical simulation results is shown in Figure 11.Comparison between predicted and calculated results.It can be seen from the cloud picture that the depth learning model can clearly predict the complex wave structure near the secondary flow nozzle of the S-shaped shock wave vectoring nozzle with the afterdeck.When the secondary flow nozzle sprays on the upper and lower wall surfaces respectively, the model can clearly predict the separation zone at the front and rear wall surfaces of the secondary flow nozzle, the separation shock wave from the upper and lower wall surfaces, the reflection shock wave reflected by the separation shock wave at the rear deck, the expansion wave reflected from the intersection of the separation shock wave and the free boundary, the expansion wave downstream of the secondary flow nozzle, and the position of the expansion wave from the rear deck trailing edge.But when the mainstream pressure is relatively high, the maximum Mach number predicted by deep learning in the jet is slightly higher than the numerical simulation results.

Error analysis
Figure 12 shows the average absolute error of the above four test samples along the S-shaped nozzle axis, and it can be seen that the average error of the samples is less than 5%.The overall error of the front section of the S nozzle is small, and the error is mainly concentrated in the secondary flow nozzle section and the outlet section, mainly because the wave system is complex and the numerical value changes greatly.The test model error of secondary flow injection on the lower wall is slightly lower than that of secondary flow injection on the upper wall.The average absolute error of the whole test set is 1.52%.This indicates that the deep learning prediction model has good prediction accuracy.At the same time, the Adjusted R-Square (AR2) is used to quantitatively evaluate the degree of fit between model predictions and CFD numerical calculation results.Based on the R-Square (R2), the adjusted coefficient introduces the number of samples and the number of features in the relationship, thereby offsetting the impact of sample size on the coefficient of determination.The specific expression is In the formula: Oi represents the predicted value; Pi represents the target value; P represents the average value of the target sample; N represents the number of samples; M represents the number of features, which is 5 in this article.Calculate the correction coefficient for the results of the test set.Figure 13 shows the distribution of the correction coefficient for the test set.It can be seen that on the test set, the fitting degree of the deep learning prediction model is greater than 0.97, and most of it is above 0.99.This indicates that the deep learning prediction model can effectively establish the mapping between aerodynamic, geometric parameters, and Mach number of the S-shaped shock vector nozzle with a rear deck, and has good prediction accuracy and generalization.

Calculation efficiency analysis
Record the training duration of the model and the calculation duration of a single case during the model training and testing stages, and also record the calculation duration of a single case through CFD.The statistical results are shown in Table 2.It can be seen that the calculation time of the deep learning model is far less than the CFD solution time.On the premise of meeting the accuracy requirements, the calculation time of the prediction model is about 1/1450 of the time of the CFD solver, and the complex wave structure at the secondary flow nozzle can be clearly predicted.This greatly improves efficiency and enables rapid evaluation of the S-shaped shock vector flow field with a rear deck under different operating conditions.

Conclusion
This article proposes a fast prediction model for the flow field of an S-shaped shock vector nozzle with a rear deck based on deep convolutional neural network.Train the network using CFD data, input nozzle geometry and aerodynamic parameters, and output the flow field Mach number of the nozzle.A comparative analysis was conducted on the predictive performance of CFD and deep learning models, and the following conclusions were obtained: 1) The deep learning model can clearly predict the complex wave structure of the S-shaped shock wave vectoring nozzle flow field under different working conditions, and can better restore the flow field results of CFD simulation, including the expansion wave and shock wave generated by the intersection of the secondary flow and the main flow, as well as the intersection of the air flow and the afterdeck.
2) The deep learning model has high precision and generalization, the average absolute error on the test set is 1.52%, the correction determination coefficient is greater than 0.97, and most of them are above 0.99, which shows a high degree of fit with the CFD data.But there are still some noise points in the local area.
3) On the premise of meeting accuracy, the prediction time of the deep learning model is 6.2 seconds, which is only 0.0689% of the CFD numerical simulation time.It greatly improves efficiency, reduces time costs, and has good application prospects in quickly evaluating the quality of nozzle flow field.
The current work mainly involves predicting the Mach number and complex wave structure of the flow field by changing the nozzle operating conditions, in order to determine the quality of the nozzle flow field and the rationality of nozzle design.However, the geometric parameters involved do not include the geometric parameters of the S-shaped section and the geometric parameters of the secondary flow nozzle, and are predicted to be two-dimensional flow fields.Future work can consider introducing more influencing parameters, and on the other hand, it is necessary to improve the model to ensure accuracy, eliminate local noise, make it closer to engineering practice, improve the engineering application ability of the model, and explore three-dimensional flow field prediction.

Figure 3 .
Figure 3. U-Net fully convolutional neural network used in this article.The deep learning neural network in this article is built based on the deep learning framework Pytorch.To balance performance and computational efficiency, this article uses Mini batch for training.The original data is shuffled and trained by randomly selecting the same number of small batches of data.The data extracted each time is not repeated until all the data in the original sample is extracted for training, completing one round of training.When the number of a single batch is large, it can improve memory utilization and parallel efficiency, but it will cause huge differences in gradient values of different weights, slow parameter updates, and easy overfitting.A small number of individual batches can lead to low training efficiency and difficulty in converging training data, resulting in underfitting.Taking into account the above advantages and disadvantages, the number of training set batches set in this article is 8, and the number of validation set batches is 4.During the network training process, an Adam optimizer is used, with a learning rate of 0.0006 selected and gradually decreasing as the training rounds increase to ensure that the early network training accelerates and approaches the local or global optimal solution faster.However, in the later stage of network training, there will be no significant fluctuations, thus approaching the optimal solution more closely.The mean square error function is selected as the loss function, and its mathematical expression is

Figure 4 .
Figure 4. S-shaped shock vector nozzle with rear deck and geometric parameter definition.Table1.Values of nozzle geometric parameters.

Figure 5 .Figure 6 .
Figure 5. Local structured grid distribution of S-shaped nozzle.To verify the rationality of turbulence model selection and the computational accuracy of numerical simulation.Compare and verify the experimental results of the S-shaped nozzle used in Dr. Sun Xiaolin's paper[27] with numerical simulations of different turbulence models.Under the condition of a drop pressure ratio of 3, using SST k-ω、S-A、standard k-ε、RNG k-ε、Realizable k-ε.These turbulence model numerically simulates the same S-shaped nozzle model and compares the wall static pressure distribution curves obtained from different turbulence models with the wall static pressure data measured in experiments, as shown in Figure6.Then, under different drop pressure

Figure 7 .
Figure 7.Comparison and Partial Enlargement of Upper Wall Pressure Distribution under DifferentTurbulence Models.From the above two comparisons, it can be seen that using SST k-ω The numerical simulation results are in good agreement with the experimental results, so the numerical simulation method used in this article has high computational accuracy.
2; The selection range for the length Ld/A8 of the rear deck is 0.5~2.5;Rear deck angle α The selection range is 0-20 °; The secondary flow injection is divided into upper and lower wall surfaces.The parameters are combined with each other, resulting in a total of 1200 data samples.Each dataset includes three input matrices (3 × 512 × 512) and a corresponding label (512 × 512), where the first layer of the input matrix is the nozzle geometry information layer, convert the nozzle geometry image shown in Figure (a) into 512 × A matrix of 512 pixels serves as the first layer of the sample tensor.The second and third layers are nozzle aerodynamic information layers.In order to input the nozzle falling pressure ratio and secondary flow pressure ratio × The matrix of 512 is used as the second and third layers of the sample tensor.One is filled with the nozzle drop pressure ratio, and the other is filled with the secondary flow pressure ratio.NPR=6, SPR=0.4,Ld=0.5, α= Taking a sample of 0 °as an example, the sample information is shown in Figure 8.

Figure 8 .
Figure 8. Schematic diagram of sample information.The label is a Mach number matrix of the nozzle flow field under the geometric and aerodynamic conditions of the sample, with a size of 512 × 512.The Mach number of the nozzle flow field was obtained through numerical simulation, and the data was mapped to 512 × Extract node information on a Cartesian grid of 512 to obtain a Mach number matrix of a specified size, as shown in Figure 9.

Figure 9 .
Figure 9. Schematic diagram of label information.The total dataset is divided into a training set and a validation set according to 8:2.The training set is used for training the prediction model, while the validation set is used for monitoring and adjusting during the model training process.At the same time, this article re selected 50 datasets from the sample parameter range as the test set to evaluate the effectiveness of the prediction model in real application scenarios.Before inputting the dataset into the neural network, it needs to undergo preprocessing, that is, normalization, so that all parameters are between 0-1.Data normalization can standardize the data features to unified attributes, prevent the neural network from overly emphasizing or relying on certain features, and improve the convergence speed and accuracy of the prediction model.

Figure 12 .
Figure 12.Curve of Average absolute error along S-shaped Axis.

Figure 13 .
Figure 13.Distribution of Correction Decision Coefficients for Test Set.However, it should be pointed out that although the overall prediction results of the deep learning model are good, there are still some errors in local details, mainly reflected in the uneven Mach number flow field contour lines of the first/second bending sections of the S-shaped nozzle, noise points (see Figure 11 circle), and some weak expansion waves in some areas that cannot be clearly predicted (see Figure 11 rectangular box).

Table 1 .
Values of nozzle geometric parameters.