Next Article in Journal
A High-Confidence Intelligent Measurement Method for Aero-Engine Oil Debris Based on Improved Variational Mode Decomposition Denoising
Previous Article in Journal
Investigation of the Influence of Wake Field Characteristic Structures on Downstream Targets Using the POD Method
Previous Article in Special Issue
Study on Optimization Design of Airfoil Transonic Buffet with Reinforcement Learning Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Flow Field Reconstruction of 2D Hypersonic Inlets Based on a Variational Autoencoder

1
School of Aerospace Engineering, Tsinghua University, Beijing 100084, China
2
Beijing Institute of Astronautical Systems Engineering, Beijing 100076, China
*
Author to whom correspondence should be addressed.
Aerospace 2023, 10(9), 825; https://doi.org/10.3390/aerospace10090825
Submission received: 19 August 2023 / Revised: 19 September 2023 / Accepted: 19 September 2023 / Published: 21 September 2023
(This article belongs to the Special Issue Aerodynamic Design with Machine Learning)

Abstract

:
The inlet is one of the most important components of a hypersonic vehicle. The design and optimization of the hypersonic inlet is of great significance to the research and development of hypersonic vehicles. In recent years, artificial intelligence techniques have been used to improve the efficiency of aerodynamic optimization. Deep generative models, such as variational autoencoder (VAE) and generative adversarial network (GAN), have been used in a variety of flow problems in the last two years, making fast reconstruction and prediction of the full flow field possible. In this study, a hybrid multilayer perceptron (MLP) combined with a VAE network is used to reconstruct and predict the flow field of a two-dimensional multiwedge hypersonic inlet. The obtained results show that the VAE network can reconstruct the overall flow structure of the hypersonic flow field with high accuracy. The reconstruction accuracy of complex flow structures, such as shockwaves, boundary layers, and separation bubbles, is satisfactory. The flow field prediction model based on the MLP-VAE hybrid model has a strong generalization and generation ability, achieving relatively accurate flow field prediction for inlets with geometric configurations outside the training set.

1. Introduction

The CFD solving process is usually time-consuming in a complex aerodynamic optimization problem. Consequently, various surrogate models are used to accelerate the flow field prediction process. Artificial intelligence (AI)-based surrogate models have become a research hotspot in recent years. AI and machine learning have an autonomy similar, in part, to human intelligence, constantly learning and improving the model. Its theoretical basis covers the disciplines of probability theory, mathematical statistics, and optimization theory. The model’s intrinsic parameters are continuously adjusted in the process of learning from the database to obtain the optimal prediction results. Commonly used machine learning surrogate models include the radial basis function (RBF), support vector machine (SVM), artificial neural network (ANN), etc. However, most of these surrogate models do not have sufficient ‘depth’ to characterize complex flow phenomena, and their limited characterization capability makes it difficult to predict the entire flow field [1].
In recent years, market applications such as image recognition, natural language processing, and autonomous driving have driven the development of artificial intelligence technologies. The resulting maturation of deep neural networks (DNNs) has expanded the characterization capabilities of artificial neural networks, enabling them to address more complex flow problems. Several studies on flow field prediction and aerodynamic optimization based on deep neural networks have emerged in recent years. Fujio et al. [2] implemented flow field prediction for axisymmetric hypersonic inlets based on a multilayer perceptron (MLP). The geometric parameters of the inlet and the node position are considered as the input, and the flow field parameters are the outputs. Brahmachary et al. [3] used proper orthogonal decomposition (POD) to downscale the dimension of the flow field and then reconstructed the flow field by a multilayer perceptron and moving least squares method. This improvement simplified the input information of the MLP network and facilitated the training of the MLP network, and the accuracy of its flow field prediction was significantly improved. POD has been a widely used method for flow field downscaling [4,5,6,7]. However, the reduced-order algorithm based on the POD method spreads the 2D flow field matrix into a 1D vector, which may cause the spatial relationship of the flow field to be lost. Yousif et al. [8] used generative adversarial networks (GAN) to reconstruct 3D flow fields from 2D measurements. GAN-based methods [9,10,11,12,13,14] show good ability for complex flow field reconstruction. Hu et al. [15] proposed RBF-GAN and RBFC-GAN to reconstruct flow fields, delivering better results than GANs. Autoencoders (AEs) and variational autoencoders (VAEs) based on convolutional neural networks can take full account of the spatial relationships of the flow field structure and the translational invariance of the physical laws of flows. Deng et al. [16] and Wang et al. [17] performed feature extraction and reconstruction of a supercritical airfoil flow field using AE and VAE, respectively. Wang et al. [17] also showed that the VAE has a higher accuracy in flow field reconstruction than the POD method. Dubois [18] used VAE to predict an unsteady flow field from limited measurements. In addition, VAE has also been used to reconstruct and predict flow fields in aircraft turbomachinery [19], vehicle aerodynamics [20,21], combustions [22,23] and supersonic combustors [24,25], which also achieved good accuracy.
This paper focuses on the hypersonic inlet, which is an important component of a supersonic combustion ramjet. Its main function is to provide an oxidant to the combustion chamber and to decelerate and pressurize the incoming flow to meet the requirements of combustion. The complex flow phenomena, such as shockwave, flow separation, and shockwave–boundary layer interaction in the hypersonic inlet, make the flow highly nonlinear, making the design and optimization of the inlet difficult. Due to the complexity of the flow, a slight change in the geometric parameters can make a large difference in the performance of the inlet. Convolutional neural network technology is used in this paper to achieve rapid prediction of the flow field of hypersonic inlets and optimize the hypersonic inlet. First, five hundred two-dimensional (2D) three-wedge inlets are randomly sampled, with the wedge angles as the design parameters; second, the inlet samples are calculated with the help of a CFD solver to obtain the flow field dataset; then, a VAE model is built to learn the abovementioned dataset to realize the feature extraction and reconstruction of the flow fields, and a MLP network is trained to learn the relationship between the design parameters and the flow field features extracted by the VAE model so that a surrogate model is obtained that can predict the flow field according to the design parameters.

