For NotSchool
Maths Programming

LINAC — how it works



You see a large orange "tank" that goes all the way to the far wall. There are these white "handles" sticking out horizontally.
What you cannot see on the photo is that the handles are not evenly spaced, they get further apart as you go to the far wall.

How it works:

(I'm afraid we need to go through this before we can write any code).

Programming rule number 1:
study the problem in great detail before writing a single line of code

A LINAC takes a subatomic particle and makes it go very fast, possibly close to the speed of light.
These particles are extremely small, so they cannot be pushed by anything material. They have to be pushed by electric fields.

The only particles that can feel an electric field are charged particles.
Atoms are made from a nucleus that is a tight ball of protons (positive) and neutrons (neutral) and orbiting electrons (negative charge).  Thas classic picture is this:

(it's of course not right but it will do for now)

Therefore, a LINAC will have to work with protons or with electrons. Neutrons are no good: no way to get a hold on them.
Protons are preferred because they are 1836 times more massive than electrons, so if they can be accelerated then you can use them more effectively, just like a heavy hammer is more effective than a light one.

The easiest way to get protons is to use hydrogen gas. Hydrogen gas was used for toy balloons, but it is explosive and therefore it is now only used industrially (welding torches). Why use hydrogen? Because it is the simplest atom conceivable: it has a single proton for nucleus and a single electron orbiting it. When hydrogen gas is heated its electrons will become detached and that leaves the protons.

The LINAC starts off with a proton. One simple rule of electric fields is that like charges repel and opposite charges attract.

In the above picture you see a proton (red, I always use red for positive electric charge) and a disc. The disc is green because I made it negative.
Thus, the proton will be attracted to the disc. The yellow force arrow shows this.

The trick is to put a hole into the disc, so that when the proton moves towards the disc it will not collide with it, but it will go through the hole.

The next thing to do to make the LINAC work

Place another disc behind the first one. As soon as the proton has gone through the hole of the first disc, make the second disc negative and the first one positive.
Then the proton will be pushed away from the first disc and be attracted to the second one.

This can be repeated, lots of discs in a row and then making them positive or negative at the right time. Each time the proton passes through a hole it gets another push from the electric field.

It goes faster and faster, and so the discs will have to be spaced further apart OR we have to change the charge of the discs faster.

In the real LINAC in the photo, the discs are inside the orange tank, and the air is pumped out of the whole tank so that the protons do not bump into atoms of the air.

Here is a photo of the inside of another LINAC:

You can see the discs with the holes clearly.

In the simulator we should simulate correctly the exact electric force on the proton and also the speed of the proton as it is pushed by the electric force.

Valid XHTML 1.0 StrictValid CSS

next planned revision: 2009-01