TL;DR
This paper introduces a novel deep learning approach using a Vision Transformer (ViT) based encoder-decoder to predict transonic flow over supercritical airfoils. By incorporating advanced geometric encoding and specialized loss functions, the method achieves high accuracy, particularly in critical regions like shock waves, while also demonstrating the effectiveness of transfer learning for improved generalization and reduced training time.
What Problem Does This Paper Address?
Designing efficient aircraft airfoils, especially supercritical airfoils, is crucial for optimizing aerodynamic performance. Traditional methods like Reynolds-averaged Navier-Stokes (RANS) simulations are computationally expensive and time-consuming, hindering rapid design iterations. While deep learning offers a promising alternative for faster flow field prediction, existing methods often struggle with accuracy in sensitive regions (like shock waves) and generalizability to new airfoil designs or flow conditions. This paper aims to bridge this gap by developing a deep learning model that can rapidly and accurately predict transonic flow fields over supercritical airfoils, addressing the limitations of current approaches in terms of accuracy and generalization.
Methods
The core of this work is a modified Vision Transformer (ViT)-based encoder-decoder network. Unlike standard ViTs, this architecture is adapted for regression tasks by removing the classification token and employing a decoder with an encoder-like structure.
Key methodological innovations include:
- Geometric Encoding: Four distinct methods (A, B, C, and D) are proposed to encode airfoil geometry and mesh information. Method D, which uses a filtered primitive mesh, shows superior performance by emphasizing near-field flow regions.
- Mesh Transformation: To handle the non-uniform grid structures common in CFD, a univalent transformation is applied to convert physical coordinates to uniform curvilinear coordinates, enabling structured input for the neural network.
- Advanced Loss Functions: To improve accuracy in critical areas like shock waves, two novel loss functions are introduced:
- Multilevel Wavelet Transformation Loss (lwt): This captures high-frequency components of the flow field, particularly useful for shock wave phenomena.
-
Gradient Distribution Loss (lgrad): This focuses on the gradients of flow quantities, further enhancing the model's ability to predict sharp changes. These are combined with the standard Mean Absolute Error (MAE) loss.
-
Transfer Learning: The model is pretrained on a large dataset of supercritical airfoils and then fine-tuned on smaller, specific datasets. This approach significantly improves generalizability and reduces the need for extensive training data for new designs or conditions.
Datasets
The study utilizes a custom-generated dataset for training and evaluation:
- Training Dataset: Consists of over 27,000 flow fields for approximately 500 supercritical airfoils, simulated using RANS modeling across 50 angles of attack (AoAs) at Mach number (Ma) = 0.73.
- Fine-tuning Datasets: Various configurations are used, including "Tiny" (0-50 airfoils, 2,805 samples), "Small" (0-100 airfoils, 5,534 samples), "Medium" (0-250 airfoils, 13,756 samples), and "Large" (0-450 airfoils, 24,744 samples). These are used in conjunction with specific snapshot sets (e.g., [0, 1, 3, 5]) for fine-tuning.
Key Insights and Ideas
- Geometric Encoding Matters: The way geometric information is presented to the neural network significantly impacts prediction accuracy. Method D, which strategically filters and emphasizes near-field information, proves most effective, especially for capturing shock wave details.
- High-Frequency Components are Key for Shock Waves: Shock waves are characterized by rapid changes, which are high-frequency signals in flow fields. The introduction of wavelet and gradient loss functions directly targets these components, leading to substantial improvements in accuracy in these critical regions.
- Transfer Learning is a Game-Changer for Generalization: Pretraining on a large, diverse dataset and then fine-tuning on smaller, specific datasets allows the model to generalize well to new airfoil designs and flow conditions with minimal additional training data and time. This is crucial for practical engineering applications.
- ViT Architecture is Well-Suited for Flow Prediction: The self-attention mechanism in ViTs allows for capturing long-range dependencies in the flow field, which is beneficial for complex aerodynamic phenomena.
Key Results
- Overall Accuracy: The proposed method achieves a mean absolute error on the order of 1e-4 for the complete flow field.
- Shock Wave Accuracy: The introduction of gradient and wavelet loss functions reduces the maximum error in the shock wave region by approximately 50%, and the maximum error decreases from 0.04 to 0.01-0.02.
- Encoding Method Performance: Method D (filtered primitive mesh) achieved the minimum l1_max error, outperforming other encoding methods.
- Loss Function Performance: The combination of l1 loss with gradient or wavelet loss significantly reduces errors. The second-order wavelet loss demonstrated the best performance in reducing the l1_max_avg error.
- Speedup: The pretrained model can predict 5,500 flow fields in approximately 72 seconds on a single Ascend 910 platform, which is orders of magnitude faster than traditional solvers.
- Transfer Learning Efficiency: With large pretraining datasets, only one snapshot is needed for fine-tuning to maintain an accuracy of 1e-4. Fine-tuning significantly reduces the time required compared to generating samples from scratch.
Limitations and Future Work
- Limitations:
- While the error near the shock wave is reduced, it is not entirely eliminated, indicating room for further improvement.
- The paper notes that the diagonal high-frequency component from wavelet transformation is incidental compared to horizontal and vertical components.
- The computational cost of higher-order wavelet transformations needs to be balanced against the benefits.
- Future Work:
- Enhancing the generalizability of the strategy to different grid topologies.
- Further investigation into optimizing the level of wavelet transformation to balance computational cost and accuracy.
Summary updated