Abstract
The Reynolds-averaged Navier-Stokes (RANS) equation for compressible flow over supercritical airfoils must be rapidly and accurately solved to shorten design cycles. While deep-learning methods can effectively predict flow fields, enhancing accuracy near sensitive regions like shock waves and improving generalizability remains a challenge. This study introduces a modified vision transformer (ViT)-based encoder-decoder network designed for transonic flow prediction. We compare four geometric encoding methods and introduce multilevel wavelet transformation and gradient distribution losses to the loss function. Statistical results show accurate predictions across the flow field with a mean absolute error (MAE) on the order of $10^{-4}$. Notably, the new loss components reduce maximum errors near shock areas by 50%. Furthermore, transfer learning on large-scale datasets enables high accuracy on small datasets with significantly reduced training time.
Introduction
In aerodynamic design, understanding air movement around an airfoil under varying conditions is critical. Traditional RANS simulations, while accurate, are computationally expensive and slow, creating a bottleneck in iterative design. Deep learning offers a potential shortcut by mapping airfoil shapes directly to flow fields. However, standard neural networks often struggle with two major issues: "blurring" sharp physical features like shock waves in transonic flow and failing to generalize to new airfoil shapes without massive amounts of training data.
Methodology
To address these challenges, we proposed a framework combining advanced architecture with physics-informed loss functions.
- Modified Vision Transformer (ViT): Unlike standard CNNs, our ViT-based encoder-decoder handles regression tasks by removing classification tokens and utilizing a symmetric decoder structure.
- Geometric Encoding (Method D): We transformed Cartesian coordinates into a structured curvilinear grid. Our most successful approach, "Method D," uses a spatial filter to prioritize the "near-field" flow closest to the wing, where physics is most complex.
- High-Frequency Loss Functions: To sharpen shock wave predictions, we introduced two components:
- Multilevel Wavelet Transformation ($l_{wt}$): This decomposes the flow field into frequency components, forcing the model to minimize errors in high-frequency details (shocks).
- Gradient Distribution ($l_{grad}$): This penalizes differences in spatial derivatives to ensure predicted pressure jumps match physical reality.
Results and Discussion
The model was trained on a dataset of over 27,000 flow field samples generated via the CFL3D RANS solver. The results demonstrate significant improvements over traditional deep-learning architectures:
- Precision and Speed: The model achieved a global MAE of $10^{-4}$ and reduced shock-area errors by 50%. Inference is exceptionally fast, processing 5,500 flow fields in just 72 seconds on an Ascend 910 platform—hundreds of times faster than traditional CFD.
- Few-Shot Engineering: Through transfer learning, a model pre-trained on large datasets can be fine-tuned on as few as 1–5 samples of a new airfoil design to achieve high accuracy, proving its utility in real-world engineering cycles.
- Architecture Comparison: Ablation studies confirmed that the ViT-based architecture significantly outperforms popular CNN-based models like U-Net in both average and maximum error metrics.
Conclusion
By treating shock waves as high-frequency signals and prioritizing near-field geometric data, this framework provides a robust and efficient alternative to traditional CFD for transonic flow prediction. Future work will focus on extending these strategies to unstructured meshes and complex 3D geometries to further enhance its applicability in full-aircraft simulations.
Summary updated