Tokamak Lab teaching notes

For middle and high school physics, engineering and computer science teachers. These notes cover a first period, the levels, the misconceptions the app is built to confront, and what it leaves out.

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>

About these notes

Tokamak Lab is a fusion machine and its control program, written in Blocks or Python. A tokamak holds a ring of plasma in a doughnut-shaped vessel with magnets. The plasma is stretched taller than it is wide, which helps it hold its heat, and a stretched plasma drifts up or down on its own, faster the farther it gets. A feedback loop has to push it back, many times a second, for the whole shot.

Levels 1 to 9 are open, and each saves its best shot. Levels 1 to 4 are the up and down drift on a small machine, shown 50 to 100 times slower so the drift can be seen. Levels 5 to 9 are whole shots that last seconds, on the small machine and then a big one: the current, heating, fuel and the limits that end a shot. The levels after them in the Levels list open in later versions.

The two machines are made up for the app and loosely matched in size to real ones, TCV in Switzerland and JET in England. The plasma is one number for its whole volume, so the temperatures the app shows are averages, cooler than the middle of a real plasma, and the app says so wherever it shows one.

A first period

Levels 1 to 3 fit in a period, with time to talk about why a push that is too strong or too late makes things worse.

  1. Run the starter (5 minutes) Open Level 1 and press the play button or the space bar. The coil is off, and the plasma, which starts 1 cm above the middle, drifts up faster and faster and touches the top in 23 thousandths of a second (shown 50 times slower). Ask which way the coil should push.
  2. Push back (10 minutes) In Blocks, set the vertical coil to -50 times the position. It slows the drift but loses at 41.9 thousandths. The plasma drifts 100 cm a second for each cm off the middle, so the push has to beat that: -150 holds it. Name the idea: negative feedback, and a gain.
  3. The slow coil (15 minutes) Level 2's coil takes 20 thousandths of a second to answer. Play the Level 1 program, then -300: the plasma swings back and forth and hits the wall. Add the drift speed: -(300 x position + 2 x drift speed) holds it. Ask what the speed part does.
  4. Late answers (10 minutes) Level 3 makes every answer 4 thousandths late. The Level 2 gains are lost at 27.4 thousandths; -(150 x position + 0.5 x drift speed) holds. Ask why gentler gains stand more delay, and what happens past about 10 thousandths.

The levels

Each level opens with a card that says what to do, gives a hint after a try, and ends with a finish card that says what the shot showed. The panel beside the machine shows the plasma's cross-section and the level's three numbers; a strip along the bottom plots the level's number against time, with its goal and its limit.

LevelThe jobWhat it is built to show
1. Keep it in the middlePush the plasma back with the vertical coilAn instability and negative feedback: the push has to beat the drift of 100 cm a second for each cm (-50 lost, -150 held)
2. The slow coilHold it with a coil that takes 20 thousandths to answerPushing against the speed as well as the position: -300 x position is lost, -(300 x position + 2 x drift speed) holds
3. Late answersHold it with every answer 4 thousandths lateDelay in a loop: the Level 2 gains are lost, gentler ones hold, and past about 10 thousandths no gains can
4. Stretch itStretch it to 1.8 tall in the Shape builder and hold itA taller plasma holds heat longer but drifts 861 cm a second for each cm, so the gains and the loop's speed grow (ten thousand times a second)
5. Light itRamp the current to 0.3 million amperes and keep it thereA circuit with a falling resistance: a steady 2 volts overshoots into the twist limit; easing off holds 0.32 and spends 1.54 of 1.8 webers
6. Ohmic stallsHeat it to 7.5 million degrees on average with current aloneThe current's heating stops growing as the plasma heats: 0.3 MA reaches 7.1, 0.34 MA reaches 8.1, more crosses the twist limit
7. Heat itKeep the big machine's average at 35 million degreesEnergy balance: 10 MW gives 28.7, 20 MW 35.3, 40 MW only 43.6, because a hotter plasma leaks heat faster
8. Too denseFuel it to 90% to 100% of the density limitA limit with a warning: fueling 13 holds 91%, 16 brings the warning, a locked wobble, and the shot is lost after 1.19 s
9. Too much pressureStore 9 million joules at half fieldA tradeoff: more current raises the pressure limit but lowers the twist number; 3.4 MA with 30 MW holds 9.4 MJ

Programs read the plasma and set the machine. Levels 1 to 4: plasma.position(), plasma.drift_speed(), plasma.time() and plasma.set_vertical_coil(). From Level 5: plasma.current(), plasma.flux_left() and plasma.set_loop_voltage(); from 6 plasma.temperature() and plasma.q_edge(); from 7 plasma.set_heating(); from 8 plasma.density(), plasma.density_limit(), plasma.set_fueling() and plasma.warning(); from 9 plasma.pressure_fraction(). plasma.next_tick() waits one control tick. Each call opens at the level that needs it, and a setting a level makes itself is skipped with a note, so a program carried up a level still runs. There is no hold command: the controller is the student's.

What students get wrong, and where the app answers it

What students thinkWhere the app answers it
Magnets simply hold the plasma stillLevel 1: the stretched plasma drifts away on its own, faster the farther it gets, and only a feedback loop keeps it in the middle.
A stronger push always fixes itLevel 2: with a slow coil a stronger push on the position swings the plasma further. Pushing against its speed is what works.
A computer answers instantlyLevel 3: 4 thousandths of delay loses gains that held on Level 2, and an answer about 10 thousandths late cannot catch it at all.
More current means a hotter plasma, without endLevel 6: as the plasma heats, its resistance falls and the current's heating stops growing, near 8 million degrees on average here.
Twice the heating makes it twice as hotLevel 7: 20 MW gives 35 million degrees, 40 MW only 44, because a hotter plasma leaks its heat faster.
More fuel always means more fusionLevel 8: past the density limit the edge cools, a wobble locks and the shot is lost. The warning comes first.
A fusion machine can explodeLosing it: a disruption ends the shot in a few thousandths of a second. It cannot explode like a bomb, though the crash can damage the machine.

What the app simplifies, on purpose

Setting it up for a class

No setup is needed. With free accounts, each student's levels, best shots, shape and program save as one project. Typed words in a shared project, its name and the program, pass the platform's filter.

Slower and Faster change only how fast the shot plays on the screen; the plasma's numbers do not change, and every shot runs the same on any computer. File, Shot report prints a sheet with the shot's numbers, its trace and the program. How it works, in the Help menu, covers the rules a student needs.

Standards

Levels 1 to 3 need only one multiplication and an addition in a loop, and suit grade 8. Levels 4 to 9 fit high school physics and engineering classes.

More help

Is something on this page wrong or not clear? Write to us.

Page last reviewed December 2026.
Google, Google Classroom and Chromebook are trademarks of Google LLC.