2. Validation of the CFD Method

The flow field of a 2D inlet is considered in this study. A test case with experimental data, which is the GK-01 inlet, is computed to test the accuracy of the CFD solver. The obtained results are compared with the experimental data in Ref. [26]. The geometric configuration of the GK-01 inlet is shown in Figure 1. The incoming flow conditions are kept consistent with the experimental conditions in Ref. [26], as listed in Table 1.
Figure 2 shows the Mach contour of the GK-01 inlet calculated by an unstructured CFD solver. The three shockwaves interfered near the inlet lip. There is a small flow separation near the inlet throat. A comparison of the calculated and experimental values of the pressure coefficient on the compression surface is shown in Figure 3. The fluid field is calculated with three different grid densities to test the grid convergence of the CFD computation in this study. Grid 1 represents a coarse grid, which has 6 × 10 4 grid cells. Grid 2 is a medium grid and has 9 × 10 4 grid cells. Grid 3 is a fine grid and has 1.3 × 10 5 grid cells. The CFD results are in general agreement with the experimental results. The obtained results are also similar for the different grid densities, indicating good grid convergence. A grid density similar to the medium grid is applied in the following computation. Figure 4 shows the shockwave structures of the inlet, both CFD for Grid 2 and the experiment. It shows that the middle grid captures most of the shockwave structures in the hypersonic inlet.

3. Generation of the Flow Field Dataset

In this study, the flow field reconstruction of a 2D three-wedge hypersonic inlet is performed. The geometry of the inlet is shown in Figure 5. The entire inlet is integrated into the aircraft forebody, and the three wedge segments allow the incoming flow to be gradually deflected and compressed before entering the combustion chamber through the throat.
To improve the efficiency of machine learning, the geometric configurations of the inlets in the dataset are predesigned and filtered based on shockwave equations. The shockwaves from the compression side (Points A, B, and C) are expected to converge at the inlet lip, Point E, to avoid leakage of the captured flow. We conduct the following design steps in the sampling process to achieve this requirement: (1) fix the inlet height H 0 and the throat height H t and then conduct independent uniform random samplings for the three wedge angles θ 1 , θ 2 , and θ 3 and (2) compute the length of each wedge segment through the shockwave equation and geometric relation to ensure that the oblique shockwaves converge exactly at the lip. The aspect ratio of isolators L t / H t is fixed to 8, and H w and θ w are also fixed. In addition, the total deflection angle ( θ 1 + θ 2 + θ 3 ) of the airflow ranges from 18° to 26°, and the Mach number Ma5 of the airflow entering the throat ranges from 1.8 to 2.4. The incoming flow Mach number M a = 6 and the flight altitude H = 25   k m .
The relation between the oblique shock angle and the deflection angle of the flow is shown in Equation (1), where θ is the deflection angle of the flow and M a 1 is the Mach number before the shockwave. Solving Equation (1) yields two solutions, the smaller of which is the oblique shock angle.
t a n θ = M a 1 2 sin 2 β m 1 M a 1 2 γ + 1 2 sin 2 β + 1 t a n β m
The relation between the Mach numbers before and after the shockwave is shown in Equation (2), where the pre-wave parameters are subscripted as 1 and the post-wave parameters are subscripted as 2.
M a 2 2 s i n 2 β θ = 1 + γ 1 2 M a 1 2 s i n 2 β γ M a 1 2 s i n 2 β γ 1 2
The values or ranges of the design parameters of the inlet in the dataset are listed in Table 2. The sample size is 500.
After the sampling process, the flow fields of the samples in the dataset are computed by the CFD solver. The grid block partition is shown in Figure 6. The entire inlet flow field is divided into four grid blocks according to geometry. The grid points of the four blocks are 250 × 100, 150 × 100, 150 × 120, and 250 × 120. Figure 7 shows the grid detail around the inlet lip. The grid is appropriately refined in the boundary layer.
The compressible Navier-Stokes equations coupled with the k-ε turbulence model are solved in the CFD solver. The wall condition is set to the nonslip condition with an isothermal value of 300 K. The initial conditions are the same as the incoming flow conditions. The calculation is terminated if the residual is less than 10 5 or the iteration is more than 2000 steps. After the CFD computation, the velocities u and v , the temperature T , and the static pressure p are used for flow field reconstruction training and testing.
The incoming flow conditions for the dataset computation are listed in Table 3. We chose to train the model with incoming Ma 6 for engineering needs. The CFD method has been verified by a comparison with the experimental data of the GK-01 model with incoming Ma 7. Although the Mach numbers are different, the results may still be reliable enough, as done in Ref. [27]. Figure 8 shows the flow field of sample ID-001. Figure 9 shows the y+ value on the compression surface of sample ID-001. Since the k-ε model is adopted in this paper with a wall function, the y+ value is passable for our calculations. A black box is marked in the figure, which is the flow field zone used for machine learning training and testing. The VAE method proposed in this paper can be applied on any part of the flow field, while we only consider the flow captured by the inlet to improve the training efficiency. A total of 399 × 100 grid points are used for training.

