Why I Built a Browser-Based XFOIL (and Why We're Investing in Open Source)

Harry R. Smith
Published 17 Mar 2026

Harry Smith, Director of Flight Sciences

I've been building interactive aerospace visualisation tools for years - in every job I've ever had, publicly through aircraftflightmechanics.com and aeronauty.com, then through various projects at Flexcompute. Adaptive streamlines, real-time flow rendering, GPU-accelerated particle tracing - the sort of thing that really helps understand fundamental flow physics. For a while, I've been interested in developing a coupled potential-viscous solver à la XFOIL, since XFOIL is the gold standard for these 2D codes.

Every aerospace engineer knows XFOIL. Most of us learned airfoil theory by running it. And despite being the most important airfoil analysis tool in existence, using it in 2026 means wrestling with a command-line Fortran program from the late 1980s, hoping your operating system cooperates, and sharing results by copying text files around. I'm a Mac user and it's an nightmare trying to get XFOIL and X11 to do anything nicely on Apple Silicon - so I've done the following at least in part to solve a daily gripe of my own.

To understand how the actual nuts and bolts of XFOIL work, I ported the whole to Rust, compiled it to WebAssembly, wrapped it in the best visualisation and UI work I could manage, and today we're releasing it for free.

It's called Flexcompute Foil. (People will inevitably shorten this to FlexFoil, and I'm fine with that/it's the intent.) You can use it right now at foil.flexcompute.com/flexfoil/. No installation, no licence, no account (though later, we'll add optional login to store/share/collaborate.) 

The Rust solver core will be released as open source under the GPL, consistent with the original XFOIL licence. Mark Drela himself has given his blessing to the project.

What It Does

Flexcompute Foil runs XFOIL's actual algorithms in your browser. I didn't build a simplified panel method and call it a day - this is a faithful reimplementation of Drela's linear vorticity panel method, the integral boundary layer equations, the eN transition prediction, and the global Newton viscous-inviscid coupling. Every function is validated against the original Fortran output as is the total integrated outputs (see below and the link to my personal blog.)

On top of the solver, I've built the interface XFOIL always deserved. Real-time flow visualisation with adaptive streamlines, surface pressure vectors, and smoke particle tracing - all updating live as you change angle of attack. GPU acceleration keeps it smooth (if you're in a suitable browser.) Interactive geometry editing with instant solver feedback and curvature-based panel spacing. Instant polar generation using Drela's two-solution superposition (each new angle of attack costs essentially nothing). A proper modern UI with docking panels, dark and light themes, and a searchable airfoil library.

If you've used any of the interactive tools on aeronauty.com, you'll recognise the visualisation philosophy. The difference is that this time there's a production-grade solver underneath it.

Oh, and it works on mobile.

Try It Here

