Simulate faster, build faster: how AI agents are speeding our path to fusion electricity
December 3, 2026
Rodrigo Nemmen
Manager, Computational Science

We gave a decade-old Fortran code to a team of AI agents. Eight days later, it ran 12 times faster, significantly speeding up our design loop.
Every pulse at Helion for the last 10+ years has been informed by a 35 thousand-line Fortran code. The code performs magnetohydrodynamic (MHD) simulations that solve equations describing how plasma flows and interacts with magnetic fields inside the generators, and these simulations have largely guided the design and upgrades of our machines.
Technology has advanced rapidly over the last decade though, and the code struggles to keep up with the pace we’re pushing. Replaying a single Polaris pulse takes 41 hours and modernizing it by hand could take two experts up to three years. However, using a team of AI coding agents, we created a new version of the code in just eight days.
Now, replaying the same Polaris pulse takes just three hours, and that speed matters beyond our simulation team. Every design question we can answer through simulation in hours is one we save in weeks and months of building and testing hardware. It allows us to prioritize our hardware work, ultimately bringing clean, reliable fusion electricity to the grid sooner.
Plasma simulation at Helion to-date
The original Fortran code has been the de facto standard at Helion for simulating the global dynamics of field reversed configurations (FRCs) for over a decade. An FRC is a self-contained ring of plasma that carries its own electric current and traps its own magnetic field, a bit like a smoke ring of ionized gas. The code solves two-dimensional, axisymmetric resistive MHD: rather than tracking individual particles, it treats the plasma as an electrically conducting fluid, evolved together with the magnetic field lines that thread it. Resistivity lets the field slowly slip through the plasma, much as viscosity diffuses momentum in a gas, and the model carries separate ion and electron temperatures because the two heat and cool at different rates.
If you've worked with computational fluid dynamics (CFD), think of it as Navier-Stokes with two additions: a Lorentz body force wherever electric currents cross magnetic fields, and an induction equation that evolves the magnetic field as the flow carries and stretches it. The field also makes heat transport strongly directional: heat moves easily along field lines but barely across them, which makes the equations stiff and expensive to solve.
What makes the code unique is that it doesn't simulate the plasma in isolation. The vacuum vessel, end walls, and coils are cut into the computational mesh, and the pulsed-power system (capacitor banks, switches, diodes, etc.) is treated as part of the physics. In a real pulse, the coil currents aren't known in advance. A moving FRC changes the inductive load every capacitor bank sees, and the banks respond. The code captures that two-way conversation by solving for the coil currents and the plasma's magnetic field together, in a single system of equations. That is why its predictions agree well with our measurements, and why the code models inform our machines’ design and operations.
The bottleneck: waiting on simulations
That accuracy comes at a cost: time. When each simulation takes days, every design question waits days for an answer, and that sets the pace at which we can build. Essentially a serial code, it was written over a decade ago in a mix of four generations of Fortran. It barely uses the extra cores of a modern workstation, let alone a GPU. At 35 thousand lines, it's about the size of a classic Doom game from 1993, and changing a single line can have unanticipated consequences and literally break the physics.
We needed to drastically improve the speed, but quick fixes wouldn't cut it. Moving only the slowest step onto a GPU would have made it 1.6 times faster at best. A true fix required a ground-up rewrite, but doing it by hand could take two to three years, and our design work would continue waiting days on every simulation in the meantime.
Enter AI coding agents.
Building the solution
The new code needed a different execution model to be able to deliver simulations to our engineers in hours rather than days. We opted for C++ and CUDA, with the entire time step living on the GPU. Three months went into the prep work alone: a comprehensive design document, better documentation of the existing code, and a robust battery of physics tests.
Then, roughly 150 AI agents went to work for seven days. Some ported pieces of the old code into the new code while others tried to break what had been built, and every piece had to match the original code’s results before the work moved on.
There were surprises along the way. During the feasibility analysis, the AI advised that a GPU port wouldn't be worth it. After some pushback, it went back, tested that conclusion, and falsified its own hypothesis. This shows that an AI's first answer to a hard technical question deserves scrutiny, and that, when challenged, it can overturn its own conclusions.
Introducing Aquila: faster simulation for faster fusion
After a month of performance tuning and hardening, Aquila is now our go-to simulation code, consisting of 61,000 lines of C++ and CUDA, with the entire time step running on the GPU. It's a drop-in replacement, allowing our existing campaigns and post-processing libraries to work without modification. Aquila's physics follow our original code, but the solvers are new. Half of the Fortran didn't come along, mostly legacy models not used in production in years. We also dropped the implicit heat-conduction solve that consumed 53% of the original code’s run time.
A Polaris production run that took the prior code 41 hours now takes three, on a single workstation GPU. For a subscale system like Tiny Merge, models that took 11 hours now take 90 minutes. Design questions that used to wait nearly two days for an answer now gets one the same afternoon.
For Orion, Aquila will impact both speed and resolution. Our current Polaris mesh uses a few percent of the GPU's memory, and with upcoming improvements like adaptive mesh refinement, we'll be able to resolve the separatrix and the compression region at a level our prior code couldn't reach.
The agents bought us necessary time and an expedited design path to our mission of delivering abundant, clean, reliable fusion electricity to the grid.

.png)

































