Skip to main content

Airfoil analysis for optimization.

Scirocco couples a panel method to an integral boundary layer with eN transition. One solve gives you Cl, Cd, and Cm. One more call gives their derivatives with respect to every coordinate, angle of attack, Reynolds number, and Mach number.

-101−Cp
NACA 2412, α = 4°, Re = 10⁶Cl 0.720Cd 0.00693Cm -0.0585

A viscous solution in three calls

quickstart.cpp
#include <iostream>

#include "scirocco/scirocco.h"

int main() {
scirocco::Scirocco foil("2412", 160); // NACA 2412, 160 panels

// alpha = 4 deg, no lift target, Re = 1e6, Mach 0
foil.SetOper(4.0, -1.0, 1.0e6, 0.0);
if (!foil.Solve()) {
std::cerr << "did not converge\n";
return 1;
}

std::cout << "Cl = " << foil.GetCl() << '\n'
<< "Cd = " << foil.GetCd() << '\n'
<< "Cm = " << foil.GetCm() << '\n';
return 0;
}
Cl = 0.720173
Cd = 0.00693199
Cm = -0.0585055

The whole program runs in about a quarter of a second on an Apple M1 Pro. At 149 panels, paneling takes 1 ms and the viscous solve 23 ms.

See all timings

XFOIL-like viscous solver

A linear-vortex panel method coupled by Newton's method to an integral boundary layer and wake, with eᴺ transition and Kármán–Tsien compressibility.

How the solver works

Verified exact gradients

The discrete adjoint returns dCl, dCd, dCm with respect to every panel node, α, Re, and Ma. Each piece of the chain is tested against complex-step reference data from mfoil.

Compute gradients

Framework-agnostic MDO interface

Connect to Scirocco through Philote, a framework-neutral interface for multidisciplinary design optimization.

Connect through Philote