Source-linked AI summary
Deep Learning Methods for Reynolds-Averaged Navier-Stokes Simulations of Airfoil Flows
Nils Thuerey, Konstantin Weissenow, Lukas Prantl, Xiangyu Hu
TL;DR
The paper asks how accurately deep learning can infer RANS solutions for airfoil flows and how training scale affects that accuracy. It evaluates modernized U-Net models for pressure and velocity prediction, finding best-model errors below 3% across previously unseen airfoil shapes. The authors also present the setup as a public, generic starting point for PDE-learning research.
Problem
The study addresses concerns about the accuracy and analyzability of deep learning by investigating its use for RANS airfoil-simulation inference.
Method
The authors evaluate many CNN models, focusing on a modernized U-Net that maps airfoil-flow inputs to RANS solution fields.
Results
Best models achieve less than 3% relative error, while larger training sets and CNN models are needed to reduce errors further.
Takeaways & Limitations
The publicly available code, training data, and generic Cartesian-grid setup provide a starting point and benchmark for deep learning methods in CFD and PDE problems.
Takeaways & Limitations
Increasing model and training-data size does not scale to arbitrary accuracies, indicating a need for different approaches and architectures.
Abstract
from arXiv · showhide
With this study we investigate the accuracy of deep learning models for the inference of Reynolds-Averaged Navier-Stokes solutions. We focus on a modernized U-net architecture, and evaluate a large number of trained neural networks with respect to their accuracy for the calculation of pressure and velocity distributions. In particular, we illustrate how training data size and the number of weights influence the accuracy of the solutions. With our best models we arrive at a mean relative pressure and velocity error of less than 3% across a range of previously unseen airfoil shapes. In addition all source code is publicly available in order to ensure reproducibility and to provide a starting point for researchers interested in deep learning methods for physics problems. While this work focuses on RANS solutions, the neural network architecture and learning setup are very generic, and applicable to a wide range of PDE boundary value problems on Cartesian grids.
1 Introduction
The study evaluates deep learning for inferring two-dimensional RANS airfoil flows, focusing on accuracy, training scale, and generic applicability to PDE boundary value problems.
- The study investigates the accuracy of trained deep learning models for inferring two-dimensional RANS simulations of airfoils.
- It examines how network size and the number of training samples affect flow-prediction accuracy.
- The learning task directly maps airfoil shape and freestream velocity to Cartesian-grid velocity and pressure fields.
- The authors present the approach as generic for PDE boundary value problems and provide a publicly available CFD testbed with code and training data.
- The setup uses supervised learning with controlled, low-noise data, while nonlinear solutions and high accuracy remain the main difficulties.
- More than 500 trained CNN models are used to study how well networks capture the nonlinear behavior of the RANS equations.
2 Related Work
Prior work applies deep learning to diverse CFD, turbulence, and fluid-learning tasks, whereas this study directly infers high-dimensional RANS flow fields with CNNs.
- Deep learning has been applied to CFD tasks including pressure projection, time integration, fluid-simulation upscaling, and physically based flow modeling.
- RANS-related studies have addressed turbulence uncertainty, model parameters, anisotropy tensors, and improved turbulence models for airfoil flows.
- Other approaches learn reduced representations of space-time fluid data and can generate new solutions efficiently within constrained flow regions.
- Related methods infer heat-diffusion, cavity-flow, discretization, semi-supervised flow, or airfoil lift solutions, while this work targets high-dimensional velocity and pressure fields.
- The paper focuses on a U-Net rather than GAN-based alternatives and targets the established, industry-relevant Spalart-Allmaras RANS model.
- Its architecture receives three constant airfoil-containing fields and produces same-sized outputs trained against OpenFOAM targets with an L1 loss.
3 Non-linear Regression with Neural Networks
The paper frames neural networks as nonlinear regressors trained by differentiable losses and explains how convolutional, resizing, and skip-connection operations support spatial field prediction.
- Neural networks approximate a target function y = ˆf(x) with a parameterized representation f(x,w).
- Activation functions introduce the nonlinearities needed for neural networks to represent nonlinear mappings.
- A network layer combines preceding-node values through weights and applies an activation function component-wise.
- A differentiable loss evaluates outputs against targets and enables backpropagation of gradients to update network weights.
- Convolutional layers exploit spatial arrangements, learn filter kernels, and use fewer weights than fully connected layers.
- Pooling and strided convolutions resize feature maps, allowing stacked convolutions to operate across multiple spatial scales.
4 Method
The method section introduces the methodology for deep-learning-based inference of RANS solutions.
- The paper describes its methodology for deep-learning-based inference of RANS solutions.
Data Generation
The study generates supervised RANS training data from diverse airfoil shapes and flow conditions, then reserves unseen airfoils for testing generalization.
- Simulation dataset: 1505 UIUC airfoil shapes are combined with randomly sampled Reynolds numbers and angles of attack to generate RANS flow solutions.The Reynolds-number range is Re = [0.5, 5] million, with incompressible flow and angles of attack from ±22.5 degrees.
- Simulation dataset: The learning targets contain velocity and pressure distributions computed with the Spalart–Allmaras one-equation turbulence model.
- Inference region: 2 × 2 units around each airfoil define the smaller region used for deep-learning training instead of the full simulation domain.The reference simulations retain sufficiently distant boundaries, while inference focuses on the vicinity of the airfoil.
- Ground-truth representation: A Cartesian 128^2 grid is produced by linearly interpolating cell-centered OpenFOAM values to obtain pressure and velocity ground truth.The interpolation spacing is 1/64 units, and the smooth solution permits reduced-resolution sampling after boundary-layer-resolving simulation.
- Evaluation split: Samples are split into training and validation sets, typically using an 80% to 20% ratio, while 30 unseen airfoils provide 90 test samples.The held-out airfoils use the same Reynolds-number and angle-of-attack ranges as the training data.
Pre-processing
The preprocessing encodes boundary conditions and targets on matching 128^2 × 3 grids, applies physical scaling choices, and normalizes channels for training stability.
- Grid encoding: Inputs and outputs both use 128^2 × 3 grids, matching the pressure and two velocity components of each RANS solution.
- Boundary-condition encoding: Airfoil shape and freestream conditions are spatially encoded so boundary-condition information is available throughout the network input.The airfoil mask is repeated across input fields, while freestream velocity components initialize the corresponding channels outside the airfoil.
- Target representation: The target channels contain pressure p followed by x- and y-velocity components of the RANS solution.
- Physical normalization: Velocity and pressure are made dimensionless using ˜v_o = v_o/|v_i| and ˜p_o = p_o/|v_i|^2 before training.Pressure scaling removes its quadratic dependence on freestream velocity magnitude.
- Pressure preprocessing: Mean pressure is optionally removed as ˆp_o = ˜p_o − p_mean because random pressure offsets are not correlated with the inputs.The mean is defined as p_mean = Σ_i p_i/n over the individual pressure samples.
- Numerical normalization: Each channel is finally scaled to [−1, 1] using its maximum absolute training-set value, with velocity scaled but not offset.
Neural Network Architecture
The model is a modified U-Net encoder-decoder that combines multiscale convolutional processing with skip connections and repeated boundary-condition information.
- Architecture choice: The study focuses on a modified U-Net after comparing architectures with different skip-connection configurations.The selected variant provided good quality with relatively low memory requirements.
- Encoder-decoder structure: The U-Net progressively downsamples inputs with strided convolutions, then restores resolution with average-depooling layers in a mirrored decoder.The encoder extracts increasingly large-scale features while the decoder reduces feature channels as spatial resolution increases.
- Skip connections: Skip connections concatenate encoder channels with corresponding decoder features to preserve low-level input information during solution reconstruction.
- Model configuration: The standard U-Net uses 7.7m weights and seven convolutional blocks to transform a 128^2 × 3 input into a 512-feature bottleneck.
- Input design: Freestream conditions are redundantly repeated across the domain so the network receives boundary-condition information throughout its convolutional hierarchy from the start.This avoids relying solely on later propagation through the bowtie-shaped network.
Supervised Training
The study evaluates supervised CNN training choices for inferring RANS airfoil flows, showing that preprocessing, optimization, data volume, and model capacity jointly affect accuracy and solution quality. Best models achieve less than 3% relative error, while direct solver comparisons suggest roughly 1000× speedup under the tested implementations.
- Data preprocessing: 291.34 average error for direct data fell to 0.0566 with velocity normalization and 0.0136 after removing the pressure null space.All subsequent models use fully normalized data.
- Optimization: 4 · 10^-3 to 4 · 10^-4 produced good convergence, while the largest tested learning rate overshot and struggled to converge.
- Optimization: Learning-rate decay stabilized training and reduced performance variance, with the strongest benefit when less training data was available.The learning rate was reduced to 10% of its initial value during the second half of training.
- Data and model size: Validation errors were larger and more variable with little data, then stabilized as training samples increased and model-specific accuracy saturation emerged.Across models with 122,979 to 30,905,859 weights, roughly doubling training data was sufficient to reach similar saturation points despite fourfold weight increases.
- Accuracy: 2.6% average relative error was achieved across all three output channels, with 2.15% x velocity, 2.6% y velocity, and 14.76% pressure error.The pressure error was attributed to many small pressure values and fewer large spikes under the L1 loss.
- Generalization: 2.32% error was reached by the 30.9m-weight model trained on 51k mixed samples, showing that generalization depends on data type, data amount, and CNN capacity.The mixed-data 30.9m model achieved 2.35% with 25,600 samples and 2.77% relative to the regular-data model comparison.
- Performance: 1000× speedup was reported against the tested OpenFOAM baseline, while a single 30.9m-model evaluation took 5.53 ms including GPU transfer.The comparison is qualified because the OpenFOAM and PyTorch implementations differ substantially.
- Discussion: Less than 3% relative error was obtained overall, but further reductions require substantially larger datasets and CNNs and may eventually require different approaches.Larger models also produced sharper solutions despite stagnating aggregate error measurements.
5 Conclusions
The study presents a first investigation of deep-learning inference for airfoil RANS solutions and offers a reproducible framework for CFD experimentation. Its results support methodological use within this setting, while emphasizing that transfer to other physical problems is not guaranteed.
- The study investigates deep-learning inference of RANS solutions for airfoils.
- The study’s results are not guaranteed to carry directly to other problems because physical solution spaces differ.
- The proposed simulation and training setup is simple but provides substantial complexity for machine-learning algorithms.
- Nondimensional problem formulation significantly improves results without changing the deep-learning components.
- The setting provides a point of entry and benchmark for CFD researchers evaluating learning methods for fluids and related physics problems.
- The authors identify inverse problems, flow control, and shape optimization as future applications for trained flow models.
Architecture and Training Details
The models use a fully convolutional, modernized U-net-style architecture with configurable channel sizes and direct three-channel outputs. Experiments compare model sizes, data compositions, and training configurations, including models with up to 30.9m weights.
- Architecture: The network is fully convolutional with 14 layers organized into repeated convolutional blocks.Blocks use activation, convolution, batch normalization, and dropout.
- Architecture: Linear upsampling followed by convolution replaces transpose convolutions with strides in the decoder.
- Evaluation settings: Figure 10 compares regular, sheared, and mixed datasets for a 7.7m-weight model.
- Model size: Channel base multipliers produce models ranging from 122k to 30.9m weights.The multipliers correspond to ci values from 3 through 7.
- Inputs and outputs: The network receives three input channels and generates three output channels.The three output channels are produced by the corresponding final convolution.
- Evaluation settings: Figure 11 compares regular and mixed data for a 30.9m-weight model, which slightly benefits from sheared data at 25.6k and 51.2k samples.
Training Data
Training data sizes range from minimal datasets to larger regular, sheared, and mixed airfoil collections, with validation sets capped for stability. Training runs generally converge without overfitting, while increased dropout slightly reduces accuracy.
- Dataset sizes: Training datasets begin at 100 samples and increase by factors of two up to 12800.
- Dataset splits: Datasets typically use an 80% training and 20% validation split, with validation capped at 400 samples.The cap was used because several hundred validation samples yielded stable estimates.
- Dataset composition: The sheared dataset contains 27108 samples, while mixed datasets combine half regular and half sheared samples.
- Training evolution: Training runs converge to stable training and validation losses without exhibiting overfitting over time.
- Regularization: Increasing dropout generally deteriorates test accuracy, although its overall effect is relatively small.