Free · no signup to try · runs on Chromebooks

Tokamak Lab

A tokamak holds a ring of plasma inside a doughnut of magnets, in a big machine hotter at its middle than the center of the Sun, and it only works while a control program keeps it there. A stretched plasma drifts up or down on its own, faster the farther it gets, and a fast feedback loop pushes it back thousands of times a second. Tokamak Lab gives every student that loop to write, in Blocks or Python, on two made-up machines loosely matched to real ones. First they hold the plasma in the middle against a slow coil and late answers. Then they run whole shots: ramp the current, heat the plasma, add fuel, and stay inside the limits that end real shots in a fraction of a second.

This is the whole app, opening on Level 1 with the starter program ready. Press the round play button or the space bar to run it. The guide walks through the first minute: the plasma gets away, and why.

Open it full screen

Using this with a class? Make a free class and add your students yourself: each gets a username and password, with no email or Google account needed. Or give them one join code. Using Google Classroom? Post the link there; with a free class, the link also puts each student in your class, so you see their work. mytekDev is also available from the Google Workspace Marketplace, so your school's Google admin can install it for everyone.A first lesson: Open it on the projector at Level 1 and press play. The starter program leaves the coil off, and the plasma, which starts 1 cm above the middle, drifts up and touches the top of the vessel in 23 thousandths of a second (the app shows it 50 times slower). Ask which way the coil should push, and how hard. Then set the coil to -50 times the position and play: it slows the drift but still loses. At -150 it holds.

Set up a free class Share to Google Classroom
Put this on your class site

Students can use Tokamak Lab right on your page, with no account. What they make stays on that page; to keep their work, they make a free account.

Google Sites: Insert, then Embed, then By URL, and paste this address.

https://mytekdev.com/try/tokamaklab?embed=1

Canvas, a blog, or any page that takes HTML: paste this code where you edit the page as HTML.

<iframe src="https://mytekdev.com/try/tokamaklab?embed=1" width="100%" height="640" style="border:0" allow="fullscreen" title="Tokamak Lab demo from mytekDev"></iframe>

What a student actually does

Level 1 starts with a plasma 1 cm above the middle of the vessel and a starter program that leaves the vertical coil off. The plasma drifts away faster the farther it gets, 100 cm a second for every cm off the middle, and touches the top in 23 thousandths of a second. Students push back with the coil, harder the farther it is: -50 times the position slows it but loses; anything stronger than the drift, such as -150, holds it. The app shows these shots 50 times slower, and says so.

Level 2 gives the coil a lag: it takes 20 thousandths of a second to reach what it is told, so a strong push on the position alone swings the plasma back and forth until it hits the wall. Pushing against the drift speed too, -(300 x position + 2 x drift speed), holds it. Level 3 makes every answer reach the coil 4 thousandths of a second late, and the Level 2 gains are lost: gentler gains, -(150 x position + 0.5 x drift speed), stand the delay. Level 4 stretches the plasma in the Shape builder to 1.8 times as tall as wide, the way real machines do because a taller plasma holds its heat longer. It now drifts 861 cm a second for each cm, and the loop runs ten thousand times a second.

From Level 5 the machine holds the plasma in the middle by itself, as real machines do, and the shots last seconds. Level 5 lights the plasma: the program sets the loop voltage that drives the current, and a steady 2 volts drives it past the twist limit. Easing off as the current nears 0.3 million amperes holds it, and the card counts the magnetic flux the shot spent. Level 6 shows why the current alone cannot make fusion: as the plasma heats it lets the current through more easily, so the current's heating stops growing near 8 million degrees on average.

Level 7 moves to the big machine and adds heating, beams and radio waves of up to 40 megawatts. Twice the heating does not make it twice as hot: 10 megawatts gives about 29 million degrees and 20 gives 35, because a hotter plasma leaks its heat faster. Level 8 adds fuel up to 90% to 100% of the density limit, where a little too much brings a warning, then a locked wobble, and the shot is lost. Level 9 runs the magnets at half field and asks for 9 million joules stored: more current raises the pressure limit but twists the field lines tighter, and students choose it in the Shape builder.

Programs read the plasma and set the machine: plasma.position(), plasma.drift_speed() and plasma.set_vertical_coil() for the first levels, then plasma.current(), plasma.temperature(), plasma.density(), plasma.pressure_fraction(), plasma.q_edge() and plasma.warning(), with plasma.set_loop_voltage(), plasma.set_heating() and plasma.set_fueling(). Each call opens at the level that needs it. Every shot gets a numbered shot report with its numbers, its trace and the program that ran, ready to print.

