Inspiration

Testing a vehicle idea for real is slow and expensive, and professional simulation tools can be hard to get into. We wanted a place where anyone can load a car, change one thing, such as downforce or fuel, and see the physical consequence in seconds. And if an AI agent can write code, why not let it run the experiments too?

What it does

Formula Ultimate Workbench is an open-source (MIT), CAD-style simulation platform that runs locally in its own desktop window.

  • Bring your own car: load a JSON vehicle file and an optional .glb 3D model, or start with the built-in demo car.
  • Experiment: edit parameters in SI units, run, and inspect telemetry, track maps, a 3D view and conservation residuals.
  • Four studies: energy and thermal race, multi-lap strategy, closed-loop lap, and downforce-and-fuel race.
  • Explore: save and diff setups, compare runs, sweep one or two parameters, or use a seeded optimizer.
  • Built-in AI agent: ask in plain language. The agent calls the workbench's own tools, starts real runs and shows each tool call.

Results from our synthetic demo car over 10 laps:

Experiment Race time Top speed Slowest corner
Baseline (50 L fuel) 976.2 s 83.2 m/s 20.8 m/s
Zero downforce 1030.7 s 84.1 m/s 19.8 m/s
180 L fuel 988.1 s 83.1 m/s 20.7 m/s
5 L fuel fuel exhausted after 1 full lap 83.2 m/s 20.8 m/s

Drag is a separate parameter here, so removing downforce does not also reduce drag area.

How we built it

The physics is Python behind a local FastAPI server. The interface is React, TypeScript and three.js. Runs are stored with their inputs and replay metadata.

In a corner of radius \( r \), tyre grip depends on weight plus downforce:

$$ v_{corner} = \sqrt{\frac{\mu m g r}{m - \frac{1}{2}\mu \rho C_L A\, r}} $$

If the denominator is not positive, this limit no longer applies. On the straights, top speed is where engine power balances drag and rolling resistance:

$$ P = \left(\frac{1}{2}\rho C_D A v^2 + C_{rr}\left(mg + \frac{1}{2}\rho C_L A v^2\right)\right) v $$

A backward pass handles braking. Fuel volume \( V \) becomes energy \( E = \eta V e \) and mass \( m_f = \rho_f V \), so the car gets lighter. We report each lap's energy residual instead of correcting it:

$$ R = W_{traction} - W_{drag} - W_{rolling} - W_{brake} - \Delta E_k $$

We built the workbench with an automated loop: OpenAI Codex wrote code, Claude wrote specs, reviewed, fixed and committed, and five gates checked the result. The gates cover the publication boundary, repository tests, API tests, UI tests and end-to-end browser tests. The demo video was recorded with Playwright and narrated with an ElevenLabs voice.

Challenges we ran into

  • Trusting AI-written code: review caught problems such as a demo car mesh with half of each box face missing, and runs that ignored the selected vehicle's values. We protect the acceptance tests from being edited by the loop.
  • Slow physics: the closed-loop lap takes tens of seconds, and larger time steps made it fail, so we kept the slower settings.
  • UI bugs that tests missed: an icon once stretched across the whole viewport. We fixed it and added a layout test.
  • Staying honest: running out of fuel is shown as a result, not hidden.

Accomplishments that we're proud of

  • A complete path from a vehicle file to a race result, comparison and export.
  • An AI agent that uses the same capabilities as the user.
  • In the four experiments above, the energy residual stayed below \( 2\times10^{-7} \) J per lap.
  • The vehicle build passed all five gates, including 1369 repository tests (11 skipped), 45 API tests, 130 UI tests and 9 end-to-end tests.

What we learned

  • Clear contracts and protected tests matter more than clever prompts when AI writes the code.
  • Passing tests is not enough. Looking at the screen found bugs the tests did not.
  • Energy accounting is a useful check on a simulation, but it does not prove the model matches a real car.

What's next for Formula Ultimate Workbench

  • Compare the models with real measurements. Everything today is Level-0: reduced-order, synthetic, and meant for comparing ideas, not predicting real lap times.
  • Demonstrate the agent with live AI models. The AI in our video uses the app's built-in rule-based test provider, so its replies are not from a live language model, though the runs it starts are real.
  • Fix a display bug visible in the video, where per-lap energy residuals appear red although the values are within tolerance.
  • Add more circuits and vehicle studies, and let the community share cars.

Built With

Share this project:

Updates

Submission history