4. Structures of the Flow Field Reconstruction and Prediction Models

A flow field reconstruction and prediction model based on the VAE-MLP hybrid model is introduced in this section. We first compress and reconstruct the data of the 2D hypersonic inlet flow field based on a variational autoencoder (VAE) model. The trained VAE encoder is used for flow field data reduction and feature extraction; thus, the complex flow field data are compressed into a latent code vector in the eigenspace to characterize the flow field. The trained VAE decoder is also a flow field generator, which can recover a vector in the flow field eigenspace into a complete flow field. The VAE decoder is then combined with a multilayer perceptron (MLP) to achieve rapid prediction of the inlet flow field.

4.1. VAE Model

The VAE was originally proposed by Kingma et al. [28]. In this paper, the VAE model is built with reference to the method in [17], i.e., the residual blocks are used to build the encoder and decoder to increase the depth of the neural network and, thus, enhance the feature extraction capability of the VAE.
The structure of the VAE model in this paper is shown in Figure 10. In VAE, the encoder maps the input x into a normal distribution.
f E n c o d e r x , θ E n c o d e r = N μ , σ
A random sample from this distribution is taken to obtain the code for the data before decoding, which is called reparameterization.
z = μ + ϵ exp 1 2 l o g v a r
where l o g v a r = ln σ 2 , and ϵ ~ N ( 0 , I ) . Finally, the decoder maps z into x as the reconstructed result of x .
x = f D e c o d e r z , θ D e c o d e r
  θ E n c o d e r in Equation (3) and θ D e c o d e r in Equation (5) represent the parameters of the network to be trained, which are continuously optimized during the training process to improve the model performance. The loss function of the VAE model is shown below.
L = β 1 n i = 1 n j = 1 d 1 2 ( 1 + σ i j 2 + μ i j 2 log σ i j 2 ) + 1 n i = 1 n x i x i 2
The loss function of VAE contains two components: namely, the K-L divergence and MSE loss. The β in Equation (6) adjusts the ratio of the K-L divergence and MSE loss. The larger β   i s , the stronger the VAE is in terms of feature decoupling and generating new samples; the smaller β   i s , the greater the VAE focuses on the reconstruction accuracy of the training samples; and when β = 0 , the VAE is reduced to a general automatic encoder.
The detailed structure of the VAE model built in this paper is listed in Table 4. A convolution or transposed convolution residual block that contains a short-circuit operation is used as the basic structure to build the encoder and decoder, thus improving the depth and feature extraction capability of the network.

4.2. MLP Model

After training the VAE model, we use a multilayer perceptron (MLP) to learn the mapping relationship between the inlet geometry parameters and the flow field feature parameters. However, the flow feature parameters are probabilistic distribution parameters rather than exact values. Therefore, when training the MLP model for flow field prediction, the mean value μ , i.e., the probability maximum position of the distribution x ~ ( μ , σ ) , is used. After the training is completed, the trained MLP model is combined with the VAE decoder to obtain a flow field prediction model based on the three wedge angles.
In this study, the number of neurons in the input layer is three, corresponding to the three wedge angles, and the number of neurons in the output layer is the same as the dimension of the VAE coding features. Three hidden layers of 8, 32, and 32 neurons are adopted in the MLP model. The structure of the MLP network is shown in Figure 11. MSE_LOSS is used as the loss function of the MLP model, and its expression is shown in Equation (7).
M S E L o s s = 1 n i = 1 n x i x i 2

4.3. VAE-MLP Hybrid Model

Although the VAE enables the reconstruction of the flow field, obtaining the flow field of the inlet directly from the given geometrical parameters is expected in the design process, i.e., the three wedge angles. Therefore, we need to connect the decoder of the VAE to the MLP network to obtain the MLP-VAE hybrid model. The structure of the hybrid model is shown in Figure 12.

5. Results of the Model Training

In this paper, the training set includes 450 samples, while the testing set includes 50 samples. This section presents the training results of the model built in Section 4. First, several evaluation indicators used in the training process are provided. Then, the training results of the VAE model, the MLP model, and, finally, the MLP-VAE hybrid network are presented.

5.1. Evaluation Indicators of the Training

Before tuning the hyperparameters and other settings of the models, several indicators are defined to evaluate the quality of the flow field reconstruction or prediction. The following three indicators are adopted in this paper:
(1) Mean absolute error (MAE)
M A E = 1 N i = 1 N w i w i
where N is the number of flow field nodes; w denotes the flow field quantities, i.e., u , v , p , and T calculated by CFD; and w is the flow field reconstructed or predicted by the machine learning model.
(2) Correlation coefficient
Because the absolute error is not intuitive to measure the relative error, in addition to the MAE, the correlation coefficient is used to evaluate the similarity of the flow field calculated by CFD compared with the reconstructed and predicted flow fields.
C O R R = w i w ¯ w i w ¯ w i w ¯ 2 w i w ¯ 2
(3) Relative error of the total pressure recovery ( σ Error)
The total pressure of a compressible flow is
P 0 = P s 1 + k 1 2 M 2 k k 1
P s is the static pressure, k is the specific heat ratio, and M is the Mach number. The total pressure recovery is an important parameter of the inlet performance and is defined as follows:
σ = P 0 o u t P 0 i n f
The numerator is the average total pressure at the outlet, and the denominator is the total pressure of the incoming flow.
Finally, the relative error of the total pressure recovery is defined as follows:
σ   E r r o r = σ σ σ
where σ is the total pressure recovery of the reconstructed or predicted flow field, and σ is the total pressure recovery of the flow field calculated by the CFD solver.