Level 8 on the big machine, a second into the shot. The cross-section panel at the top right is titled in amber: Warning: a locked wobble. The strip along the bottom plots the density as a fraction of its limit climbing from about half to just over the dashed limit line, with the fueling rate in faint orange below it.

Level 8, too dense: fueling at 16 pushes the density past its limit. The warning comes first, then the locked wobble, and the shot is lost 1.19 seconds in. Fueling at 13 holds it at 91%.

What they are learning while they work

Nothing here is presented as a lesson. This is what the levels are made of.

What the student doesWhat it is
Watches the plasma speed up as it drifts away Instability. A system that moves away from where it should be faster the farther it gets. Without a push back, it runs away.
Sets the coil to -150 times the position Negative feedback and gain. Measure, compare, push the other way, harder the farther off it is. The push has to beat the drift.
Adds the drift speed to the push on Level 2 Proportional and derivative control. Pushing against the speed as well as the position starts the correction before the plasma gets far, which a slow coil needs.
Turns the gains down when every answer is late Delay in a control loop. An answer about where the plasma was is wrong about where it is. A strong push on old news pushes the wrong way.
Eases the loop voltage off as the current nears its goal Electric circuits and resistance. The plasma is a circuit: a voltage drives its current, its resistance falls as it heats, and the solenoid can give only so much.
Heats it with 10, 20, then 40 megawatts Energy balance. The temperature settles where the heat going in equals the heat leaking out, and a hotter plasma leaks faster.
Fuels it to 91% of the density limit Operating limits and warnings. Real machines run close to limits that end a shot, and watch for the warning signs before them.
Chooses 3.4 million amperes to store 9 million joules Tradeoffs in design. More current raises one limit and lowers another. The best setting is a choice between two edges.
Writes plasma.set_heating(20) inside a loop that runs every tick Loops, variables and functions. A control program reads, decides and sets, again and again, at a fixed rate.

How to tell whether it landed

Ask, and let them show you in the app. A student who has understood it can answer these without help.

Use it in your subject

Not a technology class? Then the app is how students show what they learned in your unit. More projects for every subject.

Physics (NGSS HS-PS1-8, HS-PS2-5, HS-PS3-3)

Nuclear fusion and why it needs tens of millions of degrees, currents and magnetic fields, energy in and energy out, and a device built to work within limits.

Engineering (NGSS HS-ETS1-2, HS-ETS1-4)

Feedback control with a slow actuator and a delay, and a design tradeoff tested with a computer model before anything is built.

Computer science (CSTA 3A-AP-13, 3A-AP-17)

A program that runs in a loop at a fixed rate, reads sensors, decides and acts, written in Blocks or Python.

Math

Rates of change, a quantity that grows in proportion to itself, and reading two quantities against time on one strip.

Practical notes

For classes that will never stand next to a fusion machine

A tokamak hall is closed during a shot, and a shot is over in seconds, its control loop far too fast to watch. Here every student runs their own machine, slowed down so the drift can be seen, and writes the loop that real control rooms write. Nothing is hot, nothing is radioactive, and a lost plasma comes back with the round arrow.

Common questions

Is it free?

Yes. Tokamak Lab has no paid tier, and it can be tried right on this page without an account. Saving needs a free account.

Does it work on a Chromebook?

Yes. It runs in the browser with nothing to install.

Do students need to know how to code?

No. Level 1 is one block with one number in it, the Blocks tab is drag and drop, and every level's card says what to try. Python is there for students who want it, and the Python tab shows what the blocks say.

Are the machines real?

No. The two machines are made up for the app, and loosely matched in size to real ones: the small machine to TCV in Switzerland, the big one to JET in England. No real lab's name or logo is used as a brand, and every number is an illustration from the app's own model.

What does it simplify?

The plasma is one number for its whole volume, so the temperature is an average, cooler than the middle a real machine reports. The up and down drift follows one simple rule. From Level 5 the machine's own loop holds the position. There is no fusion yet on Levels 1 to 9, no radiation, and nothing a real control room would call a safety system. Help, What this leaves out, lists the rest.

Are more levels coming?

Yes. Levels 1 to 9 are open. The levels listed after them, ending a shot calmly, fusion heating itself on a compact machine and the giant machine, open in later versions.

Can students share their work?

Yes. A project saves every level's best shot, the program and the shape. Typed words in a shared project, its name and the program, pass the platform's filter.

Still have a question? Ask us, and a person will write back.

Where to go next

Start with Tokamak Lab

Trying it costs nothing and takes about five minutes. An account is what makes the work last.

Tokamak Lab is one of the making apps on the platform. Every level runs on one model of the machine, so the feedback a student writes on Level 1 is the loop the machine runs by itself from Level 5.
Page last reviewed December 2026.
Google, Google Classroom and Chromebook are trademarks of Google LLC.