Here's a live example running the actual applet inline. If the embed doesn't load (we're waiting on some PRs to merge to allow embedding), open the same example directly on foil.flexcompute.com.

It's the XFOIL you know and love with some added bells and whistles like a local-only SQL storage for everything you do - so you can add to a polar without re-running the whole thing. And look for data trends over everything you've done with the correlogram:

Or click a point in a polar and see the flow field that causes the result you're interested in:

 

 

Why Free?

Flexcompute is a commercial company. We sell CFD solver time. So why am I spending my time building a free tool?

Let's be honest about this - there are three reasons, and they're all good ones.

First, because accessibility matters. The student learning airfoil theory in Delft or Bangalore shouldn't have to fight their operating system to run a panel method. I put everything on aeronauty.com for free because I believe educational tools should be freely available. This is the same philosophy applied to a much more capable tool. Having this stuff out there benefits us all.

Second, because the community deserves this. XFOIL has served aerospace for several decades. Making it available in a form that meets today's expectations is the least we can do. The solver is Drela's achievement. The browser rewrite is my contribution.

Third, because it's good for Flexcompute, and there's no point pretending otherwise. Every engineer who uses Flexcompute Foil is an engineer who knows our name. Some will eventually need 3D CFD, and Flow360 is right there. Some will need to track results across hundreds of simulations, and Thread (the provenance tracking platform I'm building) will be there for that. The free tool builds awareness. The commercial products earn revenue. That's a sustainable model.

I don't believe in locking up foundational tools behind paywalls. Panel methods are textbook science. The value we add commercially is in high-fidelity 3D simulation, in scale, in the infrastructure that turns raw CFD into engineering decisions. Flexcompute Foil sits at the beginning of that journey, not the end.

Why Rust and WASM?

Rust gives us memory safety, predictable performance, and a single codebase that compiles to both native and WebAssembly targets. Same solver code runs in the browser and on a server for batch processing. No performance tax for safety, no separate codepath for the web.

WASM means the solver runs at near-native speed in any modern browser, on any platform, with no plugins. The computation happens on your machine, not ours. Your airfoil data never leaves your browser.

And the Rust solver crate is a clean, well-tested library with a defined API. It can be embedded in other tools, compiled to other targets, extended with new capabilities. When we open-source the core, the community gets code that's designed to be built upon - not just code that works.

Open Source, On Purpose

The Rust solver will be released under the GPL, honouring the original XFOIL licence. This isn't reluctant compliance - it's deliberate.

An open-source airfoil solver in Rust is something the aerospace community has wanted for years. The sheer number of projects that have tried to wrap XFOIL in Python (or reimplement subsets in Julia, C++, you name it) tells you there's demand for a modern, clean implementation. A tested Rust crate that faithfully reproduces XFOIL's behaviour gives the community a proper foundation to build on.

I expect people will fork it, extend it, embed it in their own tools, and write papers about it. Every one of those activities puts Flexcompute's name in front of engineers. That's the model.

The Flexcompute Foil web application itself - the UI, the visualisation engine, the interactive features - remains proprietary. The distinction is clean: the science is open, the product experience is ours.

What I Learned Along the Way

I've written a much longer piece about the porting process, and rich write up of the validation on aeronauty.com: What I Learned Porting XFOIL to Rust. It covers the debugging war stories in detail - the edge velocity clamp that froze the solver after one iteration, the repanelling difference that produced a factor-of-two velocity error at the leading edge, the 23× premature transition that cascaded from a few percent error in panel placement, the 1987 amplification function we ported instead of the 1996 update (78% stall error → 18% after swapping one function), and four independent bugs hiding in a single shear-lag equation.

It also covers how the 365 tests and the instrumented Fortran binary actually work - including how I got AI agents to instrument fifteen Fortran subroutines with structured JSON dumps so I could diff the two solvers field by field at every internal checkpoint. That instrumentation pipeline is what made the whole project tractable. Without it I'd still be guessing.

If you're interested in the numerical details or in how AI-assisted porting of legacy scientific code actually works in practice, that's the piece to read.

Acknowledgements

This project wouldn't exist without Mark Drela's XFOIL. The algorithms, the numerical methods, the physical insight embedded in the code - these are his contributions to the field, and they're as impressive today as when they were first written. I'm grateful for his support and his blessing to build on his work.

Flexcompute Foil is the first in a planned suite of free, browser-based aerospace analysis tools from Flexcompute.


Try Flexcompute Foil at foil.flexcompute.com/flexfoil/. The Rust solver source will be available on GitHub.

You Might Also Like
Introducing Photonic Canvas: End-to-End Photonic Design Automation

Introducing Photonic Canvas: End-to-End Photonic Design Automation

11 Mar 2026 By Prashanta Kharel, PhD
The DARPA Lift Challenge and the Best Simulation Software to Help Win

The DARPA Lift Challenge and the Best Simulation Software to Help Win

09 Feb 2026 By Steve Defibaugh
How to Customize Your CFD Solver Behavior With User-Defined Dynamics

How to Customize Your CFD Solver Behavior With User-Defined Dynamics

05 Feb 2026 By Steve Defibaugh