5.2. Model Tuning

The composition and hyperparameters of the model do not change during the learning process, and they need to be tuned manually. In this paper, we sequentially tune the activation function, Adam optimizer’s β 1 , batch size, dimension of the latent code vector, and β in the loss function and select the best parameters based on the training results. Due to limited space, the specific tuning process is not given in this paper; only the final settings of the model are marked in bold in Table 5.

5.3. Results of Fluid Field Reconstruction Based on the VAE

The VAE model was trained for 5000 epochs. The learning rate decay strategy is referenced in [17]. The initial learning rate is set to 0.0004, and the learning rate is reduced by half after every 1000 epochs. The decay curve of the loss function of the VAE model is shown in Figure 13. The final accuracy of the flow field reconstruction based on the VAE model is listed in Table 6. The values before the plus or minus sign in each cell are the mean values of the individuals in the dataset, and the values after the plus or minus sign are their statistical standard deviation. In the whole dataset, u ranges from 487.7   m / s to 1791.6   m / s , v ranges from 491.1   m / s to 866.7   m / s , p ranges from 2549   P a to 887.9   K P a , and T ranges from 221.6   K to 1584.2   K .
Figure 14 and Figure 15 show typical flow fields for the individuals in the training and testing sets, respectively. Each plot contains twelve subplots, which can be divided into four groups. The subplots in the four rows are the maps of the u velocity, v velocity, static pressure P , and temperature T . The three subplots in each row from left to right are the flow field calculated by CFD, the reconstructed data based on the VAE model, and the absolute error between the CFD and VAE, respectively. We can see that the calculated and reconstructed flow fields are similar in most regions, and the errors are relatively high near shockwaves.
Figure 16 and Figure 17 show the corresponding scatter plots of the flow fields, and each scatter represents the flow data at a grid node. The horizontal coordinates are the values calculated by CFD, and the vertical coordinates are the values reconstructed by VAE. The red lines are the lines of the ±5% errors. We can see that most of the scatters are located inside or near the lines of the ±5% errors. The reconstruction accuracy of the static pressure and vertical velocity has a larger error than the other flow variables. It is consistent with the results in Figure 14 and Figure 15. The vertical velocity and pressure undergo a sudden change besides a shockwave, which makes these two quantities more uneven and discontinuous in spatial distribution.
Figure 18 and Figure 19 show the pressure coefficient profile on the compression surface of the typical flow field in the training and testing sets, respectively. The wall pressure is basically well-captured by the VAE reconstruction method. The error is relatively high near the throat, but we are more concerned about the results near the exit of the inlets.
The error distribution of the total pressure recovery of all the reconstructed flow fields is given in Figure 20. The left plot is the training set, which includes 450 training samples; the right plot is the testing set, which includes 50 test samples. Each scatter represents an individual sample, and the horizontal coordinates are the values obtained from the CFD calculations. The vertical coordinates are the reconstructed VAE values. The red lines in the figures are the lines of the ±5% errors.
The results in Table 6 show that the correlation coefficients of all the physical quantities between the reconstructed flow field and the CFD flow field are above 0.99, which demonstrates that the accuracy of the flow field reconstruction is relatively high. The flow structure and shockwave pattern of the reconstructed flow field are close to the CFD flow field. The errors of the reconstructed flow field data on most of the grid nodes are within 5% error compared with the CFD values, except for the velocity component v . Table 6 and Figure 20 also show that the total pressure recovery of the reconstructed flow fields for all the individual inlets is within 5% error compared to the CFD values. The average error level is less than 2%. The error level of the testing set is also close to that of the training set, indicating that the VAE model has a high generalization capability within the sampling space of the dataset. However, the reconstructed flow field has a significantly larger error near the shockwaves or the flow separation, which indicates that the regions with strong nonlinear effects and complex flow structures are more difficult to capture by the artificial intelligence method than other regions.

5.4. Training of the MLP Model

The MLP model is trained by the Adam optimizer, with an initial learning rate of 0.001 and a decay rate of 1/2 every 1000 epochs. The total training process has 5000 epochs. The batch size is 64. The loss function drop curves are shown in Figure 21.

5.5. Results of Fluid Field Prediction Based on the VAE-MLP Model

