Major components of circular particle accelerators (for example LHC in CERN) are its magnets. In this Demonstration, you can study the forces on moving charged particles in a magnetic field.
The locator represents a particle moving perpendicularly to the screen. If the particle is positively charged, it moves in the direction into the screen, away from you; if the particle is negative, it moves in the direction out of the screen, toward you.
Magnetic dipoles are used to deflect the particle beam into a circular orbit. Magnetic quadrupole magnets, in addition, focus the beam in a transverse plane (vertically by focusing or horizontally by defocusing). Magnetic sextupoles are used to focus the beam in a longitudinal direction (changing the so-called chromaticity of the beam).
The magnetic force (Lorentz force) on a particle with charge in a magnetic field of strength B moving with velocity v is:
F= v × B.
This force is centripetal, directing the particle into a circular path. This is the role of the main dipole magnets.
Quadrupole magnets can focus the beam of particles, but only in one direction. They focus the charged particles in the vertical direction, but unfortunately also defocus them in the horizontal direction. It is possible to focus particles back into the horizontal direction with a quadrupole magnet rotated by 90 degrees. The optimal result is obtained by alternating these two orientations.
The strength of the magnetic field along the focusing axis of a quadrupole grows linearly from the center of the field, where it is zero. There are many pairs of focusing-defocusing magnets (so called FODO cells) in circular accelerators.
Sextupoles can be used in combination with quadrupoles to align the particle momentum of particles as the radial positions of the circulating particles change with momentum. The strength of the field of sextupoles along the horizontal axis grows quadratically from the center, where it is zero.