RapidWing
A tool that designs race-car wings automatically. It creates wing shapes, checks them against the competition rules, tests them in airflow simulations on the university supercomputer, and uses each result to choose the next design to try.
Project details
1. The Problem
A Formula Student car's wings work like an aeroplane wing turned upside down. Instead of lifting the car, they push it into the ground, which gives the tyres more grip in corners. That push is called downforce. The price is drag, air resistance that slows the car on the straights.
A rear wing is usually not one wing but three, stacked with small gaps between them. Each piece has its own angle, size, and position relative to the others, so even a simple design has eight or more settings that all affect each other. The competition rules also limit how big the wing can be and where it can sit, and the front wing has to stay clear of the tyres.
Normally, an engineer changes one angle in a CAD program, runs a simulation, waits, compares, and repeats. That only covers a handful of the possible designs, and the small run-to-run variation in simulation results can be as large as the difference being measured. My first project, RapidFOAM, made running one simulation easy. RapidWing goes a step further: it lets the computer decide which wing designs are worth simulating.
My goals were:
- One description of the wing. A short settings file describes the wing shapes, the allowed ranges for each setting, and the rules. Every 3D file and every simulation is built from that one description.
- Throw out bad designs before simulating them. Designs where pieces overlap, gaps are too narrow, or the wing breaks the rules should be rejected in a fraction of a second, not after an hour on the supercomputer.
- Show the trade-off, not one answer. More downforce usually means more drag, and the best balance depends on the event. The result should be a set of best compromises, not a single "best" wing.
- Survive interruptions. Long runs on a shared supercomputer get interrupted. A run must be able to pick up where it stopped without repeating work.
2. How It Works
Building wing shapes from a few numbers. RapidWing starts from a library of proven wing cross-sections, called airfoils. It can bend, thicken, or slightly reshape them. It then places each piece behind the one in front with the exact gap and overlap requested: ask for a 12 mm gap and you get 12 mm. From these 2D cross-sections it builds the full 3D wing, including the side plates at each end.
Clean 3D files for simulation and manufacturing. RapidWing writes one closed 3D surface file per part, then checks each file for holes and broken triangles before it goes to the simulation, because a single hole can ruin a simulation. It can also export smooth CAD files that open in SolidWorks, the design software engineers use. An automated test checks that the two kinds of file stay within 0.1 mm of each other.
A quick rule check first. Before any simulation, every design is checked for overlapping pieces, gaps that are too narrow, parts too thin to build, and anything outside the space the rules allow. This takes about 15 milliseconds for the example rear wing and about 45 for the larger front wing, so bad designs are thrown out without wasting any supercomputer time.
A smart search instead of trying everything. Simulating every possible wing would take far too long. RapidWing first tries a spread of designs across the whole range. It then uses Bayesian optimization, a method that builds a statistical model from the results so far and uses it to pick the next design most likely to improve the trade-off between downforce and drag. The model takes into account how noisy each result is, and it learns which kinds of design tend to make the simulation fail. A simpler search method runs on the supercomputer itself, where the heavier tools can't be installed.
Fast first, then careful. Early simulations use a quicker, lower-detail setting so many designs can be tried. The most promising ones are then re-run at higher detail, and RapidWing checks whether the quick runs ranked the designs in the same order. It also tests the best wings in other situations: a rear wing with its adjustable flap opened for the straights (DRS), and a front wing when the car dips its nose under braking. A wing that only works in one situation gets caught.
A fair comparison every time. Every design is simulated in the same-sized virtual wind tunnel, with the same starting cell size, so differences between results come from the wings and not from the simulation setup.
Built for a busy shared supercomputer. RapidWing keeps several simulations running at once on the university cluster. It avoids older machines that can't run the software, automatically retries a job once when a machine fails, and when restarted, it reconnects to jobs that were still running or cleanly discards ones that were lost.
A web app to see it all. A browser app, in the same style as RapidFOAM's, lets you build a wing visually with a live 3D preview, set up and launch runs on the supercomputer, and explore the results. Charts show the trade-off between downforce and drag and which settings matter most, and you can compare designs side by side. For every simulation it shows whether the result had settled, so an unreliable result is visible before anyone trusts it.
Key Takeaway
"Most of the work in automatic design is not the search method itself. It's making every test a fair comparison, rejecting impossible designs before they waste computing time, measuring how reliable each result is, and making sure a two-day run survives a machine failure. A clever search fed with unfair or unreliable results will confidently pick the wrong wing."
3. Where It Stands
RapidWing is in active development for the Rapidamente Formula Student aero team. All the steps are connected: from the settings file to a checked design, 3D files, a simulation on the supercomputer, a score, and a final report. Example setups cover a three-piece rear wing with eight adjustable settings and a front wing that runs close to the ground. No optimized wing from it has been built or tested on the car yet.
The final report ranks the best compromise designs for each Formula Student event. Skidpad, a tight circle, mostly rewards downforce. Endurance, a long race, gives much more weight to low drag. The top designs are exported as 3D files and SolidWorks CAD files.
The simulations underneath come from RapidFOAM, which has been checked against published wind-tunnel measurements, including one test case within 1.6% of the measured drag. RapidWing itself has 81 automated tests covering the wing shapes, rule checks, the search methods, resuming after interruptions, and the web app. They replace the slow simulations with stand-ins so they run quickly. They run automatically on Windows and Linux with every change; a few need optional extra software and are skipped without it.
RapidWing has clear limits. It only searches the range of designs a person sets up, the simulations have known weaknesses, and any design it suggests still needs a more detailed check and, eventually, testing on the real car. It doesn't replace engineering judgement. It points the team's limited supercomputer time and attention at the designs most worth building.