TL;DR:
Modeling airfoil efficiency typically relies on high-fidelity computational fluid dynamics (CFD) to accurately simulate air traversing the surfaces of a wing. But creating, testing, and analyzing data from an airfoil experiment can be even more resource intensive. In this study, I examine the possibilty of developing a machine learning (ML) surrogate model to side-step the computation and predict the output. The final result is based on 3,509 held-out test points of 288 airfoil shapes never used during training or tuning.
Introduction
Ever fascinated by taking to the air, humanity developed wings to lift us into the skies. In aviation, the wings on the side of the aircraft have a slightly more technical name: an “airfoil”. The airfoil is divided into two surfaces: the top and the bottom. Bernoulli’s principle states that as the speed of a moving fluid (liquid or gas) increases, the pressure within that fluid decreases. Since air moving over the top of a wing travels faster than air traveling underneath a wing, the air on top of a wing has less pressure. Greater pressure from the underside of the wing causes the wing to rise, giving the wing lift. Thus, as an aircraft speeds up, it begins to lift — and we take flight.

To optimize an airfoil’s design, you need to be able to accurately model the flow of the air around an airfoil. Two ways to accomplish this include: (1) high-fidelity computational fluid dymanics (CFD) simulations, or (2) run experiments and measure parameters. Ideally, the two work in tandem — simulations enable new wing designs, and experiment validates the design to support the theory. In practice, both can be a significant drain on resources because CFD is computationally difficult and building fully equipped wind tunnels costs time, effort, and money.
Surrogate Modeling
If you boil that down, you get a simple relationship between input parameters and output parameters. The input parameters are used to define wind speed and wing design, and the outputs are the metrics they produce based on the airfoil (ex. lift and drag). With the dawn of artificial intelligence (AI), a third option arises: ML surrogate modeling.

In short, surrogate modeling means using the model inputs as features and developing a machine learning algorithm to predict the output parameters without running the computationally expensive CFD models.

In this case, we’re trying to compute two parameters, each normalized to the product of dynamic pressure and chord:
- : Lift per unit span
- : Drag per unit span
To be specific, the “dynamic pressure” is defined by :
where is the air density, and is the airspeed.
Here’s some vocabulary we’ll encounter…
- Camber: The curvature of an airfoil’s surface from its leading edge to its trailing edge
- Angle of attack: The angle of the airfoil with respect to the incident windstream
- Computational Fluid Dynamics: The family of computer models used to simulate airfoil performance
- Class Shape Transformation: A method used to represent smooth geometries using a small number of parameters
and here are some acronyms, as well:
- AI / ML: Artificial Intelligence / Machine Learning
- CFD: Computational Fluid Dynamics
- CST: Class Shape Transformation
- DPH: Drag-Polar Hypernetwork
- MdAPE: Median Absolute Percentage Error
- MAE: Mean Absolute Error
Data Collection
The data used in this study was downloaded from the Github repository, “Dataset of Airfoil Aerodynamic and Geometric Coefficients“. Downloaded as a CSV, airfoil shapes are described with Class Shape Transformation (CST), Kulfan’s parameterization, in which each surface is a smooth curve built from a few weights on Bernstein polynomial bumps. The eight coefficients are four lower-surface weights followed by four upper-surface weights, each ordered from nose to tail. In total, the data contain 9 columns:
- Angle of attack (AoA)
- Four CST coefficients to define the lower-surface
- Four CST coefficients to define the upper-surface
These parameters are cleaned and used as the input to various ML models. Within the context of the airfoil shape, a “smooth” airfoil is one whose CFD -versus-AoA curve closely follows a cubic fitted to that airfoil’s own points. If each point is left out of the fit in turn and the fit predicts it, the median miss is within 0.05 in , about 5%. These airfoil are used as a proxy for well-converged CFD runs and the most trustworthy labels.
Modeling
Model choice
For completeness, 20 models were run on the same dataset and their held-out test metrics were compared. These included standard surrogate model choices like Gaussian Process and Multilayer Perceptrons (MLP), as well as interpolation-based models like K-Nearest Neighbors and Support Vector regression:.
| Model | Reason |
| K-Nearest Neighbors | Pure interpolation |
| Support Vector Regression (SVR) | Smooth kernel interpolator |
| Nymstrom Kernel Ridge Regression (KRR) | Faster approximation of regression kernel |
| Gaussian Process | Standard choice for engineering surrogates |
| Random Forest (RF) / Extra Trees (ET) | Robust, very little tuning |
| HistGradBoost | Does well against tabular data |
| Light Gradient Boosting Machine (GBM) | LightGBM that downweights outliers |
| [Residual] Multilayer Perceptron (MLP, ResMLP) | Standard choice in airfoil surrogates |
| Average Ensemble | Averages LightGBM, CatBoost, ResMLP |
And sometimes there are models that are non-standard, but offer perks that other models do not. For instance, the Drag-polar hypernetwork forces physical constraints on the shape of the airfoils, while Fourier-feature MLPs handle stalls. Still other models (ex. Student-t heteroscedastic Neural Networks) suppress outliers to enhance the model.
| Model | Reason |
| Drag-polar hypernetwork (DPH) | Forces physically plausible airfoil curves |
| Kolmogorov–Arnold network (KAN) | Learns smooth 1D function per connection |
| Student-t heteroscedastic NN | Unconverged points treated as outliers instead of being fitted |
| Fourier-feature MLP | Helps NNs learn sharp features (ex. stall) |
| Thin-airfoil features + LightGBM | Adds physics features to LightGB |
Results
Decoupled Models (SVR)
Of each of the models, Support Vector Regression (SVR) with a Gaussian (RBF) kernel performed the best. After tuning the hyperparameters, the most accurate parameter combination was identified based on 3,509 held-out test points of 288 airfoil shapes never used during training or tuning. Since each SVR has one output, two SVR models are run side-by-side to predict and : SVR #1 takes (AoA, shape parameters) and predicts , while SVR #2 takes the same 9 inputs and predicts . For this reason, the (smoothness), (fit tightness), and (noise tolerance) parameters will be different for each model.
| 15.8 | 0.001 | 0.022 | |
| 10.8 | 0.0023 | 0.016 |
But does this make sense? No.
Physically, the lift () and drag () are not independent forces — they are perpendicular components of a single aerodynamic force. But in our model comparison, SVR provided the best prediction result, so it was used as the “best” model despite separating the physics into two uncoupled components. Since the models treat the parameters separately, they arrive at different optimized parameters.
If the airfoil’s CFD drag-vs-angle-of-attack or lift-versus-AoA curves varies smoothly from one angle to the next, the usable held-out test data decrease significantly, but the modeling accuracy rises:
MdAPE | MAE | R^2 | MAE | R^2 | |
| SVR (tuned) | 0.42% | 0.0005 | 0.831 | 0.0042 | 0.9994 |
If all test points are considered, the median absolute percentage error (MdAPE) still remains rather small.
MdAPE | MAE | R^2 | MAE | R^2 | |
| SVR (tuned) | 3.03% | 0.0077 | -0.11 | 0.0375 | 0.962 |
Coupled Models (Parametric drag-polar hypernetwork)
The drag-polar hypernetwork couples aerodynamics with machine learning, inherently accounting for the relationship between lift and drag. The “drag polar” is an In aerospace engineering, a drag polar is a mathematical relationship that shows how an aircraft’s drag coefficient changes as its lift coefficient changes. It typically follows a parabolic curve like:
But an aircraft’s drag polars are based on a family of curves that shift drastically based on conditions like Mach number and Reynold’s number. The machine learning aspect is handled by the hypernetwork — a neural network whose one job is to generate the weights for another neural network, also called the “target network”. Instead of training a static model, the hypernetwork receives a context vector as input and dynmically outputs a tailored NN for the exact situation.
To be clear, the shap network only reads the eight shape coefficients (not angle of attack) and outputs , , , and along with four lift-curve coefficients — each airfoil gets its own drag-polar determined by its shape. Since the only way can change drag is by changing lift, AoA enters the model through the lift curve thereby ensuring the physics parameter coupling.
- Cd₀, k and k₄ are produced through an exponential, so they’re
always positive, and Cd ≥ Cd₀ > 0 always.
The parametric drag-polar hypernetwork reads in the airfoil’s shape and produces a lift curve and its drag polar. is computed from the predicted :
where is the minimum drag coefficient, is the lift at minimum drag, is the quadratic drag-rise factor, and is the quartic drag-rise factor. A drag-polar plot is illustrated below in two scenarios. The first scenario (left) illustrates various components of the drag and lift coefficients, and their relationship to each other and additional derived quantity. In the adjacent (right) plot, a similar aerodynmic analysis is compared to the same airfoil within a windtunnel. Discrepancies between the analytic and empirical data are small until higher drag coefficients begin to illustrate a drop in lift during windtunnel tests.

