MaterialTech Labs
Blog · Applied CFD

Airfoil Optimization via CFD

18% drag reduction using computational simulation and genetic algorithms.

Jul 2026 · 8 min read · Applied CFD

The problem: too many prototypes, too much time

Airfoil design follows a classic cycle: CAD, prototype, wind tunnel, measure, tweak, repeat. Each iteration costs money and weeks of waiting. With CFD (Computational Fluid Dynamics) simulation and optimization algorithms, that cycle shrinks to hours.

In this article we describe a real case of airfoil optimization for a fixed-wing drone, starting from the baseline NACA 4412 airfoil and achieving an 18% reduction in the drag coefficient (Cd) while maintaining lift (Cl) within the design margin.

Methodology: from parametric airfoil to structured mesh

Step 1: Airfoil parameterization

We don't start from fixed coordinates, but from a parametric representation of the airfoil using degree-5 Bezier curves with 18 control points. Each control point can move within a bounded range that ensures the resulting airfoil is physically viable (maximum thickness, leading-edge radius, etc.).

# Parametric representation of the mean camber line and thickness distribution
def naca4_profile(m, p, t, n=200):
    """Generates a 4-digit NACA airfoil from its parameters."""
    x = np.linspace(0, 1, n)
    yt = 5 * t * (0.2969*np.sqrt(x) - 0.1260*x - 0.3516*x**2 + 0.2843*x**3 - 0.1015*x**4)
    yc = np.where(x < p, m/p**2 * (2*p*x - x**2), m/(1-p)**2 * ((1-2*p) + 2*p*x - x**2))
    dyc_dx = np.where(x < p, 2*m/p**2 * (p - x), 2*m/(1-p)**2 * (p - x))
    theta = np.arctan(dyc_dx)
    xu = x - yt * np.sin(theta)
    yu = yc + yt * np.cos(theta)
    xl = x + yt * np.sin(theta)
    yl = yc - yt * np.cos(theta)
    return xu, yu, xl, yl

Step 2: Automatic meshing with snappyHexMesh

OpenFOAM provides snappyHexMesh, a meshing tool that automatically refines the mesh near the airfoil surface and adds layers to resolve the boundary layer with precision. For an airfoil at Re = 1.2 × 106, we use a target y+ of 1, resulting in a first-cell height of approximately 2.3 × 10-5 m.

/* snappyHexMeshDict */
castellatedMesh true;
snap            true;
addLayers       true;

refinementSurfaces
{
    airfoil
    {
        level (5 5);
    }
}

addLayersControls
{
    relativeSizes true;
    layers
    {
        airfoil
        {
            nSurfaceLayers 12;
        }
    }
    expansionRatio 1.2;
    finalLayerThickness 0.4;
    minThickness 1e-6;
}

Step 3: Solver and boundary conditions

We use simpleFoam, the steady-state incompressible solver with the k-ω SST turbulence model — ideal for flows with adverse pressure gradients and boundary layer separation. The boundary conditions replicate those of a wind tunnel: fixed velocity at the inlet (U = 30 m/s), fixed pressure at the outlet, and slip walls on the domain sides.

/* 0/U - Velocity boundary conditions */
boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (30 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    airfoil
    {
        type            noSlip;
    }
    topAndBottom
    {
        type            slip;
    }
}

Optimization with genetic algorithms

With the simulation pipeline automated, we run a genetic algorithm (NSGA-II) with 50 individuals per generation for 30 generations. Each individual is a vector of 18 Bezier parameters. The fitness function penalizes drag and rewards lift maintenance:

fitness = -(C_d / C_d0) + penalty(max(0, C_l_min - C_l), max(0, C_l - C_l_max))
# Maximize the negative of normalized drag, with a penalty for lift loss

Results

After 1,500 simulations (50 × 30), the best airfoil achieved:

  • Cd: 0.0089 (baseline: 0.0109) — 18.3% reduction
  • Cl: 0.48 (baseline: 0.50) — within the acceptable margin
  • L/D: 53.9 (baseline: 45.9) — 17.4% improvement in aerodynamic efficiency

The optimized geometry subtly shifted the maximum thickness point aft and reduced the upper-surface curvature in the pressure recovery zone, delaying the laminar-to-turbulent transition.

Conclusions and next steps

The CFD + genetic algorithms combination enables efficient exploration of the design space. The computational cost (≈ 1,500 core-hours) is negligible compared to the cost of manufacturing and testing 10 physical prototypes.

The next step is to incorporate multi-objective optimization that simultaneously considers drag, lift and pitching moment, in addition to adding structural constraints via FSI (Fluid-Structure Interaction) coupling.