By combining the VAE and MLP models, a hybrid MLP-VAE model is obtained, which can predict the inlet flow field based on the three wedge angles. We continue to use the mean absolute error, correlation coefficient, and relative error of the total pressure recovery between the predicted flow field and CFD to evaluate the accuracy of the prediction model, as listed in Table 7.
Figure 22 and Figure 23 show the typical flow field in the training and testing sets, respectively. The subplots in the four rows are the maps of the u velocity, v velocity, static pressure P , and temperature T . The three subplots in each group from left to right are the flow field calculated by CFD, the predicted data based on the hybrid MLP-VAE model, and the absolute error between CFD and the hybrid MLP-VAE model. We can see that the calculated and predicted flow fields are similar in most regions, and the errors are relatively high near shockwaves. The error level of the predicted flow field is roughly equivalent to that of the reconstructed flow field.
The error distribution of the total pressure recovery of the predicted flow field is given in Figure 24, where the left plot is the training set, and the right plot is the testing set. Each scatter represents an individual sample. The horizontal coordinates are the values obtained from CFD computations. The vertical coordinates are the predicted values given by the VAE-MLP model, and the red lines mark the range of the ±5% errors.
Comparing the results in Table 6 with those in Table 7, it is found that the overall error level of the predicted flow field obtained by MLP-VAE is comparable to or even slightly reduced compared to that of the VAE reconstructed flow field. This occurs because no reparameterization operation is performed when training the MLP network. Here, the mean of the code distribution, i.e., the value with the maximum probability density of this distribution, is used for training. Figure 24 shows that the MLP-VAE network is also able to predict the inlet total pressure recovery more accurately for most individuals in both the training and testing sets. However, there are three samples with relative errors larger than 5%, which may be due to the cumulative error of the two networks when combined. There was no sample outside the ±5% error range in the testing set.
Since the AI model is based on the probability method, if we run the training model again, the result will not be the same completely. However, the loss function will converge to almost the same value, and the value is usually small, as shown in Figure 13 and Figure 21. Then, the AI model may give a believable and reasonable result for flow field prediction with an acceptable error. In this sense, the AI model is repeatable and is a sufficient surrogate model to replace CFD.

5.6. Computational Cost

The computation times for the different processes in this paper are given in Table 8. The computing platform used for training the VAE is NVIDIA RTX A2000 with CUDA 11.1 and cuDNN8.0.5. The computing platform for training the MLP and CFD calculations is Intel i5-11300H. Although the training of the neural network requires a large amount of data, once the neural network is trained, it can be used repeatedly for the design optimization of the inlet, reducing the marginal cost of the calculations and, thus, significantly reducing the time required for aerodynamic optimization.

6. Conclusions

This paper implements the flow field reconstruction of a two-dimensional hypersonic inlet based on an artificial intelligence method. First, 500 geometric configurations of the two-dimensional hypersonic inlet are sampled, and the flow field is calculated by CFD to obtain the dataset for training, while the accuracy of the calculation method is verified using the standard model GK-01. Finally, a hypersonic inlet flow field prediction model based on the MLP-VAE network is constructed by training a residual variational autoencoder (VAE) and a multilayer perceptron (MLP).
The results show the following:
(1)
The variational autoencoder based on convolutional residual blocks has sufficient depth to characterize the flow fields of hypersonic inlets. The flow field is reconstructed with a good overall accuracy. Even for flow structures with strong nonlinear effects, such as shockwaves, boundary layers, and flow separations, the reconstruction accuracy is well maintained.
(2)
The flow field prediction model based on a hybrid MLP-VAE network has good generation capability, performs well on the test set, and can be used for fast predictions of the flow fields of two-dimensional hypersonic inlets.
(3)
The neural network surrogate model can significantly reduce the time consumed in calculating the aerodynamic performance and the whole fluid field, thus improving the overall efficiency of aerodynamic optimization and reducing the computational cost.
This is a preliminary attempt to study the flow field reconstruction ability of artificial intelligence. In our future work, the reconstruction method will be further studied and extended to a three-dimensional flow field. The inlet with a lip deflection can also be considered in the dataset.

Author Contributions

