Index29 AUG 20263 min
I built a nuclear power plant simulator that runs in your browser
Xenon-135 peaks about nine hours after you shut a reactor down, and until it decays a restart is physically impossible. Criticality is a full 4-loop PWR running at 60 fps in your browser, so you can watch that happen instead of reading it off a whiteboard.
- Nuclear
- AI systems

When I was studying nuclear engineering, the concepts that cost me the most all shared one trait: they describe fields nobody can see. The 1,200 °C gradient across four millimeters of fuel ceramic. The neutron flux flattening and shifting as a control bank moves. The xenon-135 that peaks nine hours after you shut the reactor down, making a restart physically impossible until physics says otherwise. We learned all of it as systems of coupled differential equations on a whiteboard — and I spent years wishing I could just watch them happen.
I ended up writing my master's thesis on exactly this problem: numerical methods for coupled multiphysics calculations in reactors — for example, whether the RA-10 reactor's second shutdown system, the draining of a heavy-water tank, empties fast enough to kill criticality. Back then, running an end-to-end plant simulation on my own computer was unthinkable.
It isn't anymore. Criticality is a full 4-loop PWR — 3400 MWth, 1156 MWe — running at 60 fps in your browser, no install, no signup: criticality.fedecaccia.com
What it solves
Every existing educational simulator renders instruments: gauges, setpoints, control-room panels. Criticality renders the phenomenon. The engine couples:
- Point kinetics with 6 delayed-neutron groups
- A 1-D axial flux shape that is solved, not prescribed — insert the control bank and watch the power profile deform
- The I-135/Xe-135 and Pm-149/Sm-149 poison chains
- Decay heat as 9 fission-product groups fitted to the ANS-5.1 standard, driven by the whole power history
- Radial fuel-pellet conduction with temperature-dependent conductivity (Fink correlation) — the reason the pellet's temperature profile steepens toward the centerline
- The primary loop transported in enthalpy across 7 volumes, with the steam generator as tanks in series, a pressurizer, and a thin secondary side
The reactivity balance is decomposed term by term on screen — rods, boron, Doppler, moderator, xenon, samarium. Watch that bar for ten minutes and you understand reactor control.
The scenario to try first: scram from full power, then try to restart four hours later. You can't — xenon peaks ~9 hours after shutdown, at about twice its equilibrium worth. Speed time up 600× and watch the whole iodine pit. Come back at +30 hours and the restart works.
How I know the engine does what it says
This is the part I care most about. The engine ships with 166 automated comparisons against independent references — Ganapol's 2024 high-precision kinetics transients, the ANS-5.1 decay-heat standard, the closed-form iodine–xenon solution, Nordheim–Fuchs excursion scaling, a published 4-loop design point — each with a tolerance fixed before running. The limitations are documented with the same care: single-phase primary, fresh core, 1-D flux; the app tells you when a run leaves the validated envelope. It is an educational plant model, honestly bounded — not engineering software, and not operator training.
One more property that mattered to me: the engine is deterministic. A run is defined by its initial conditions plus the input log, so any run can be shared by URL and reproduced exactly, step by step.
How it was built
In school, rigor meant a full day hunting a sign error in Fortran. That rigor didn't go away — it moved. Claude Code agents wrote most of the implementation, in loops of execute → review → audit → test, in layers. My job was choosing which equations are worth solving, designing the numerical methods — implicit Euler with static condensation for the stiff kinetics, exact exponential integrators for the poison chains, RK4 where nothing is stiff — reviewing every physics-related line, and writing the verification targets. The benchmark suite is the contract: code that fails a benchmark isn't done.
What's next
BWR and SMR are on the roadmap — the void coefficient is a completely different teaching story — and each component's model can keep gaining fidelity. If you teach reactor physics, there's an instructors page on the site: I'm building assignment and auto-grading features and I want input from the people who would use them.
Try it, break it, and tell me what you find: criticality.fedecaccia.com
— Federico Caccia, MSc Nuclear Engineering (Instituto Balseiro)