If the airfoil’s CFD drag-vs-angle-of-attack or lift-versus-AoA curves varies smoothly from one angle to the next, the usable held-out test data decrease significantly, but the modeling accuracy rises (shown below for a Drag-Polar Hypernetwork (DPH):
MdAPE | MAE | R^2 | MAE | R^2 | |
| DPH | 0.57% | 0.0004 | 0.962 | 0.0126 | 0.9974 |
But if all test points are considered, the median absolute percentage error (MdAPE) still remains rather small.
MdAPE | MAE | R^2 | MAE | R^2 | |
| DPH | 3.10% | 0.0075 | -0.075 | 0.0437 | 0.960 |
Compariong the drag-polar hypernetwork to the decoupled SVR models, the hypernetwork achieves a success in predicting worst-case drag. Demonstrating lower mean error and higher error on each subset. On airfoils with smooth – or -versus-AoA curves, the hypernetwork also wins, achieving a higher score (0.962 vs 0.831), indicating its big drag misses are smaller than the SVR network. In short, the drag-polar model stops drag from drifting off in ways the SVR could not handle.
However, the SVR wins on typical drag error (0.42% vs. 0.57% on smooth data), but both error terms are still relatively smally. SVR also models lift better, with an indicated error 3x lower than that of the DPH; in turn, this drives a weaker lift-over-drag () and force-direction scores.
Next Steps
In the future, we can begin looking at how the curves inside the model are fit, like increasing curve flexibility (ex. implementing higher-order polynomals for ). We could also implement a learned network branch, or even add a thin-airfoil term along with a learned correction. Judging by the performance of the DPH model, lift () is where the most work needs to be done.
Conclusion
In order to place a wing on an airplane, it needs to be tested in a windstream. Prior to the experiment, computationally expensive CFD simulations are performed to predict and optimize airfoil behavior. Before the model can be built, the airfoil must be defined by a set of parameters. In the end, we begin with a set of input parameters and after a lot of work, we end up with a set of performance metrics. At a high level, this is no different than the operation of a machine learning model.
References
- Guerrero, Joel & Maestro, Dario & Bottaro, Alessandro. (2012). Biomimetic spiroid winglets for lift and drag control. Comptes Rendus Mecanique. 340. 67-80. 10.1016/j.crme.2011.11.007.
- Boschetti, Pedro & Amerio, Andrea & Cárdenas, Elsa. (2009). Aerodynamic Performance as a Function of Local Twist in an Unmanned Airplane. 47th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition. 10.2514/6.2009-1481.