Conceptualization, Z.T. and R.L.; software, Z.T.; validation, Z.T.; writing—original draft preparation, Z.T.; writing—review and editing, Y.Z.; supervision, Y.Z.; project administration, Y.Z.; funding acquisition, Y.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China (11872230 and 92152301).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sun, G.; Wang, C.; Wang, L.; Tao, J.; Wang, S.; Wang, X.; Zhou, S.; Li, Z.; Hu, Y. Applications and Prospect of Artificial Intelligence in Aerodynamic Design. Civ. Aircr. Des. Res. 2021, 3, 1–9+147. (In Chinese) [Google Scholar]
  2. Fujio, C.; Ogawa, H. Scramjet Intake Design Based on Exit Flow Profile via Global Optimization and Deep Learning toward Inverse Design. In Proceedings of the AIAA SCITECH 2022 Forum, San Diego, CA, USA, 3–7 January 2022; p. 1408. [Google Scholar]
  3. Brahmachary, S.; Bhagyarajan, A.; Ogawa, H. Fast estimation of internal flow fields in scramjet intakes via reduced-order modeling and machine learning. Phys. Fluids 2021, 33, 106110. [Google Scholar] [CrossRef]
  4. Liu, Q.; Luo, Z.; Deng, X.; Wang, L.; Zhou, Y. Numerical investigation on flow field characteristics of dual synthetic cold/hot jets using POD and DMD methods. Chin. J. Aeronaut. 2020, 33, 73–87. [Google Scholar] [CrossRef]
  5. Sun, F.; Su, W.Y.; Wang, M.Y.; Wang, R.J. RBF-POD reduced-order modeling of flow field in the curved shock compression inlet. Acta Astronaut. 2021, 185, 25–36. [Google Scholar] [CrossRef]
  6. Vitkovicova, R.; Yokoi, Y.; Hyhlik, T. Identification of structures and mechanisms in a flow field by POD analysis for input data obtained from visualization and PIV. Exp. Fluids 2020, 61, 171. [Google Scholar] [CrossRef]
  7. Kikuchi, R.; Misaka, T.; Obayashi, S. International journal of computational fluid dynamics real-time prediction of unsteady flow based on POD reduced-order model and particle filter. Int. J. Comput. Fluid Dyn. 2016, 30, 285–306. [Google Scholar] [CrossRef]
  8. Yousif, M.Z.; Yu, L.; Hoyas, S.; Vinuesa, R.; Lim, H. A deep-learning approach for reconstructing 3D turbulent flows from 2D observation data. Sci. Rep. 2023, 13, 2529. [Google Scholar] [CrossRef]
  9. Kim, H.; Kim, J.; Won, S.; Lee, C. Unsupervised deep learning for super-resolution reconstruction of turbulence. J. Fluid Mech. 2021, 910, A29. [Google Scholar] [CrossRef]
  10. Afzali, J.; Casas, C.Q.; Arcucci, R. Latent GAN: Using a latent space-based GAN for rapid forecasting of CFD models. In International Conference on Computational Science; Springer International Publishing: Cham, Switzerland, 2021; pp. 360–372. [Google Scholar]
  11. Buzzicotti, M.; Bonaccorso, F.; Di Leoni, P.C.; Biferale, L. Reconstruction of turbulent data with deep generative models for semantic inpainting from TURB-Rot database. Phys. Rev. Fluids 2021, 6, 050503. [Google Scholar] [CrossRef]
  12. Wen, S.; Shen, N.; Zhang, J.; Lan, Y.; Han, J.; Yin, X.; Zhang, Q.; Ge, Y. Single-rotor UAV flow field simulation using generative adversarial networks. Comput. Electron. Agric. 2019, 167, 105004. [Google Scholar] [CrossRef]
  13. Yousif, M.Z.; Yu, L.; Lim, H.C. High-fidelity reconstruction of turbulent flow from spatially limited data using enhanced super-resolution generative adversarial network. Phys. Fluids 2021, 33, 125119. [Google Scholar] [CrossRef]
  14. Nista, L.; Schumann, C.D.K.; Grenga, T.; Attili, A.; Pitsch, H. Investigation of the generalization capability of a generative adversarial network for large eddy simulation of turbulent premixed reacting flows. Proc. Combust. Inst. 2022, 39, 5279–5288. [Google Scholar] [CrossRef]
  15. Hu, L.; Wang, W.; Xiang, Y.; Zhang, J. Flow field reconstructions with gans based on radial basis functions. IEEE Trans. Aerosp. Electron. Syst. 2022, 58, 3460–3476. [Google Scholar] [CrossRef]
  16. Deng, K.; Chen, H.; Zhang, Y. Flow structure oriented optimization aided by deep neural network. In Proceedings of the Tenth International Conference on Computational Fluid Dynamics (ICCFD10), Barcelona, Spain, 9–13 July 2018. [Google Scholar]
  17. Wang, J.; He, C.; Li, R.; Chen, H.; Zhai, C.; Zhang, M. Flow field prediction of supercritical airfoils via variational autoencoder based deep learning framework. Phys. Fluids 2021, 33, 086108. [Google Scholar] [CrossRef]
  18. Dubois, P.; Gomez, T.; Planckaert, L.; Perret, L. Machine learning for fluid flow reconstruction from limited measurements. J. Comput. Phys. 2022, 448, 110733. [Google Scholar] [CrossRef]
  19. Zalger, J. Application of Variational Autoencoders for Aircraft Turbomachinery Design; Technical Report; Stanford University: Stanford, CA, USA, 2017. [Google Scholar]
  20. Mrosek, M.; Othmer, C.; Radespiel, R. Variational autoencoders for model order reduction in vehicle aerodynamics. In Proceedings of the AIAA Aviation 2021 Forum, Virtual Event, 2–6 August 2021; p. 3049. [Google Scholar]
  21. Ando, K.; Onishi, K.; Bale, R.; Kuroda, A.; Tsubokura, M. Nonlinear reduced-order modeling for three-dimensional turbulent flow by large-scale machine learning. Comput. Fluids 2023, 2023, 106047. [Google Scholar] [CrossRef]
  22. Posch, S.; Gößnitzer, C.; Ofner, A.B.; Pirker, G.; Wimmer, A. Modeling cycle-to-cycle variations of a spark-ignited gas engine using artificial flow fields generated by a variational autoencoder. Energies 2022, 15, 2325. [Google Scholar] [CrossRef]
  23. Wu, S.; Patel, S.; Ameen, M. Investigation of cycle-to-cycle variations in internal combustion engine using proper orthogonal decomposition. Flow Turbul. Combust. 2023, 110, 125–147. [Google Scholar] [CrossRef]
  24. Chen, H.; Guo, M.; Tian, Y.; Le, J.; Zhang, H.; Zhong, F. Intelligent reconstruction of the flow field in a supersonic combustor based on deep learning. Phys. Fluids 2022, 34, 035128. [Google Scholar] [CrossRef]
  25. Laubscher, R.; Rousseau, P. Application of generative deep learning to predict temperature, flow and species distributions using simulation data of a methane combustor. Int. J. Heat Mass Transf. 2020, 163, 120417. [Google Scholar] [CrossRef]
  26. Häberle, J.; Gülhan, A. Investigation of the Flow Field of a 2D SCRAM Jet Inlet at Mach 7 with optional Boundary Layer Bleed. In Proceedings of the 43rd AIAA/ASME/SAE/ASEE Joint Propulsion Conference & Exhibit, Cincinnati, OH, USA, 8–11 July 2007; p. 5068. [Google Scholar]
  27. Zhu, C.; Zhang, X.; Kong, F.; You, Y. Design of a three-dimensional hypersonic inward-turning inlet with tri-ducts for combined cycle engines. Int. J. Aerosp. Eng. 2018, 2018, 7459141. [Google Scholar] [CrossRef]
  28. Kingma, D.P.; Welling, M. Auto-encoding variational bayes. arXiv 2013, arXiv:1312.6114. [Google Scholar]
Figure 1. Geometric configuration of the GK-01 inlet (unit: mm).
Figure 1. Geometric configuration of the GK-01 inlet (unit: mm).
Aerospace 10 00825 g001
Figure 2. Mach number contour of the GK-01 inlet model.
Figure 2. Mach number contour of the GK-01 inlet model.
Aerospace 10 00825 g002
Figure 3. Pressure coefficient on the compression surface of GK-01.
Figure 3. Pressure coefficient on the compression surface of GK-01.
Aerospace 10 00825 g003
Figure 4. Shockwave in the inlet [26].
Figure 4. Shockwave in the inlet [26].
Aerospace 10 00825 g004
Figure 5. Geometric configuration of a two-dimensional three-wedge hypersonic inlet.
Figure 5. Geometric configuration of a two-dimensional three-wedge hypersonic inlet.
Aerospace 10 00825 g005
Figure 6. Grid block partition of the inlet.
Figure 6. Grid block partition of the inlet.
Aerospace 10 00825 g006
Figure 7. Grid detail around the inlet lip.
Figure 7. Grid detail around the inlet lip.
Aerospace 10 00825 g007
Figure 8. Flow field (Mach contour) of sample ID-001.
Figure 8. Flow field (Mach contour) of sample ID-001.
Aerospace 10 00825 g008
Figure 9. y+ value on the compression surface of sample ID-001.
Figure 9. y+ value on the compression surface of sample ID-001.
Aerospace 10 00825 g009
Figure 10. A diagram of the VAE model.
Figure 10. A diagram of the VAE model.
Aerospace 10 00825 g010
Figure 11. The structure of the MLP network.
Figure 11. The structure of the MLP network.
Aerospace 10 00825 g011
Figure 12. Structure of the VAE-MLP hybrid model.
Figure 12. Structure of the VAE-MLP hybrid model.
Aerospace 10 00825 g012
Figure 13. Loss function of the VAE model.
Figure 13. Loss function of the VAE model.
Aerospace 10 00825 g013
Figure 14. Typical flow fields reconstructed in the training set.
Figure 14. Typical flow fields reconstructed in the training set.
Aerospace 10 00825 g014
Figure 15. Typical flow fields reconstructed in the testing set.
Figure 15. Typical flow fields reconstructed in the testing set.
Aerospace 10 00825 g015
Figure 16. Scatter plot of a typical flow field in the training set.
Figure 16. Scatter plot of a typical flow field in the training set.
Aerospace 10 00825 g016
Figure 17. Scatter plot of a typical flow field in the testing set.
Figure 17. Scatter plot of a typical flow field in the testing set.
Aerospace 10 00825 g017
Figure 18. Pressure coefficient profile on the compression surface of a typical flow field in the training set.
Figure 18. Pressure coefficient profile on the compression surface of a typical flow field in the training set.
Aerospace 10 00825 g018
Figure 19. Pressure coefficient profile on the compression surface of a typical flow field in the testing set.
Figure 19. Pressure coefficient profile on the compression surface of a typical flow field in the testing set.
Aerospace 10 00825 g019
Figure 20. Error distribution of the total pressure recovery of the reconstructed flow field.
Figure 20. Error distribution of the total pressure recovery of the reconstructed flow field.
Aerospace 10 00825 g020
Figure 21. Loss function drop curves of the MLP model.
Figure 21. Loss function drop curves of the MLP model.
Aerospace 10 00825 g021
Figure 22. Typical flow fields predicted in the training set.
Figure 22. Typical flow fields predicted in the training set.
Aerospace 10 00825 g022
Figure 23. Typical flow fields predicted in the testing set.
Figure 23. Typical flow fields predicted in the testing set.
Aerospace 10 00825 g023
Figure 24. Error distribution of the total pressure recovery of the predicted flow field.
Figure 24. Error distribution of the total pressure recovery of the predicted flow field.
Aerospace 10 00825 g024
Table 1. Incoming flow conditions for the GK-01 test case.
Table 1. Incoming flow conditions for the GK-01 test case.
Incoming Flow ParametersValues
Mach number M a 7.0
Temperature T 46 K
Static pressure P 170 Pa
Reynolds number R e 4 × 10 6 / m
Table 2. Values or ranges of the design parameters of the inlets in the dataset.
Table 2. Values or ranges of the design parameters of the inlets in the dataset.
Parameter θ 1 θ 2 θ 3 θ w θ 1 + θ 2 + θ 3
Value/range 4 ° ~ 10 ° 4 ° ~ 10 ° 4 ° ~ 10 ° 10 ° 18 ° ~ 26 °
Parameter H 0 H t H w L t / H t M a 5
Value/range300 mm30 mm15 mm8 1.8 ~ 2.4
Table 3. Incoming flow conditions for the dataset.
Table 3. Incoming flow conditions for the dataset.
Incoming Flow ParametersValues
M a 6.0
T 221.55 K
P 2549 Pa
R e 4.95 × 10 6
Table 4. Detailed structure of the VAE model in this paper (FC: fully connected layer, Conv: convolution residual block, Trans conv: transposed convolution residual block, and N: dimensions of latent code vector).
Table 4. Detailed structure of the VAE model in this paper (FC: fully connected layer, Conv: convolution residual block, Trans conv: transposed convolution residual block, and N: dimensions of latent code vector).
EncoderDecoder
LayerInput Size
× Channels
Output Size
× Channels
LayerInput Size
× Channels
Output Size
× Channels
Up sample 1(399 × 100) × 4(512 × 128) × 4ReparametrizeN × 2N × 1
Conv 1(512 × 128) × 4(512 × 128) × 8y-FCN × 1(2 × 2) × 256
Conv 2(512 × 128) × 8(256 × 64) × 16Up sample 2(2 × 2) × 256(16 × 4) × 256
Conv 3(256 × 64) × 16(128 × 32) × 32Trans conv 1(16 × 4) × 256(32 × 8) × 128
Conv 4(128 × 32) × 32(64 × 16) × 64Trans conv 2(32 × 8) × 128(64 × 16) × 64
Conv 5(64 × 16) × 64(32 × 8) × 128Trans conv 3(64 × 16) × 64(128 × 32) × 32
Conv 6(32 × 8) × 128(16 × 4) × 256Trans conv 4(128 × 32) × 32(256 × 64) × 16
Down sample 1(16 × 4) × 256(2 × 2) × 256Trans conv5(256 × 64) × 16(512 × 128) × 8
Mu-FC(2 × 2) × 256N × 1Trans conv 6(512 × 128) × 8(512 × 128) × 4
Var-FC(2 × 2) × 256N × 1Down sample 2(512 × 128) × 4(399 × 100) × 4
Table 5. Model tuning and the final settings of the model (marked in bold).
Table 5. Model tuning and the final settings of the model (marked in bold).
Activation FunctionReLU Leaky ReLU
β 1 in Adam0.5 0.9
Batch size81632
Dimension of latent code vector5810
β in loss function 1 × 10 6 5 × 10 6 1 × 10 5
Table 6. Accuracy of the flow field reconstruction based on the VAE model.
Table 6. Accuracy of the flow field reconstruction based on the VAE model.
Evaluation IndicatorsQuantityTraining SetTesting Set
MAE u 3.75 ± 0.85 m/s3.98 ± 0.99 m/s
v 4.02 ± 1.37 m/s4.33 ± 1.44 m/s
p 1570 ± 324 Pa1620 ± 344 Pa
T 3.56 ± 0.92 K3.87 ± 1.11 K
CORR u 0.9997 ± 2.16 × 10−40.9997 ± 2.11 × 10−4
v 0.9991 ± 7.00 × 10−40.9989 ± 8.25 × 10−4
p 0.9993 ± 4.54 × 10−40.9993 ± 2.29 × 10−4
T 0.9998 ± 1.00 × 10−40.9998 ± 1.14 × 10−4
σ   error p 0 (1.14 ± 0.79)%(1.02 ± 0.73)%
Table 7. Accuracy of the flow field prediction based on the VAE-MLP model.
Table 7. Accuracy of the flow field prediction based on the VAE-MLP model.
Evaluation IndicatorsQuantityTraining SetTesting Set
MAE u 3.55 ± 2.71 m/s3.37 ± 0.68 m/s
v 3.08 ± 1.88 m/s3.22 ± 0.90 m/s
p 1641 ± 1074 Pa1535 ± 355 Pa
T 3.44 ± 2.62 K3.29 ± 0.85 K
CORR u 0.9996 ± 2.47 × 10−30.9998 ± 1.34 × 10−4
v 0.9992 ± 3.17 × 10−30.9994 ± 3.46 × 10−4
p 0.9990 ± 4.39 × 10−30.9993 ± 2.39 × 10−4
T 0.9998 ± 1.31 × 10−30.9999 ± 0.75 × 10−4
σ  error p 0 (0.94 ± 1.14)%(0.78 ± 0.70)%
Table 8. Time consumption of different computation processes.
Table 8. Time consumption of different computation processes.
ProcessTime-Consuming
CFD calculation (single core)Approximately 20 min
Training of VAE8 h 13 min
Training of MLP1 min 21 s
Prediction based on MLP-VAE network0.17 s
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Tan, Z.; Li, R.; Zhang, Y. Flow Field Reconstruction of 2D Hypersonic Inlets Based on a Variational Autoencoder. Aerospace 2023, 10, 825. https://doi.org/10.3390/aerospace10090825

AMA Style

Tan Z, Li R, Zhang Y. Flow Field Reconstruction of 2D Hypersonic Inlets Based on a Variational Autoencoder. Aerospace. 2023; 10(9):825. https://doi.org/10.3390/aerospace10090825

Chicago/Turabian Style

Tan, Zuwei, Runze Li, and Yufei Zhang. 2023. "Flow Field Reconstruction of 2D Hypersonic Inlets Based on a Variational Autoencoder" Aerospace 10, no. 9: 825. https://doi.org/10.3390/aerospace10090825

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop